[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / ppc / syslib / mpc83xx_devices.c
blob5c1a919eaabfb367a57e0ec714ceebf129aaa0ff
1 /*
2 * arch/ppc/platforms/83xx/mpc83xx_devices.c
4 * MPC83xx Device descriptions
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
8 * Copyright 2005 Freescale Semiconductor Inc.
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
16 #include <linux/init.h>
17 #include <linux/module.h>
18 #include <linux/device.h>
19 #include <linux/serial_8250.h>
20 #include <linux/fsl_devices.h>
21 #include <asm/mpc83xx.h>
22 #include <asm/irq.h>
23 #include <asm/ppc_sys.h>
25 /* We use offsets for IORESOURCE_MEM since we do not know at compile time
26 * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup
29 static struct gianfar_platform_data mpc83xx_tsec1_pdata = {
30 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
31 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
32 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
33 .phy_reg_addr = 0x24000,
36 static struct gianfar_platform_data mpc83xx_tsec2_pdata = {
37 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
38 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
39 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
40 .phy_reg_addr = 0x24000,
43 static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = {
44 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
47 static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = {
48 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
51 static struct plat_serial8250_port serial_platform_data[] = {
52 [0] = {
53 .mapbase = 0x4500,
54 .irq = MPC83xx_IRQ_UART1,
55 .iotype = UPIO_MEM,
56 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
58 [1] = {
59 .mapbase = 0x4600,
60 .irq = MPC83xx_IRQ_UART2,
61 .iotype = UPIO_MEM,
62 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
66 struct platform_device ppc_sys_platform_devices[] = {
67 [MPC83xx_TSEC1] = {
68 .name = "fsl-gianfar",
69 .id = 1,
70 .dev.platform_data = &mpc83xx_tsec1_pdata,
71 .num_resources = 4,
72 .resource = (struct resource[]) {
74 .start = 0x24000,
75 .end = 0x24fff,
76 .flags = IORESOURCE_MEM,
79 .name = "tx",
80 .start = MPC83xx_IRQ_TSEC1_TX,
81 .end = MPC83xx_IRQ_TSEC1_TX,
82 .flags = IORESOURCE_IRQ,
85 .name = "rx",
86 .start = MPC83xx_IRQ_TSEC1_RX,
87 .end = MPC83xx_IRQ_TSEC1_RX,
88 .flags = IORESOURCE_IRQ,
91 .name = "error",
92 .start = MPC83xx_IRQ_TSEC1_ERROR,
93 .end = MPC83xx_IRQ_TSEC1_ERROR,
94 .flags = IORESOURCE_IRQ,
98 [MPC83xx_TSEC2] = {
99 .name = "fsl-gianfar",
100 .id = 2,
101 .dev.platform_data = &mpc83xx_tsec2_pdata,
102 .num_resources = 4,
103 .resource = (struct resource[]) {
105 .start = 0x25000,
106 .end = 0x25fff,
107 .flags = IORESOURCE_MEM,
110 .name = "tx",
111 .start = MPC83xx_IRQ_TSEC2_TX,
112 .end = MPC83xx_IRQ_TSEC2_TX,
113 .flags = IORESOURCE_IRQ,
116 .name = "rx",
117 .start = MPC83xx_IRQ_TSEC2_RX,
118 .end = MPC83xx_IRQ_TSEC2_RX,
119 .flags = IORESOURCE_IRQ,
122 .name = "error",
123 .start = MPC83xx_IRQ_TSEC2_ERROR,
124 .end = MPC83xx_IRQ_TSEC2_ERROR,
125 .flags = IORESOURCE_IRQ,
129 [MPC83xx_IIC1] = {
130 .name = "fsl-i2c",
131 .id = 1,
132 .dev.platform_data = &mpc83xx_fsl_i2c1_pdata,
133 .num_resources = 2,
134 .resource = (struct resource[]) {
136 .start = 0x3000,
137 .end = 0x30ff,
138 .flags = IORESOURCE_MEM,
141 .start = MPC83xx_IRQ_IIC1,
142 .end = MPC83xx_IRQ_IIC1,
143 .flags = IORESOURCE_IRQ,
147 [MPC83xx_IIC2] = {
148 .name = "fsl-i2c",
149 .id = 2,
150 .dev.platform_data = &mpc83xx_fsl_i2c2_pdata,
151 .num_resources = 2,
152 .resource = (struct resource[]) {
154 .start = 0x3100,
155 .end = 0x31ff,
156 .flags = IORESOURCE_MEM,
159 .start = MPC83xx_IRQ_IIC2,
160 .end = MPC83xx_IRQ_IIC2,
161 .flags = IORESOURCE_IRQ,
165 [MPC83xx_DUART] = {
166 .name = "serial8250",
167 .id = 0,
168 .dev.platform_data = serial_platform_data,
170 [MPC83xx_SEC2] = {
171 .name = "fsl-sec2",
172 .id = 1,
173 .num_resources = 2,
174 .resource = (struct resource[]) {
176 .start = 0x30000,
177 .end = 0x3ffff,
178 .flags = IORESOURCE_MEM,
181 .start = MPC83xx_IRQ_SEC2,
182 .end = MPC83xx_IRQ_SEC2,
183 .flags = IORESOURCE_IRQ,
187 [MPC83xx_USB2_DR] = {
188 .name = "fsl-usb2-dr",
189 .id = 1,
190 .num_resources = 2,
191 .resource = (struct resource[]) {
193 .start = 0x22000,
194 .end = 0x22fff,
195 .flags = IORESOURCE_MEM,
198 .start = MPC83xx_IRQ_USB2_DR,
199 .end = MPC83xx_IRQ_USB2_DR,
200 .flags = IORESOURCE_IRQ,
204 [MPC83xx_USB2_MPH] = {
205 .name = "fsl-usb2-mph",
206 .id = 1,
207 .num_resources = 2,
208 .resource = (struct resource[]) {
210 .start = 0x23000,
211 .end = 0x23fff,
212 .flags = IORESOURCE_MEM,
215 .start = MPC83xx_IRQ_USB2_MPH,
216 .end = MPC83xx_IRQ_USB2_MPH,
217 .flags = IORESOURCE_IRQ,
223 static int __init mach_mpc83xx_fixup(struct platform_device *pdev)
225 ppc_sys_fixup_mem_resource(pdev, immrbar);
226 return 0;
229 static int __init mach_mpc83xx_init(void)
231 if (ppc_md.progress)
232 ppc_md.progress("mach_mpc83xx_init:enter", 0);
233 ppc_sys_device_fixup = mach_mpc83xx_fixup;
234 return 0;
237 postcore_initcall(mach_mpc83xx_init);