sync hh.org
[hh.org.git] / arch / ppc / syslib / mpc8xx_devices.c
blobcf5ab47487a752dd352b510643889c60c542ed4f
1 /*
2 * MPC8xx Device descriptions
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
6 * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug<vbordug@ru.mvista.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
14 #include <linux/init.h>
15 #include <linux/module.h>
16 #include <linux/device.h>
17 #include <linux/serial_8250.h>
18 #include <linux/mii.h>
19 #include <asm/commproc.h>
20 #include <asm/mpc8xx.h>
21 #include <asm/irq.h>
22 #include <asm/ppc_sys.h>
24 /* We use offsets for IORESOURCE_MEM to do not set dependences at compile time.
25 * They will get fixed up by mach_mpc8xx_fixup
28 struct platform_device ppc_sys_platform_devices[] = {
29 [MPC8xx_CPM_FEC1] = {
30 .name = "fsl-cpm-fec",
31 .id = 1,
32 .num_resources = 2,
33 .resource = (struct resource[]) {
35 .name = "regs",
36 .start = 0xe00,
37 .end = 0xe88,
38 .flags = IORESOURCE_MEM,
41 .name = "interrupt",
42 .start = MPC8xx_INT_FEC1,
43 .end = MPC8xx_INT_FEC1,
44 .flags = IORESOURCE_IRQ,
48 [MPC8xx_CPM_FEC2] = {
49 .name = "fsl-cpm-fec",
50 .id = 2,
51 .num_resources = 2,
52 .resource = (struct resource[]) {
54 .name = "regs",
55 .start = 0x1e00,
56 .end = 0x1e88,
57 .flags = IORESOURCE_MEM,
60 .name = "interrupt",
61 .start = MPC8xx_INT_FEC2,
62 .end = MPC8xx_INT_FEC2,
63 .flags = IORESOURCE_IRQ,
67 [MPC8xx_CPM_SCC1] = {
68 .name = "fsl-cpm-scc",
69 .id = 1,
70 .num_resources = 3,
71 .resource = (struct resource[]) {
73 .name = "regs",
74 .start = 0xa00,
75 .end = 0xa18,
76 .flags = IORESOURCE_MEM,
79 .name = "pram",
80 .start = 0x3c00,
81 .end = 0x3c80,
82 .flags = IORESOURCE_MEM,
85 .name = "interrupt",
86 .start = MPC8xx_INT_SCC1,
87 .end = MPC8xx_INT_SCC1,
88 .flags = IORESOURCE_IRQ,
92 [MPC8xx_CPM_SCC2] = {
93 .name = "fsl-cpm-scc",
94 .id = 2,
95 .num_resources = 3,
96 .resource = (struct resource[]) {
98 .name = "regs",
99 .start = 0xa20,
100 .end = 0xa38,
101 .flags = IORESOURCE_MEM,
104 .name = "pram",
105 .start = 0x3d00,
106 .end = 0x3d80,
107 .flags = IORESOURCE_MEM,
111 .name = "interrupt",
112 .start = MPC8xx_INT_SCC2,
113 .end = MPC8xx_INT_SCC2,
114 .flags = IORESOURCE_IRQ,
118 [MPC8xx_CPM_SCC3] = {
119 .name = "fsl-cpm-scc",
120 .id = 3,
121 .num_resources = 3,
122 .resource = (struct resource[]) {
124 .name = "regs",
125 .start = 0xa40,
126 .end = 0xa58,
127 .flags = IORESOURCE_MEM,
130 .name = "pram",
131 .start = 0x3e00,
132 .end = 0x3e80,
133 .flags = IORESOURCE_MEM,
137 .name = "interrupt",
138 .start = MPC8xx_INT_SCC3,
139 .end = MPC8xx_INT_SCC3,
140 .flags = IORESOURCE_IRQ,
144 [MPC8xx_CPM_SCC4] = {
145 .name = "fsl-cpm-scc",
146 .id = 4,
147 .num_resources = 3,
148 .resource = (struct resource[]) {
150 .name = "regs",
151 .start = 0xa60,
152 .end = 0xa78,
153 .flags = IORESOURCE_MEM,
156 .name = "pram",
157 .start = 0x3f00,
158 .end = 0x3f80,
159 .flags = IORESOURCE_MEM,
163 .name = "interrupt",
164 .start = MPC8xx_INT_SCC4,
165 .end = MPC8xx_INT_SCC4,
166 .flags = IORESOURCE_IRQ,
170 [MPC8xx_CPM_SMC1] = {
171 .name = "fsl-cpm-smc",
172 .id = 1,
173 .num_resources = 3,
174 .resource = (struct resource[]) {
176 .name = "regs",
177 .start = 0xa80,
178 .end = 0xa8f,
179 .flags = IORESOURCE_MEM,
182 .name = "pram",
183 .start = 0x3e80,
184 .end = 0x3ebf,
185 .flags = IORESOURCE_MEM,
188 .name = "interrupt",
189 .start = MPC8xx_INT_SMC1,
190 .end = MPC8xx_INT_SMC1,
191 .flags = IORESOURCE_IRQ,
195 [MPC8xx_CPM_SMC2] = {
196 .name = "fsl-cpm-smc",
197 .id = 2,
198 .num_resources = 3,
199 .resource = (struct resource[]) {
201 .name = "regs",
202 .start = 0xa90,
203 .end = 0xa9f,
204 .flags = IORESOURCE_MEM,
207 .name = "pram",
208 .start = 0x3f80,
209 .end = 0x3fbf,
210 .flags = IORESOURCE_MEM,
214 .name = "interrupt",
215 .start = MPC8xx_INT_SMC2,
216 .end = MPC8xx_INT_SMC2,
217 .flags = IORESOURCE_IRQ,
222 [MPC8xx_MDIO_FEC] = {
223 .name = "fsl-cpm-fec-mdio",
224 .id = 0,
225 .num_resources = 0,
231 static int __init mach_mpc8xx_fixup(struct platform_device *pdev)
233 ppc_sys_fixup_mem_resource (pdev, IMAP_ADDR);
234 return 0;
237 static int __init mach_mpc8xx_init(void)
239 ppc_sys_device_fixup = mach_mpc8xx_fixup;
240 return 0;
243 postcore_initcall(mach_mpc8xx_init);