- 07 Mar, 2019 1 commit
-
-
Tien Hock, Loh authored
Some bugs in MMC stack needs to be fixed: - scr cannot be local as this will cause cache issue when invalidating after the read DMA transfer is completed - ACMD41 needs to send voltage information in initialization, otherwise the command is a query, thus will not initialize the controller - when checking device state, retry until the retries counter goes to zero before failing Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
-
- 17 Jan, 2019 1 commit
-
-
Yann Gautier authored
In patch 93768644 , ret will be MMC_STATE_TRAN (=4), which is a valid value. We shouldn't exit the function in that case, but only if ret is < 0. Change-Id: I776693fe847b6b45190af028f12d2e724ca46399 Signed-off-by: Yann Gautier <yann.gautier@st.com>
-
- 04 Jan, 2019 1 commit
-
-
Antonio Nino Diaz authored
Enforce full include path for includes. Deprecate old paths. The following folders inside include/lib have been left unchanged: - include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH} The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them). For example, this patch had to be created because two headers were called the same way: e0ea0928 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca339 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems. Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged. Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
- 18 Dec, 2018 1 commit
-
-
Joakim Bech authored
Running TF-A 2.0 and later seems to cause a regression on HiKey 620. NOTICE: BL2: v2.0(release):v2.0 NOTICE: BL2: Built : 17:41:23, Dec 17 2018 NOTICE: acpu_dvfs_set_freq: set acpu freq success!ERROR: CMD1 failed after 100 retries ERROR: BL2: Failed to load image (-5) The reason seems to be that during emmc enumeration when BL2 sends the command OCR_SECTOR_MODE | OCR_VDD_MIN_2V7 | OCR_VDD_MIN_1V7 it for some reason takes some more time to get a reply. So a delay with mdelay(1), seems to not be enough any longer and therefore we increase it to mdelay(10) instead which makes the device boot as expected again. Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
-
- 04 Dec, 2018 1 commit
-
-
Yann Gautier authored
Signed-off-by: Yann Gautier <yann.gautier@st.com>
-
- 26 Nov, 2018 1 commit
-
-
Haojian Zhuang authored
EXT_CSD command needs to access data from eMMC device. Add the operation of polling eMMC device status. Make sure the command is finished. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-
- 28 Sep, 2018 2 commits
-
-
Yann Gautier authored
Respect official response type and update response to follow official specification. All the MMC_RESPONSE_R(_x) are replaced with each corresponding define. Partly revert 2a82a9c9 for dw_mmc.c: Responses R1, R1B and R5 have CRC. Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Yann Gautier <yann.gautier@st.com>
-
Shawn Guo authored
The Poplar is broken on eMMC initialization because of commit 2a82a9c9 ("drivers: emmc: dw_mmc: Add response flag into response ID definition"). It changes the driver behavior on response type handling in dw_send_cmd(), because MMC_RESPONSE_R(2) and MMC_RESPONSE_R2 are different things. MMC core is still sending the former while we already changed to check the latter in dw_mmc driver. This patch fixes R2 response type in MMC core code. It's the same thing as what commit 94522ff7 ("drivers: mmc: Fix R3 response type definition") does for R3 response. With this fix, Poplar is back to work. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-
- 04 Sep, 2018 2 commits
-
-
Bryan O'Donoghue authored
Add missing response type for SWITCH command and STOP_TRANSMISSION so that controller can be configured accordingly. [bod: ported this change from Jun's eMMC patches to the MMC driver] Signed-off-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
Bryan O'Donoghue authored
The R3 response type definition should be (1 << 0). Make sure we define the expected response code in the appropriate fashion. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-
- 10 Aug, 2018 5 commits
-
-
Antonio Nino Diaz authored
Because of -Werror, this causes a build error. Change-Id: I37a8c4bbfe3f2ced5e17981a2814985919ad483b Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
-
Haojian Zhuang authored
It should set buswidth and speed of mmc controller before accessing mmc. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-
Haojian Zhuang authored
DMA is always used in mmc driver. So the buffer address should always follow the DMA limitation. There're same requirement in mmc_read_blocks()/mmc_write_blocks() on parameter buf. Since parameter buf comes from io_block driver, it's already handled in io_block driver. At here, just make the minimum address alignment on 16 chars. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-
Haojian Zhuang authored
mmc_read_blocks()/mmc_write_blocks() derived from io_block_ops_t type. It means that lba param should be integer type, not unsigned integer type. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-
Haojian Zhuang authored
Sending CMD8 before CMD1 just causes to fetch data failure in eMMC. Check whether it's eMMC first. If it's eMMC, send CMD1 command instead. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-
- 02 Aug, 2018 1 commit
-
-
Yann Gautier authored
A new function mmc_reset_to_idle is also created. Signed-off-by: Yann Gautier <yann.gautier@st.com>
-
- 03 Jul, 2018 1 commit
-
-
Yann Gautier authored
This change is largely based on existing eMMC framework by Haojian Zhuang (@hzhuang1). The MMC framework supports both eMMC and SD card devices. It was written as a new framework since breaking few eMMC framework APIs. At card probe and after the reset to idle command (CMD0), a Send Interface Condition Command is sent (CMD8) to distinguish between eMMC and SD card devices. eMMC devices go through the same sequence as in the former eMMC framework. Else the framework uses commands dedicated to SD-cards for init or frequency switch. A structure is created to share info with the driver. It stores: - the MMC type (eMMC, SD or SD HC) - the device size - the max frequency supported by the device - the block size: 512 for eMMC and SD-HC and read from CSD structure for older SD-cards Restriction to align buffers on block size has been removed. Cache maintenance was removed and is expected to be done in the platform or device driver. The MMC framework includes some MISRA compliance coding style maybe not yet ported in the existing eMMC framework. Fixes ARM-software/tf-issues#597 Signed-off-by: Yann Gautier <yann.gautier@st.com>
-