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>
23 #include <asm/ppc_sys.h>
24 #include <asm/machdep.h>
26 /* We use offsets for IORESOURCE_MEM since we do not know at compile time
27 * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup
30 static struct gianfar_platform_data mpc83xx_tsec1_pdata = {
31 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
32 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
33 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
34 .phy_reg_addr = 0x24000,
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,
41 .phy_reg_addr = 0x24000,
44 static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = {
45 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
48 static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = {
49 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
52 static struct plat_serial8250_port serial_platform_data[] = {
55 .irq = MPC83xx_IRQ_UART1,
57 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
61 .irq = MPC83xx_IRQ_UART2,
63 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
68 struct platform_device ppc_sys_platform_devices[] = {
70 .name = "fsl-gianfar",
72 .dev.platform_data = &mpc83xx_tsec1_pdata,
74 .resource = (struct resource[]) {
78 .flags = IORESOURCE_MEM,
82 .start = MPC83xx_IRQ_TSEC1_TX,
83 .end = MPC83xx_IRQ_TSEC1_TX,
84 .flags = IORESOURCE_IRQ,
88 .start = MPC83xx_IRQ_TSEC1_RX,
89 .end = MPC83xx_IRQ_TSEC1_RX,
90 .flags = IORESOURCE_IRQ,
94 .start = MPC83xx_IRQ_TSEC1_ERROR,
95 .end = MPC83xx_IRQ_TSEC1_ERROR,
96 .flags = IORESOURCE_IRQ,
101 .name = "fsl-gianfar",
103 .dev.platform_data = &mpc83xx_tsec2_pdata,
105 .resource = (struct resource[]) {
109 .flags = IORESOURCE_MEM,
113 .start = MPC83xx_IRQ_TSEC2_TX,
114 .end = MPC83xx_IRQ_TSEC2_TX,
115 .flags = IORESOURCE_IRQ,
119 .start = MPC83xx_IRQ_TSEC2_RX,
120 .end = MPC83xx_IRQ_TSEC2_RX,
121 .flags = IORESOURCE_IRQ,
125 .start = MPC83xx_IRQ_TSEC2_ERROR,
126 .end = MPC83xx_IRQ_TSEC2_ERROR,
127 .flags = IORESOURCE_IRQ,
134 .dev.platform_data = &mpc83xx_fsl_i2c1_pdata,
136 .resource = (struct resource[]) {
140 .flags = IORESOURCE_MEM,
143 .start = MPC83xx_IRQ_IIC1,
144 .end = MPC83xx_IRQ_IIC1,
145 .flags = IORESOURCE_IRQ,
152 .dev.platform_data = &mpc83xx_fsl_i2c2_pdata,
154 .resource = (struct resource[]) {
158 .flags = IORESOURCE_MEM,
161 .start = MPC83xx_IRQ_IIC2,
162 .end = MPC83xx_IRQ_IIC2,
163 .flags = IORESOURCE_IRQ,
168 .name = "serial8250",
169 .id = PLAT8250_DEV_PLATFORM,
170 .dev.platform_data = serial_platform_data,
176 .resource = (struct resource[]) {
180 .flags = IORESOURCE_MEM,
183 .start = MPC83xx_IRQ_SEC2,
184 .end = MPC83xx_IRQ_SEC2,
185 .flags = IORESOURCE_IRQ,
189 [MPC83xx_USB2_DR] = {
190 .name = "fsl-usb2-dr",
193 .resource = (struct resource[]) {
197 .flags = IORESOURCE_MEM,
200 .start = MPC83xx_IRQ_USB2_DR,
201 .end = MPC83xx_IRQ_USB2_DR,
202 .flags = IORESOURCE_IRQ,
206 [MPC83xx_USB2_MPH] = {
207 .name = "fsl-usb2-mph",
210 .resource = (struct resource[]) {
214 .flags = IORESOURCE_MEM,
217 .start = MPC83xx_IRQ_USB2_MPH,
218 .end = MPC83xx_IRQ_USB2_MPH,
219 .flags = IORESOURCE_IRQ,
225 static int __init mach_mpc83xx_fixup(struct platform_device *pdev)
227 ppc_sys_fixup_mem_resource(pdev, immrbar);
231 static int __init mach_mpc83xx_init(void)
234 ppc_md.progress("mach_mpc83xx_init:enter", 0);
235 ppc_sys_device_fixup = mach_mpc83xx_fixup;
239 postcore_initcall(mach_mpc83xx_init);