From mboxrd@z Thu Jan 1 00:00:00 1970 From: hl Date: Tue, 10 Nov 2015 09:02:13 +0800 Subject: [U-Boot] [PATCH v4 13/20] rockchip: Add an rk3036 MMC driver In-Reply-To: References: <1447056167-16138-1-git-send-email-hl@rock-chips.com> <1447056167-16138-14-git-send-email-hl@rock-chips.com> Message-ID: <56414215.4020703@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 10/11/15 04:23, Simon Glass wrote: > Hi Lin, > > On 9 November 2015 at 00:02, Lin Huang wrote: >> rk3036 mmc driver is similar to dw_mmc, but use external dma, >> this patch implment fifo mode, need to do dma mode in future. > What is the plan to merge this driver with the dwmmc one? Also the > other code seems very similar to rockchip_dw_mmc.c - can we combine > these? i have confirm with my colleague, they have tested that in uboot use external dma is not more efficient than fifo mode, so i think it not necessary to support external dma in future. And about the mmc driver, i think there is two way to combine: 1. add fifo mode in dw_mmc.c(i don't know weather is it allow), combine the rockchip_dw_mmc.c and rockchip_3036_dw_mmc.c 2. combine the probe(), get_mmc_clk(), platdata() function, implement the 3036_dw_mmc.c use for 3036, and 3288 use dw_mmc.c which do you prefer? > >> Signed-off-by: Lin Huang >> --- >> Changes in v1: >> - clean copyright announcement >> Changes in v2: >> - modify code suggest by Simon: >> - use get_time() to do timeout >> Changes in v3: >> - extend read and write data timeout time >> - fix write data read fifo length bug >> Changes in v4: None >> >> drivers/mmc/Kconfig | 9 + >> drivers/mmc/Makefile | 1 + >> drivers/mmc/rockchip_3036_dw_mmc.c | 485 +++++++++++++++++++++++++++++++++++++ >> 3 files changed, 495 insertions(+) >> create mode 100644 drivers/mmc/rockchip_3036_dw_mmc.c > Regards, > Simon > > > -- Lin Huang