diff options
author | Ben Dooks <ben@simtec.co.uk> | 2009-03-06 19:49:48 +0000 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-05-07 11:04:54 +0100 |
commit | eca8655ffa1ffb23c8f6f1485c1315a3087c8f38 (patch) | |
tree | ce06a53f4d49ee5bba5fda3d98807778b97da4df | |
parent | 091438dd5668396328a3419abcbc6591159eb8d1 (diff) |
[ARM] S3C: Add common USB OHCI device definition
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>
-rw-r--r-- | arch/arm/mach-s3c2410/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-s3c/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-s3c/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-s3c/dev-usb.c | 50 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/devs.c | 30 |
7 files changed, 72 insertions, 30 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 63a30d1dd42..41bb65d5b91 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig @@ -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 diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index ca99564ae4b..63586ffd0ae 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig @@ -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 diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig index cde5ae9a434..5df73cbf2b4 100644 --- a/arch/arm/mach-s3c2440/Kconfig +++ b/arch/arm/mach-s3c2440/Kconfig @@ -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 diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig index de9383814e5..042d34a6f81 100644 --- a/arch/arm/plat-s3c/Kconfig +++ b/arch/arm/plat-s3c/Kconfig @@ -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 diff --git a/arch/arm/plat-s3c/Makefile b/arch/arm/plat-s3c/Makefile index 8d7815d25a5..aa995a49e56 100644 --- a/arch/arm/plat-s3c/Makefile +++ b/arch/arm/plat-s3c/Makefile @@ -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 index 00000000000..a997d952816 --- /dev/null +++ b/arch/arm/plat-s3c/dev-usb.c @@ -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); diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 16ac01d9b8a..4eb378c89a3 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c @@ -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[] = { |