summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-12-03 12:12:29 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-03 12:12:29 -0800
commitfe4bfb30fe5788100a70c0ed96ddd8c6186eb9c4 (patch)
tree054d3a37dd62db5f362947c306c12fc3a223571f /arch
parent367576b813ed66a000e66ec18f7082bbc84c05d7 (diff)
parente3e9887ee9de36d8e2bef972ad74a42abd7a44c4 (diff)
Merge branch 'sh/ehci' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 into work
* 'sh/ehci' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Convert to USB_ARCH_HAS_OHCI/EHCI selects. usb: ehci-sh: Add missing ehci helpers. usb: ehci-sh: Fix up fault in shutdown path. sh: Add EHCI support for SH7786. usb: ehci-hcd: Add support for SuperH EHCI. usb: ohci-sh: Set IRQ as shared.
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/Kconfig5
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c35
2 files changed, 36 insertions, 4 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 5c075f562eb..e0e2234341f 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -344,6 +344,7 @@ config CPU_SUBTYPE_SH7720
select CPU_SH3
select CPU_HAS_DSP
select SYS_SUPPORTS_CMT
+ select USB_ARCH_HAS_OHCI
help
Select SH7720 if you have a SH3-DSP SH7720 CPU.
@@ -352,6 +353,7 @@ config CPU_SUBTYPE_SH7721
select CPU_SH3
select CPU_HAS_DSP
select SYS_SUPPORTS_CMT
+ select USB_ARCH_HAS_OHCI
help
Select SH7721 if you have a SH3-DSP SH7721 CPU.
@@ -429,6 +431,7 @@ config CPU_SUBTYPE_SH7757
config CPU_SUBTYPE_SH7763
bool "Support SH7763 processor"
select CPU_SH4A
+ select USB_ARCH_HAS_OHCI
help
Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
@@ -453,6 +456,8 @@ config CPU_SUBTYPE_SH7786
select CPU_SHX3
select CPU_HAS_PTEAEX
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+ select USB_ARCH_HAS_OHCI
+ select USB_ARCH_HAS_EHCI
config CPU_SUBTYPE_SHX3
bool "Support SH-X3 processor"
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index c016c000471..0170dbda1d0 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -522,10 +522,37 @@ static struct platform_device dma0_device = {
},
};
+#define USB_EHCI_START 0xffe70000
+#define USB_OHCI_START 0xffe70400
+
+static struct resource usb_ehci_resources[] = {
+ [0] = {
+ .start = USB_EHCI_START,
+ .end = USB_EHCI_START + 0x3ff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 77,
+ .end = 77,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device usb_ehci_device = {
+ .name = "sh_ehci",
+ .id = -1,
+ .dev = {
+ .dma_mask = &usb_ehci_device.dev.coherent_dma_mask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ },
+ .num_resources = ARRAY_SIZE(usb_ehci_resources),
+ .resource = usb_ehci_resources,
+};
+
static struct resource usb_ohci_resources[] = {
[0] = {
- .start = 0xffe70400,
- .end = 0xffe704ff,
+ .start = USB_OHCI_START,
+ .end = USB_OHCI_START + 0x3ff,
.flags = IORESOURCE_MEM,
},
[1] = {
@@ -535,12 +562,11 @@ static struct resource usb_ohci_resources[] = {
},
};
-static u64 usb_ohci_dma_mask = DMA_BIT_MASK(32);
static struct platform_device usb_ohci_device = {
.name = "sh_ohci",
.id = -1,
.dev = {
- .dma_mask = &usb_ohci_dma_mask,
+ .dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(usb_ohci_resources),
@@ -570,6 +596,7 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
static struct platform_device *sh7786_devices[] __initdata = {
&dma0_device,
+ &usb_ehci_device,
&usb_ohci_device,
};