Re: [PATCH 1/1] DaVinci: MMC: Updated MMC/SD controller driver for DaVinci family.

David Brownell
2009-03-23T20:17:21Z

On Wednesday 18 March 2009, Purushotam Kumar wrote:
> From: Purshotam Kumar <purushotam@ti.com>
>
> This patch adds support for MMC/SD controller driver for DaVinci family SoC.
> This patch will work for SoC like DM6446 and DM355. SoC like DM365 and
> DA830 also has same controller with small variations and could supported/added
> easily by using this version of patch. It means that this version of patch
> could be used for all SoC which has been derived from DaVinci family.
>
> This patch has been generated against latest 2.6.29 mainline kernel. This patch
> will not compile currently because it depends notably on the EDMA utilities and
> chip/board setup, that will come at some point through the ARM tree. Please use
> currently DaVinci GIT tree for EDMA utilities and chip/board setup etc.
>
> Many thanks to David Brownell (david-b@pacbell.net) for his all support.
>
>
> Signed-off-by: Purshotam Kumar <purushotam@ti.com>

Sanity-tested against mainline with simple patches to add
EDMA and chip/board setup ... root-on-MMC works, just like
root-on-IDE.

Once you fix the build bug noted below:

Acked-by: David Brownell <dbrownell@users.sourceforge.net>

Though the PIO bits still bother me ... I'd use *only* the
io{read,write}8_rep() calls to load/unload the FIFO. While
those calls haven't broken yet, it's rude to (a) open-code
io{read,write}32_rep() like that, and (b) assume all buffers
coming in to that function are 32-bit aligned. PIO is hardly
ever used, given EDMA. Maybe just one or two calls when
enumerating. (SDIO might use it more often.) That can be
fixed a bit later.

Also, it'd be good to submit a patch to the DaVinci tree
to make it match whatever Pierre eventually merges. (Less
the clock name change, of course, which is only needed to
cope with the elderly clock logic now in mainline.)

> ---
> arch/arm/mach-davinci/include/mach/mmc.h | 25 +
> drivers/mmc/host/Kconfig | 8 +
> drivers/mmc/host/Makefile | 1 +
> drivers/mmc/host/davinci_mmc.c | 1257 ++++++++++++++++++++++++++++++
> 4 files changed, 1291 insertions(+), 0 deletions(-)

Build bug in probe():

> + host->clk = clk_get(&pdev->dev, MMCSDCLK);

Put quotes around "MMCSDCLK".