![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <commonlib/storage.h>
#include <delay.h>
#include <endian.h>
#include <string.h>
#include "mmc.h"
#include "sd_mmc.h"
#include "storage.h"
Go to the source code of this file.
Functions | |
uint64_t | sd_mmc_extract_uint32_bits (const uint32_t *array, int start, int count) |
static uint32_t | sd_mmc_calculate_transfer_speed (uint32_t csd0) |
int | sd_mmc_go_idle (struct storage_media *media) |
int | sd_mmc_send_status (struct storage_media *media, ssize_t tries) |
int | sd_mmc_set_blocklen (struct sd_mmc_ctrlr *ctrlr, int len) |
int | sd_mmc_enter_standby (struct storage_media *media) |
Definition at line 29 of file sd_mmc.c.
Referenced by sd_mmc_enter_standby().
int sd_mmc_enter_standby | ( | struct storage_media * | media | ) |
Definition at line 139 of file sd_mmc.c.
References CARD_IN_PROGRESS, CARD_RSP_R2, CARD_RSP_R6, CARD_TIMEOUT, CARD_UNUSABLE_ERR, storage_media::cid, mmc_command::cmdarg, mmc_command::cmdidx, CONFIG, storage_media::csd, storage_media::ctrlr, mmc_command::flags, IS_SD, media, memcpy(), MMC_CMD_ALL_SEND_CID, MMC_CMD_SEND_CSD, mmc_complete_op_cond(), mmc_send_op_cond(), MMC_VERSION_1_2, MMC_VERSION_1_4, MMC_VERSION_2_2, MMC_VERSION_3, MMC_VERSION_4, MMC_VERSION_UNKNOWN, NULL, storage_media::rca, storage_media::read_bl_len, mmc_command::resp_type, mmc_command::response, SD_CMD_SEND_RELATIVE_ADDR, sd_mmc_calculate_transfer_speed(), sd_mmc_debug, sd_mmc_error, sd_mmc_extract_uint32_bits(), sd_mmc_go_idle(), SD_MMC_IO_RETRIES, sd_mmc_send_status(), sd_send_if_cond(), sd_send_op_cond(), sd_mmc_ctrlr::send_cmd, SET_BUS_WIDTH, SET_CLOCK, storage_media::tran_speed, storage_media::version, version, and storage_media::write_bl_len.
Referenced by storage_setup_media().
Definition at line 17 of file sd_mmc.c.
Referenced by mmc_update_capacity(), sd_mmc_enter_standby(), and storage_startup().
int sd_mmc_go_idle | ( | struct storage_media * | media | ) |
Definition at line 68 of file sd_mmc.c.
References CARD_RSP_NONE, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, mmc_command::flags, mdelay(), sd_mmc_ctrlr::mdelay_after_cmd0, sd_mmc_ctrlr::mdelay_before_cmd0, media, MMC_CMD_GO_IDLE_STATE, NULL, mmc_command::resp_type, and sd_mmc_ctrlr::send_cmd.
Referenced by early_mmc_wake_hw(), mtk_emmc_early_init(), and sd_mmc_enter_standby().
int sd_mmc_send_status | ( | struct storage_media * | media, |
ssize_t | tries | ||
) |
Definition at line 94 of file sd_mmc.c.
References CARD_COMM_ERR, CARD_RSP_R1, CARD_TIMEOUT, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, mmc_command::flags, media, MMC_CMD_SEND_STATUS, MMC_STATUS_CURR_STATE, MMC_STATUS_MASK, MMC_STATUS_RDY_FOR_DATA, NULL, storage_media::rca, mmc_command::resp_type, mmc_command::response, sd_mmc_error, sd_mmc_trace, sd_mmc_ctrlr::send_cmd, and udelay().
Referenced by mmc_select_hs(), mmc_select_hs400(), mmc_switch(), sd_mmc_enter_standby(), storage_block_erase(), storage_read(), and storage_write().
int sd_mmc_set_blocklen | ( | struct sd_mmc_ctrlr * | ctrlr, |
int | len | ||
) |
Definition at line 128 of file sd_mmc.c.
References CARD_RSP_R1, mmc_command::cmdarg, mmc_command::cmdidx, mmc_command::flags, MMC_CMD_SET_BLOCKLEN, NULL, mmc_command::resp_type, and sd_mmc_ctrlr::send_cmd.
Referenced by storage_block_setup().