[ARM] S3C: Add USB high-speed/OtG device definitions
authorBen Dooks <ben@simtec.co.uk>
Sat, 16 May 2009 21:05:27 +0000 (22:05 +0100)
committerBen Dooks <ben-linux@fluff.org>
Sat, 16 May 2009 21:13:52 +0000 (22:13 +0100)
Add platform device definitions for the high-speed and OtG
capable device block on the newer Samsung parts.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c6400/include/mach/map.h
arch/arm/plat-s3c/Kconfig
arch/arm/plat-s3c/Makefile
arch/arm/plat-s3c/dev-usb-hsotg.c [new file with mode: 0644]
arch/arm/plat-s3c/include/plat/devs.h
arch/arm/plat-s3c/include/plat/udc-hs.h [new file with mode: 0644]

index ea4223b55099c9a5d776789fdf52906f52b45923..99d5e3b420ad53ea8006eeaba2de87e979175d6f 100644 (file)
@@ -39,6 +39,7 @@
 #define S3C_VA_UART3           S3C_VA_UARTx(3)
 
 #define S3C64XX_PA_FB          (0x77100000)
+#define S3C64XX_PA_USB_HSOTG   (0x7C000000)
 #define S3C64XX_PA_SYSCON      (0x7E00F000)
 #define S3C64XX_PA_TIMER       (0x7F006000)
 #define S3C64XX_PA_IIC0                (0x7F004000)
@@ -70,5 +71,6 @@
 #define S3C_PA_IIC1            S3C64XX_PA_IIC1
 #define S3C_PA_FB              S3C64XX_PA_FB
 #define S3C_PA_USBHOST         S3C64XX_PA_USBHOST
+#define S3C_PA_USB_HSOTG       S3C64XX_PA_USB_HSOTG
 
 #endif /* __ASM_ARCH_6400_MAP_H */
index a4c5027421d30a0ba77e2eeb4ac7803698186431..140391587c39aac142bb45d3596f2c79ffe21b65 100644 (file)
@@ -186,4 +186,9 @@ config S3C_DEV_USB_HOST
        help
          Compile in platform device definition for USB host.
 
+config S3C_DEV_USB_HSOTG
+       bool
+       help
+         Compile in platform device definition for USB high-speed OtG
+
 endif
index bfc8f537db18d9d1745432384d7aa9492ed8139e..061e20458e897e7d5cce2440a5f2f793e851be11 100644 (file)
@@ -32,3 +32,4 @@ 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
+obj-$(CONFIG_S3C_DEV_USB_HSOTG)        += dev-usb-hsotg.o
diff --git a/arch/arm/plat-s3c/dev-usb-hsotg.c b/arch/arm/plat-s3c/dev-usb-hsotg.c
new file mode 100644 (file)
index 0000000..e2f604b
--- /dev/null
@@ -0,0 +1,41 @@
+/* linux/arch/arm/plat-s3c/dev-usb-hsotg.c
+ *
+ * Copyright 2008 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
+ *     http://armlinux.simtec.co.uk/
+ *
+ * S3C series device definition for USB high-speed UDC/OtG block
+ *
+ * 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_hsotg_resources[] = {
+       [0] = {
+               .start  = S3C_PA_USB_HSOTG,
+               .end    = S3C_PA_USB_HSOTG + 0x10000 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_OTG,
+               .end    = IRQ_OTG,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device s3c_device_usb_hsotg = {
+       .name           = "s3c-hsotg",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(s3c_usb_hsotg_resources),
+       .resource       = s3c_usb_hsotg_resources,
+};
index 26f0cec3ac04160d1f3111eec4f66621548cd064..a0b6768fddcffda46ddd905cbc413975bc8196b5 100644 (file)
@@ -45,6 +45,7 @@ extern struct platform_device s3c_device_spi1;
 extern struct platform_device s3c_device_nand;
 
 extern struct platform_device s3c_device_usbgadget;
+extern struct platform_device s3c_device_usb_hsotg;
 
 /* s3c2440 specific devices */
 
diff --git a/arch/arm/plat-s3c/include/plat/udc-hs.h b/arch/arm/plat-s3c/include/plat/udc-hs.h
new file mode 100644 (file)
index 0000000..dd04db0
--- /dev/null
@@ -0,0 +1,29 @@
+/* arch/arm/plat-s3c/include/plat/udc-hs.h
+ *
+ * Copyright 2008 Openmoko, Inc.
+ * Copyright 2008 Simtec Electronics
+ *      Ben Dooks <ben@simtec.co.uk>
+ *      http://armlinux.simtec.co.uk/
+ *
+ * S3C USB2.0 High-speed / OtG platform information
+ *
+ * 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.
+*/
+
+enum s3c_hostg_dmamode {
+       S3C_HSOTG_DMA_NONE,     /* do not use DMA at-all */
+       S3C_HSOTG_DMA_ONLY,     /* always use DMA */
+       S3C_HSOTG_DMA_DRV,      /* DMA is chosen by driver */
+};
+
+/**
+ * struct s3c_hsotg_plat - platform data for high-speed otg/udc
+ * @dma: Whether to use DMA or not.
+ * @is_osc: The clock source is an oscillator, not a crystal
+ */
+struct s3c_hsotg_plat {
+       enum s3c_hostg_dmamode  dma;
+       unsigned int            is_osc : 1;
+};
This page took 0.029225 seconds and 5 git commands to generate.