arm:lpc32xx:fdi3250 - config with mmc, no frame buffer
authorDaveSKok <DaveSKok@xxx.com>
Wed, 16 May 2012 10:29:26 +0000 (10:29 +0000)
committerBangaragiri G <bangaragiri.g@nxp.com>
Wed, 16 May 2012 10:29:26 +0000 (10:29 +0000)
When support for frame buffer is disabled and MMC enabled, fdi3250.c
will not compile because MMC conditional compile construct mistakenly
placed inside of frame buffer conditional compile construct. This patch
moves MMC code out.

Signed-off-by: Bangaragiri G <bangaragiri.g@nxp.com>

arch/arm/mach-lpc32xx/fdi3250.c

index eb4fd0b..55ca1ff 100644 (file)
@@ -195,47 +195,6 @@ static struct clcd_panel conn_lcd_panel = {
 
 #endif // CONFIG_SOM9DIMM3250_LCD_PANEL
 
-#if defined (CONFIG_MMC_ARMMMCI)
-static u32 mmc_translate_vdd(struct device *dev, unsigned int vdd)
-{
-       return 0;
-}
-
-unsigned int fdi_mmc_status_always_on(struct device *dev)
-{
-       return 0;
-}
-/*
- * Board specific MMC driver data
- */
-struct mmci_platform_data lpc32xx_plat_data = {
-       .ocr_mask       = MMC_VDD_30_31|MMC_VDD_31_32|MMC_VDD_32_33|MMC_VDD_33_34,
-       .translate_vdd  = mmc_translate_vdd,
-       .capabilities   = MMC_CAP_4_BIT_DATA,
-       .gpio_wp        = ARCH_NR_GPIOS + 1,
-       .gpio_cd        = ARCH_NR_GPIOS + 1,
-       .status         = fdi_mmc_status_always_on,
-};
-
-/*
- * SD card controller resources
- */
-struct amba_device lpc32xx_mmc_device = {
-       .dev = {
-               .coherent_dma_mask      = ~0,
-               .init_name                 = "dev:mmc0",
-               .platform_data          = &lpc32xx_plat_data,
-       },
-       .res = {
-               .start                  = LPC32XX_SD_BASE,
-               .end                    = (LPC32XX_SD_BASE + SZ_4K - 1),
-               .flags                  = IORESOURCE_MEM,
-       },
-       .dma_mask                       = ~0,
-       .irq                            = {IRQ_LPC32XX_SD0, IRQ_LPC32XX_SD1},
-};
-#endif
-
 static int lpc32xx_clcd_setup(struct clcd_fb *fb)
 {
         dma_addr_t dma;
@@ -319,6 +278,47 @@ struct amba_device lpc32xx_clcd_device = {
 };
 #endif
 
+#if defined (CONFIG_MMC_ARMMMCI)
+static u32 mmc_translate_vdd(struct device *dev, unsigned int vdd)
+{
+       return 0;
+}
+
+unsigned int fdi_mmc_status_always_on(struct device *dev)
+{
+       return 0;
+}
+/*
+ * Board specific MMC driver data
+ */
+struct mmci_platform_data lpc32xx_plat_data = {
+       .ocr_mask       = MMC_VDD_30_31|MMC_VDD_31_32|MMC_VDD_32_33|MMC_VDD_33_34,
+       .translate_vdd  = mmc_translate_vdd,
+       .capabilities   = MMC_CAP_4_BIT_DATA,
+       .gpio_wp        = ARCH_NR_GPIOS + 1,
+       .gpio_cd        = ARCH_NR_GPIOS + 1,
+       .status         = fdi_mmc_status_always_on,
+};
+
+/*
+ * SD card controller resources
+ */
+struct amba_device lpc32xx_mmc_device = {
+       .dev = {
+               .coherent_dma_mask      = ~0,
+               .init_name                 = "dev:mmc0",
+               .platform_data          = &lpc32xx_plat_data,
+       },
+       .res = {
+               .start                  = LPC32XX_SD_BASE,
+               .end                    = (LPC32XX_SD_BASE + SZ_4K - 1),
+               .flags                  = IORESOURCE_MEM,
+       },
+       .dma_mask                       = ~0,
+       .irq                            = {IRQ_LPC32XX_SD0, IRQ_LPC32XX_SD1},
+};
+#endif
+
 /* AMBA based devices list */
 static struct amba_device *amba_devs[] __initdata = {
        &lpc32xx_ssp0_device,