2 * arch/ppc/platforms/4xx/ibmstb4.c
4 * Author: Armin Kuster <akuster@mvista.com>
6 * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
15 #include <asm/ppc4xx_pic.h>
16 #include <platforms/4xx/ibmstb4.h>
18 static struct ocp_func_iic_data ibmstb4_iic0_def
= {
19 .fast_mode
= 0, /* Use standad mode (100Khz) */
22 static struct ocp_func_iic_data ibmstb4_iic1_def
= {
23 .fast_mode
= 0, /* Use standad mode (100Khz) */
27 struct ocp_def core_ocp
[] __initdata
= {
28 { .vendor
= OCP_VENDOR_IBM
,
29 .function
= OCP_FUNC_16550
,
31 .paddr
= UART0_IO_BASE
,
35 { .vendor
= OCP_VENDOR_IBM
,
36 .function
= OCP_FUNC_16550
,
38 .paddr
= UART1_IO_BASE
,
42 { .vendor
= OCP_VENDOR_IBM
,
43 .function
= OCP_FUNC_16550
,
45 .paddr
= UART2_IO_BASE
,
49 { .vendor
= OCP_VENDOR_IBM
,
50 .function
= OCP_FUNC_IIC
,
54 .additions
= &ibmstb4_iic0_def
,
55 .show
= &ocp_show_iic_data
57 { .vendor
= OCP_VENDOR_IBM
,
58 .function
= OCP_FUNC_IIC
,
62 .additions
= &ibmstb4_iic1_def
,
63 .show
= &ocp_show_iic_data
65 { .vendor
= OCP_VENDOR_IBM
,
66 .function
= OCP_FUNC_GPIO
,
71 { .vendor
= OCP_VENDOR_IBM
,
72 .function
= OCP_FUNC_IDE
,
77 { .vendor
= OCP_VENDOR_INVALID
,
81 /* Polarity and triggering settings for internal interrupt sources */
82 struct ppc4xx_uic_settings ppc4xx_core_uic_cfg
[] __initdata
= {
83 { .polarity
= 0x7fffff01,
84 .triggering
= 0x00000000,
85 .ext_irq_mask
= 0x0000007e, /* IRQ0 - IRQ5 */
89 static struct resource ohci_usb_resources
[] = {
92 .end
= USB0_BASE
+ USB0_SIZE
- 1,
93 .flags
= IORESOURCE_MEM
,
98 .flags
= IORESOURCE_IRQ
,
102 static u64 dma_mask
= 0xffffffffULL
;
104 static struct platform_device ohci_usb_device
= {
105 .name
= "ppc-soc-ohci",
107 .num_resources
= ARRAY_SIZE(ohci_usb_resources
),
108 .resource
= ohci_usb_resources
,
110 .dma_mask
= &dma_mask
,
111 .coherent_dma_mask
= 0xffffffffULL
,
115 static struct platform_device
*ibmstb4_devs
[] __initdata
= {
120 ibmstb4_platform_add_devices(void)
122 return platform_add_devices(ibmstb4_devs
, ARRAY_SIZE(ibmstb4_devs
));
124 arch_initcall(ibmstb4_platform_add_devices
);