]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] eseries: move UDC defs to machine files
authorIan Molton <spyro@f2s.com>
Tue, 19 Aug 2008 12:34:56 +0000 (13:34 +0100)
committerIan Molton <spyro@f2s.com>
Tue, 19 Aug 2008 12:44:07 +0000 (13:44 +0100)
This patchset moves the UDC definitons for e7xx compatible eseries machines
to a common location and moves the 'oddball' e800 definition to its machine
file.

Signed-off-by: Ian Molton <spyro@f2s.com>
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/e330.c
arch/arm/mach-pxa/e350.c
arch/arm/mach-pxa/e400.c
arch/arm/mach-pxa/e740.c
arch/arm/mach-pxa/e750.c
arch/arm/mach-pxa/e800.c
arch/arm/mach-pxa/eseries.c
arch/arm/mach-pxa/eseries.h
arch/arm/mach-pxa/eseries_udc.c [deleted file]

index b536a50c150e817adb3d32226c2ac5b1398e307d..5ca73a22439bce5ee87f805e0d2f9dab1388fa93 100644 (file)
@@ -37,7 +37,7 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD)   += pcm990-baseboard.o
 obj-$(CONFIG_MACH_TOSA)                += tosa.o
 obj-$(CONFIG_MACH_EM_X270)     += em-x270.o
 obj-$(CONFIG_MACH_MAGICIAN)    += magician.o
-obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o
+obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
 obj-$(CONFIG_MACH_E330)                += e330.o
 obj-$(CONFIG_MACH_E350)                += e350.o
 obj-$(CONFIG_MACH_E740)                += e740.o
index 2f4555e2fb914cadb1adfd12802ae5dd29d99fb9..d488eded2058be2053752d5e62dbe3dc88d47042 100644 (file)
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 #include "eseries.h"
 
+static void __init e330_init(void)
+{
+       pxa_set_udc_info(&e7xx_udc_mach_info);
+}
+
 MACHINE_START(E330, "Toshiba e330")
        /* Maintainer: Ian Molton (spyro@f2s.com) */
        .phys_io        = 0x40000000,
@@ -31,6 +37,7 @@ MACHINE_START(E330, "Toshiba e330")
        .map_io         = pxa_map_io,
        .init_irq       = pxa25x_init_irq,
        .fixup          = eseries_fixup,
+       .init_machine   = e330_init,
        .timer          = &pxa_timer,
 MACHINE_END
 
index 5d58deb7eff8ac0fa87b096538d2e10a02471ad8..8ecbc5479828625d91f583324c17abbb80720618 100644 (file)
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 #include "eseries.h"
 
+static void __init e350_init(void)
+{
+       pxa_set_udc_info(&e7xx_udc_mach_info);
+}
+
 MACHINE_START(E350, "Toshiba e350")
        /* Maintainer: Ian Molton (spyro@f2s.com) */
        .phys_io        = 0x40000000,
@@ -31,6 +37,7 @@ MACHINE_START(E350, "Toshiba e350")
        .map_io         = pxa_map_io,
        .init_irq       = pxa25x_init_irq,
        .fixup          = eseries_fixup,
+       .init_machine   = e350_init,
        .timer          = &pxa_timer,
 MACHINE_END
 
index 0bcf9ece3d33e997e057ab73feb3a24daddebe5a..544bbaa20621eddc0e54147855407cd704117643 100644 (file)
@@ -22,6 +22,7 @@
 #include <mach/hardware.h>
 
 #include <mach/pxafb.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -76,6 +77,7 @@ static void __init e400_init(void)
 {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
        set_pxa_fb_info(&e400_pxafb_mach_info);
+       pxa_set_udc_info(&e7xx_udc_mach_info);
 }
 
 MACHINE_START(E400, "Toshiba e400")
index ef0c3c80e7910bd0f0442f887968cc5953384db4..c57a15b37f0d0ed2c39dc0decbb57f1eeede05a5 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -151,6 +152,7 @@ static void __init e740_init(void)
 {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
        platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa_set_udc_info(&e7xx_udc_mach_info);
 }
 
 MACHINE_START(E740, "Toshiba e740")
index 7e9a21dddd4d19473279b988f34a5e7d2640318f..640e738b85df44b96d9b7493ad5b0c5ada1f98b5 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -108,6 +109,7 @@ static struct platform_device *devices[] __initdata = {
 static void __init e750_init(void)
 {
        platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa_set_udc_info(&e7xx_udc_mach_info);
 }
 
 MACHINE_START(E750, "Toshiba e750")
index 2f5e9061954b6df30d4f52b8b320100005bd6428..a293e09bfe2530f38dfc7c01090244e9a9f70534 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/eseries-gpio.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 #include "eseries.h"
@@ -150,6 +152,14 @@ static struct platform_device e800_fb_device = {
        .resource       = e800_fb_resources,
 };
 
+/* --------------------------- UDC definitions --------------------------- */
+
+static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
+       .gpio_vbus   = GPIO_E800_USB_DISC,
+       .gpio_pullup = GPIO_E800_USB_PULLUP,
+       .gpio_pullup_inverted = 1
+};
+
 /* ----------------------------------------------------------------------- */
 
 static struct platform_device *devices[] __initdata = {
@@ -159,6 +169,7 @@ static struct platform_device *devices[] __initdata = {
 static void __init e800_init(void)
 {
        platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa_set_udc_info(&e800_udc_mach_info);
 }
 
 MACHINE_START(E800, "Toshiba e800")
index 1872faa11a27604a41f73f047829fabfc0b54784..d28849b50a142f7a9bce40994c92e050d50fd34c 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/eseries-gpio.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 
@@ -35,3 +37,9 @@ void __init eseries_fixup(struct machine_desc *desc,
                mi->bank[0].size = (64*1024*1024);
 }
 
+struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
+       .gpio_vbus   = GPIO_E7XX_USB_DISC,
+       .gpio_pullup = GPIO_E7XX_USB_PULLUP,
+       .gpio_pullup_inverted = 1
+};
+
index bc74e21d054af893450a6fc843bd7a1c309a28c5..a83f88d4b6ad813dfbcd569f1ad57edb7a2ace80 100644 (file)
@@ -1,3 +1,4 @@
 void __init eseries_fixup(struct machine_desc *desc,
        struct tag *tags, char **cmdline, struct meminfo *mi);
 
+extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info;
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c
deleted file mode 100644 (file)
index d622c04..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * UDC functions for the Toshiba e-series PDAs
- *
- * Copyright (c) Ian Molton 2003
- *
- * This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/device.h>
-
-#include <mach/udc.h>
-#include <mach/eseries-gpio.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <asm/mach/arch.h>
-#include <asm/mach-types.h>
-#include <asm/mach/map.h>
-#include <asm/domain.h>
-
-/* local PXA generic code */
-#include "generic.h"
-
-static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
-       .gpio_vbus   = GPIO_E7XX_USB_DISC,
-       .gpio_pullup = GPIO_E7XX_USB_PULLUP,
-       .gpio_pullup_inverted = 1
-};
-
-static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
-       .gpio_vbus   = GPIO_E800_USB_DISC,
-       .gpio_pullup = GPIO_E800_USB_PULLUP,
-       .gpio_pullup_inverted = 1
-};
-
-static int __init eseries_udc_init(void)
-{
-       if (machine_is_e330() || machine_is_e350() ||
-           machine_is_e740() || machine_is_e750() ||
-           machine_is_e400())
-               pxa_set_udc_info(&e7xx_udc_mach_info);
-       else if (machine_is_e800())
-               pxa_set_udc_info(&e800_udc_mach_info);
-
-       return 0;
-}
-
-module_init(eseries_udc_init);
-
-MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
-MODULE_DESCRIPTION("eseries UDC support");
-MODULE_LICENSE("GPLv2");