- Oct 28, 2019
-
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Yangbo Lu authored
Converted to use fsl_esdhc_imx for i.MX platforms. Signed-off-by:
Yangbo Lu <yangbo.lu@nxp.com> Tested-by:
Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by:
Peng Fan <peng.fan@nxp.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Martyn Welch <martyn.welch@collabora.com> Acked-by:
Jason Liu <Jason.hui.liu@nxp.com> Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Troy Kisky authored
Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Yangbo Lu authored
The fsl_esdhc driver was for Freescale eSDHC on MPC83XX/MPC85XX initially. The later QoriQ series PowerPC processors (which were evolutions of MPC83XX/MPC85XX), QorIQ series ARM processors, and i.MX series processors were using this driver for their eSDHCs too. For the two series processors, the eSDHCs are becoming more and more different. We should have split it into two drivers, like them (sdhci-of-esdhc.c/sdhci-esdhc-imx.c) in linux kernel. This patch is just to create a fsl_esdhc_imx driver which is a copy of fsl_esdhc driver for i.MX processors. We will convert i.MX processors to use fsl_esdhc_imx, and clean up the two drivers separately in the future patches. Signed-off-by:
Yangbo Lu <yangbo.lu@nxp.com> Tested-by:
Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by:
Peng Fan <peng.fan@nxp.com> Reviewed-by:
Martyn Welch <martyn.welch@collabora.com>
-
Yangbo Lu authored
u-boot is trying to make CONFIG_BLK as a hard requirement for DM_MMC. But now it's still not. config BLK bool "Support block devices" depends on DM default y if DM_MMC When fsl_esdhc driver was reworked for DM_MMC support, DM_MMC without CONFIG_BLK enabled wasn't considered. This patch is to fix probe issue without CONFIG_BLK enabled. Signed-off-by:
Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by:
Yinbo Zhu <yinbo.zhu@nxp.com> Reviewed-by:
Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Yinbo Zhu authored
PowerPC supports 32 bit address. So adopt 32 bit addr in fsl_esdhc for CONFIG_PPC. Signed-off-by:
Yinbo Zhu <yinbo.zhu@nxp.com> Reviewed-by:
Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
-
Yinbo Zhu authored
Signed-off-by:
Yinbo Zhu <yinbo.zhu@nxp.com> Reviewed-by:
Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
-
Ye Li authored
The wp-gpios property is used for gpio, if this is set, the WP pin is muxed to gpio function, can't be used as internal WP checking. However the codes remain to use internal WP checking. This patch changes to examine the "fsl,wp-controller" for enabling internal WP checking, and "wp-gpios" for muxing to gpio. Signed-off-by:
Ye Li <ye.li@nxp.com>
-
Abel Vesa authored
Since the fsl_esdhc will also be used by SPL, make the preprocessor switches more generic to allow any kind of build. Signed-off-by:
Abel Vesa <abel.vesa@nxp.com> Reviewed-by:
Fabio Estevam <festevam@gmail.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
Patrick Bruenn authored
Add compatible "fsl,imx53-esdhc" to keep mmc working on i.MX53 platforms with CONFIG_DM_MMC=y Signed-off-by:
Patrick Bruenn <p.bruenn@beckhoff.com>
-
Angelo Dureghello authored
This patch has been tested on the mcf54415-based stmark2 board. The eSDHC driver works reliably using DMA mode. Signed-off-by:
Angelo Dureghello <angelo@sysam.it>
-
Yinbo Zhu authored
This patch is to make get_cd work well when DM_MMC enabled Signed-off-by:
Yinbo Zhu <yinbo.zhu@nxp.com> Reviewed-by:
York Sun <york.sun@nxp.com>
-
Fabio Estevam authored
The following hang is observed on a Hummingboard 2 MicroSOM i2eX iMX6D - rev 1.3 with no eMMC populated on board: U-Boot SPL 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000) Trying to boot from MMC1 U-Boot 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000) CPU: Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) at 33C Reset cause: POR Board: MX6 HummingBoard2 DRAM: 1 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... *** Warning - bad CRC, using default environment No panel detected: default to HDMI Display: HDMI (1024x768) In: serial Out: serial Err: serial ---> hangs which is caused by the following infinite loop inside esdhc_send_cmd_common() while (!(esdhc_read32(®s->irqstat) & flags)) ; Instead of looping forever, provide an exit path so that a timeout error can be propagated in the case irqstat does not report any interrupts, which may happen when no eMMC is populated on board. Reported-by:
Ricardo Salveti <rsalveti@rsalveti.net> Signed-off-by:
Fabio Estevam <festevam@gmail.com> Tested-by:
Peter Robinson <pbrobinson@gmail.com> Tested-by:
Ricardo Salveti <rsalveti@rsalveti.net>
-
Peng Fan authored
When CONIFG_CLK is enabled, use uclass clk api to handle the clock. Signed-off-by:
Peng Fan <peng.fan@nxp.com> Reviewed-by:
Anatolij Gustschin <agust@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by:
Troy Kisky <troy.kisky@boundarydevices.com>
-
Peng Fan authored
The strobe dll code is ported from Linux Kernel: drivers/mmc/host/sdhci-esdhc-imx.c The comments are from the above file, "For HS400 eMMC, there is a data_strobe line. This signal is generated by the device and used for data output and CRC status response output in HS400 mode. The frequency of this signal follows the frequency of CLK generated by host. The host receives the data which is aligned to the edge of data_strobe line. Due to the time delay between CLK line and data_strobe line, if the delay time is larger than one clock cycle, then CLK and data_strobe line will be misaligned, read error shows up. So when the CLK is higher than 100MHz, each clock cycle is short enough, host should configure the delay target. " Signed-off-by:
Peng Fan <peng.fan@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
-
- Oct 25, 2019
-
-
Lokesh Vutla authored
In SPL, all the available mmc devices gets initialized during boot. This might not work in cases where clocks are not available for certain mmc devices(other than boot device) and the support for enabling device might not be ready. Texas Instruments' K3 J721E device having a central system controller (dmsc) is one such example falling in this category. Below is the sequence for the failing scenario: - ROM comes up in SD mode and loads SPL by just initialing SD card. - SPL loads dmsc firmware from SD Card. Since ROM has enabled SD, SPL need not enable the SD, just need to re initialize the card. But SPL is trying to initialize other MMC instances which are in disabled state. Since dmsc firmware is not yet available, devices cannot be enabled. So in SPL, initialize only the mmc device that is needed. Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by:
Peng Fan <peng.fan@nxp.com>
-
Sam Protsenko authored
It's quite hard to figure out time units for various function that have timeout parameters. This leads to possible errors when one forgets to convert ms to us, for example. Let's rename those parameters correspondingly to 'timeout_us' and 'timeout_ms' to prevent such issues further. While at it, add time units info as comments to struct mmc fields. This commit doesn't change the behavior, only renames parameters names. Buildman should report no changes at all. Signed-off-by:
Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by:
Peng Fan <peng.fan@nxp.com> Reviewed-by:
Igor Opaniuk <igor.opaniuk@gmail.com>
-
Sam Protsenko authored
mmc_wait_dat0() expects timeout argument to be in usec units. But some overlying functions operate on timeout in msec units. Convert timeout from msec to usec when passing it to mmc_wait_dat0(). This fixes 'avb' commands on BeagleBoard X15, because next chain was failing: get_partition() -> mmc_switch_part() -> __mmc_switch() -> mmc_wait_dat0() when passing incorrect timeout from __mmc_switch() to mmc_wait_dat0(). Fixes: bb98b8c5c06a ("mmc: During a switch, poll on dat0 if available and check the final status") Signed-off-by:
Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by:
Eugeniu Rosca <rosca.eugeniu@gmail.com> Tested-by:
Eugeniu Rosca <rosca.eugeniu@gmail.com> Reviewed-by:
Peng Fan <peng.fan@nxp.com> Tested-by:
Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by:
Igor Opaniuk <igor.opaniuk@gmail.com>
-
Baruch Siach authored
The comment about init op being NULL used to be next to the NULL check code. Commit 8ca51e51 ("dm: mmc: Add a way to use driver model for MMC operations") separated the comment from the code. Put them back together. Fixes: 8ca51e51 ("dm: mmc: Add a way to use driver model for MMC operations") Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Reviewed-by:
Peng Fan <peng.fan@nxp.com>
-
Peng Fan authored
eMMC 5.1+ supports HS400 Enhances Strobe mode without the need for tuning procedure. The flow is as following: - set HS_TIMIMG (Highspeed) - Host change freq to <= 52Mhz - set the bus width to Enhanced strobe and DDR8Bit(CMD6), EXT_CSD[183] = 0x86 instead of 0x80 - set HS_TIMING to 0x3 (HS400) - Host change freq to <= 200Mhz - Host select HS400 enhanced strobe complete Signed-off-by:
Peng Fan <peng.fan@nxp.com>
-
Anup Patel authored
The MMC mode and width are fixed for MMC SPI host hence we skip sd_select_mode_and_width() and mmc_select_mode_and_width() for MMC SPI host. Signed-off-by:
Anup Patel <anup.patel@wdc.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Bin Meng <bmeng.cn@gmail.com>
-
Jean-Jacques Hiblot authored
This operation may fail. Retry it a few times before giving up and report a failure. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
Accessing the boot partition had been error prone with HS200 and HS400 and was disabled. The driver first switched to a lesser mode and then switched the partition access. It was mostly due to a bad handling of the switch and has been fixed, so let's remove this 'feature' Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
The switch operation can sometimes make the bus unreliable, in that case the send_status parameter should be false to indicate not to poll using CMD13. If polling on dat0 is possible, we should use it to detect the end of the operation. At the end of the operation it is safe to use CMD13 to get the status of the card. It is important to do so because the operation may have failed. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
The e-MMC spec allows the e-MMC to specify a timeout for the partition switch command. It can take up to 2550 ms. There is no lower limit to this value in the spec, but do as the the linux driver does and force it to be at least 300ms. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
Starting with rev 4.5, the eMMC can define a generic timeout for the SWITCH command. Following Linux Kernel code, the timeout also changed from 1000 -> 500 Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
Using the DAT0 line as a rdy/busy line is an alternative to reading the status register of the card. It especially useful in situation where the bus is not in a good shape, like when modes are switched. This is also how the linux driver behaves. Note of warning: As per the specification, while polling on DAT0 the CLK must not turned off: "[...] Without a clock edge the Device (unless previously disconnected by a deselect command (CMD7)) will force the DAT0 line down, forever. [...]" Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
mmc_send_status() is currently used to poll the card until it is ready, not actually returning the status of the card. Make it return the status and add another function to poll the card. Also remove the 'extern' declaration in the mmc-private.h header to comply with the coding standard. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Jean-Jacques Hiblot authored
This reverts commit 318a7a57. The last and only user of this callback had been the omap_hsmmc driver. It is not used anymore. Removing the callback. Signed-off-by:
Jean-Jacques Hiblot <jjhiblot@ti.com>
-
Marek Vasut authored
U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well. Currently U-Boot code not support accessing boot partition in HS200/400 mode. This needs more check. Signed-off-by:
Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Peng Fan <peng.fan@nxp.com> Reviewed-by:
Peng Fan <peng.fan@nxp.com>
-
Marek Vasut authored
The tiny printf implementation only supports %x format specifier, it does not support %X . Since it makes little difference whether the debug output prints hex numbers in capitals or not, change it to %x and make the MMC_TRACE output work with tiny printf too. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Simon Glass <sjg@chromium.org>
-