aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben@simtec.co.uk>2009-05-16 17:05:27 -0400
committerBen Dooks <ben-linux@fluff.org>2009-05-16 17:13:52 -0400
commitf0e1fa760099eef43f4450471d795807a1cc43c8 (patch)
tree173c95c9c24a3ca12b08493bf5bfc25862656fc1
parent496a3f0927197ca155a604478bf6e7db3eca3bbd (diff)
[ARM] S3C: Add USB high-speed/OtG device definitions
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>
-rw-r--r--arch/arm/mach-s3c6400/include/mach/map.h2
-rw-r--r--arch/arm/plat-s3c/Kconfig5
-rw-r--r--arch/arm/plat-s3c/Makefile1
-rw-r--r--arch/arm/plat-s3c/dev-usb-hsotg.c41
-rw-r--r--arch/arm/plat-s3c/include/plat/devs.h1
-rw-r--r--arch/arm/plat-s3c/include/plat/udc-hs.h29
6 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h
index ea4223b55099..99d5e3b420ad 100644
--- a/arch/arm/mach-s3c6400/include/mach/map.h
+++ b/arch/arm/mach-s3c6400/include/mach/map.h
@@ -39,6 +39,7 @@
39#define S3C_VA_UART3 S3C_VA_UARTx(3) 39#define S3C_VA_UART3 S3C_VA_UARTx(3)
40 40
41#define S3C64XX_PA_FB (0x77100000) 41#define S3C64XX_PA_FB (0x77100000)
42#define S3C64XX_PA_USB_HSOTG (0x7C000000)
42#define S3C64XX_PA_SYSCON (0x7E00F000) 43#define S3C64XX_PA_SYSCON (0x7E00F000)
43#define S3C64XX_PA_TIMER (0x7F006000) 44#define S3C64XX_PA_TIMER (0x7F006000)
44#define S3C64XX_PA_IIC0 (0x7F004000) 45#define S3C64XX_PA_IIC0 (0x7F004000)
@@ -70,5 +71,6 @@
70#define S3C_PA_IIC1 S3C64XX_PA_IIC1 71#define S3C_PA_IIC1 S3C64XX_PA_IIC1
71#define S3C_PA_FB S3C64XX_PA_FB 72#define S3C_PA_FB S3C64XX_PA_FB
72#define S3C_PA_USBHOST S3C64XX_PA_USBHOST 73#define S3C_PA_USBHOST S3C64XX_PA_USBHOST
74#define S3C_PA_USB_HSOTG S3C64XX_PA_USB_HSOTG
73 75
74#endif /* __ASM_ARCH_6400_MAP_H */ 76#endif /* __ASM_ARCH_6400_MAP_H */
diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig
index a4c5027421d3..140391587c39 100644
--- a/arch/arm/plat-s3c/Kconfig
+++ b/arch/arm/plat-s3c/Kconfig
@@ -186,4 +186,9 @@ config S3C_DEV_USB_HOST
186 help 186 help
187 Compile in platform device definition for USB host. 187 Compile in platform device definition for USB host.
188 188
189config S3C_DEV_USB_HSOTG
190 bool
191 help
192 Compile in platform device definition for USB high-speed OtG
193
189endif 194endif
diff --git a/arch/arm/plat-s3c/Makefile b/arch/arm/plat-s3c/Makefile
index bfc8f537db18..061e20458e89 100644
--- a/arch/arm/plat-s3c/Makefile
+++ b/arch/arm/plat-s3c/Makefile
@@ -32,3 +32,4 @@ obj-y += dev-i2c0.o
32obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o 32obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
33obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o 33obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
34obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o 34obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
35obj-$(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
index 000000000000..e2f604b51c86
--- /dev/null
+++ b/arch/arm/plat-s3c/dev-usb-hsotg.c
@@ -0,0 +1,41 @@
1/* linux/arch/arm/plat-s3c/dev-usb-hsotg.c
2 *
3 * Copyright 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * S3C series device definition for USB high-speed UDC/OtG block
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#include <linux/kernel.h>
15#include <linux/string.h>
16#include <linux/platform_device.h>
17
18#include <mach/irqs.h>
19#include <mach/map.h>
20
21#include <plat/devs.h>
22
23static struct resource s3c_usb_hsotg_resources[] = {
24 [0] = {
25 .start = S3C_PA_USB_HSOTG,
26 .end = S3C_PA_USB_HSOTG + 0x10000 - 1,
27 .flags = IORESOURCE_MEM,
28 },
29 [1] = {
30 .start = IRQ_OTG,
31 .end = IRQ_OTG,
32 .flags = IORESOURCE_IRQ,
33 },
34};
35
36struct platform_device s3c_device_usb_hsotg = {
37 .name = "s3c-hsotg",
38 .id = -1,
39 .num_resources = ARRAY_SIZE(s3c_usb_hsotg_resources),
40 .resource = s3c_usb_hsotg_resources,
41};
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h
index 26f0cec3ac04..a0b6768fddcf 100644
--- a/arch/arm/plat-s3c/include/plat/devs.h
+++ b/arch/arm/plat-s3c/include/plat/devs.h
@@ -45,6 +45,7 @@ extern struct platform_device s3c_device_spi1;
45extern struct platform_device s3c_device_nand; 45extern struct platform_device s3c_device_nand;
46 46
47extern struct platform_device s3c_device_usbgadget; 47extern struct platform_device s3c_device_usbgadget;
48extern struct platform_device s3c_device_usb_hsotg;
48 49
49/* s3c2440 specific devices */ 50/* s3c2440 specific devices */
50 51
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
index 000000000000..dd04db043109
--- /dev/null
+++ b/arch/arm/plat-s3c/include/plat/udc-hs.h
@@ -0,0 +1,29 @@
1/* arch/arm/plat-s3c/include/plat/udc-hs.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
7 *
8 * S3C USB2.0 High-speed / OtG platform information
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15enum s3c_hostg_dmamode {
16 S3C_HSOTG_DMA_NONE, /* do not use DMA at-all */
17 S3C_HSOTG_DMA_ONLY, /* always use DMA */
18 S3C_HSOTG_DMA_DRV, /* DMA is chosen by driver */
19};
20
21/**
22 * struct s3c_hsotg_plat - platform data for high-speed otg/udc
23 * @dma: Whether to use DMA or not.
24 * @is_osc: The clock source is an oscillator, not a crystal
25 */
26struct s3c_hsotg_plat {
27 enum s3c_hostg_dmamode dma;
28 unsigned int is_osc : 1;
29};