![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <commonlib/sd_mmc_ctrlr.h>
#include <commonlib/storage.h>
#include <delay.h>
#include <endian.h>
#include "sd_mmc.h"
#include "storage.h"
Go to the source code of this file.
Functions | |
int | sd_send_if_cond (struct storage_media *media) |
int | sd_send_op_cond (struct storage_media *media) |
static int | sd_switch (struct sd_mmc_ctrlr *ctrlr, int mode, int group, uint8_t value, uint8_t *resp) |
static void | sd_recalculate_clock (struct storage_media *media) |
int | sd_change_freq (struct storage_media *media) |
int | sd_set_bus_width (struct storage_media *media) |
int | sd_set_partition (struct storage_media *media, unsigned int partition_number) |
const char * | sd_partition_name (struct storage_media *media, unsigned int partition_number) |
int sd_change_freq | ( | struct storage_media * | media | ) |
Definition at line 120 of file sd.c.
References ALLOC_CACHE_ALIGN_BUFFER, be32toh(), mmc_data::blocks, mmc_data::blocksize, sd_mmc_ctrlr::bus_hz, BUS_TIMING_SD_HS, sd_mmc_ctrlr::caps, storage_media::caps, CARD_RSP_R1, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, DATA_FLAG_READ, delay(), mmc_data::dest, DRVR_CAP_4BIT, DRVR_CAP_HS, DRVR_CAP_HS52, mmc_command::flags, mmc_data::flags, media, MMC_CMD_APP_CMD, ntohl, NULL, storage_media::rca, mmc_command::resp_type, storage_media::scr, SD_CMD_APP_SEND_SCR, SD_DATA_4BIT, SD_HIGHSPEED_BUSY, SD_HIGHSPEED_SUPPORTED, sd_mmc_error, sd_recalculate_clock(), sd_switch(), SD_SWITCH_CHECK, SD_SWITCH_SWITCH, SD_VERSION_1_0, SD_VERSION_1_10, SD_VERSION_2, sd_mmc_ctrlr::send_cmd, SET_TIMING, udelay(), and storage_media::version.
Referenced by storage_startup().
const char* sd_partition_name | ( | struct storage_media * | media, |
unsigned int | partition_number | ||
) |
Definition at line 280 of file sd.c.
Referenced by storage_partition_name().
|
static |
Definition at line 109 of file sd.c.
References storage_media::caps, CLOCK_25MHZ, CLOCK_50MHZ, storage_media::ctrlr, DRVR_CAP_HS, media, and SET_CLOCK.
Referenced by sd_change_freq().
int sd_send_if_cond | ( | struct storage_media * | media | ) |
Definition at line 15 of file sd.c.
References CARD_RSP_R7, CARD_UNUSABLE_ERR, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, mmc_command::flags, media, NULL, mmc_command::resp_type, mmc_command::response, SD_CMD_SEND_IF_COND, SD_VERSION_2, sd_mmc_ctrlr::send_cmd, storage_media::version, and sd_mmc_ctrlr::voltages.
Referenced by sd_mmc_enter_standby().
int sd_send_op_cond | ( | struct storage_media * | media | ) |
Definition at line 35 of file sd.c.
References CARD_RSP_R1, CARD_RSP_R3, CARD_UNUSABLE_ERR, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, mmc_command::flags, storage_media::high_capacity, media, MMC_CMD_APP_CMD, NULL, storage_media::ocr, OCR_BUSY, OCR_HCS, storage_media::rca, mmc_command::resp_type, mmc_command::response, SD_CMD_APP_SEND_OP_COND, SD_MMC_IO_RETRIES, SD_VERSION_1_0, SD_VERSION_2, sd_mmc_ctrlr::send_cmd, udelay(), storage_media::version, and sd_mmc_ctrlr::voltages.
Referenced by sd_mmc_enter_standby().
int sd_set_bus_width | ( | struct storage_media * | media | ) |
Definition at line 239 of file sd.c.
References storage_media::caps, CARD_RSP_R1, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, DRVR_CAP_4BIT, mmc_command::flags, media, MMC_CMD_APP_CMD, NULL, storage_media::rca, mmc_command::resp_type, SD_CMD_APP_SET_BUS_WIDTH, sd_mmc_ctrlr::send_cmd, and SET_BUS_WIDTH.
Referenced by storage_startup().
int sd_set_partition | ( | struct storage_media * | media, |
unsigned int | partition_number | ||
) |
Definition at line 268 of file sd.c.
References media, and storage_media::partition_config.
Referenced by storage_set_partition().
|
static |
Definition at line 89 of file sd.c.
References mmc_data::blocks, mmc_data::blocksize, CARD_RSP_R1, mmc_command::cmdarg, mmc_command::cmdidx, DATA_FLAG_READ, mmc_data::dest, mmc_command::flags, mmc_data::flags, mmc_command::resp_type, SD_CMD_SWITCH_FUNC, sd_mmc_ctrlr::send_cmd, and value.
Referenced by sd_change_freq().