2 * arch/ppc/syslib/mpc52xx_devices.c
4 * Freescale MPC52xx device descriptions
7 * Maintainer : Sylvain Munaut <tnt@246tNt.com>
9 * Copyright (C) 2005 Sylvain Munaut <tnt@246tNt.com>
11 * This file is licensed under the terms of the GNU General Public License
12 * version 2. This program is licensed "as is" without any warranty of any
13 * kind, whether express or implied.
16 #include <linux/fsl_devices.h>
17 #include <linux/resource.h>
18 #include <asm/mpc52xx.h>
19 #include <asm/ppc_sys.h>
22 static u64 mpc52xx_dma_mask = 0xffffffffULL;
24 static struct fsl_i2c_platform_data mpc52xx_fsl_i2c_pdata = {
25 .device_flags = FSL_I2C_DEV_CLOCK_5200,
29 /* We use relative offsets for IORESOURCE_MEM to be independent from the
30 * MBAR location at compile time
33 /* TODO Add the BestComm initiator channel to the device definitions,
34 possibly using IORESOURCE_DMA. But that's when BestComm is ready ... */
36 struct platform_device ppc_sys_platform_devices[] = {
38 .name = "mpc52xx-mscan",
41 .resource = (struct resource[]) {
45 .flags = IORESOURCE_MEM,
48 .start = MPC52xx_MSCAN1_IRQ,
49 .end = MPC52xx_MSCAN1_IRQ,
50 .flags = IORESOURCE_IRQ,
55 .name = "mpc52xx-mscan",
58 .resource = (struct resource[]) {
62 .flags = IORESOURCE_MEM,
65 .start = MPC52xx_MSCAN2_IRQ,
66 .end = MPC52xx_MSCAN2_IRQ,
67 .flags = IORESOURCE_IRQ,
72 .name = "mpc52xx-spi",
75 .resource = (struct resource[]) {
79 .flags = IORESOURCE_MEM,
83 .start = MPC52xx_SPI_MODF_IRQ,
84 .end = MPC52xx_SPI_MODF_IRQ,
85 .flags = IORESOURCE_IRQ,
89 .start = MPC52xx_SPI_SPIF_IRQ,
90 .end = MPC52xx_SPI_SPIF_IRQ,
91 .flags = IORESOURCE_IRQ,
96 .name = "ppc-soc-ohci",
99 .dev.dma_mask = &mpc52xx_dma_mask,
100 .dev.coherent_dma_mask = 0xffffffffULL,
101 .resource = (struct resource[]) {
105 .flags = IORESOURCE_MEM,
108 .start = MPC52xx_USB_IRQ,
109 .end = MPC52xx_USB_IRQ,
110 .flags = IORESOURCE_IRQ,
115 .name = "mpc52xx-bdlc",
118 .resource = (struct resource[]) {
122 .flags = IORESOURCE_MEM,
125 .start = MPC52xx_BDLC_IRQ,
126 .end = MPC52xx_BDLC_IRQ,
127 .flags = IORESOURCE_IRQ,
132 .name = "mpc52xx-psc",
135 .resource = (struct resource[]) {
139 .flags = IORESOURCE_MEM,
142 .start = MPC52xx_PSC1_IRQ,
143 .end = MPC52xx_PSC1_IRQ,
144 .flags = IORESOURCE_IRQ,
149 .name = "mpc52xx-psc",
152 .resource = (struct resource[]) {
156 .flags = IORESOURCE_MEM,
159 .start = MPC52xx_PSC2_IRQ,
160 .end = MPC52xx_PSC2_IRQ,
161 .flags = IORESOURCE_IRQ,
166 .name = "mpc52xx-psc",
169 .resource = (struct resource[]) {
173 .flags = IORESOURCE_MEM,
176 .start = MPC52xx_PSC3_IRQ,
177 .end = MPC52xx_PSC3_IRQ,
178 .flags = IORESOURCE_IRQ,
183 .name = "mpc52xx-psc",
186 .resource = (struct resource[]) {
190 .flags = IORESOURCE_MEM,
193 .start = MPC52xx_PSC4_IRQ,
194 .end = MPC52xx_PSC4_IRQ,
195 .flags = IORESOURCE_IRQ,
200 .name = "mpc52xx-psc",
203 .resource = (struct resource[]) {
207 .flags = IORESOURCE_MEM,
210 .start = MPC52xx_PSC5_IRQ,
211 .end = MPC52xx_PSC5_IRQ,
212 .flags = IORESOURCE_IRQ,
217 .name = "mpc52xx-psc",
220 .resource = (struct resource[]) {
224 .flags = IORESOURCE_MEM,
227 .start = MPC52xx_PSC6_IRQ,
228 .end = MPC52xx_PSC6_IRQ,
229 .flags = IORESOURCE_IRQ,
234 .name = "mpc52xx-fec",
237 .resource = (struct resource[]) {
241 .flags = IORESOURCE_MEM,
244 .start = MPC52xx_FEC_IRQ,
245 .end = MPC52xx_FEC_IRQ,
246 .flags = IORESOURCE_IRQ,
251 .name = "mpc52xx-ata",
254 .resource = (struct resource[]) {
258 .flags = IORESOURCE_MEM,
261 .start = MPC52xx_ATA_IRQ,
262 .end = MPC52xx_ATA_IRQ,
263 .flags = IORESOURCE_IRQ,
270 .dev.platform_data = &mpc52xx_fsl_i2c_pdata,
272 .resource = (struct resource[]) {
276 .flags = IORESOURCE_MEM,
279 .start = MPC52xx_I2C1_IRQ,
280 .end = MPC52xx_I2C1_IRQ,
281 .flags = IORESOURCE_IRQ,
288 .dev.platform_data = &mpc52xx_fsl_i2c_pdata,
290 .resource = (struct resource[]) {
294 .flags = IORESOURCE_MEM,
297 .start = MPC52xx_I2C2_IRQ,
298 .end = MPC52xx_I2C2_IRQ,
299 .flags = IORESOURCE_IRQ,
306 static int __init mach_mpc52xx_fixup(struct platform_device *pdev)
308 ppc_sys_fixup_mem_resource(pdev, MPC52xx_MBAR);
312 static int __init mach_mpc52xx_init(void)
314 ppc_sys_device_fixup = mach_mpc52xx_fixup;
318 postcore_initcall(mach_mpc52xx_init);