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>
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[] = {
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,
66 struct platform_device ppc_sys_platform_devices[] = {
68 .name = "fsl-gianfar",
70 .dev.platform_data = &mpc83xx_tsec1_pdata,
72 .resource = (struct resource[]) {
76 .flags = IORESOURCE_MEM,
80 .start = MPC83xx_IRQ_TSEC1_TX,
81 .end = MPC83xx_IRQ_TSEC1_TX,
82 .flags = IORESOURCE_IRQ,
86 .start = MPC83xx_IRQ_TSEC1_RX,
87 .end = MPC83xx_IRQ_TSEC1_RX,
88 .flags = IORESOURCE_IRQ,
92 .start = MPC83xx_IRQ_TSEC1_ERROR,
93 .end = MPC83xx_IRQ_TSEC1_ERROR,
94 .flags = IORESOURCE_IRQ,
99 .name = "fsl-gianfar",
101 .dev.platform_data = &mpc83xx_tsec2_pdata,
103 .resource = (struct resource[]) {
107 .flags = IORESOURCE_MEM,
111 .start = MPC83xx_IRQ_TSEC2_TX,
112 .end = MPC83xx_IRQ_TSEC2_TX,
113 .flags = IORESOURCE_IRQ,
117 .start = MPC83xx_IRQ_TSEC2_RX,
118 .end = MPC83xx_IRQ_TSEC2_RX,
119 .flags = IORESOURCE_IRQ,
123 .start = MPC83xx_IRQ_TSEC2_ERROR,
124 .end = MPC83xx_IRQ_TSEC2_ERROR,
125 .flags = IORESOURCE_IRQ,
132 .dev.platform_data = &mpc83xx_fsl_i2c1_pdata,
134 .resource = (struct resource[]) {
138 .flags = IORESOURCE_MEM,
141 .start = MPC83xx_IRQ_IIC1,
142 .end = MPC83xx_IRQ_IIC1,
143 .flags = IORESOURCE_IRQ,
150 .dev.platform_data = &mpc83xx_fsl_i2c2_pdata,
152 .resource = (struct resource[]) {
156 .flags = IORESOURCE_MEM,
159 .start = MPC83xx_IRQ_IIC2,
160 .end = MPC83xx_IRQ_IIC2,
161 .flags = IORESOURCE_IRQ,
166 .name = "serial8250",
168 .dev.platform_data = serial_platform_data,
174 .resource = (struct resource[]) {
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",
191 .resource = (struct resource[]) {
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",
208 .resource = (struct resource[]) {
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);
229 static int __init mach_mpc83xx_init(void)
232 ppc_md.progress("mach_mpc83xx_init:enter", 0);
233 ppc_sys_device_fixup = mach_mpc83xx_fixup;
237 postcore_initcall(mach_mpc83xx_init);