]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
E-series UDC support
authorIan Molton <spyro@f2s.com>
Thu, 10 Jul 2008 19:16:35 +0000 (20:16 +0100)
committerIan Molton <spyro@f2s.com>
Thu, 10 Jul 2008 19:16:35 +0000 (20:16 +0100)
Signed-off-by: IAn Molton <spyro@f2s.com>
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/eseries_udc.c [new file with mode: 0644]

index c4dfbe87fc4e4768f555b53a7f679836b0e70e5e..9d4c3931d0e9df600bb8cfc5a3b97eb2e372ef93 100644 (file)
@@ -36,7 +36,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
+obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o
 
 ifeq ($(CONFIG_MACH_ZYLONITE),y)
   obj-y                                += zylonite.o
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c
new file mode 100644 (file)
index 0000000..362847a
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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 <asm/arch/udc.h>
+#include <asm/arch/eseries-gpio.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/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");