]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-palmz71.c
ARM: OMAP: Clean-up MMC device init
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-palmz71.c
index e020c2774606884e1dfcfa8f5dbd76f94887ca6e..5c75b9a4d52c87ba8c37cf30d12f0beaf8bfe7bc 100644 (file)
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
 
-#include <asm/arch/mcbsp.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/mux.h>
-#include <asm/arch/usb.h>
-#include <asm/arch/dma.h>
-#include <asm/arch/tc.h>
-#include <asm/arch/board.h>
-#include <asm/arch/irda.h>
-#include <asm/arch/keypad.h>
-#include <asm/arch/common.h>
-#include <asm/arch/omap-alsa.h>
+#include <mach/mcbsp.h>
+#include <mach/gpio.h>
+#include <mach/mux.h>
+#include <mach/usb.h>
+#include <mach/dma.h>
+#include <mach/tc.h>
+#include <mach/board.h>
+#include <mach/irda.h>
+#include <mach/keypad.h>
+#include <mach/common.h>
+#include <mach/omap-alsa.h>
+#include <mach/mmc.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
@@ -267,13 +268,15 @@ static struct omap_usb_config palmz71_usb_config __initdata = {
        .pins[0]        = 2,
 };
 
-static struct omap_mmc_config palmz71_mmc_config __initdata = {
-       .mmc[0] = {
-               .enabled        = 1,
-               .wire4          = 0,
-               .wp_pin         = PALMZ71_MMC_WP_GPIO,
-               .power_pin      = -1,
-               .switch_pin     = PALMZ71_MMC_IN_GPIO,
+static struct omap_mmc_platform_data palmz71_mmc_data = {
+       .nr_slots                       = 1,
+       .slots[0]       = {
+               .enabled                = 1,
+               .wire4                  = 0,
+               .wp_pin                 = PALMZ71_MMC_WP_GPIO,
+               .power_pin              = -1,
+               .switch_pin             = PALMZ71_MMC_IN_GPIO,
+               .name                   = "mmcblk",
        },
 };
 
@@ -287,7 +290,6 @@ static struct omap_uart_config palmz71_uart_config __initdata = {
 
 static struct omap_board_config_kernel palmz71_config[] __initdata = {
        {OMAP_TAG_USB,  &palmz71_usb_config},
-       {OMAP_TAG_MMC,  &palmz71_mmc_config},
        {OMAP_TAG_LCD,  &palmz71_lcd_config},
        {OMAP_TAG_UART, &palmz71_uart_config},
 };
@@ -298,11 +300,11 @@ palmz71_powercable(int irq, void *dev_id)
        if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) {
                printk(KERN_INFO "PM: Power cable connected\n");
                set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
-                               IRQT_FALLING);
+                               IRQ_TYPE_EDGE_FALLING);
        } else {
                printk(KERN_INFO "PM: Power cable disconnected\n");
                set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
-                               IRQT_RISING);
+                               IRQ_TYPE_EDGE_RISING);
        }
        return IRQ_HANDLED;
 }
@@ -365,6 +367,7 @@ omap_palmz71_init(void)
        omap_serial_init();
        omap_register_i2c_bus(1, 100, NULL, 0);
        palmz71_gpio_setup(0);
+       omap1_init_mmc(&palmz71_mmc_data);
 }
 
 static void __init