Home
last modified time | relevance | path

Searched full:mmc (Results 1 – 25 of 2534) sorted by relevance

12345678910>>...102

/openbmc/u-boot/drivers/mmc/
H A Dmmc.c15 #include <mmc.h>
24 static int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage);
25 static int mmc_power_cycle(struct mmc *mmc);
27 static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps);
33 static int mmc_wait_dat0(struct mmc *mmc, int state, int timeout) in mmc_wait_dat0() argument
39 __weak int board_mmc_getwp(struct mmc *mmc) in board_mmc_getwp() argument
44 int mmc_getwp(struct mmc *mmc) in mmc_getwp() argument
48 wp = board_mmc_getwp(mmc); in mmc_getwp()
51 if (mmc->cfg->ops->getwp) in mmc_getwp()
52 wp = mmc->cfg->ops->getwp(mmc); in mmc_getwp()
[all …]
H A Dmmc_legacy.c9 #include <mmc.h>
16 static struct mmc mmc_static;
17 struct mmc *find_mmc_device(int dev_num) in find_mmc_device()
24 struct mmc *m = &mmc_static; in mmc_do_preinit()
32 struct blk_desc *mmc_get_blk_desc(struct mmc *mmc) in mmc_get_blk_desc() argument
34 return &mmc->block_dev; in mmc_get_blk_desc()
37 struct mmc *find_mmc_device(int dev_num) in find_mmc_device()
39 struct mmc *m; in find_mmc_device()
43 m = list_entry(entry, struct mmc, link); in find_mmc_device()
50 printf("MMC Device %d not found\n", dev_num); in find_mmc_device()
[all …]
H A Dmeson_gx_mmc.c10 #include <mmc.h>
15 static inline void *get_regbase(const struct mmc *mmc) in get_regbase() argument
17 struct meson_mmc_platdata *pdata = mmc->priv; in get_regbase()
22 static inline uint32_t meson_read(struct mmc *mmc, int offset) in meson_read() argument
24 return readl(get_regbase(mmc) + offset); in meson_read()
27 static inline void meson_write(struct mmc *mmc, uint32_t val, int offset) in meson_write() argument
29 writel(val, get_regbase(mmc) + offset); in meson_write()
32 static void meson_mmc_config_clock(struct mmc *mmc) in meson_mmc_config_clock() argument
37 if (!mmc->clock) in meson_mmc_config_clock()
41 if (mmc->clock > 16000000) { in meson_mmc_config_clock()
[all …]
H A Dmmc_write.c17 static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt) in mmc_erase_t() argument
23 if (mmc->high_capacity) { in mmc_erase_t()
26 end = (start + blkcnt - 1) * mmc->write_bl_len; in mmc_erase_t()
27 start *= mmc->write_bl_len; in mmc_erase_t()
30 if (IS_SD(mmc)) { in mmc_erase_t()
42 err = mmc_send_cmd(mmc, &cmd, NULL); in mmc_erase_t()
49 err = mmc_send_cmd(mmc, &cmd, NULL); in mmc_erase_t()
57 err = mmc_send_cmd(mmc, &cmd, NULL); in mmc_erase_t()
64 puts("mmc erase failed\n"); in mmc_erase_t()
80 struct mmc *mmc = find_mmc_device(dev_num); in mmc_berase() local
[all …]
H A Dmmc-uclass.c8 #include <mmc.h>
17 struct mmc *mmc = mmc_get_mmc_dev(dev); in dm_mmc_send_cmd() local
21 mmmc_trace_before_send(mmc, cmd); in dm_mmc_send_cmd()
26 mmmc_trace_after_send(mmc, cmd, ret); in dm_mmc_send_cmd()
31 int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) in mmc_send_cmd() argument
33 return dm_mmc_send_cmd(mmc->dev, cmd, data); in mmc_send_cmd()
45 int mmc_set_ios(struct mmc *mmc) in mmc_set_ios() argument
47 return dm_mmc_set_ios(mmc->dev); in mmc_set_ios()
58 void mmc_send_init_stream(struct mmc *mmc) in mmc_send_init_stream() argument
60 dm_mmc_send_init_stream(mmc->dev); in mmc_send_init_stream()
[all …]
H A Dmmc_private.h12 #include <mmc.h>
14 extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
16 extern int mmc_send_status(struct mmc *mmc, int timeout);
17 extern int mmc_set_blocklen(struct mmc *mmc, int len);
75 void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd);
76 void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret);
77 void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd);
79 static inline void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd) in mmmc_trace_before_send() argument
83 static inline void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, in mmmc_trace_after_send() argument
88 static inline void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd) in mmc_trace_state() argument
[all …]
H A Dfsl_esdhc_spl.c7 #include <mmc.h>
26 struct mmc *mmc = find_mmc_device(0); in mmc_spl_load_image() local
27 if (!mmc) { in mmc_spl_load_image()
28 puts("spl: mmc device not found!!\n"); in mmc_spl_load_image()
32 if (mmc_init(mmc)) { in mmc_spl_load_image()
33 puts("MMC init failed\n"); in mmc_spl_load_image()
37 blk_start = ALIGN(offs, mmc->read_bl_len) / mmc->read_bl_len; in mmc_spl_load_image()
38 blk_cnt = ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len; in mmc_spl_load_image()
40 err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, in mmc_spl_load_image()
43 puts("spl: mmc read failed!!\n"); in mmc_spl_load_image()
[all …]
H A Drpmb.c13 #include <mmc.h>
76 static int mmc_set_blockcount(struct mmc *mmc, unsigned int blockcount, in mmc_set_blockcount() argument
87 return mmc_send_cmd(mmc, &cmd, NULL); in mmc_set_blockcount()
89 static int mmc_rpmb_request(struct mmc *mmc, const struct s_rpmb *s, in mmc_rpmb_request() argument
96 ret = mmc_set_blockcount(mmc, count, is_rel_write); in mmc_rpmb_request()
113 ret = mmc_send_cmd(mmc, &cmd, &data); in mmc_rpmb_request()
122 static int mmc_rpmb_response(struct mmc *mmc, struct s_rpmb *s, in mmc_rpmb_response() argument
129 ret = mmc_set_blockcount(mmc, 1, false); in mmc_rpmb_response()
145 ret = mmc_send_cmd(mmc, &cmd, &data); in mmc_rpmb_response()
170 static int mmc_rpmb_status(struct mmc *mmc, unsigned short expected) in mmc_rpmb_status() argument
[all …]
H A Dpxa_mmc_gen.c5 * Loosely based on the old code and Linux's PXA MMC driver
10 #include <asm/arch/regs-mmc.h>
14 #include <mmc.h>
34 #error "This CPU isn't supported by PXA MMC!"
50 static int pxa_mmc_wait(struct mmc *mmc, uint32_t mask) in pxa_mmc_wait() argument
52 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_wait()
69 static int pxa_mmc_stop_clock(struct mmc *mmc) in pxa_mmc_stop_clock() argument
71 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_stop_clock()
97 static int pxa_mmc_start_cmd(struct mmc *mmc, struct mmc_cmd *cmd, in pxa_mmc_start_cmd() argument
100 struct pxa_mmc_priv *priv = mmc->priv; in pxa_mmc_start_cmd()
[all …]
H A DKconfig1 menu "MMC Host controller Support"
3 config MMC config
4 bool "MMC/SD/SDIO card support"
11 If you want MMC/SD/SDIO support, you should say Y here and
15 bool "support for MMC/SD write operations"
16 depends on MMC
19 Enable write access to MMC and SD Cards
27 bool "Enable MMC controllers using Driver Model"
30 This enables the MultiMediaCard (MMC) uclass which supports MMC and
37 bool "Enable MMC controllers using Driver Model in SPL"
[all …]
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/
H A Dmmc_core.c14 #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 */
198 pr_debug("stmmac: MMC ctrl register (offset 0x%x): 0x%08x\n", in dwmac_mmc_ctrl()
[all …]
/openbmc/u-boot/cmd/
H A Dmmc.c10 #include <mmc.h>
16 static void print_mmcinfo(struct mmc *mmc) in print_mmcinfo() argument
20 printf("Device: %s\n", mmc->cfg->name); in print_mmcinfo()
21 printf("Manufacturer ID: %x\n", mmc->cid[0] >> 24); in print_mmcinfo()
22 printf("OEM: %x\n", (mmc->cid[0] >> 8) & 0xffff); in print_mmcinfo()
23 printf("Name: %c%c%c%c%c \n", mmc->cid[0] & 0xff, in print_mmcinfo()
24 (mmc->cid[1] >> 24), (mmc->cid[1] >> 16) & 0xff, in print_mmcinfo()
25 (mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff); in print_mmcinfo()
27 printf("Bus Speed: %d\n", mmc->clock); in print_mmcinfo()
29 printf("Mode : %s\n", mmc_mode_name(mmc->selected_mode)); in print_mmcinfo()
[all …]
/openbmc/u-boot/env/
H A Dmmc.c16 #include <mmc.h>
42 ret = blk_get_device_by_str("mmc", STR(CONFIG_SYS_MMC_ENV_DEV), &desc); in mmc_offset_try_partition()
71 .offset_redund = "u-boot,mmc-env-offset-redundant", in mmc_offset()
72 .partition = "u-boot,mmc-env-partition", in mmc_offset()
73 .offset = "u-boot,mmc-env-offset", in mmc_offset()
80 /* look for the partition in mmc CONFIG_SYS_MMC_ENV_DEV */ in mmc_offset()
113 __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr) in mmc_get_env_addr() argument
118 offset += mmc->capacity; in mmc_get_env_addr()
131 __weak uint mmc_get_env_part(struct mmc *mmc) in mmc_get_env_part() argument
138 static int mmc_set_env_part(struct mmc *mmc) in mmc_set_env_part() argument
[all …]
/openbmc/u-boot/include/
H A Dmmc.h24 /* SD/MMC version bits; 8 flags, 8 major, 8 minor, 8 change */
336 /* Maximum block size for MMC */
339 /* The number of MMC physical partitions. These consist of:
340 * boot partitions (2), general purpose partitions (4) in MMC v4.4.
351 struct mmc *mmc; member
355 * mmc_get_mmc_dev() - get the MMC struct pointer for a device
361 * @return associated mmc struct pointer if available, else NULL
363 struct mmc *mmc_get_mmc_dev(struct udevice *dev);
394 struct mmc;
399 * send_cmd() - Send a command to the MMC device
[all …]
/openbmc/u-boot/common/spl/
H A Dspl_mmc.c15 #include <mmc.h>
18 static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc, in mmc_load_legacy() argument
30 image_size_sectors = (spl_image->size + mmc->read_bl_len - 1) / in mmc_load_legacy()
31 mmc->read_bl_len; in mmc_load_legacy()
34 count = blk_dread(mmc_get_blk_desc(mmc), sector, image_size_sectors, in mmc_load_legacy()
47 struct mmc *mmc = load->dev; in h_spl_load_read() local
49 return blk_dread(mmc_get_blk_desc(mmc), sector, count, buf); in h_spl_load_read()
54 struct mmc *mmc, unsigned long sector) in mmc_load_image_raw_sector() argument
58 struct blk_desc *bd = mmc_get_blk_desc(mmc); in mmc_load_image_raw_sector()
76 load.dev = mmc; in mmc_load_image_raw_sector()
[all …]
/openbmc/linux/drivers/mmc/host/
H A Dmeson-mx-sdhc-mmc.c3 * 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 Dmmc_hsq.c4 * MMC software queue support based on command queue interfaces
10 #include <linux/mmc/card.h>
11 #include <linux/mmc/host.h>
19 struct mmc_host *mmc = hsq->mmc; in mmc_hsq_retry_handler() local
21 mmc->ops->request(mmc, hsq->mrq); in mmc_hsq_retry_handler()
26 struct mmc_host *mmc = hsq->mmc; in mmc_hsq_pump_requests() local
51 if (mmc->ops->request_atomic) in mmc_hsq_pump_requests()
52 ret = mmc->ops->request_atomic(mmc, hsq->mrq); in mmc_hsq_pump_requests()
54 mmc->ops->request(mmc, hsq->mrq); in mmc_hsq_pump_requests()
126 * @mmc: the host controller
[all …]
H A Dcqhci-core.c16 #include <linux/mmc/mmc.h>
17 #include <linux/mmc/host.h>
18 #include <linux/mmc/card.h>
50 return cq_host->trans_desc_len * cq_host->mmc->max_segs * tag; in get_trans_desc_offset()
79 if (tag == DCMD_SLOT && (cq_host->mmc->caps2 & MMC_CAP2_CQE_DCMD)) { in setup_trans_desc()
106 pr_err("%s: " DRV_NAME ": " f, mmc_hostname(mmc), ## x)
110 struct mmc_host *mmc = cq_host->mmc; in cqhci_dumpregs() local
149 cq_host->ops->dumpregs(mmc); in cqhci_dumpregs()
203 cq_host->data_size = get_trans_desc_offset(cq_host, cq_host->mmc->cqe_qdepth); in cqhci_host_alloc_tdl()
206 mmc_hostname(cq_host->mmc), cq_host->desc_size, cq_host->data_size, in cqhci_host_alloc_tdl()
[all …]
/openbmc/linux/Documentation/devicetree/bindings/mmc/
H A Dallwinner,sun4i-a10-mmc.yaml4 $id: http://devicetree.org/schemas/mmc/allwinner,sun4i-a10-mmc.yaml#
7 title: Allwinner A10 MMC Controller
10 - $ref: mmc-controller.yaml
22 - const: allwinner,sun4i-a10-mmc
23 - const: allwinner,sun5i-a13-mmc
24 - const: allwinner,sun7i-a20-mmc
26 - const: allwinner,sun9i-a80-mmc
27 - const: allwinner,sun20i-d1-mmc
29 - const: allwinner,sun50i-a64-mmc
31 - const: allwinner,sun50i-a100-mmc
[all …]
H A Dmtk-sd.yaml4 $id: http://devicetree.org/schemas/mmc/mtk-sd.yaml#
17 - mediatek,mt2701-mmc
18 - mediatek,mt2712-mmc
19 - mediatek,mt6779-mmc
20 - mediatek,mt6795-mmc
21 - mediatek,mt7620-mmc
22 - mediatek,mt7622-mmc
23 - mediatek,mt7986-mmc
24 - mediatek,mt8135-mmc
25 - mediatek,mt8173-mmc
[all …]
H A Dcavium-mmc.txt1 * Cavium Octeon & ThunderX MMC controller
3 The highspeed MMC host controller on Caviums SoCs provides an interface
4 for MMC and SD types of memory cards.
11 cavium,octeon-6130-mmc
12 cavium,octeon-7890-mmc
13 cavium,thunder-8190-mmc
14 cavium,thunder-8390-mmc
15 mmc-slot
16 - reg : mmc controller base registers
20 - for cd, bus-width and additional generic mmc parameters
[all …]
H A Dsdhci-st.txt1 * STMicroelectronics sdhci-st MMC/SD controller
4 Documentation/devicetree/bindings/mmc/mmc.txt and the properties
9 to set the internal glue logic used for configuring the MMC
13 - clock-names: Should be "mmc" and "icn". (NB: The latter is not compulsory)
18 - interrupts: One mmc interrupt should be described here.
31 - reg-names: Should be "mmc" and "top-mmc-delay". "top-mmc-delay" is optional
36 See: Documentation/devicetree/bindings/mmc/mmc.txt.
39 See: Documentation/devicetree/bindings/mmc/mmc.txt.
43 See: Documentation/devicetree/bindings/mmc/mmc.txt.
52 See: Documentation/devicetree/bindings/mmc/mmc.txt.
[all …]
H A Dingenic,mmc.yaml4 $id: http://devicetree.org/schemas/mmc/ingenic,mmc.yaml#
7 title: Ingenic SoCs MMC Controller
13 - $ref: mmc-controller.yaml#
19 - ingenic,jz4740-mmc
20 - ingenic,jz4725b-mmc
21 - ingenic,jz4760-mmc
22 - ingenic,jz4775-mmc
23 - ingenic,jz4780-mmc
24 - ingenic,x1000-mmc
26 - const: ingenic,jz4770-mmc
[all …]
/openbmc/u-boot/drivers/dfu/
H A Ddfu_mmc.c16 #include <mmc.h>
25 struct mmc *mmc; in mmc_block_op() local
29 mmc = find_mmc_device(dfu->data.mmc.dev_num); in mmc_block_op()
30 if (!mmc) { in mmc_block_op()
31 pr_err("Device MMC %d - not found!", dfu->data.mmc.dev_num); in mmc_block_op()
39 *len = ALIGN(*len, dfu->data.mmc.lba_blk_size); in mmc_block_op()
41 blk_start = dfu->data.mmc.lba_start + in mmc_block_op()
42 (u32)lldiv(offset, dfu->data.mmc.lba_blk_size); in mmc_block_op()
43 blk_count = *len / dfu->data.mmc.lba_blk_size; in mmc_block_op()
45 dfu->data.mmc.lba_start + dfu->data.mmc.lba_size) { in mmc_block_op()
[all …]
/openbmc/linux/drivers/mmc/core/
H A Dregulator.c3 * Helper functions for MMC regulators.
11 #include <linux/mmc/host.h>
57 * can be provided to MMC/SD/SDIO devices using the specified voltage
59 * MMC host adapter.
96 * @mmc: the host to regulate
102 * MMC host drivers may use this to enable or disable a regulator using
106 int mmc_regulator_set_ocr(struct mmc_host *mmc, in mmc_regulator_set_ocr() argument
120 if (result == 0 && !mmc->regulator_enabled) { in mmc_regulator_set_ocr()
123 mmc->regulator_enabled = true; in mmc_regulator_set_ocr()
125 } else if (mmc->regulator_enabled) { in mmc_regulator_set_ocr()
[all …]

12345678910>>...102