]> git.hungrycats.org Git - linux/commitdiff
[ARM] Enclose MMC-related code in #ifdef CONFIG_MMC .. #endif
authorRussell King <rmk@flint.arm.linux.org.uk>
Fri, 7 May 2004 23:11:05 +0000 (00:11 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 7 May 2004 23:11:05 +0000 (00:11 +0100)
arch/arm/mach-versatile/core.c

index fa393090e01b03487e52244c0ece0eb6350739df..598d8d1b1aff24aada7c58a44657e3cce5741365 100644 (file)
@@ -18,6 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/sysdev.h>
@@ -33,7 +34,9 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
+#ifdef CONFIG_MMC
 #include <asm/mach/mmc.h>
+#endif
 
 /*
  * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
@@ -294,6 +297,7 @@ static struct platform_device smc91x_device = {
 
 #define VERSATILE_SYSMCI       (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET)
 
+#ifdef CONFIG_MMC
 static unsigned int mmc_status(struct device *dev)
 {
        struct amba_device *adev = container_of(dev, struct amba_device, dev);
@@ -318,6 +322,7 @@ static struct mmc_platform_data mmc1_plat_data = {
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
        .status         = mmc_status,
 };
+#endif
 
 #define AMBA_DEVICE(name,busid,base,plat)                      \
 static struct amba_device name##_device = {                    \
@@ -396,12 +401,16 @@ static struct amba_device name##_device = {                       \
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,  "fpga:04", AACI,     NULL);
+#ifdef CONFIG_MMC
 AMBA_DEVICE(mmc0,  "fpga:05", MMCI0,    &mmc0_plat_data);
+#endif
 AMBA_DEVICE(kmi0,  "fpga:06", KMI0,     NULL);
 AMBA_DEVICE(kmi1,  "fpga:07", KMI1,     NULL);
 AMBA_DEVICE(uart3, "fpga:09", UART3,    NULL);
 AMBA_DEVICE(sci1,  "fpga:0a", SCI1,     NULL);
+#ifdef CONFIG_MMC
 AMBA_DEVICE(mmc1,  "fpga:0b", MMCI1,    &mmc1_plat_data);
+#endif
 
 /* DevChip Primecells */
 AMBA_DEVICE(smc,   "dev:00",  SMC,      NULL);
@@ -440,11 +449,15 @@ static struct amba_device *amba_devs[] __initdata = {
        &sci0_device,
        &ssp0_device,
        &aaci_device,
+#ifdef CONFIG_MMC
        &mmc0_device,
+#endif
        &kmi0_device,
        &kmi1_device,
        &sci1_device,
+#ifdef CONFIG_MMC
        &mmc1_device,
+#endif
 };
 
 #define VA_LEDS_BASE (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)