DaVinci: MMC: V3: MMC/SD controller driver for DaVinci family.
PATCH 1/1 DaVinci: MMC: V3: MMC/SD controller driver for DaVinci family.
From: Purshotam Kumar <[email protected]>
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 ([email protected]) for his all support.
Updated by adding quotes around "MMCSDCLK" in order fix build bug in this version of patch.
--- 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(-) create mode 100644 arch/arm/mach-davinci/include/mach/mmc.h create mode 100644 drivers/mmc/host/davinci_mmc.c
arch/arm/mach-davinci/include/mach/mmc.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Board-specific MMC configuration +*/ + +#ifndef _DAVINCI_MMC_H +#define _DAVINCI_MMC_H + +#include <linux/types.h> +#include <linux/mmc/host.h> + +struct davinci_mmc_config { +/* get_cd()/get_wp() may sleep */ +int (*get_cd)(int module); +int (*get_ro)(int module); +/* wires == 0 is equivalent to wires == 4 (4-bit parallel) */ +u8 wires; + +u32 max_freq; + +/* any additional host capabilities: OR'd in to mmc->f_caps */ +u32 caps; +}; +void davinci_setup_mmc (int module,struct davinci_mmc_config *config); + +#endif
drivers/mmc/host/Kconfig +8 -0
@@ -171,6 +171,14 @@ config MMC_TIFM_SD To compile this driver as a module, choose M here: the module will be called tifm_sd. +config MMC_DAVINCI + tristate "TI DAVINCI Multimedia Card Interface support" + depends on ARCH_DAVINCI + help + This selects the TI DAVINCI Multimedia card Interface. + If you have an DAVINCI board with a Multimedia Card slot, + say Y or M here. If unsure, say N. + config MMC_SPI tristate "MMC/SD/SDIO over SPI" depends on SPI_MASTER && !HIGHMEM && HAS_DMA
drivers/mmc/host/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_MMC_OMAP_HS) += omap_hsmmc.o obj-$(CONFIG_MMC_AT91) += at91_mci.o obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o +obj-$(CONFIG_MMC_DAVINCI) += davinci_mmc.o obj-$(CONFIG_MMC_SPI) += mmc_spi.o ifeq ($(CONFIG_OF),y) obj-$(CONFIG_MMC_SPI) += of_mmc_spi.o
drivers/mmc/host/davinci_mmc.c new file +1257 -0
1,257 lines not on this page · raw message
Signature · 1 line
1.5.4.1
Quoted 13 lines · On Tue, 24 Mar 2009 18:12:50 +0530 Purushotam Kumar <[email protected]> wrote:
From: Purshotam Kumar <[email protected]>
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.
Quoted 8 lines
Many thanks to David Brownell ([email protected]) for his all support.
Updated by adding quotes around "MMCSDCLK" in order fix build bug in this version of patch.
Signed-off-by Purshotam Kumar <[email protected]>Acked-by David Brownell <[email protected]>---
Kumar, please look at the comments I made to your earlier patch.
Rgds
Signature · 9 lines
-- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption.