| #
f7c0370c |
| 26-Jul-2018 |
Jason Zhu <jason.zhu@rock-chips.com> |
mmc: dw_mmc: fix timeout error
If data error, we will reset the controller and wait when it is ready. But the timeout data type is u32, it is never less than zero. So change judgement data to one.
mmc: dw_mmc: fix timeout error
If data error, we will reset the controller and wait when it is ready. But the timeout data type is u32, it is never less than zero. So change judgement data to one.
Change-Id: If049da06ecfe42fd31cca344bf87f69f7850dbe2 Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
show more ...
|
| #
39abf9c1 |
| 17-Aug-2017 |
Paweł Jarosz <paweljarosz3691@gmail.com> |
mmc: dw_mmc: support transfer mode autodetection
dw_mmc supports two transfer modes in u-boot: idma and fifo. This patch adds autodetection of transfer mode and eliminates setting this in host confi
mmc: dw_mmc: support transfer mode autodetection
dw_mmc supports two transfer modes in u-boot: idma and fifo. This patch adds autodetection of transfer mode and eliminates setting this in host config struct
Change-Id: I0eafb78c3fd171827664e320b8959f3c5e27094a Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
show more ...
|
| #
12ee84b1 |
| 19-Oct-2017 |
Shawn Lin <shawn.lin@rock-chips.com> |
mmc: dwmmc: fix wrong implementation of dwmci_memcpy_toio
We should increase the buffer address instead of fifo for write case.
Change-Id: Ifab8ab0480c7b6f5cd0f89c8cd67ed7b7005acad Fixes: bda599f7c
mmc: dwmmc: fix wrong implementation of dwmci_memcpy_toio
We should increase the buffer address instead of fifo for write case.
Change-Id: Ifab8ab0480c7b6f5cd0f89c8cd67ed7b7005acad Fixes: bda599f7c7d1 ("mmc: dwmmc: Add stride PIO for better burst mode support") Reported-and-tested-by: Frank Wang <wmc@rock-chips.com> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
show more ...
|
| #
bda599f7 |
| 09-Oct-2017 |
Shawn Lin <shawn.lin@rock-chips.com> |
mmc: dwmmc: Add stride PIO for better burst mode support
This patch enables stride PIO for better burst mode support on some rockchip platforms, for instance rk3128, etc. It uses ldm and stm to make
mmc: dwmmc: Add stride PIO for better burst mode support
This patch enables stride PIO for better burst mode support on some rockchip platforms, for instance rk3128, etc. It uses ldm and stm to make multiple accessing from CPU under some ARM architecture.
Design Note: 1) Carefully test it beyond the armv7(m) core since I don't test them! If you disassemble the code, dwmci_memcpy_fromio may be changed to use ldmia.w and stmia.w, as well as some other optimization for push/pop stack operation, but they are all fine! 2) Do *NOT* remove noinline and __volatile attributes as you could fall into trouble by the optimization of GCC. And please invent new attributes if you use *OTHER* compilers which have their own keywords claiming the function to be a "plase don't inline the function and please don't reorder the groups". 3) If you want to use this feature for other rockchip platforms, you could append new config in rockchip_dw_mmc.c. But now we only have CONFIG_ROCKCHIP_RK3128 which means we just enable it for rk312x platforms. 4) Stride PIO is determined by both of host->stride_pio and the data payload. The intention of it is to make the block accessing faster. So now only enable it for who's data payload is larger(or equal to)than 512 Bytes. 5) MAX_STRIDE means we support burst MAX_STRIDE * 4 Bytes per stride. Of course you could change that, but please read the comment before it in the code and do it carefully.
How to test? 1) Prepare a memory, for instance, 0x70000000 on RK3126c.
=> mw 0x70000000 0x55aa55aa 0x200
2) Check it to see if 0x70000000 ~ 0x700000200 are all 0x55aa55aa
=> md 0x70000000 0x200 70000000: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U 70000010: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U 70000020: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U 70000030: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U ....
3) Fetch data of 0x70000000 ~ 0x700000200 and wrrite them to eMMC, for instance, LBA 0x10000, and blk count is 1 as one blk means 0x200 bytes.
=> mmc write 0x70000000 0x10000 1
MMC write: dev # 0, block # 65536, count 1 ... 1 blocks written: OK
4) Clean the merory buffer and double check it
=> mw 0x70000000 0x0 0x200 => md 0x70000000 0x200 70000000: 00000000 00000000 00000000 00000000 ................ 70000010: 00000000 00000000 00000000 00000000 ................ 70000020: 00000000 00000000 00000000 00000000 ................ ....
5) Well, now let's read back the data from eMMC from the LBA we wrote before.
=> mmc read 0x70000000 0x10000 1
MMC read: dev # 0, block # 65536, count 1 ... 1 blocks read: OK
6) We expect the 0x70000000 ~ 0x700000200 should be 0x55aa55aa instead of 0x0 which is cleared by step 4).
=> md 0x70000000 0x200 70000000: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U 70000010: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U 70000020: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U 70000030: 55aa55aa 55aa55aa 55aa55aa 55aa55aa .U.U.U.U.U.U.U.U ....
Great, we see that the write and read eMMC are finished well and the data payload is correct as expected!
Change-Id: I9b68c335449550b95f1a8f5841d46821346e45af Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
show more ...
|
| #
c1cfa99b |
| 15-May-2017 |
Ziyuan Xu <xzy.xu@rock-chips.com> |
mmc: dw_mmc: fix bus width setting
Hosts capable of 8-bit transfers can also do 4 bits.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
|
| #
24527ef9 |
| 15-May-2017 |
Ziyuan Xu <xzy.xu@rock-chips.com> |
mmc: dw_mmc: rockchip: fix data crc error on ddr52 8bit mode
The clk_divider must be set to 1 on ddr52 8bit mode for rockchip platform. Otherwise we will get a data crc error during data transmissio
mmc: dw_mmc: rockchip: fix data crc error on ddr52 8bit mode
The clk_divider must be set to 1 on ddr52 8bit mode for rockchip platform. Otherwise we will get a data crc error during data transmission.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
show more ...
|
| #
0d797f18 |
| 15-May-2017 |
Ziyuan Xu <xzy.xu@rock-chips.com> |
mmc: dw_mmc: reset controller after data error
Per dw_mmc databook, it's recommend that reset the host contoller if some data-related error occurre during tuning progress.
Signed-off-by: Ziyuan Xu
mmc: dw_mmc: reset controller after data error
Per dw_mmc databook, it's recommend that reset the host contoller if some data-related error occurre during tuning progress.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
show more ...
|
| #
8c921dce |
| 15-May-2017 |
Ziyuan Xu <xzy.xu@rock-chips.com> |
mmc: dw_mmc: add the support for the tuning scheme
For the HS200/HS400/SDR104, tuning is needed to determine the optimal sampling point. Actual tuning procedure is provided by specific host controll
mmc: dw_mmc: add the support for the tuning scheme
For the HS200/HS400/SDR104, tuning is needed to determine the optimal sampling point. Actual tuning procedure is provided by specific host controller driver.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
show more ...
|
| #
caa21a21 |
| 15-May-2017 |
Ziyuan Xu <xzy.xu@rock-chips.com> |
mmc: rework ddr mode judgement with timing
Since the card device is set the proper timing after speed mode switch is completed, host driver can get ddr_mode from timing parameter. So drop the antiqu
mmc: rework ddr mode judgement with timing
Since the card device is set the proper timing after speed mode switch is completed, host driver can get ddr_mode from timing parameter. So drop the antiquated ddr_mode.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
show more ...
|
| #
ba0e56e1 |
| 15-May-2017 |
Ziyuan Xu <xzy.xu@rock-chips.com> |
mmc: dw_mmc: implement card_busy detection
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
|
| #
1fdafb2e |
| 18-Aug-2017 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
|
| #
e7881d85 |
| 29-Jul-2017 |
Simon Glass <sjg@chromium.org> |
dm: mmc: Drop CONFIG_DM_MMC_OPS
All boards which use DM_MMC have now been converted to use DM_MMC_OPS. Drop the option and good riddance.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
07b0b9c0 |
| 30-Dec-2016 |
Jaehoon Chung <jh80.chung@samsung.com> |
mmc: change the set_ios return type from void to int
To maintain consistency, set_ios type of legacy mmc_ops changed to int.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
|
| #
c69f6d04 |
| 13-Oct-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of http://git.denx.de/u-boot-mmc
|
| #
e5113c33 |
| 23-Sep-2016 |
Jaehoon Chung <jh80.chung@samsung.com> |
mmc: dw_mmc: remove the unnecessary arguments for dwmci_setup_cfg
Some arguments don't need to pass to dwmci_setup_cfg. They are already included in dwmci_host structure.
Signed-off-by: Jaehoon Chu
mmc: dw_mmc: remove the unnecessary arguments for dwmci_setup_cfg
Some arguments don't need to pass to dwmci_setup_cfg. They are already included in dwmci_host structure.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
f85fad02 |
| 21-Sep-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of http://git.denx.de/u-boot-mmc
|
| #
2b429033 |
| 19-Sep-2016 |
Jacob Chen <jacob2.chen@rock-chips.com> |
mmc: dw_mmc: push/pop all FIFO data if any data request
When DTO interrupt occurred, there are any remaining data still in FIFO due to RX FIFO threshold is larger than remaining data. It also causes
mmc: dw_mmc: push/pop all FIFO data if any data request
When DTO interrupt occurred, there are any remaining data still in FIFO due to RX FIFO threshold is larger than remaining data. It also causes that dwmmc didn't trigger RXDR interrupt, so is TX.
It's responsibility of driver to read remaining bytes on seeing DTO interrupt.
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
show more ...
|
| #
a60d94b2 |
| 05-Aug-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
|
| #
720724d0 |
| 28-Jul-2016 |
Xu Ziyuan <xzy.xu@rock-chips.com> |
mmc: dw_mmc: fix data starvation by host timeout under FIFO mode
This patch fixes data starvation by host timeout(HTO) error interrupt which occurred under FIFO mode transfer on rk3036 board.
The f
mmc: dw_mmc: fix data starvation by host timeout under FIFO mode
This patch fixes data starvation by host timeout(HTO) error interrupt which occurred under FIFO mode transfer on rk3036 board.
The former implement, the actual bytes were transmitted may be less than should be. The size will still subtract value of len in case of there is no receive/transmit FIFO data request interrupt.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
show more ...
|
| #
2990e07a |
| 28-Jul-2016 |
Xu Ziyuan <xzy.xu@rock-chips.com> |
mmc: dw_mmc: transfer proper bytes to FIFO
The former implement, dw_mmc will push and pop the redundant data to FIFO, we should transfer it according to the real size.
Signed-off-by: Ziyuan Xu <xzy
mmc: dw_mmc: transfer proper bytes to FIFO
The former implement, dw_mmc will push and pop the redundant data to FIFO, we should transfer it according to the real size.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
show more ...
|
| #
915ffa52 |
| 19-Jul-2016 |
Jaehoon Chung <jh80.chung@samsung.com> |
mmc: use the generic error number
Use the generic error number instead of specific error number. If use the generic error number, it can debug more easier.
Signed-off-by: Jaehoon Chung <jh80.chung@
mmc: use the generic error number
Use the generic error number instead of specific error number. If use the generic error number, it can debug more easier.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
show more ...
|
| #
ccd60a85 |
| 19-Jul-2016 |
Jaehoon Chung <jh80.chung@samsung.com> |
mmc: dw_mmc: remove the duplicated header file
<asm-generic/errno.h> is already included in <errno.h>. It can use <errno.h> instead of <asm-generic/errno.h>
Signed-off-by: Jaehoon Chung <jh80.chung
mmc: dw_mmc: remove the duplicated header file
<asm-generic/errno.h> is already included in <errno.h>. It can use <errno.h> instead of <asm-generic/errno.h>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
fe34b6a4 |
| 28-Jul-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
02ebd42c |
| 19-Jul-2016 |
Xu Ziyuan <xzy.xu@rock-chips.com> |
mmc: dw_mmc: reduce timeout detection cycle
It's no need to speed 10 seconds to wait the mmc device out from busy status. 500 milliseconds enough.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> R
mmc: dw_mmc: reduce timeout detection cycle
It's no need to speed 10 seconds to wait the mmc device out from busy status. 500 milliseconds enough.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
show more ...
|
| #
5628347f |
| 28-Jun-2016 |
Jaehoon Chung <jh80.chung@samsung.com> |
dm: mmc: dwmmc: use the callback functions as static
There are no places to call these functions. It should be used the callback function. Then it can be used as static functions.
Signed-off-by: Ja
dm: mmc: dwmmc: use the callback functions as static
There are no places to call these functions. It should be used the callback function. Then it can be used as static functions.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|