| /OK3568_Linux_fs/u-boot/drivers/mmc/ |
| H A D | mmc.c | 16 #include <mmc.h> 36 static struct mmc mmc_static; 37 struct mmc *find_mmc_device(int dev_num) in find_mmc_device() 44 struct mmc *m = &mmc_static; in mmc_do_preinit() 52 struct blk_desc *mmc_get_blk_desc(struct mmc *mmc) in mmc_get_blk_desc() argument 54 return &mmc->block_dev; in mmc_get_blk_desc() 59 __weak int board_mmc_getwp(struct mmc *mmc) in board_mmc_getwp() argument 64 int mmc_getwp(struct mmc *mmc) in mmc_getwp() argument 68 wp = board_mmc_getwp(mmc); in mmc_getwp() 71 if (mmc->cfg->ops->getwp) in mmc_getwp() [all …]
|
| H A D | mmc.su | |
| H A D | mmc-uclass.su | |
| H A D | mmc_legacy.c | 10 #include <mmc.h> 17 struct mmc *find_mmc_device(int dev_num) in find_mmc_device() 19 struct mmc *m; in find_mmc_device() 23 m = list_entry(entry, struct mmc, link); in find_mmc_device() 30 printf("MMC Device %d not found\n", dev_num); in find_mmc_device() 41 struct blk_desc *mmc_get_blk_desc(struct mmc *mmc) in mmc_get_blk_desc() argument 43 return &mmc->block_dev; in mmc_get_blk_desc() 53 struct mmc *m; in mmc_do_preinit() 57 m = list_entry(entry, struct mmc, link); in mmc_do_preinit() 74 void mmc_list_add(struct mmc *mmc) in mmc_list_add() argument [all …]
|
| H A D | mmc-uclass.c | 9 #include <mmc.h> 21 struct mmc *mmc = mmc_get_mmc_dev(dev); in dm_mmc_send_cmd() local 26 mmmc_trace_before_send(mmc, cmd); in dm_mmc_send_cmd() 31 mmmc_trace_after_send(mmc, cmd, ret); in dm_mmc_send_cmd() 41 mmc->timing == MMC_TIMING_MMC_HS200 && in dm_mmc_send_cmd() 44 ops->execute_tuning(mmc->dev, opcode); in dm_mmc_send_cmd() 48 printf("MMC error: The cmd index is %d, ret is %d\n", cmd->cmdidx, ret); in dm_mmc_send_cmd() 58 struct mmc *mmc = mmc_get_mmc_dev(dev); in dm_mmc_send_cmd_prepare() local 62 mmmc_trace_before_send(mmc, cmd); in dm_mmc_send_cmd_prepare() 67 mmmc_trace_after_send(mmc, cmd, ret); in dm_mmc_send_cmd_prepare() [all …]
|
| H A D | meson_gx_mmc.c | 11 #include <mmc.h> 16 static inline void *get_regbase(const struct mmc *mmc) in get_regbase() argument 18 struct meson_mmc_platdata *pdata = mmc->priv; in get_regbase() 23 static inline uint32_t meson_read(struct mmc *mmc, int offset) in meson_read() argument 25 return readl(get_regbase(mmc) + offset); in meson_read() 28 static inline void meson_write(struct mmc *mmc, uint32_t val, int offset) in meson_write() argument 30 writel(val, get_regbase(mmc) + offset); in meson_write() 33 static void meson_mmc_config_clock(struct mmc *mmc) in meson_mmc_config_clock() argument 39 if (mmc->clock > 16000000) { in meson_mmc_config_clock() 46 clk_div = DIV_ROUND_UP(clk, mmc->clock); in meson_mmc_config_clock() [all …]
|
| H A D | mmc_write.c | 18 static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt) in mmc_erase_t() argument 25 if (mmc->high_capacity) { in mmc_erase_t() 28 end = (start + blkcnt - 1) * mmc->write_bl_len; in mmc_erase_t() 29 start *= mmc->write_bl_len; in mmc_erase_t() 39 if (IS_SD(mmc)) { in mmc_erase_t() 46 if (mmc->esr.mmc_can_trim) in mmc_erase_t() 56 err = mmc_send_cmd(mmc, &cmd, NULL); in mmc_erase_t() 63 err = mmc_send_cmd(mmc, &cmd, NULL); in mmc_erase_t() 71 err = mmc_send_cmd(mmc, &cmd, NULL); in mmc_erase_t() 78 puts("mmc erase failed\n"); in mmc_erase_t() [all …]
|
| H A D | mmc_private.h | 13 #include <mmc.h> 15 extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, 18 int mmc_send_cmd_prepare(struct mmc *mmc, struct mmc_cmd *cmd, 21 extern int mmc_send_status(struct mmc *mmc, int timeout); 22 extern int mmc_set_blocklen(struct mmc *mmc, int len); 88 void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd); 89 void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret); 90 void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd); 92 static inline void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd) in mmmc_trace_before_send() argument 96 static inline void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, in mmmc_trace_after_send() argument [all …]
|
| H A D | fsl_esdhc_spl.c | 8 #include <mmc.h> 27 struct mmc *mmc = find_mmc_device(0); in mmc_spl_load_image() local 28 if (!mmc) { in mmc_spl_load_image() 29 puts("spl: mmc device not found!!\n"); in mmc_spl_load_image() 33 if (mmc_init(mmc)) { in mmc_spl_load_image() 34 puts("MMC init failed\n"); in mmc_spl_load_image() 38 blk_start = ALIGN(offs, mmc->read_bl_len) / mmc->read_bl_len; in mmc_spl_load_image() 39 blk_cnt = ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len; in mmc_spl_load_image() 41 err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, in mmc_spl_load_image() 44 puts("spl: mmc read failed!!\n"); in mmc_spl_load_image() [all …]
|
| H A D | pxa_mmc_gen.c | 4 * Loosely based on the old code and Linux's PXA MMC driver 11 #include <asm/arch/regs-mmc.h> 15 #include <mmc.h> 35 #error "This CPU isn't supported by PXA MMC!" 51 static int pxa_mmc_wait(struct mmc *mmc, uint32_t mask) in pxa_mmc_wait() argument 53 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_wait() 70 static int pxa_mmc_stop_clock(struct mmc *mmc) in pxa_mmc_stop_clock() argument 72 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_stop_clock() 98 static int pxa_mmc_start_cmd(struct mmc *mmc, struct mmc_cmd *cmd, in pxa_mmc_start_cmd() argument 101 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_start_cmd() [all …]
|
| H A D | Kconfig | 1 menu "MMC Host controller Support" 3 config MMC config 4 bool "MMC/SD/SDIO card support" 10 If you want MMC/SD/SDIO support, you should say Y here and 14 bool "support for MMC/SD write operations" 15 depends on MMC 18 Enable write access to MMC and SD Cards 21 bool "Enable MMC controllers using Driver Model" 24 This enables the MultiMediaCard (MMC) uclass which supports MMC and 31 bool "Enable MMC controllers using Driver Model in SPL" [all …]
|
| H A D | rpmb.c | 14 #include <mmc.h> 57 static int mmc_set_blockcount(struct mmc *mmc, unsigned int blockcount, in mmc_set_blockcount() argument 68 return mmc_send_cmd(mmc, &cmd, NULL); in mmc_set_blockcount() 70 static int mmc_rpmb_request(struct mmc *mmc, const void *s, in mmc_rpmb_request() argument 77 ret = mmc_set_blockcount(mmc, count, is_rel_write); in mmc_rpmb_request() 94 ret = mmc_send_cmd(mmc, &cmd, &data); in mmc_rpmb_request() 103 static int mmc_rpmb_response(struct mmc *mmc, struct s_rpmb *s, in mmc_rpmb_response() argument 110 ret = mmc_set_blockcount(mmc, cnt, false); in mmc_rpmb_response() 126 ret = mmc_send_cmd(mmc, &cmd, &data); in mmc_rpmb_response() 151 static int mmc_rpmb_status(struct mmc *mmc, unsigned short expected) in mmc_rpmb_status() argument [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/stmicro/stmmac/ |
| H A D | mmc_core.c | 14 #include "mmc.h" 18 #define MMC_CNTRL 0x00 /* MMC Control */ 19 #define MMC_RX_INTR 0x04 /* MMC RX Interrupt */ 20 #define MMC_TX_INTR 0x08 /* MMC TX Interrupt */ 21 #define MMC_RX_INTR_MASK 0x0c /* MMC Interrupt Mask */ 22 #define MMC_TX_INTR_MASK 0x10 /* MMC Interrupt Mask */ 25 /* MMC TX counter registers */ 57 /* MMC RX counter registers */ 129 /* XGMAC MMC Registers */ 196 pr_debug("stmmac: MMC ctrl register (offset 0x%x): 0x%08x\n", in dwmac_mmc_ctrl() [all …]
|
| /OK3568_Linux_fs/u-boot/spl/drivers/mmc/ |
| H A D | mmc.su | |
| H A D | mmc-uclass.su | |
| /OK3568_Linux_fs/u-boot/cmd/ |
| H A D | mmc.c | 10 #include <mmc.h> 17 static void print_mmcinfo(struct mmc *mmc) in print_mmcinfo() argument 25 printf("Device: %s\n", mmc->cfg->name); in print_mmcinfo() 26 printf("Manufacturer ID: %x\n", mmc->cid[0] >> 24); in print_mmcinfo() 27 printf("OEM: %x\n", (mmc->cid[0] >> 8) & 0xffff); in print_mmcinfo() 28 printf("Name: %c%c%c%c%c \n", mmc->cid[0] & 0xff, in print_mmcinfo() 29 (mmc->cid[1] >> 24), (mmc->cid[1] >> 16) & 0xff, in print_mmcinfo() 30 (mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff); in print_mmcinfo() 32 printf("Timing Interface: %s\n", timing[mmc->timing]); in print_mmcinfo() 33 printf("Tran Speed: %d\n", mmc->clock); in print_mmcinfo() [all …]
|
| H A D | mmc.su | |
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | mmc.h | 18 /* SD/MMC version bits; 8 flags, 8 major, 8 minor, 8 change */ 302 /* Maximum block size for MMC */ 305 /* The number of MMC physical partitions. These consist of: 306 * boot partitions (2), general purpose partitions (4) in MMC v4.4. 346 struct mmc *do_returnmmc(void); 348 int read_counter(struct mmc *mmc, struct s_rpmb *requestpackets); 349 int program_key(struct mmc *mmc, struct s_rpmb *requestpackets); 351 (struct mmc *mmc, struct s_rpmb *requestpackets, uint16_t block_count); 352 int authenticated_write(struct mmc *mmc, struct s_rpmb *requestpackets); 360 struct mmc *mmc; member [all …]
|
| /OK3568_Linux_fs/u-boot/env/ |
| H A D | mmc.c | 17 #include <mmc.h> 43 ret = blk_get_device_by_str("mmc", STR(CONFIG_SYS_MMC_ENV_DEV), &desc); in mmc_offset_try_partition() 72 .offset_redund = "u-boot,mmc-env-offset-redundant", in mmc_offset() 73 .partition = "u-boot,mmc-env-partition", in mmc_offset() 74 .offset = "u-boot,mmc-env-offset", in mmc_offset() 81 /* look for the partition in mmc CONFIG_SYS_MMC_ENV_DEV */ in mmc_offset() 114 __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr) in mmc_get_env_addr() argument 119 offset += mmc->capacity; in mmc_get_env_addr() 132 __weak uint mmc_get_env_part(struct mmc *mmc) in mmc_get_env_part() argument 139 static int mmc_set_env_part(struct mmc *mmc) in mmc_set_env_part() argument [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mmc/host/ |
| H A D | meson-mx-sdhc-mmc.c | 3 * Amlogic Meson6/Meson8/Meson8b/Meson8m2 SDHC MMC host controller driver. 21 #include <linux/mmc/host.h> 22 #include <linux/mmc/mmc.h> 23 #include <linux/mmc/sdio.h> 24 #include <linux/mmc/slot-gpio.h> 38 void (*init_hw)(struct mmc_host *mmc); 39 void (*set_pdma)(struct mmc_host *mmc); 40 void (*wait_before_send)(struct mmc_host *mmc); 45 struct mmc_host *mmc; member 68 static void meson_mx_sdhc_hw_reset(struct mmc_host *mmc) in meson_mx_sdhc_hw_reset() argument [all …]
|
| H A D | cqhci-core.c | 16 #include <linux/mmc/mmc.h> 17 #include <linux/mmc/host.h> 18 #include <linux/mmc/card.h> 51 (cq_host->mmc->max_segs * tag * in get_trans_desc_dma() 58 (cq_host->trans_desc_len * cq_host->mmc->max_segs * tag); in get_trans_desc() 73 if (tag == DCMD_SLOT && (cq_host->mmc->caps2 & MMC_CAP2_CQE_DCMD)) { in setup_trans_desc() 100 pr_err("%s: " DRV_NAME ": " f, mmc_hostname(mmc), ## x) 104 struct mmc_host *mmc = cq_host->mmc; in cqhci_dumpregs() local 143 cq_host->ops->dumpregs(mmc); in cqhci_dumpregs() 197 cq_host->data_size = cq_host->trans_desc_len * cq_host->mmc->max_segs * in cqhci_host_alloc_tdl() [all …]
|
| H A D | mmc_hsq.c | 4 * MMC software queue support based on command queue interfaces 10 #include <linux/mmc/card.h> 11 #include <linux/mmc/host.h> 22 struct mmc_host *mmc = hsq->mmc; in mmc_hsq_retry_handler() local 24 mmc->ops->request(mmc, hsq->mrq); in mmc_hsq_retry_handler() 29 struct mmc_host *mmc = hsq->mmc; in mmc_hsq_pump_requests() local 54 if (mmc->ops->request_atomic) in mmc_hsq_pump_requests() 55 ret = mmc->ops->request_atomic(mmc, hsq->mrq); in mmc_hsq_pump_requests() 57 mmc->ops->request(mmc, hsq->mrq); in mmc_hsq_pump_requests() 147 * @mmc: the host controller [all …]
|
| H A D | meson-mx-sdio.c | 3 * meson-mx-sdio.c - Meson6, Meson8 and Meson8b SDIO/MMC Host Controller 25 #include <linux/mmc/host.h> 26 #include <linux/mmc/mmc.h> 27 #include <linux/mmc/sdio.h> 28 #include <linux/mmc/slot-gpio.h> 118 struct mmc_host *mmc; member 125 static void meson_mx_mmc_mask_bits(struct mmc_host *mmc, char reg, u32 mask, in meson_mx_mmc_mask_bits() argument 128 struct meson_mx_mmc_host *host = mmc_priv(mmc); in meson_mx_mmc_mask_bits() 155 static void meson_mx_mmc_start_cmd(struct mmc_host *mmc, in meson_mx_mmc_start_cmd() argument 158 struct meson_mx_mmc_host *host = mmc_priv(mmc); in meson_mx_mmc_start_cmd() [all …]
|
| /OK3568_Linux_fs/u-boot/common/spl/ |
| H A D | spl_mmc.c | 19 #include <mmc.h> 24 static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc, in mmc_load_legacy() argument 36 image_size_sectors = (spl_image->size + mmc->read_bl_len - 1) / in mmc_load_legacy() 37 mmc->read_bl_len; in mmc_load_legacy() 40 count = blk_dread(mmc_get_blk_desc(mmc), sector, image_size_sectors, in mmc_load_legacy() 58 struct mmc *mmc, unsigned long sector) argument 68 count = blk_dread(mmc_get_blk_desc(mmc), sector, 1, header); 86 load.dev = mmc_get_blk_desc(mmc); 89 load.bl_len = mmc->read_bl_len; 93 ret = mmc_load_legacy(spl_image, mmc, sector, header); [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/dfu/ |
| H A D | dfu_mmc.c | 17 #include <mmc.h> 26 struct mmc *mmc; in mmc_block_op() local 30 mmc = find_mmc_device(dfu->data.mmc.dev_num); in mmc_block_op() 31 if (!mmc) { in mmc_block_op() 32 pr_err("Device MMC %d - not found!", dfu->data.mmc.dev_num); in mmc_block_op() 40 *len = ALIGN(*len, dfu->data.mmc.lba_blk_size); in mmc_block_op() 42 blk_start = dfu->data.mmc.lba_start + in mmc_block_op() 43 (u32)lldiv(offset, dfu->data.mmc.lba_blk_size); in mmc_block_op() 44 blk_count = *len / dfu->data.mmc.lba_blk_size; in mmc_block_op() 46 dfu->data.mmc.lba_start + dfu->data.mmc.lba_size) { in mmc_block_op() [all …]
|