diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2005-11-09 00:34:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:55:52 -0500 |
commit | 78b331213ec738ee4c1218034d6eec17293b3aed (patch) | |
tree | 71d58a2ab58659026ad023cf5af5abce196e53a1 /arch/ppc/syslib | |
parent | 143dcec2f7123b630b9e2c01c31b01a383dc15ff (diff) |
[PATCH] ppc32: Update MPC834x platform to work with new phylib
MPC834x uses the gianfar network driver which now uses the new phylib. We
need to update the platform code to create a gianfar platform MDIO bus and
pass the right intializations to the gianfar driver to make things work
again.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/syslib')
-rw-r--r-- | arch/ppc/syslib/mpc83xx_devices.c | 12 | ||||
-rw-r--r-- | arch/ppc/syslib/mpc83xx_sys.c | 24 |
2 files changed, 22 insertions, 14 deletions
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index dbf8acac507f..f43fbf9a9389 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c | |||
@@ -27,18 +27,20 @@ | |||
27 | * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup | 27 | * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup |
28 | */ | 28 | */ |
29 | 29 | ||
30 | struct gianfar_mdio_data mpc83xx_mdio_pdata = { | ||
31 | .paddr = 0x24520, | ||
32 | }; | ||
33 | |||
30 | static struct gianfar_platform_data mpc83xx_tsec1_pdata = { | 34 | static struct gianfar_platform_data mpc83xx_tsec1_pdata = { |
31 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | 35 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | |
32 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | 36 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | |
33 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, | 37 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, |
34 | .phy_reg_addr = 0x24000, | ||
35 | }; | 38 | }; |
36 | 39 | ||
37 | static struct gianfar_platform_data mpc83xx_tsec2_pdata = { | 40 | static struct gianfar_platform_data mpc83xx_tsec2_pdata = { |
38 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | 41 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | |
39 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | 42 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | |
40 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, | 43 | FSL_GIANFAR_DEV_HAS_MULTI_INTR, |
41 | .phy_reg_addr = 0x24000, | ||
42 | }; | 44 | }; |
43 | 45 | ||
44 | static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { | 46 | static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { |
@@ -220,6 +222,12 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
220 | }, | 222 | }, |
221 | }, | 223 | }, |
222 | }, | 224 | }, |
225 | [MPC83xx_MDIO] = { | ||
226 | .name = "fsl-gianfar_mdio", | ||
227 | .id = 0, | ||
228 | .dev.platform_data = &mpc83xx_mdio_pdata, | ||
229 | .num_resources = 0, | ||
230 | }, | ||
223 | }; | 231 | }; |
224 | 232 | ||
225 | static int __init mach_mpc83xx_fixup(struct platform_device *pdev) | 233 | static int __init mach_mpc83xx_fixup(struct platform_device *pdev) |
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c index 29aa63350025..da743446789b 100644 --- a/arch/ppc/syslib/mpc83xx_sys.c +++ b/arch/ppc/syslib/mpc83xx_sys.c | |||
@@ -24,72 +24,72 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
24 | .ppc_sys_name = "8349E", | 24 | .ppc_sys_name = "8349E", |
25 | .mask = 0xFFFF0000, | 25 | .mask = 0xFFFF0000, |
26 | .value = 0x80500000, | 26 | .value = 0x80500000, |
27 | .num_devices = 8, | 27 | .num_devices = 9, |
28 | .device_list = (enum ppc_sys_devices[]) | 28 | .device_list = (enum ppc_sys_devices[]) |
29 | { | 29 | { |
30 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 30 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
31 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, | 31 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, |
32 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 32 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
33 | }, | 33 | }, |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | .ppc_sys_name = "8349", | 36 | .ppc_sys_name = "8349", |
37 | .mask = 0xFFFF0000, | 37 | .mask = 0xFFFF0000, |
38 | .value = 0x80510000, | 38 | .value = 0x80510000, |
39 | .num_devices = 7, | 39 | .num_devices = 8, |
40 | .device_list = (enum ppc_sys_devices[]) | 40 | .device_list = (enum ppc_sys_devices[]) |
41 | { | 41 | { |
42 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 42 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
43 | MPC83xx_IIC2, MPC83xx_DUART, | 43 | MPC83xx_IIC2, MPC83xx_DUART, |
44 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 44 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
45 | }, | 45 | }, |
46 | }, | 46 | }, |
47 | { | 47 | { |
48 | .ppc_sys_name = "8347E", | 48 | .ppc_sys_name = "8347E", |
49 | .mask = 0xFFFF0000, | 49 | .mask = 0xFFFF0000, |
50 | .value = 0x80520000, | 50 | .value = 0x80520000, |
51 | .num_devices = 8, | 51 | .num_devices = 9, |
52 | .device_list = (enum ppc_sys_devices[]) | 52 | .device_list = (enum ppc_sys_devices[]) |
53 | { | 53 | { |
54 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 54 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
55 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, | 55 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, |
56 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 56 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
57 | }, | 57 | }, |
58 | }, | 58 | }, |
59 | { | 59 | { |
60 | .ppc_sys_name = "8347", | 60 | .ppc_sys_name = "8347", |
61 | .mask = 0xFFFF0000, | 61 | .mask = 0xFFFF0000, |
62 | .value = 0x80530000, | 62 | .value = 0x80530000, |
63 | .num_devices = 7, | 63 | .num_devices = 8, |
64 | .device_list = (enum ppc_sys_devices[]) | 64 | .device_list = (enum ppc_sys_devices[]) |
65 | { | 65 | { |
66 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 66 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
67 | MPC83xx_IIC2, MPC83xx_DUART, | 67 | MPC83xx_IIC2, MPC83xx_DUART, |
68 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH | 68 | MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO |
69 | }, | 69 | }, |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | .ppc_sys_name = "8343E", | 72 | .ppc_sys_name = "8343E", |
73 | .mask = 0xFFFF0000, | 73 | .mask = 0xFFFF0000, |
74 | .value = 0x80540000, | 74 | .value = 0x80540000, |
75 | .num_devices = 7, | 75 | .num_devices = 8, |
76 | .device_list = (enum ppc_sys_devices[]) | 76 | .device_list = (enum ppc_sys_devices[]) |
77 | { | 77 | { |
78 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 78 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
79 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, | 79 | MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, |
80 | MPC83xx_USB2_DR, | 80 | MPC83xx_USB2_DR, MPC83xx_MDIO |
81 | }, | 81 | }, |
82 | }, | 82 | }, |
83 | { | 83 | { |
84 | .ppc_sys_name = "8343", | 84 | .ppc_sys_name = "8343", |
85 | .mask = 0xFFFF0000, | 85 | .mask = 0xFFFF0000, |
86 | .value = 0x80550000, | 86 | .value = 0x80550000, |
87 | .num_devices = 6, | 87 | .num_devices = 7, |
88 | .device_list = (enum ppc_sys_devices[]) | 88 | .device_list = (enum ppc_sys_devices[]) |
89 | { | 89 | { |
90 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, | 90 | MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, |
91 | MPC83xx_IIC2, MPC83xx_DUART, | 91 | MPC83xx_IIC2, MPC83xx_DUART, |
92 | MPC83xx_USB2_DR, | 92 | MPC83xx_USB2_DR, MPC83xx_MDIO |
93 | }, | 93 | }, |
94 | }, | 94 | }, |
95 | { /* default match */ | 95 | { /* default match */ |