summaryrefslogtreecommitdiff
path: root/drivers/mmc
Commit message (Collapse)AuthorAgeLines
* MLK-12483-4 mx6: Modify drivers to disable fused modulesYe Li2017-04-05-0/+16
| | | | | | | | | | | Add the fuse checking in drivers, when the module is disabled in fuse, the driver will not work. Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C, USB-EHCI, GIS, LCDIF. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e)
* MLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECTYe Li2017-03-14-4/+0
| | | | | | | | | | Since we have added the "vs18_enable" parameter for fixed 1.8v I/O, remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT. This configuration can only work with one MMC device. If more devices are supported, this will set 1.8v to all controllers, so will cause problem to 3.3v devices. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit c1de6a58e44f4770b32a41e3689884abf7449e1b)
* MLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/OYe Li2017-03-14-0/+20
| | | | | | | | | | | | | | | | | | When using eMMC with 1.8V I/O, we have to set the VSELECT bit at this USDHC controller setup and init. The CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT has problem that it will apply to all USDHC controllers and it only set the 1.8V at init phase. So if user does not select to the eMMC device, the voltage on the I/O pins are not correct. This patch adds a parameter "vs18_enable" in fsl_esdhc_cfg structure and priv data, so each controller can have different settings. The default value is 0 for 3.3V, which is compatible with current codes. When setting this value to 1, at USDHC setup and init phase the driver will set the VSELECT bit. For DM driver, the vqmmc-supply property will be searched for current usdhc node. If the vqmmc-supply is set to 1800000 uV, the vs18_enable in priv data will be set to 1. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit ebd872f491af27c38a0698d226222ea5093c563c)
* omap_hsmmc.c: Fix build warning on non-omap3Tom Rini2017-02-09-1/+3
| | | | | | | | | | It was incorrect to always include "asm/arch-omap3/mux.h" constantly. This introduced warnings on non-omap3 where certain values will conflict between the various families. Conditionally guard the inclusion in order to correct the problem. Fixes: 6aca17c9b7e8 ("drivers: mmc: omap_hsmmc: Fix IO Buffer on OMAP36xx") Signed-off-by: Tom Rini <trini@konsulko.com>
* mmc: init mmc block devices on probeFiach Antaw2017-02-09-0/+12
| | | | | | | | | MMC devices accessed exclusively via the driver model were not being initialized before being exposed as block devices, causing issues in scenarios where the MMC device is first accessed via the uclass block interface. Signed-off-by: Fiach Antaw <fiach.antaw@uqconnect.edu.au>
* drivers: mmc: omap_hsmmc: Fix IO Buffer on OMAP36xxAdam Ford2017-02-09-0/+30
| | | | | | | | | | | On the OMAP36xx/37xx the CONTROL_WKUP_CTRL register has a field (bit 6) named GPIO_IO_PWRDNZ. If 0, the IO buffers which are related to GPIO_126, 127 and 129 are disabled. Some boards may need this for MMC. After the PBIAS is configured, this bit should be set high to enable these GPIO pins. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* mmc: ftsdc021_sdhci: remove the ftsdc021_sdhci.cJaehoon Chung2017-02-09-35/+0
| | | | | | | | | ftsdc021_sdhci.c is dead file. There is no reason to maintain this host controller. Removes the entire ftsdc021_sdhci.c. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* mmc: mmc-uclass: use the fixed devnum with alias nodeJaehoon Chung2017-02-09-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are alias nodes as "mmc", use the devnum as alias index number. This patch is for fixing a problem of Exynos4 series. Problem is the below thing. Current legacy mode: EXYNOS DWMMC: 0, SAMSUNG SDHCI: 1 After using DM: SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1 Dev index is swapped. Then u-boot can't find the kernel image..because it is already set to 0 as mmcdev. If change from legacy to DM, also needs to touch all exynos4 config file. For using simply, just supporting the fixed devnum with alias node is better than it. Usage: alaise { .... mmc0 = &sdhci2; /* eMMC */ mmc1 = &sdhci1; /* SD */ ... } Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: core: Replace of_offset with accessorSimon Glass2017-02-08-35/+34
| | | | | | | | | At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
* mmc: atmel: rename CONFIG_ATMEL_SDHCI to CONFIG_MMC_SDHCI_ATMELMasahiro Yamada2017-01-31-12/+13
| | | | | | | | | Make the naming scheme consistent; all SDHCI-base drivers prefixed with CONFIG_MMC_SDHCI_. While we are here, add "depends on ARCH_AT91". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mmc: pic32: rename CONFIG_PIC32_SDHCI to CONFIG_MMC_SDHCI_PIC32Masahiro Yamada2017-01-31-8/+8
| | | | | | | Make the naming scheme consistent; all SDHCI-base drivers prefixed with CONFIG_MMC_SDHCI_. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mmc: msm: rename CONFIG_MSM_SDHCI to CONFIG_MMC_SDHCI_MSMMasahiro Yamada2017-01-31-11/+11
| | | | | | | Make the naming scheme consistent; all SDHCI-base drivers prefixed with CONFIG_MMC_SDHCI_. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mmc: rockchip: rename CONFIG_ROCKCHIP_SDHCI to CONFIG_MMC_SDHCI_ROCKCHIPMasahiro Yamada2017-01-31-8/+9
| | | | | | | | | Make the naming scheme consistent; all SDHCI-base drivers prefixed with CONFIG_MMC_SDHCI_. While we are here, add "depends on ARCH_ROCKCHIP". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mmc: zynq: rename CONFIG_ZYNQ_SDHCI to CONFIG_MMC_SDHCI_ZYNQMasahiro Yamada2017-01-31-8/+9
| | | | | | | | | Make the naming scheme consistent; all SDHCI-base drivers prefixed with CONFIG_MMC_SDHCI_. While we are here, add "depends on ARCH_ZYNQ || ARCH_ZYNQMP". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mmc: sandbox: rename CONFIG, fix dependency, and use it in MakefileMasahiro Yamada2017-01-31-7/+4
| | | | | | | | | | | | | | | [1] Rename CONFIG_SANDBOX_MMC to CONFIG_MMC_SANDBOX for consistency I want all MMC driver options prefixed with CONFIG_MMC_. [2] Fix dependency Add necessary depends on to avoid compile error. Instead "depends on MMC" is unneeded because this config entry resides inside of "if MMC". [3] Currently, this config symbol is not referenced at all. Use it to enable/disable the driver in Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* mmc: move CONFIG_GENERIC_MMC to KconfigMasahiro Yamada2017-01-31-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, CONFIG_GENERIC_MMC seems equivalent to CONFIG_MMC. Let's create an entry for "config GENERIC_MMC" with "default MMC", then convert all macro defines in headers to Kconfig. Almost all of the defines will go away. I see only two exceptions: configs/blanche_defconfig configs/sandbox_noblk_defconfig They define CONFIG_GENERIC_MMC, but not CONFIG_MMC. Something might be wrong with these two boards, so should be checked later. Anyway, this is the output of the moveconfig tool. This commit was created as follows: [1] create a config entry in drivers/mmc/Kconfig [2] tools/moveconfig.py -r HEAD GENERIC_MMC [3] manual clean-up of garbage comments in doc/README.* and include/configs/*.h Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* mmc: Add Marvell Xenon SDHCI controller driverStefan Roese2017-01-25-0/+509
| | | | | | | | | | | | | | | | This driver implementes platform specific code for the Xenon SDHCI controller which is integrated in the Marvell MVEBU Armada 37xx and Armada 7k / 8K SoCs. History: This driver is ported from the Marvell U-Boot version 2015.01 which is written by Victor Gu <xigu@marvell.com> with minor changes ported from the Linux driver which is written by Ziji Hu <huziji@marvell.com>. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: sdhci: Add support for optional controller specific set_ios_post()Stefan Roese2017-01-25-0/+4
| | | | | | | | | | | | | | | Some SDHCI drivers might need to do some special controller configuration after the common clock set_ios() function has been called (speed / width configuration). This patch adds a call to the newly created function set_ios_port() when its configured in the host driver. This will be used by the Xenon SDHCI controller driver used on the Marvell Armada 3700 and 7k/8k ARM64 SoCs. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: sdhci: Clear SDHCI_CLOCK_CONTROL before configuring the new valueStefan Roese2017-01-25-4/+2
| | | | | | | | | | | | | | | | | | | This patch completely clears the SDHCI_CLOCK_CONTROL register before the new value is configured instead of just clearing the 2 bits SDHCI_CLOCK_CARD_EN and SDHCI_CLOCK_INT_EN. Without this change, some clock configurations will lead to the "Internal clock never stabilised." error message on the Xenon SDHCI controller used on the Marvell Armada 3700 and 7k/8k ARM64 SoCs. The Linux SDHCI core driver also writes 0 to this register before the new value is configured. So this patch simplifies the driver a bit and brings the U-Boot driver more in-line with the Linux one. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: Print error code for mmc_complete_init failureJagan Teki2017-01-23-1/+3
| | | | | | | | Print the error code for non-zero (failure case) instead of making debug statement without any condition, this usually gives proper clue in failure condition. Log:
* mmc: sdhci: Distinguish between base clock and maximum peripheral frequencyStefan Herbrechtsmeier2017-01-23-28/+45
| | | | | | | | | | The sdhci controller assumes that the base clock frequency is fully supported by the peripheral and doesn't support hardware limitations. The Linux kernel distinguishes between base clock (max_clk) of the host controller and maximum frequency (f_max) of the card interface. Use the same differentiation and allow the platform to constrain the peripheral interface. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
* Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2017-01-19-9/+23
|\
| * mmc: fsl_esdhc: move 'status' property fixup into a weak functionYangbo Lu2017-01-18-7/+14
| | | | | | | | | | | | | | | | Move fdt fixup of 'status' property into a weak function. This allows board to define 'status' fdt fixup by themselves. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * mmc: fsl_esdhc: add 'fsl, esdhc' into of_match tableYangbo Lu2017-01-18-0/+1
| | | | | | | | | | | | | | | | This patch is to add 'fsl,esdhc' into of_match table to support driver model for QorIQ eSDHC. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * mmc: fsl_esdhc: make GPIO support optionalYangbo Lu2017-01-18-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | There would be compiling error as below when enable driver model for esdhc. undefined reference to `dm_gpio_get_value' undefined reference to `gpio_request_by_name_nodev' This patch is to make GPIO support optional with CONFIG_DM_GPIO. Because all boards of QorIQ platform don't need it and they just check register for CD/WP status, only some boards of i.MX platform require this. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | Merge branch 'master' of http://git.denx.de/u-boot-mmcTom Rini2017-01-13-6/+6
|\ \
| * | mmc: sunxi: revive depends on UART0_PORT_FMasahiro Yamada2017-01-13-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f401e907fcbc ("ARM: sunxi: remove bare default for CONFIG_MMC") dropped "depends on UART0_PORT_F", but it is still needed. Revive it as a prerequisite of CONFIG_MMC_SUNXI. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * | mmc: pic32_sdhci: rename {pci->pic}32_sdhci_get_cdMasahiro Yamada2017-01-13-2/+2
| | | | | | | | | | | | | | | | | | I suspect this is a typo. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * | mmc: sdhci: fix NULL pointer access when host->ops is not setMasahiro Yamada2017-01-13-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until recently, sdhci_ops was used only for overriding IO accessors. (so, host->ops was not set by any drivers except bcm2835_sdhci.c) Now, we have more optional callbacks, get_cd, set_control_reg, and set_clock. However, the code if (host->ops->get_cd) host->ops->get_cd(host); ... expects host->ops is set for all drivers. Commit 5e96217f0434 ("mmc: pic32_sdhci: move the code to pic32_sdhci.c") and commit 62226b68631b ("mmc: sdhci: move the callback function into sdhci_ops") added sdhci_ops for pic32_sdhci.c and s5p_sdhci.c, but the other drivers still do not (need not) set host->ops because all callbacks in sdhci_ops are optional. host->ops must be checked to avoid the system crash caused by NULL pointer access. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | | mmc: rockchip_sdhci: add clock init for mmcKever Yang2017-01-11-2/+17
|/ / | | | | | | | | | | | | Init the clock rate to max-frequency from dts with clock driver api. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: move more driver config options to KconfigMasahiro Yamada2017-01-11-7/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move (and rename) the following CONFIG options to Kconfig: CONFIG_DAVINCI_MMC (renamed to CONFIG_MMC_DAVINCI) CONFIG_OMAP_HSMMC (renamed to CONFIG_MMC_OMAP_HS) CONFIG_MXC_MMC (renamed to CONFIG_MMC_MXC) CONFIG_MXS_MMC (renamed to CONFIG_MMC_MXS) CONFIG_TEGRA_MMC (renamed to CONFIG_MMC_SDHCI_TEGRA) CONFIG_SUNXI_MMC (renamed to CONFIG_MMC_SUNXI) They are the same option names as used in Linux. This commit was created as follows: [1] Rename the options with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e ' s/CONFIG_DAVINCI_MMC/CONFIG_MMC_DAVINCI/g s/CONFIG_OMAP_HSMMC/CONFIG_MMC_OMAP_HS/g s/CONFIG_MXC_MMC/CONFIG_MMC_MXC/g s/CONFIG_MXS_MMC/CONFIG_MMC_MXS/g s/CONFIG_TEGRA_MMC/CONFIG_MMC_SDHCI_TEGRA/g s/CONFIG_SUNXI_MMC/CONFIG_MMC_SUNXI/g ' [2] Commit the changes [3] Create entries in driver/mmc/Kconfig. (copied from Linux) [4] Move the options with the following command tools/moveconfig.py -y -r HEAD \ MMC_DAVINCI MMC_OMAP_HS MMC_MXC MMC_MXS MMC_SDHCI_TEGRA MMC_SUNXI [5] Sort and align drivers/mmc/Makefile for readability Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
* | mmc: move DesignWare-based drivers to KconfigMasahiro Yamada2017-01-11-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move (and rename) the following CONFIG options to Kconfig: CONFIG_EXYNOS_DWMMC (renamed to CONFIG_MMC_DW_EXYNOS) CONFIG_HIKEY_DWMMC (renamed to CONFIG_MMC_DW_K3) CONFIG_SOCFPGA_DWMMC (renamed to CONFIG_MMC_DW_SOCFPGA) The "HIKEY" is a board name, so it is not suitable for the MMC controller name. I am following the name used in Linux. This commit was generated as follows: [1] Rename the config options with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e ' s/CONFIG_EXYNOS_DWMMC/CONFIG_MMC_DW_EXYNOS/g s/CONFIG_HIKEY_DWMMC/CONFIG_MMC_DW_K3/g s/CONFIG_SOCFPGA_DWMMC/CONFIG_MMC_DW_SOCFPGA/g ' [2] Commit the changes [3] Create the entries in drivers/mmc/Kconfig (with default y for EXYNOS and SOCFPGA) [4] Run the following: tools/moveconfig.py -y -r HEAD MMC_DW_EXYNOS MMC_DW_K3 MMC_DW_SOCFPGA [5] Sort and align drivers/mmc/Makefile for readability [6] Clean-up doc/README.socfpga by hand Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
* | mmc: move CONFIG_DWMMC to Kconfig, renaming to CONFIG_MMC_DWMasahiro Yamada2017-01-11-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit was created as follows: [1] Rename the option with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e 's/CONFIG_DWMMC/CONFIG_MMC_DW/g' [2] create the entry for MMC_DW in drivers/mmc/Kconfig (the prompt and help were copied from Linux) [3] run "tools/moveconfig.py -y MMC_DW" [4] add "depends on MMC_DW" to the MMC_DW_ROCKCHIP entry [5] Clean-up doc/README.socfpga by hand Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
* | mmc: rename CONFIG_ROCKCHIP_DWMMC to CONFIG_MMC_DW_ROCKCHIPMasahiro Yamada2017-01-11-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | I am trying to make all DesignWare-based driver options prefixed with CONFIG_MMC_DW_. This commit was generated as follows: find . -name .git -prune -o -type f -print | \ xargs sed -i -e 's/ROCKCHIP_DWMMC/MMC_DW_ROCKCHIP/g' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Marek Vasut <marex@denx.de>
* | mmc: uniphier-sd: fix Kconfig dependencyMasahiro Yamada2017-01-11-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some MMC drivers describe operations with the DM_MMC_OPS form, but there are still several drivers with older implementation. We can not compile drivers from different groups at the same time because the core framework is shared with #ifdef CONFIG_DM_MMC_OPS. Every driver should have "depends on DM_MMC_OPS" (or !DM_MMC_OPS) explicitly to express which framework it is based on. This will avoid enabling drivers with incompatible interface at the same time. It is incorrect to make a driver "select DM_MMC_OPS". While we are here, add "depends on OF_CONTROL" as well because this driver can be configured only by Device Tree. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | mmc: sdhci-cadence: add Cadence SD4HC supportMasahiro Yamada2017-01-11-0/+138
| | | | | | | | | | | | Add a driver for the Cadence SD4HC SD/SDIO/eMMC Controller. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | mmc: sdhci: combine the Host controller v3.0 feature into one conditionJaehoon Chung2017-01-11-10/+7
| | | | | | | | | | | | It doesn't need to seperate the condition. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: sdhci: remove the SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWERJaehoon Chung2017-01-11-3/+0
| | | | | | | | | | | | Ther is no usage anywhere. It doesn't need to maintain this bit. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: sdhci: move the callback function into sdhci_opsJaehoon Chung2017-01-11-7/+10
| | | | | | | | | | | | | | | | callback function should be moved into sdhci_ops struct. Other controller can use these ops for controlling clock or their own specific register. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: s5p_sdhci: add the s5p_set_clock functionJaehoon Chung2017-01-11-1/+7
| | | | | | | | | | | | | | | | Add the s5p_set_clock function. It's not good that "set_mmc_clk" is assigned directly. In future, it should be changed to use the clock framework. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: change the set_ios return type from void to intJaehoon Chung2017-01-11-29/+59
| | | | | | | | | | | | To maintain consistency, set_ios type of legacy mmc_ops changed to int. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: sdhci: remove the SDHCI_QUIRK_NO_CDJaehoon Chung2017-01-11-5/+3
| | | | | | | | | | | | | | This quirk doesn't need anymore. It's replaced to get_cd callback function. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: pic32_sdhci: move the code to pic32_sdhci.cJaehoon Chung2017-01-11-6/+17
| | | | | | | | | | | | | | | | This code is used for only pic32_sdhci controller. To remove the "#ifdef", moves to pic32_sdhci.c. And use the get_cd callback function. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: sdhci: remove the unused code about testing Card detectJaehoon Chung2017-01-11-11/+0
| | | | | | | | | | | | This code is dead code..There is no usage anywhere. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* | mmc: sdhci: disable the 8bit mode when host doesn't support itJaehoon Chung2017-01-11-3/+2
|/ | | | | | | | | | | | | Buswidth is depeneded on Hardware schematic. Evne though host can support the 8bit buswidth, if hardware doesn't support 8bit mode, it doesn't work fine. So the buswidth mode selection leaves a matter in each SoC drivers. On the contrary to this, hardware supports 8bit mode, but host doesn't support it. then controller has to disable the MMC_MODE_8BIT. (Host can check whether 8bit mode is supported or not, since V3.0) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: move CONFIG_SYS_FSL_ERRATUM_ESDHC* to KconfigYork Sun2017-01-04-0/+12
| | | | | | | | | | Add option SYS_FSL_ERRATUM_ESDHC111, SYS_FSL_ERRATUM_ESDHC13, SYS_FSL_ERRATUM_ESDHC135, SYS_FSL_ERRATUM_ESDHC_A001 to mmc Kconfig. Move existing macros to related Kconfig. Signed-off-by: York Sun <york.sun@nxp.com> [trini: Migrate bk4r1] Signed-off-by: Tom Rini <trini@konsulko.com>
* mmc: move MMC_SDHCI_IO_ACCESSORS to KconfigMasahiro Yamada2016-12-29-0/+8
| | | | | | | | | | This is a user-unconfigurable option that is selected by the drivers that need to overwrite SDHCI IO memory accessors. (BCM2835 SDHCI seems the only driver that needs to do so.) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: move some SDHCI related options to KconfigMasahiro Yamada2016-12-29-10/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While I moved the options, I also renamed them so that they are all prefixed with MMC_SDHCI_. This commit was created in the following steps. [1] Rename with the following command find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e ' s/CONFIG_MMC_SDMA/CONFIG_MMC_SDHCI_SDMA/g s/CONFIG_BCM2835_SDHCI/CONFIG_MMC_SDHCI_BCM2835/g s/CONFIG_KONA_SDHCI/CONFIG_MMC_SDHCI_KONA/g s/CONFIG_MV_SDHCI/CONFIG_MMC_SDHCI_MV/g s/CONFIG_S5P_SDHCI/CONFIG_MMC_SDHCI_S5P/g s/CONFIG_SPEAR_SDHCI/CONFIG_MMC_SDHCI_SPEAR/g ' [2] create the Kconfig entries in drivers/mmc/Kconfig [3] Move the options by the following command tools/moveconfig.py -y MMC_SDHCI_SDMA MMC_SDHCI_BCM2835 \ MMC_SDHCI_KONA MMC_SDHCI_MV MMC_SDHCI_S5P MMC_SDHCI_SPEAR [4] Sort drivers/mmc/Makefile for readability Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: move CONFIG_SDHCI to Kconfig, renaming to CONFIG_MMC_SDHCIMasahiro Yamada2016-12-29-1/+17
| | | | | | | | | | | | | | | | | | | | | | | Move CONFIG_SDHCI to Kconfig and rename it to CONFIG_MMC_SDHCI. My motivation for the rename is, ultimately, to make all the MMC options prefixed with MMC_ and SDHCI options with MMC_SDHCI_, like Linux. This commit was created as follows: [1] Rename the config option with the following command: find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \ -type f -print | xargs sed -i -e 's/CONFIG_SDHCI/CONFIG_MMC_SDHCI/g' [2] create the entry for MMC_SDHCI in drivers/mmc/Kconfig [3] run "tools/moveconfig.py -y MMC_SDHCI" [4] add "depends on MMC_SDHCI" to existing SDHCI driver entries Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc: make MMC driver entries dependent on MMCMasahiro Yamada2016-12-29-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, CONFIG_MMC is not related to any other options by "depends on" or "select". One of big advantages of using Kconfig is automatic dependency tracking, but the current state is lacking it. As the first step, make the existing MMC driver entries depend on MMC. This commit was created by the following steps: [1] Run the following script: --------------------8<-------------------- rm -f tmp.txt for d in $(find . -path './configs/*_defconfig') do if grep -q -e 'CONFIG_MSM_SDHCI=y' $d || grep -q -e 'CONFIG_ATMEL_SDHCI=y' $d || grep -q -e 'CONFIG_ROCKCHIP_DWMMC=y' $d || grep -q -e 'CONFIG_SH_SDHI=y' $d || grep -q -e 'CONFIG_PIC32_SDHCI=y' $d || grep -q -e 'CONFIG_ZYNQ_SDHCI=y' $d || grep -q -e 'CONFIG_ROCKCHIP_SDHCI=y' $d || grep -q -e 'CONFIG_MMC_UNIPHIER=y' $d || grep -q -e 'CONFIG_SANDBOX_MMC=y' $d then echo CONFIG_MMC=y >> $d echo ${d#./configs/} >> tmp.txt fi done tools/moveconfig.py -y -s -d tmp.txt rm tmp.txt --------------------8<-------------------- [2] surround MMC driver entries with "if MMC" and "endif" Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>