- 02 5月, 2018 1 次提交
-
-
由 Peng Fan 提交于
sd_read_ssr returns 0, means no error. Fixes: 5b2e72f3("mmc: read ssr only if MMC write support is enabled") Signed-off-by: NPeng Fan <peng.fan@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
-
- 24 4月, 2018 1 次提交
-
-
由 Marek Vasut 提交于
Staticize the function since it's only used in mmc.c . Signed-off-by: NMarek Vasut <marek.vasut@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Tom Rini <trini@konsulko.com>
-
- 23 2月, 2018 2 次提交
-
-
由 Alexander Kochetkov 提交于
MMC card with EXT_CSD_REV value 9 will trigger off-by-one bug while accessing mmc_versions array. The patch fix that. Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com>
-
由 Faiz Abbas 提交于
Drop the unnecessary empty function case for mmc_probe(). Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com>
-
- 21 2月, 2018 1 次提交
-
-
由 Jaehoon Chung 提交于
If some configs are disabled, number of freqs array will not assigned to correct value with bus_mode. Synchornize the ordering with enum bus_mode in mmc.h. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
-
- 19 2月, 2018 3 次提交
-
-
由 Jean-Jacques Hiblot 提交于
The correspondence between mmc versions as used in u-boot and the version numbers reported in register EXT_CSD_REV is wrong for versions above and including MMC_VERSION_4_41. All those versions were shifted by one: real 4.5 hardware appeared to be MMC_VERSION_5_0. Fix this by adding the missing version in the correspondence table. Reported-by: Neil Eilmsteiner Heribert <eil@keba.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NSam Protsenko <semen.protsenko@linaro.org>
-
由 Jean-Jacques Hiblot 提交于
After settings the speed of the sd with the switch command, a check is done to make sure that the new speed has been set. The current check has a masking error: speed are encoded on 4 bits only. Fix it by masking the upper bits. This fixes a problem seen with QEmu emulating a vexpress-a15. Reported-by: NJonathan Gray <jsg@jsg.id.au> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: NJonathan Gray <jsg@jsg.id.au>
-
由 Masahiro Yamada 提交于
Use pr_* log functions from Linux. They can be enabled/disabled via CONFIG_LOGLEVEL. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NLukasz Majewski <lukma@denx.de> Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
-
- 24 1月, 2018 2 次提交
-
-
由 Jun Nie 提交于
Poll for broken card detection case instead of return no card detected. Signed-off-by: NJun Nie <jun.nie@linaro.org>
-
由 Jaehoon Chung 提交于
When clock is enabling, it's assigned to 0 as mmc->clock. Then it can't initialize any card. Fix to assign to correct clock value as mmc->cfg->f_min or f_max. Fixes: 9546eb92 ("mmc: fix the wrong disabling clock") Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Tested-by: NGuillaume GARDET <guillaume.gardet@free.fr> Tested-by: NAnand Moon <linux.amoon@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
- 22 1月, 2018 1 次提交
-
-
由 Jaehoon Chung 提交于
When power is off, clock is not disabling. Because it's passed to 1, mmc->clock should be set to f_min value. Some drivers can't initialize the eMMC/SD card with current status. This patch is to fix the disabling clock value to 0. Fixes: 2e7410d7 ("mmc: disable the mmc clock during power off") Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Reviewed-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: NGuillaume GARDET <guillaume.gardet@free.fr> Tested-by: NAnand Moon <linux.amoon@gmail.com>
-
- 12 1月, 2018 29 次提交
-
-
由 Jean-Jacques Hiblot 提交于
hc_wp_grp_size is needed only if hardware partitionning is used. On ARM removing it saves about 30 bytes of code space. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
This information is only used by the "mmc info" command. On ARM removing this information from SPL saves about 140 of code space. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Also remove erase_grp_size and write_bl_len from struct mmc as they are not used anymore. On ARM, removing them saves about 100 bytes of code space in SPL. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
The content of ssr is useful only for erase operations. on ARM, removing sd_read_ssr() saves around 300 bytes. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Using a table versus a switch() structure saves a bit of space Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Not all boards have an eMMC and not all users have a need for this. Allow to compile it out. By default it is still included. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Supporting USH and HS200 increases the code size as it brings in IO voltage control, tuning and fatter data structures. Use Kconfig configuration to select which of those features should be built in. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
This allows to compile out the log message by tweaking the LOGLEVEL. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Jean-Jacques Hiblot 提交于
Not using this function reduces the size of the binary. It's replaces by a standard malloc() and the alignment requirement is handled by an intermediate buffer on the stack. Also make sure that the allocated buffer is freed in case of error. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
The ext_csd is allocated only for MMC above version 4. The compare will crash or fail for older MMCs. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Make sure that those basic capabilities are advertised by the host. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NLukasz Majewski <lukma@denx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Jean-Jacques Hiblot 提交于
As the legacy modes were not added to the list of supported modes, old cards that do not support other modes could not be used. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NLukasz Majewski <lukma@denx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Jean-Jacques Hiblot 提交于
This is a useful information while debugging the initialization process or performance issues. Also dump this information with the other mmc info if the verbose option is selected Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
HS200/SDR104 requires tuning command to be sent to the card. Add a simple function to send tuning command and to read and compare the received data with the tuning block pattern. This function can be used by platform driver to perform DLL tuning. This patch is similar to commit 996903de92f0 ("mmc: core: add core-level function for sending tuning commands") added in linux kernel. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
HS200 only supports 1.2v and 1.8v signal voltages. DDR52 supports 3.3v/1.8v or 1.2v signal voltages. Select the lowest voltage available when using those modes. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Kishon Vijay Abraham I 提交于
With certain SD cards like Kingston 8GB/16GB UHS card, it is seen that MMC_CMD_ALL_SEND_CID cmd fails on first attempt, but succeeds subsequently. Therefore, retry MMC_CMD_ALL_SEND_CID cmd a few time as done in Linux kernel. Similarly, it is seen that MMC_CMD_SET_BLOCKLEN may fail on first attempt, therefore retry this cmd a few times as done in kernel. To make it clear that those are optionnal workarounds, a new Kconfig option 'MMC_QUIRKS' is added (enabled by default). Signed-off-by: NVignesh R <vigneshr@ti.com> Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Boot partitions do not support HS200. Changing to a lower performance mode is required to access them. mmc_select_mode_and_width() and sd_select_mode_and_width() are modified to make it easier to call them outside of the initialization context. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Jean-Jacques Hiblot 提交于
If a power cycle cannot be done on Vcc, it is safer not to try the UHS modes because we wouldn't be able to recover from an error occurring during the UHS initialization. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Add UHS modes to the list of supported modes, get the UHS capabilites of the SDcard and implement the procedure to switch the voltage (UHS modes use 1v8 IO lines) During the voltage switch procedure, DAT0 is used by the card to signal when it's ready. The optional card_busy() callback can be used to get this information from the host driver. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Kishon Vijay Abraham I 提交于
Add HS200 to the list of supported modes and introduce tuning in the MMC startup process. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Kishon Vijay Abraham I 提交于
Tuning is a mandatory step in the initialization of SDR104 and HS200 modes. This callback execute the tuning process. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Kishon Vijay Abraham I 提交于
There is no point in having the mmc clock enabled during power off. Disable the mmc clock. This is similar to how it's programmed in Linux Kernel. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NVignesh R <vigneshr@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Kishon Vijay Abraham I 提交于
mmc clock has to be disabled in certain cases like during the voltage switch sequence. Modify mmc_set_clock function to take disable as an argument that signifies if the clock has to be enabled or disabled. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Kishon Vijay Abraham I 提交于
mmc/sd specification requires vdd to be disabled for 1 ms and then enabled again during power cycle. Add a function in mmc core to perform power cycle and set the io signal to it's initial state. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Jean-Jacques Hiblot 提交于
Add a new callback function *send_init_stream* which start a sequence of at least 74 clock cycles. The mmc core uses *mmc_send_init_stream* in order to invoke the callback function. This will be used during power cycle where the specification requires such a sequence after power up. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Kishon Vijay Abraham I 提交于
Add a new function *mmc_set_signal_voltage* in mmc core which can be used during mmc initialization to select the signal voltage. Platform driver should use the set_ios callback function to select the signal voltage. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Kishon Vijay Abraham I 提交于
set_ios callback has a return value of 'int' but the mmc_set_ios() function ignore this. Modify mmc_set_ios() and the callers of mmc_set_ios() to to return the error status. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Jean-Jacques Hiblot 提交于
The MMC startup process currently handles 4 modes. To make it easier to add support for more modes, let's make the process more generic and use a list of the modes to try. The major functional change is that when a mode fails we try the next one. Not all modes are tried, only those supported by the card and the host. Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-