2 * MPC83xx Device descriptions
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
6 * Copyright 2005 Freescale Semiconductor Inc.
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/fsl_devices.h>
19 #include <asm/mpc83xx.h>
21 #include <asm/ppc_sys.h>
22 #include <asm/machdep.h>
24 /* We use offsets for IORESOURCE_MEM since we do not know at compile time
25 * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup
28 struct gianfar_mdio_data mpc83xx_mdio_pdata
= {
31 static struct gianfar_platform_data mpc83xx_tsec1_pdata
= {
32 .device_flags
= FSL_GIANFAR_DEV_HAS_GIGABIT
|
33 FSL_GIANFAR_DEV_HAS_COALESCE
| FSL_GIANFAR_DEV_HAS_RMON
|
34 FSL_GIANFAR_DEV_HAS_MULTI_INTR
,
37 static struct gianfar_platform_data mpc83xx_tsec2_pdata
= {
38 .device_flags
= FSL_GIANFAR_DEV_HAS_GIGABIT
|
39 FSL_GIANFAR_DEV_HAS_COALESCE
| FSL_GIANFAR_DEV_HAS_RMON
|
40 FSL_GIANFAR_DEV_HAS_MULTI_INTR
,
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
[] = {
54 .irq
= MPC83xx_IRQ_UART1
,
56 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
60 .irq
= MPC83xx_IRQ_UART2
,
62 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
67 struct platform_device ppc_sys_platform_devices
[] = {
69 .name
= "fsl-gianfar",
71 .dev
.platform_data
= &mpc83xx_tsec1_pdata
,
73 .resource
= (struct resource
[]) {
77 .flags
= IORESOURCE_MEM
,
81 .start
= MPC83xx_IRQ_TSEC1_TX
,
82 .end
= MPC83xx_IRQ_TSEC1_TX
,
83 .flags
= IORESOURCE_IRQ
,
87 .start
= MPC83xx_IRQ_TSEC1_RX
,
88 .end
= MPC83xx_IRQ_TSEC1_RX
,
89 .flags
= IORESOURCE_IRQ
,
93 .start
= MPC83xx_IRQ_TSEC1_ERROR
,
94 .end
= MPC83xx_IRQ_TSEC1_ERROR
,
95 .flags
= IORESOURCE_IRQ
,
100 .name
= "fsl-gianfar",
102 .dev
.platform_data
= &mpc83xx_tsec2_pdata
,
104 .resource
= (struct resource
[]) {
108 .flags
= IORESOURCE_MEM
,
112 .start
= MPC83xx_IRQ_TSEC2_TX
,
113 .end
= MPC83xx_IRQ_TSEC2_TX
,
114 .flags
= IORESOURCE_IRQ
,
118 .start
= MPC83xx_IRQ_TSEC2_RX
,
119 .end
= MPC83xx_IRQ_TSEC2_RX
,
120 .flags
= IORESOURCE_IRQ
,
124 .start
= MPC83xx_IRQ_TSEC2_ERROR
,
125 .end
= MPC83xx_IRQ_TSEC2_ERROR
,
126 .flags
= IORESOURCE_IRQ
,
133 .dev
.platform_data
= &mpc83xx_fsl_i2c1_pdata
,
135 .resource
= (struct resource
[]) {
139 .flags
= IORESOURCE_MEM
,
142 .start
= MPC83xx_IRQ_IIC1
,
143 .end
= MPC83xx_IRQ_IIC1
,
144 .flags
= IORESOURCE_IRQ
,
151 .dev
.platform_data
= &mpc83xx_fsl_i2c2_pdata
,
153 .resource
= (struct resource
[]) {
157 .flags
= IORESOURCE_MEM
,
160 .start
= MPC83xx_IRQ_IIC2
,
161 .end
= MPC83xx_IRQ_IIC2
,
162 .flags
= IORESOURCE_IRQ
,
167 .name
= "serial8250",
168 .id
= PLAT8250_DEV_PLATFORM
,
169 .dev
.platform_data
= serial_platform_data
,
175 .resource
= (struct resource
[]) {
179 .flags
= IORESOURCE_MEM
,
182 .start
= MPC83xx_IRQ_SEC2
,
183 .end
= MPC83xx_IRQ_SEC2
,
184 .flags
= IORESOURCE_IRQ
,
188 [MPC83xx_USB2_DR
] = {
189 .name
= "fsl-usb2-dr",
192 .resource
= (struct resource
[]) {
196 .flags
= IORESOURCE_MEM
,
199 .start
= MPC83xx_IRQ_USB2_DR
,
200 .end
= MPC83xx_IRQ_USB2_DR
,
201 .flags
= IORESOURCE_IRQ
,
205 [MPC83xx_USB2_MPH
] = {
206 .name
= "fsl-usb2-mph",
209 .resource
= (struct resource
[]) {
213 .flags
= IORESOURCE_MEM
,
216 .start
= MPC83xx_IRQ_USB2_MPH
,
217 .end
= MPC83xx_IRQ_USB2_MPH
,
218 .flags
= IORESOURCE_IRQ
,
223 .name
= "fsl-gianfar_mdio",
225 .dev
.platform_data
= &mpc83xx_mdio_pdata
,
227 .resource
= (struct resource
[]) {
231 .flags
= IORESOURCE_MEM
,
237 static int __init
mach_mpc83xx_fixup(struct platform_device
*pdev
)
239 ppc_sys_fixup_mem_resource(pdev
, immrbar
);
243 static int __init
mach_mpc83xx_init(void)
246 ppc_md
.progress("mach_mpc83xx_init:enter", 0);
247 ppc_sys_device_fixup
= mach_mpc83xx_fixup
;
251 postcore_initcall(mach_mpc83xx_init
);