On Tue, May 11, 2010 at 11:32 AM, Madhvapathi Sriram <[email protected]> wrote:
> - This moves the dma line population from omap_hsmmc.c to plat-omap/devices.c
> - This is done to keep platform specific code inside the platform directory
> rather than the host driver
> - This makes the porting work across OMAP platforms easier
>
> Signed-off-by: Madhvapathi Sriram <[email protected]>
> ---
> arch/arm/plat-omap/devices.c | 49
> ++++++++++++++++++++++++++++++++++++++++-
> drivers/mmc/host/omap_hsmmc.c | 35 +++++++---------------------
> 2 files changed, 57 insertions(+), 27 deletions(-)
>
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index 95677d1..a62b148 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -30,6 +30,7 @@
> #include <plat/mcbsp.h>
> #include <plat/dsp_common.h>
> #include <plat/omap44xx.h>
> +#include <plat/dma.h>
>
> #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
>
> @@ -232,7 +233,7 @@ static inline void omap_init_mcpdm(void) {}
> #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
> defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
>
> -#define OMAP_MMC_NR_RES 2
> +#define OMAP_MMC_NR_RES 4
>
> /*
> * Register MMC devices. Called from mach-omap1 and mach-omap2 device init.
> @@ -255,6 +256,52 @@ int __init omap_mmc_add(const char *name, int id,
> unsigned long base,
> res[0].flags = IORESOURCE_MEM;
> res[1].start = res[1].end = irq;
> res[1].flags = IORESOURCE_IRQ;
You can just set .flags right here, no need to repeat in each switch case:
> + res[2].flags = IORESOURCE_DMA;
> + res[3].flags = IORESOURCE_DMA;
> + /* Populate DMA lines based on the instance used. Rx first,Tx next*/
> + switch (id) {
> + case 0:
> + res[2].start = OMAP24XX_DMA_MMC1_RX;
> + res[2].end = OMAP24XX_DMA_MMC1_RX;
> + res[2].flags = IORESOURCE_DMA;
> + res[3].start = OMAP24XX_DMA_MMC1_TX;
> + res[3].end = OMAP24XX_DMA_MMC1_TX;
> + res[3].flags = IORESOURCE_DMA;
> + break;
> + case 1:
> + res[2].start = OMAP24XX_DMA_MMC2_RX;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html