Home
last modified time | relevance | path

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

12345678910>>...43

/openbmc/u-boot/drivers/mmc/
H A Dmmc.c1 // SPDX-License-Identifier: GPL-2.0+
13 #include <dm/device-internal.h>
15 #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
35 return -ENOSYS; in mmc_wait_dat0()
39 __weak int board_mmc_getwp(struct mmc *mmc) in board_mmc_getwp() argument
41 return -1; in board_mmc_getwp()
[all …]
H A Dmmc_legacy.c1 // SPDX-License-Identifier: GPL-2.0+
9 #include <mmc.h>
13 static int cur_dev_num = -1;
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()
28 if (m->preinit) 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()
[all …]
H A Dmeson_gx_mmc.c1 // SPDX-License-Identifier: GPL-2.0+
10 #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()
19 return pdata->regbase; 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
[all …]
H A Dmmc_write.c1 // SPDX-License-Identifier: GPL-2.0+
17 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()
24 end = start + blkcnt - 1; 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()
[all …]
H A Dmmc-uclass.c1 // SPDX-License-Identifier: GPL-2.0+
8 #include <mmc.h>
10 #include <dm/device-internal.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()
22 if (ops->send_cmd) in dm_mmc_send_cmd()
23 ret = ops->send_cmd(dev, cmd, data); in dm_mmc_send_cmd()
25 ret = -ENOSYS; 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
[all …]
H A Dmmc_private.h1 /* SPDX-License-Identifier: GPL-2.0+ */
12 #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
[all …]
H A Dfsl_esdhc_spl.c1 // SPDX-License-Identifier: GPL-2.0+
7 #include <mmc.h>
11 * The environment variables are written to just after the u-boot image
13 * length of the u-boot image, then calculate the address of the env.
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()
[all …]
H A Drpmb.c1 // SPDX-License-Identifier: GPL-2.0+
6 * eMMC- Replay Protected Memory Block
7 * According to JEDEC Standard No. 84-A441
13 #include <mmc.h>
14 #include <u-boot/sha256.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()
99 printf("%s:mmc_set_blockcount-> %d\n", __func__, ret); in mmc_rpmb_request()
[all …]
H A Dpxa_mmc_gen.c1 // SPDX-License-Identifier: GPL-2.0+
5 * 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()
53 struct pxa_mmc_regs *regs = priv->regs; in pxa_mmc_wait()
57 while (--timeout) { in pxa_mmc_wait()
58 if (readl(&regs->stat) & mask) in pxa_mmc_wait()
[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
31 Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
[all …]
/openbmc/linux/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 …]
/openbmc/u-boot/cmd/
H A Dmmc.c1 // SPDX-License-Identifier: GPL-2.0+
4 * Kyle Harris, kharris@nexus-tech.net
10 #include <mmc.h>
12 #include <image-sparse.h>
14 static int curr_device = -1;
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()
[all …]
/openbmc/u-boot/env/
H A Dmmc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2008-2011 Freescale Semiconductor, Inc.
16 #include <mmc.h>
42 ret = blk_get_device_by_str("mmc", STR(CONFIG_SYS_MMC_ENV_DEV), &desc); in mmc_offset_try_partition()
56 len = (CONFIG_ENV_SIZE + info.blksz - 1) & ~(info.blksz - 1); in mmc_offset_try_partition()
59 *val = (info.start + info.size - 1) - len / info.blksz; 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()
[all …]
/openbmc/u-boot/include/
H A Dmmc.h1 /* SPDX-License-Identifier: GPL-2.0+ */
24 /* SD/MMC version bits; 8 flags, 8 major, 8 minor, 8 change */
77 #define IS_SD(x) ((x)->version & SD_VERSION_SD)
78 #define IS_MMC(x) ((x)->version & MMC_VERSION_MMC)
173 #define MMC_VDD_165_195 0x00000080 /* VDD voltage 1.65 - 1.95 */
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.
348 * struct mmc_uclass_priv - Holds information about a device used by the uclass
351 struct mmc *mmc; member
[all …]
/openbmc/u-boot/common/spl/
H A Dspl_mmc.c1 // SPDX-License-Identifier: GPL-2.0+
13 #include <asm/u-boot.h>
15 #include <mmc.h>
18 static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc, in mmc_load_legacy() argument
29 /* convert size to sectors - round up */ in mmc_load_legacy()
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()
35 (void *)(ulong)spl_image->load_addr); in mmc_load_legacy()
37 spl_image->load_addr); in mmc_load_legacy()
[all …]
/openbmc/linux/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 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>
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
31 spin_lock_irqsave(&hsq->lock, flags); in mmc_hsq_pump_requests()
34 if (hsq->mrq || hsq->recovery_halt) { in mmc_hsq_pump_requests()
35 spin_unlock_irqrestore(&hsq->lock, flags); in mmc_hsq_pump_requests()
[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_len * cq_host->mmc->max_segs * tag; in get_trans_desc_offset()
57 return cq_host->trans_desc_dma_base + offset; in get_trans_desc_dma()
[all …]
/openbmc/linux/Documentation/devicetree/bindings/mmc/
H A Dallwinner,sun4i-a10-mmc.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/mmc/allwinner,sun4i-a10-mmc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Allwinner A10 MMC Controller
10 - $ref: mmc-controller.yaml
13 - Chen-Yu Tsai <wens@csie.org>
14 - Maxime Ripard <mripard@kernel.org>
17 "#address-cells": true
18 "#size-cells": true
[all …]
H A Dmtk-sd.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/mmc/mtk-sd.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Chaotian Jing <chaotian.jing@mediatek.com>
11 - Wenbin Mei <wenbin.mei@mediatek.com>
16 - enum:
17 - mediatek,mt2701-mmc
18 - mediatek,mt2712-mmc
19 - mediatek,mt6779-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.
10 - compatible : should be one of:
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
[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 …]
H A Dingenic,mmc.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/mmc/ingenic,mmc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Ingenic SoCs MMC Controller
10 - Paul Cercueil <paul@crapouillou.net>
13 - $ref: mmc-controller.yaml#
18 - enum:
19 - ingenic,jz4740-mmc
20 - ingenic,jz4725b-mmc
[all …]
/openbmc/u-boot/drivers/dfu/
H A Ddfu_mmc.c1 // SPDX-License-Identifier: GPL-2.0+
3 * dfu.c -- DFU back-end routines
16 #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()
32 return -ENODEV; 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()
[all …]
/openbmc/linux/drivers/mmc/core/
H A Dregulator.c1 // SPDX-License-Identifier: GPL-2.0
3 * Helper functions for MMC regulators.
11 #include <linux/mmc/host.h>
19 * mmc_ocrbitnum_to_vdd - Convert a OCR bit number to its voltage
32 return -EINVAL; in mmc_ocrbitnum_to_vdd()
40 tmp = vdd_bit - ilog2(MMC_VDD_165_195); in mmc_ocrbitnum_to_vdd()
53 * mmc_regulator_get_ocrmask - return mask of supported voltages
57 * can be provided to MMC/SD/SDIO devices using the specified voltage
59 * MMC host adapter.
95 * mmc_regulator_set_ocr - set regulator to match host->ios voltage
[all …]

12345678910>>...43