Home
last modified time | relevance | path

Searched +full:mmc +full:- (Results 1 – 25 of 1148) sorted by relevance

12345678910>>...46

/OK3568_Linux_fs/u-boot/drivers/mmc/
H A Dmmc.c7 * SPDX-License-Identifier: GPL-2.0+
14 #include <dm/device-internal.h>
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()
48 if (m->preinit) 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
[all …]
H A Dmmc-uclass.su
H A Dmmc_legacy.c5 * SPDX-License-Identifier: GPL-2.0+
10 #include <mmc.h>
14 static int cur_dev_num = -1;
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()
25 if (m->block_dev.devnum == dev_num) 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()
[all …]
H A Dmmc-uclass.c5 * SPDX-License-Identifier: GPL-2.0+
9 #include <mmc.h>
11 #include <dm/device-internal.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()
27 if (ops->send_cmd) in dm_mmc_send_cmd()
28 ret = ops->send_cmd(dev, cmd, data); in dm_mmc_send_cmd()
30 ret = -ENOSYS; in dm_mmc_send_cmd()
31 mmmc_trace_after_send(mmc, cmd, ret); in dm_mmc_send_cmd()
33 if (ret && cmd->cmdidx != SD_CMD_SEND_IF_COND && in dm_mmc_send_cmd()
[all …]
H A Dmeson_gx_mmc.c4 * SPDX-License-Identifier: GPL-2.0+
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()
20 return pdata->regbase; 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
[all …]
H A Dmmc_write.c7 * SPDX-License-Identifier: GPL-2.0+
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()
26 end = start + blkcnt - 1; 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()
[all …]
H A Dmmc_private.h7 * SPDX-License-Identifier: GPL-2.0+
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
[all …]
H A Dfsl_esdhc_spl.c4 * SPDX-License-Identifier: GPL-2.0+
8 #include <mmc.h>
12 * The environment variables are written to just after the u-boot image
14 * length of the u-boot image, then calculate the address of the env.
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()
[all …]
H A Dpxa_mmc_gen.c4 * Loosely based on the old code and Linux's PXA MMC driver
6 * SPDX-License-Identifier: GPL-2.0+
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()
54 struct pxa_mmc_regs *regs = priv->regs; in pxa_mmc_wait()
58 while (--timeout) { in pxa_mmc_wait()
59 if (readl(&regs->stat) & mask) in pxa_mmc_wait()
[all …]
H A Drpmb.c5 * eMMC- Replay Protected Memory Block
6 * According to JEDEC Standard No. 84-A441
8 * SPDX-License-Identifier: GPL-2.0+
14 #include <mmc.h>
15 #include <u-boot/sha256.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()
80 printf("%s:mmc_set_blockcount-> %d\n", __func__, ret); in mmc_rpmb_request()
[all …]
H A DKconfig1 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
25 Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/stmicro/stmmac/
H A Dmmc_core.c1 // SPDX-License-Identifier: GPL-2.0-only
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 */
[all …]
/OK3568_Linux_fs/u-boot/cmd/
H A Dmmc.c3 * Kyle Harris, kharris@nexus-tech.net
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <mmc.h>
15 static int curr_device = -1;
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()
[all …]
/OK3568_Linux_fs/u-boot/spl/drivers/mmc/
H A Dmmc-uclass.su
/OK3568_Linux_fs/u-boot/include/
H A Dmmc.h7 * SPDX-License-Identifier: GPL-2.0+
18 /* SD/MMC version bits; 8 flags, 8 major, 8 minor, 8 change */
67 #define IS_SD(x) ((x)->version & SD_VERSION_SD)
68 #define IS_MMC(x) ((x)->version & MMC_VERSION_MMC)
142 #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */
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);
[all …]
/OK3568_Linux_fs/u-boot/env/
H A Dmmc.c2 * (C) Copyright 2008-2011 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
17 #include <mmc.h>
43 ret = blk_get_device_by_str("mmc", STR(CONFIG_SYS_MMC_ENV_DEV), &desc); in mmc_offset_try_partition()
57 len = (CONFIG_ENV_SIZE + info.blksz - 1) & ~(info.blksz - 1); in mmc_offset_try_partition()
60 *val = (info.start + info.size - 1) - len / info.blksz; 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()
[all …]
/OK3568_Linux_fs/kernel/drivers/mmc/host/
H A Dmeson-mx-sdhc-mmc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Amlogic Meson6/Meson8/Meson8b/Meson8m2 SDHC MMC host controller driver.
10 #include <linux/dma-mapping.h>
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>
26 #include "meson-mx-sdhc.h"
38 void (*init_hw)(struct mmc_host *mmc);
39 void (*set_pdma)(struct mmc_host *mmc);
[all …]
H A Dcqhci-core.c1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <linux/dma-mapping.h>
16 #include <linux/mmc/mmc.h>
17 #include <linux/mmc/host.h>
18 #include <linux/mmc/card.h>
21 #include "cqhci-crypto.h"
38 return cq_host->desc_base + (tag * cq_host->slot_sz); in get_desc()
45 return desc + cq_host->task_desc_len; in get_link_desc()
50 return cq_host->trans_desc_dma_base + in get_trans_desc_dma()
51 (cq_host->mmc->max_segs * tag * in get_trans_desc_dma()
[all …]
H A Dmmc_hsq.c1 // SPDX-License-Identifier: GPL-2.0
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
34 spin_lock_irqsave(&hsq->lock, flags); in mmc_hsq_pump_requests()
37 if (hsq->mrq || hsq->recovery_halt) { in mmc_hsq_pump_requests()
38 spin_unlock_irqrestore(&hsq->lock, flags); in mmc_hsq_pump_requests()
[all …]
H A Dmeson-mx-sdio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * meson-mx-sdio.c - Meson6, Meson8 and Meson8b SDIO/MMC Host Controller
12 #include <linux/clk-provider.h>
15 #include <linux/dma-mapping.h>
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>
98 #define MESON_MX_SDIO_RESPONSE_CRC16_BITS (16 - 1)
118 struct mmc_host *mmc; member
[all …]
H A Dmxs-mmc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Portions copyright (C) 2004-2005 Pierre Ossman, W83L51xD SD/MMC driver
7 * Copyright 2009-2011 Freescale Semiconductor, Inc.
18 #include <linux/dma-mapping.h>
20 #include <linux/dma/mxs-dma.h>
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>
32 #include <linux/spi/mxs-spi.h>
[all …]
/OK3568_Linux_fs/u-boot/common/spl/
H A Dspl_mmc.c7 * SPDX-License-Identifier: GPL-2.0+
17 #include <asm/u-boot.h>
19 #include <mmc.h>
24 static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc, in mmc_load_legacy() argument
35 /* convert size to sectors - round up */ in mmc_load_legacy()
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()
41 (void *)(ulong)spl_image->load_addr); in mmc_load_legacy()
43 spl_image->load_addr); in mmc_load_legacy()
[all …]
/OK3568_Linux_fs/u-boot/drivers/dfu/
H A Ddfu_mmc.c2 * dfu.c -- DFU back-end routines
7 * SPDX-License-Identifier: GPL-2.0+
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()
33 return -ENODEV; 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()
[all …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mmc/
H A Dmtk-sd.txt1 * MTK MMC controller
3 The MTK MSDC can act as a MMC controller
4 to support MMC, SD, and SDIO types of memory cards.
6 This file documents differences between the core properties in mmc.txt
10 - compatible: value should be either of the following.
11 "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
12 "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
13 "mediatek,mt8183-mmc": for mmc host ip compatible with mt8183
14 "mediatek,mt8516-mmc": for mmc host ip compatible with mt8516
15 "mediatek,mt6779-mmc": for mmc host ip compatible with mt6779
[all …]
H A Dsdhci-st.txt1 * STMicroelectronics sdhci-st MMC/SD controller
4 Documentation/devicetree/bindings/mmc/mmc.txt and the properties
5 used by the sdhci-st driver.
8 - compatible: Must be "st,sdhci" and it can be compatible to "st,sdhci-stih407"
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)
14 See: Documentation/devicetree/bindings/resource-names.txt
15 - clocks: Phandle to the clock.
16 See: Documentation/devicetree/bindings/clock/clock-bindings.txt
18 - interrupts: One mmc interrupt should be described here.
[all …]

12345678910>>...46