[ARM] S3C: Add common USB OHCI device definition
authorBen Dooks <ben@simtec.co.uk>
Fri, 6 Mar 2009 19:49:48 +0000 (19:49 +0000)
committerBen Dooks <ben-linux@fluff.org>
Thu, 7 May 2009 10:04:54 +0000 (11:04 +0100)
Add common definition for USB OHCI platform device, add a Kconfig
to selectively compile it and add update all the users.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c2410/Kconfig
arch/arm/mach-s3c2412/Kconfig
arch/arm/mach-s3c2440/Kconfig
arch/arm/plat-s3c/Kconfig
arch/arm/plat-s3c/Makefile
arch/arm/plat-s3c/dev-usb.c [new file with mode: 0644]
arch/arm/plat-s3c24xx/devs.c

index 63a30d1dd4250e6c838d3e5c63242a3fa1959116..41bb65d5b91f18c5dd964e87524a1aef40a7a5d7 100644 (file)
@@ -59,6 +59,7 @@ config ARCH_H1940
        bool "IPAQ H1940"
        select CPU_S3C2410
        select PM_H1940 if PM
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the HP IPAQ H1940
 
@@ -70,6 +71,7 @@ config PM_H1940
 config MACH_N30
        bool "Acer N30 family"
        select CPU_S3C2410
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you want suppt for the Acer N30, Acer N35,
          Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
@@ -82,6 +84,7 @@ config ARCH_BAST
        select MACH_BAST_IDE
        select S3C24XX_DCLK
        select ISA
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Simtec Electronics EB2410ITX
          development board (also known as BAST)
@@ -89,6 +92,7 @@ config ARCH_BAST
 config MACH_OTOM
        bool "NexVision OTOM Board"
        select CPU_S3C2410
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Nex Vision OTOM board
 
@@ -96,6 +100,7 @@ config MACH_AML_M5900
        bool "AML M5900 Series"
        select CPU_S3C2410
        select PM_SIMTEC if PM
+       select S3C_DEV_USB_HOST
        help
           Say Y here if you are using the American Microsystems M5900 Series
            <http://www.amltd.com>
@@ -111,6 +116,7 @@ config BAST_PC104_IRQ
 config MACH_TCT_HAMMER
        bool "TCT Hammer Board"
        select CPU_S3C2410
+       select S3C_DEV_USB_HOST
        help
           Say Y here if you are using the TinCanTools Hammer Board
            <http://www.tincantools.com>
@@ -122,12 +128,14 @@ config MACH_VR1000
        select SIMTEC_NOR
        select MACH_BAST_IDE
        select CPU_S3C2410
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Thorcom VR1000 board.
 
 config MACH_QT2410
        bool "QT2410"
        select CPU_S3C2410
+       select S3C_DEV_USB_HOST
        help
           Say Y here if you are using the Armzone QT2410
 
index ca99564ae4b56c917a73a48dd357244c2d3fe654..63586ffd0ae722228f97187bc899bc3a3711e7eb 100644 (file)
@@ -38,6 +38,7 @@ menu "S3C2412 Machines"
 config MACH_JIVE
        bool "Logitech Jive"
        select CPU_S3C2412
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Logitech Jive.
 
@@ -50,6 +51,7 @@ config MACH_SMDK2413
        select CPU_S3C2412
        select MACH_S3C2413
        select MACH_SMDK
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using an SMDK2413
 
@@ -72,6 +74,7 @@ config MACH_SMDK2412
 config MACH_VSTMS
        bool "VMSTMS"
        select CPU_S3C2412
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using an VSTMS board
 
index cde5ae9a43400e650f280641019a9bf4c3c7973e..5df73cbf2b40d17e8000601e3888cf34e6ef6650 100644 (file)
@@ -33,6 +33,7 @@ config MACH_ANUBIS
        select PM_SIMTEC if PM
        select HAVE_PATA_PLATFORM
        select S3C24XX_GPIO_EXTRA64
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Simtec Electronics ANUBIS
          development system
@@ -43,6 +44,7 @@ config MACH_OSIRIS
        select S3C24XX_DCLK
        select PM_SIMTEC if PM
        select S3C24XX_GPIO_EXTRA128
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Simtec IM2440D20 module, also
          known as the Osiris.
@@ -58,12 +60,14 @@ config ARCH_S3C2440
        bool "SMDK2440"
        select CPU_S3C2440
        select MACH_SMDK
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the SMDK2440.
 
 config MACH_NEXCODER_2440
        bool "NexVision NEXCODER 2440 Light Board"
        select CPU_S3C2440
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
 
@@ -76,6 +80,7 @@ config SMDK2440_CPU2440
 config MACH_AT2440EVB
        bool "Avantech AT2440EVB development board"
        select CPU_S3C2440
+       select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the AT2440EVB development board
 
index de9383814e5ef15db9cc36b20ee7e84cf49819b2..042d34a6f81532437c64b35d5e7566406309fd07 100644 (file)
@@ -172,4 +172,9 @@ config S3C_DEV_FB
        help
          Compile in platform device definition for framebuffer
 
+config S3C_DEV_USB_HOST
+       bool
+       help
+         Compile in platform device definition for USB host.
+
 endif
index 8d7815d25a51d3b3b2f3e2bab6afddee6f50986b..aa995a49e567cd8e5d73b3b3be6a7e456ed44a57 100644 (file)
@@ -30,3 +30,4 @@ obj-$(CONFIG_S3C_DEV_HSMMC1)  += dev-hsmmc1.o
 obj-y                          += dev-i2c0.o
 obj-$(CONFIG_S3C_DEV_I2C1)     += dev-i2c1.o
 obj-$(CONFIG_S3C_DEV_FB)       += dev-fb.o
+obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
diff --git a/arch/arm/plat-s3c/dev-usb.c b/arch/arm/plat-s3c/dev-usb.c
new file mode 100644 (file)
index 0000000..a997d95
--- /dev/null
@@ -0,0 +1,50 @@
+/* linux/arch/arm/plat-s3c/dev-usb.c
+ *
+ * Copyright 2008 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
+ *     http://armlinux.simtec.co.uk/
+ *
+ * S3C series device definition for USB host
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/devs.h>
+
+
+static struct resource s3c_usb_resource[] = {
+       [0] = {
+               .start = S3C24XX_PA_USBHOST,
+               .end   = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = IRQ_USBH,
+               .end   = IRQ_USBH,
+               .flags = IORESOURCE_IRQ,
+       }
+};
+
+static u64 s3c_device_usb_dmamask = 0xffffffffUL;
+
+struct platform_device s3c_device_usb = {
+       .name             = "s3c2410-ohci",
+       .id               = -1,
+       .num_resources    = ARRAY_SIZE(s3c_usb_resource),
+       .resource         = s3c_usb_resource,
+       .dev              = {
+               .dma_mask = &s3c_device_usb_dmamask,
+               .coherent_dma_mask = 0xffffffffUL
+       }
+};
+
+EXPORT_SYMBOL(s3c_device_usb);
index 16ac01d9b8ab631c023bc309d30e45f9289e1835..4eb378c89a390541ca3e17bbd3d4eefaf866031b 100644 (file)
@@ -136,36 +136,6 @@ struct platform_device *s3c24xx_uart_src[4] = {
 struct platform_device *s3c24xx_uart_devs[4] = {
 };
 
-/* USB Host Controller */
-
-static struct resource s3c_usb_resource[] = {
-       [0] = {
-               .start = S3C24XX_PA_USBHOST,
-               .end   = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = IRQ_USBH,
-               .end   = IRQ_USBH,
-               .flags = IORESOURCE_IRQ,
-       }
-};
-
-static u64 s3c_device_usb_dmamask = 0xffffffffUL;
-
-struct platform_device s3c_device_usb = {
-       .name             = "s3c2410-ohci",
-       .id               = -1,
-       .num_resources    = ARRAY_SIZE(s3c_usb_resource),
-       .resource         = s3c_usb_resource,
-       .dev              = {
-               .dma_mask = &s3c_device_usb_dmamask,
-               .coherent_dma_mask = 0xffffffffUL
-       }
-};
-
-EXPORT_SYMBOL(s3c_device_usb);
-
 /* LCD Controller */
 
 static struct resource s3c_lcd_resource[] = {
This page took 0.030881 seconds and 5 git commands to generate.