aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorMatt Porter <mporter@kernel.crashing.org>2005-09-03 18:55:32 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:05:55 -0400
commit886b9fa49900b055e20cd98f379fda49835d1ee6 (patch)
treef4156ed32dcec8962661d7bdf2584524a91a8786 /arch/ppc
parentd27477c2259488825f2f425d24f209a1b6f8dc7d (diff)
[PATCH] ppc32: Add usb support to IBM stb04xxx platforms
Support ochi-ppc-soc.c on IBM stb04xxx platforms Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/platforms/4xx/ibmstb4.c52
-rw-r--r--arch/ppc/platforms/4xx/ibmstb4.h4
-rw-r--r--arch/ppc/platforms/4xx/redwood5.c13
3 files changed, 61 insertions, 8 deletions
diff --git a/arch/ppc/platforms/4xx/ibmstb4.c b/arch/ppc/platforms/4xx/ibmstb4.c
index 874d16bab73c..d90627b68faa 100644
--- a/arch/ppc/platforms/4xx/ibmstb4.c
+++ b/arch/ppc/platforms/4xx/ibmstb4.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/ocp.h> 13#include <asm/ocp.h>
14#include <asm/ppc4xx_pic.h>
14#include <platforms/4xx/ibmstb4.h> 15#include <platforms/4xx/ibmstb4.h>
15 16
16static struct ocp_func_iic_data ibmstb4_iic0_def = { 17static struct ocp_func_iic_data ibmstb4_iic0_def = {
@@ -72,12 +73,51 @@ struct ocp_def core_ocp[] __initdata = {
72 .irq = IDE0_IRQ, 73 .irq = IDE0_IRQ,
73 .pm = OCP_CPM_NA, 74 .pm = OCP_CPM_NA,
74 }, 75 },
75 { .vendor = OCP_VENDOR_IBM,
76 .function = OCP_FUNC_USB,
77 .paddr = USB0_BASE,
78 .irq = USB0_IRQ,
79 .pm = OCP_CPM_NA,
80 },
81 { .vendor = OCP_VENDOR_INVALID, 76 { .vendor = OCP_VENDOR_INVALID,
82 } 77 }
83}; 78};
79
80/* Polarity and triggering settings for internal interrupt sources */
81struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = {
82 { .polarity = 0x7fffff01,
83 .triggering = 0x00000000,
84 .ext_irq_mask = 0x0000007e, /* IRQ0 - IRQ5 */
85 }
86};
87
88static struct resource ohci_usb_resources[] = {
89 [0] = {
90 .start = USB0_BASE,
91 .end = USB0_BASE + USB0_SIZE - 1,
92 .flags = IORESOURCE_MEM,
93 },
94 [1] = {
95 .start = USB0_IRQ,
96 .end = USB0_IRQ,
97 .flags = IORESOURCE_IRQ,
98 },
99};
100
101static u64 dma_mask = 0xffffffffULL;
102
103static struct platform_device ohci_usb_device = {
104 .name = "ppc-soc-ohci",
105 .id = 0,
106 .num_resources = ARRAY_SIZE(ohci_usb_resources),
107 .resource = ohci_usb_resources,
108 .dev = {
109 .dma_mask = &dma_mask,
110 .coherent_dma_mask = 0xffffffffULL,
111 }
112};
113
114static struct platform_device *ibmstb4_devs[] __initdata = {
115 &ohci_usb_device,
116};
117
118static int __init
119ibmstb4_platform_add_devices(void)
120{
121 return platform_add_devices(ibmstb4_devs, ARRAY_SIZE(ibmstb4_devs));
122}
123arch_initcall(ibmstb4_platform_add_devices);
diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h
index bcb4b1ee71f2..9f21d4c88a3d 100644
--- a/arch/ppc/platforms/4xx/ibmstb4.h
+++ b/arch/ppc/platforms/4xx/ibmstb4.h
@@ -73,9 +73,9 @@
73#define OPB0_BASE 0x40000000 73#define OPB0_BASE 0x40000000
74#define GPIO0_BASE 0x40060000 74#define GPIO0_BASE 0x40060000
75 75
76#define USB0_BASE 0x40010000
77#define USB0_SIZE 0xA0
76#define USB0_IRQ 18 78#define USB0_IRQ 18
77#define USB0_BASE STB04xxx_MAP_IO_ADDR(0x40010000)
78#define USB0_EXTENT 4096
79 79
80#define IIC_NUMS 2 80#define IIC_NUMS 2
81#define UART_NUMS 3 81#define UART_NUMS 3
diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c
index 2f5e410afbc5..bee8b4ac8afd 100644
--- a/arch/ppc/platforms/4xx/redwood5.c
+++ b/arch/ppc/platforms/4xx/redwood5.c
@@ -18,6 +18,19 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/machdep.h> 20#include <asm/machdep.h>
21#include <asm/ppc4xx_pic.h>
22
23/*
24 * Define external IRQ senses and polarities.
25 */
26unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = {
27 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 0 */
28 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 1 */
29 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 2 */
30 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 3 */
31 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 4 */
32 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 5 */
33};
21 34
22static struct resource smc91x_resources[] = { 35static struct resource smc91x_resources[] = {
23 [0] = { 36 [0] = {