[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>
This commit is contained in:
parent
091438dd56
commit
eca8655ffa
7 changed files with 72 additions and 30 deletions
|
@ -59,6 +59,7 @@ config ARCH_H1940
|
||||||
bool "IPAQ H1940"
|
bool "IPAQ H1940"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
select PM_H1940 if PM
|
select PM_H1940 if PM
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the HP IPAQ H1940
|
Say Y here if you are using the HP IPAQ H1940
|
||||||
|
|
||||||
|
@ -70,6 +71,7 @@ config PM_H1940
|
||||||
config MACH_N30
|
config MACH_N30
|
||||||
bool "Acer N30 family"
|
bool "Acer N30 family"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you want suppt for the Acer N30, Acer N35,
|
Say Y here if you want suppt for the Acer N30, Acer N35,
|
||||||
Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
|
Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
|
||||||
|
@ -82,6 +84,7 @@ config ARCH_BAST
|
||||||
select MACH_BAST_IDE
|
select MACH_BAST_IDE
|
||||||
select S3C24XX_DCLK
|
select S3C24XX_DCLK
|
||||||
select ISA
|
select ISA
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Simtec Electronics EB2410ITX
|
Say Y here if you are using the Simtec Electronics EB2410ITX
|
||||||
development board (also known as BAST)
|
development board (also known as BAST)
|
||||||
|
@ -89,6 +92,7 @@ config ARCH_BAST
|
||||||
config MACH_OTOM
|
config MACH_OTOM
|
||||||
bool "NexVision OTOM Board"
|
bool "NexVision OTOM Board"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Nex Vision OTOM board
|
Say Y here if you are using the Nex Vision OTOM board
|
||||||
|
|
||||||
|
@ -96,6 +100,7 @@ config MACH_AML_M5900
|
||||||
bool "AML M5900 Series"
|
bool "AML M5900 Series"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
select PM_SIMTEC if PM
|
select PM_SIMTEC if PM
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the American Microsystems M5900 Series
|
Say Y here if you are using the American Microsystems M5900 Series
|
||||||
<http://www.amltd.com>
|
<http://www.amltd.com>
|
||||||
|
@ -111,6 +116,7 @@ config BAST_PC104_IRQ
|
||||||
config MACH_TCT_HAMMER
|
config MACH_TCT_HAMMER
|
||||||
bool "TCT Hammer Board"
|
bool "TCT Hammer Board"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the TinCanTools Hammer Board
|
Say Y here if you are using the TinCanTools Hammer Board
|
||||||
<http://www.tincantools.com>
|
<http://www.tincantools.com>
|
||||||
|
@ -122,12 +128,14 @@ config MACH_VR1000
|
||||||
select SIMTEC_NOR
|
select SIMTEC_NOR
|
||||||
select MACH_BAST_IDE
|
select MACH_BAST_IDE
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Thorcom VR1000 board.
|
Say Y here if you are using the Thorcom VR1000 board.
|
||||||
|
|
||||||
config MACH_QT2410
|
config MACH_QT2410
|
||||||
bool "QT2410"
|
bool "QT2410"
|
||||||
select CPU_S3C2410
|
select CPU_S3C2410
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Armzone QT2410
|
Say Y here if you are using the Armzone QT2410
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ menu "S3C2412 Machines"
|
||||||
config MACH_JIVE
|
config MACH_JIVE
|
||||||
bool "Logitech Jive"
|
bool "Logitech Jive"
|
||||||
select CPU_S3C2412
|
select CPU_S3C2412
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Logitech Jive.
|
Say Y here if you are using the Logitech Jive.
|
||||||
|
|
||||||
|
@ -50,6 +51,7 @@ config MACH_SMDK2413
|
||||||
select CPU_S3C2412
|
select CPU_S3C2412
|
||||||
select MACH_S3C2413
|
select MACH_S3C2413
|
||||||
select MACH_SMDK
|
select MACH_SMDK
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using an SMDK2413
|
Say Y here if you are using an SMDK2413
|
||||||
|
|
||||||
|
@ -72,6 +74,7 @@ config MACH_SMDK2412
|
||||||
config MACH_VSTMS
|
config MACH_VSTMS
|
||||||
bool "VMSTMS"
|
bool "VMSTMS"
|
||||||
select CPU_S3C2412
|
select CPU_S3C2412
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using an VSTMS board
|
Say Y here if you are using an VSTMS board
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ config MACH_ANUBIS
|
||||||
select PM_SIMTEC if PM
|
select PM_SIMTEC if PM
|
||||||
select HAVE_PATA_PLATFORM
|
select HAVE_PATA_PLATFORM
|
||||||
select S3C24XX_GPIO_EXTRA64
|
select S3C24XX_GPIO_EXTRA64
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Simtec Electronics ANUBIS
|
Say Y here if you are using the Simtec Electronics ANUBIS
|
||||||
development system
|
development system
|
||||||
|
@ -43,6 +44,7 @@ config MACH_OSIRIS
|
||||||
select S3C24XX_DCLK
|
select S3C24XX_DCLK
|
||||||
select PM_SIMTEC if PM
|
select PM_SIMTEC if PM
|
||||||
select S3C24XX_GPIO_EXTRA128
|
select S3C24XX_GPIO_EXTRA128
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Simtec IM2440D20 module, also
|
Say Y here if you are using the Simtec IM2440D20 module, also
|
||||||
known as the Osiris.
|
known as the Osiris.
|
||||||
|
@ -58,12 +60,14 @@ config ARCH_S3C2440
|
||||||
bool "SMDK2440"
|
bool "SMDK2440"
|
||||||
select CPU_S3C2440
|
select CPU_S3C2440
|
||||||
select MACH_SMDK
|
select MACH_SMDK
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the SMDK2440.
|
Say Y here if you are using the SMDK2440.
|
||||||
|
|
||||||
config MACH_NEXCODER_2440
|
config MACH_NEXCODER_2440
|
||||||
bool "NexVision NEXCODER 2440 Light Board"
|
bool "NexVision NEXCODER 2440 Light Board"
|
||||||
select CPU_S3C2440
|
select CPU_S3C2440
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
|
Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
|
||||||
|
|
||||||
|
@ -76,6 +80,7 @@ config SMDK2440_CPU2440
|
||||||
config MACH_AT2440EVB
|
config MACH_AT2440EVB
|
||||||
bool "Avantech AT2440EVB development board"
|
bool "Avantech AT2440EVB development board"
|
||||||
select CPU_S3C2440
|
select CPU_S3C2440
|
||||||
|
select S3C_DEV_USB_HOST
|
||||||
help
|
help
|
||||||
Say Y here if you are using the AT2440EVB development board
|
Say Y here if you are using the AT2440EVB development board
|
||||||
|
|
||||||
|
|
|
@ -172,4 +172,9 @@ config S3C_DEV_FB
|
||||||
help
|
help
|
||||||
Compile in platform device definition for framebuffer
|
Compile in platform device definition for framebuffer
|
||||||
|
|
||||||
|
config S3C_DEV_USB_HOST
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Compile in platform device definition for USB host.
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -30,3 +30,4 @@ obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o
|
||||||
obj-y += dev-i2c0.o
|
obj-y += dev-i2c0.o
|
||||||
obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
|
obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
|
||||||
obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
|
obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
|
||||||
|
obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
|
||||||
|
|
50
arch/arm/plat-s3c/dev-usb.c
Normal file
50
arch/arm/plat-s3c/dev-usb.c
Normal file
|
@ -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);
|
|
@ -136,36 +136,6 @@ struct platform_device *s3c24xx_uart_src[4] = {
|
||||||
struct platform_device *s3c24xx_uart_devs[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 */
|
/* LCD Controller */
|
||||||
|
|
||||||
static struct resource s3c_lcd_resource[] = {
|
static struct resource s3c_lcd_resource[] = {
|
||||||
|
|
Loading…
Reference in a new issue