[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / arm / mach-iop3xx / iop331-setup.c
blob622e7914819a49d9b365d9bffe14bfc171a1db5a
1 /*
2 * linux/arch/arm/mach-iop3xx/iop331-setup.c
4 * Author: Dave Jiang (dave.jiang@intel.com)
5 * Copyright (C) 2004 Intel Corporation.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/mm.h>
13 #include <linux/init.h>
14 #include <linux/config.h>
15 #include <linux/init.h>
16 #include <linux/major.h>
17 #include <linux/fs.h>
18 #include <linux/device.h>
19 #include <linux/serial.h>
20 #include <linux/tty.h>
21 #include <linux/serial_core.h>
23 #include <asm/io.h>
24 #include <asm/pgtable.h>
25 #include <asm/page.h>
26 #include <asm/mach/map.h>
27 #include <asm/setup.h>
28 #include <asm/system.h>
29 #include <asm/memory.h>
30 #include <asm/hardware.h>
31 #include <asm/mach-types.h>
32 #include <asm/mach/arch.h>
34 #define IOP331_UART_XTAL 33334000
37 * Standard IO mapping for all IOP331 based systems
39 static struct map_desc iop331_std_desc[] __initdata = {
40 /* virtual physical length type */
42 /* mem mapped registers */
43 { IOP331_VIRT_MEM_BASE, IOP331_PHYS_MEM_BASE, 0x00002000, MT_DEVICE },
45 /* PCI IO space */
46 { IOP331_PCI_LOWER_IO_VA, IOP331_PCI_LOWER_IO_PA, IOP331_PCI_IO_WINDOW_SIZE, MT_DEVICE }
49 static struct uart_port iop331_serial_ports[] = {
51 .membase = (char*)(IOP331_UART0_VIRT),
52 .mapbase = (IOP331_UART0_PHYS),
53 .irq = IRQ_IOP331_UART0,
54 .flags = UPF_SKIP_TEST,
55 .iotype = UPIO_MEM,
56 .regshift = 2,
57 .uartclk = IOP331_UART_XTAL,
58 .line = 0,
59 .type = PORT_XSCALE,
60 .fifosize = 32
61 } , {
62 .membase = (char*)(IOP331_UART1_VIRT),
63 .mapbase = (IOP331_UART1_PHYS),
64 .irq = IRQ_IOP331_UART1,
65 .flags = UPF_SKIP_TEST,
66 .iotype = UPIO_MEM,
67 .regshift = 2,
68 .uartclk = IOP331_UART_XTAL,
69 .line = 1,
70 .type = PORT_XSCALE,
71 .fifosize = 32
75 static struct resource iop33x_i2c_0_resources[] = {
76 [0] = {
77 .start = 0xfffff680,
78 .end = 0xfffff698,
79 .flags = IORESOURCE_MEM,
81 [1] = {
82 .start = IRQ_IOP331_I2C_0,
83 .end = IRQ_IOP331_I2C_0,
84 .flags = IORESOURCE_IRQ
88 static struct resource iop33x_i2c_1_resources[] = {
89 [0] = {
90 .start = 0xfffff6a0,
91 .end = 0xfffff6b8,
92 .flags = IORESOURCE_MEM,
94 [1] = {
95 .start = IRQ_IOP331_I2C_1,
96 .end = IRQ_IOP331_I2C_1,
97 .flags = IORESOURCE_IRQ
101 static struct platform_device iop33x_i2c_0_controller = {
102 .name = "IOP3xx-I2C",
103 .id = 0,
104 .num_resources = 2,
105 .resource = iop33x_i2c_0_resources
108 static struct platform_device iop33x_i2c_1_controller = {
109 .name = "IOP3xx-I2C",
110 .id = 1,
111 .num_resources = 2,
112 .resource = iop33x_i2c_1_resources
115 static struct platform_device *iop33x_devices[] __initdata = {
116 &iop33x_i2c_0_controller,
117 &iop33x_i2c_1_controller
120 void __init iop33x_init(void)
122 if(iop_is_331())
124 platform_add_devices(iop33x_devices,
125 ARRAY_SIZE(iop33x_devices));
129 void __init iop331_map_io(void)
131 iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
132 early_serial_setup(&iop331_serial_ports[0]);
133 early_serial_setup(&iop331_serial_ports[1]);
136 #ifdef CONFIG_ARCH_IOP331
137 extern void iop331_init_irq(void);
138 extern struct sys_timer iop331_timer;
139 #endif
141 #ifdef CONFIG_ARCH_IQ80331
142 extern void iq80331_map_io(void);
143 #endif
145 #ifdef CONFIG_MACH_IQ80332
146 extern void iq80332_map_io(void);
147 #endif
149 #if defined(CONFIG_ARCH_IQ80331)
150 MACHINE_START(IQ80331, "Intel IQ80331")
151 MAINTAINER("Intel Corp.")
152 BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
153 //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
154 MAPIO(iq80331_map_io)
155 INITIRQ(iop331_init_irq)
156 .timer = &iop331_timer,
157 BOOT_PARAMS(0x0100)
158 INIT_MACHINE(iop33x_init)
159 MACHINE_END
161 #elif defined(CONFIG_MACH_IQ80332)
162 MACHINE_START(IQ80332, "Intel IQ80332")
163 MAINTAINER("Intel Corp.")
164 BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
165 //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
166 MAPIO(iq80332_map_io)
167 INITIRQ(iop331_init_irq)
168 .timer = &iop331_timer,
169 BOOT_PARAMS(0x0100)
170 INIT_MACHINE(iop33x_init)
171 MACHINE_END
173 #else
174 #error No machine descriptor defined for this IOP3XX implementation
175 #endif