diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2006-08-15 02:00:31 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:44:31 -0400 |
commit | 2ca2d5e84c19ddbc0126087af6288533a05f1799 (patch) | |
tree | 4d8014f576180e9a689dfcb9d405d412b19471ef /arch/ppc/syslib | |
parent | 5b4b8454344a0391bb0f69fda0f4ec8e1f0d2fed (diff) |
[PATCH] ppc32: board-specific part of fs_enet update
This contains board-specific portion to respect driver changes (for 8272ads ,
885ads and 866ads). Altered platform_data structures as well as initial setup
routines relevant to fs_enet.
Changes to the mpc8560ads ppc/ code are also introduced, but mainly as
reference, since the entire board support is going to appear in arch/powerpc.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'arch/ppc/syslib')
-rw-r--r-- | arch/ppc/syslib/mpc85xx_devices.c | 89 | ||||
-rw-r--r-- | arch/ppc/syslib/mpc8xx_devices.c | 8 | ||||
-rw-r--r-- | arch/ppc/syslib/mpc8xx_sys.c | 6 | ||||
-rw-r--r-- | arch/ppc/syslib/pq2_devices.c | 5 | ||||
-rw-r--r-- | arch/ppc/syslib/pq2_sys.c | 3 |
5 files changed, 105 insertions, 6 deletions
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 7735336f5b8f..325136e5aee0 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -16,9 +16,11 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/serial_8250.h> | 17 | #include <linux/serial_8250.h> |
18 | #include <linux/fsl_devices.h> | 18 | #include <linux/fsl_devices.h> |
19 | #include <linux/fs_enet_pd.h> | ||
19 | #include <asm/mpc85xx.h> | 20 | #include <asm/mpc85xx.h> |
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
21 | #include <asm/ppc_sys.h> | 22 | #include <asm/ppc_sys.h> |
23 | #include <asm/cpm2.h> | ||
22 | 24 | ||
23 | /* We use offsets for IORESOURCE_MEM since we do not know at compile time | 25 | /* We use offsets for IORESOURCE_MEM since we do not know at compile time |
24 | * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup | 26 | * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup |
@@ -82,6 +84,60 @@ static struct fsl_i2c_platform_data mpc85xx_fsl_i2c2_pdata = { | |||
82 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, | 84 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, |
83 | }; | 85 | }; |
84 | 86 | ||
87 | static struct fs_platform_info mpc85xx_fcc1_pdata = { | ||
88 | .fs_no = fsid_fcc1, | ||
89 | .cp_page = CPM_CR_FCC1_PAGE, | ||
90 | .cp_block = CPM_CR_FCC1_SBLOCK, | ||
91 | |||
92 | .rx_ring = 32, | ||
93 | .tx_ring = 32, | ||
94 | .rx_copybreak = 240, | ||
95 | .use_napi = 0, | ||
96 | .napi_weight = 17, | ||
97 | |||
98 | .clk_mask = CMX1_CLK_MASK, | ||
99 | .clk_route = CMX1_CLK_ROUTE, | ||
100 | .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), | ||
101 | |||
102 | .mem_offset = FCC1_MEM_OFFSET, | ||
103 | }; | ||
104 | |||
105 | static struct fs_platform_info mpc85xx_fcc2_pdata = { | ||
106 | .fs_no = fsid_fcc2, | ||
107 | .cp_page = CPM_CR_FCC2_PAGE, | ||
108 | .cp_block = CPM_CR_FCC2_SBLOCK, | ||
109 | |||
110 | .rx_ring = 32, | ||
111 | .tx_ring = 32, | ||
112 | .rx_copybreak = 240, | ||
113 | .use_napi = 0, | ||
114 | .napi_weight = 17, | ||
115 | |||
116 | .clk_mask = CMX2_CLK_MASK, | ||
117 | .clk_route = CMX2_CLK_ROUTE, | ||
118 | .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), | ||
119 | |||
120 | .mem_offset = FCC2_MEM_OFFSET, | ||
121 | }; | ||
122 | |||
123 | static struct fs_platform_info mpc85xx_fcc3_pdata = { | ||
124 | .fs_no = fsid_fcc3, | ||
125 | .cp_page = CPM_CR_FCC3_PAGE, | ||
126 | .cp_block = CPM_CR_FCC3_SBLOCK, | ||
127 | |||
128 | .rx_ring = 32, | ||
129 | .tx_ring = 32, | ||
130 | .rx_copybreak = 240, | ||
131 | .use_napi = 0, | ||
132 | .napi_weight = 17, | ||
133 | |||
134 | .clk_mask = CMX3_CLK_MASK, | ||
135 | .clk_route = CMX3_CLK_ROUTE, | ||
136 | .clk_trx = (PC_F3RXCLK | PC_F3TXCLK), | ||
137 | |||
138 | .mem_offset = FCC3_MEM_OFFSET, | ||
139 | }; | ||
140 | |||
85 | static struct plat_serial8250_port serial_platform_data[] = { | 141 | static struct plat_serial8250_port serial_platform_data[] = { |
86 | [0] = { | 142 | [0] = { |
87 | .mapbase = 0x4500, | 143 | .mapbase = 0x4500, |
@@ -318,19 +374,28 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
318 | [MPC85xx_CPM_FCC1] = { | 374 | [MPC85xx_CPM_FCC1] = { |
319 | .name = "fsl-cpm-fcc", | 375 | .name = "fsl-cpm-fcc", |
320 | .id = 1, | 376 | .id = 1, |
321 | .num_resources = 3, | 377 | .num_resources = 4, |
378 | .dev.platform_data = &mpc85xx_fcc1_pdata, | ||
322 | .resource = (struct resource[]) { | 379 | .resource = (struct resource[]) { |
323 | { | 380 | { |
381 | .name = "fcc_regs", | ||
324 | .start = 0x91300, | 382 | .start = 0x91300, |
325 | .end = 0x9131F, | 383 | .end = 0x9131F, |
326 | .flags = IORESOURCE_MEM, | 384 | .flags = IORESOURCE_MEM, |
327 | }, | 385 | }, |
328 | { | 386 | { |
387 | .name = "fcc_regs_c", | ||
329 | .start = 0x91380, | 388 | .start = 0x91380, |
330 | .end = 0x9139F, | 389 | .end = 0x9139F, |
331 | .flags = IORESOURCE_MEM, | 390 | .flags = IORESOURCE_MEM, |
332 | }, | 391 | }, |
333 | { | 392 | { |
393 | .name = "fcc_pram", | ||
394 | .start = 0x88400, | ||
395 | .end = 0x884ff, | ||
396 | .flags = IORESOURCE_MEM, | ||
397 | }, | ||
398 | { | ||
334 | .start = SIU_INT_FCC1, | 399 | .start = SIU_INT_FCC1, |
335 | .end = SIU_INT_FCC1, | 400 | .end = SIU_INT_FCC1, |
336 | .flags = IORESOURCE_IRQ, | 401 | .flags = IORESOURCE_IRQ, |
@@ -340,19 +405,28 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
340 | [MPC85xx_CPM_FCC2] = { | 405 | [MPC85xx_CPM_FCC2] = { |
341 | .name = "fsl-cpm-fcc", | 406 | .name = "fsl-cpm-fcc", |
342 | .id = 2, | 407 | .id = 2, |
343 | .num_resources = 3, | 408 | .num_resources = 4, |
409 | .dev.platform_data = &mpc85xx_fcc2_pdata, | ||
344 | .resource = (struct resource[]) { | 410 | .resource = (struct resource[]) { |
345 | { | 411 | { |
412 | .name = "fcc_regs", | ||
346 | .start = 0x91320, | 413 | .start = 0x91320, |
347 | .end = 0x9133F, | 414 | .end = 0x9133F, |
348 | .flags = IORESOURCE_MEM, | 415 | .flags = IORESOURCE_MEM, |
349 | }, | 416 | }, |
350 | { | 417 | { |
418 | .name = "fcc_regs_c", | ||
351 | .start = 0x913A0, | 419 | .start = 0x913A0, |
352 | .end = 0x913CF, | 420 | .end = 0x913CF, |
353 | .flags = IORESOURCE_MEM, | 421 | .flags = IORESOURCE_MEM, |
354 | }, | 422 | }, |
355 | { | 423 | { |
424 | .name = "fcc_pram", | ||
425 | .start = 0x88500, | ||
426 | .end = 0x885ff, | ||
427 | .flags = IORESOURCE_MEM, | ||
428 | }, | ||
429 | { | ||
356 | .start = SIU_INT_FCC2, | 430 | .start = SIU_INT_FCC2, |
357 | .end = SIU_INT_FCC2, | 431 | .end = SIU_INT_FCC2, |
358 | .flags = IORESOURCE_IRQ, | 432 | .flags = IORESOURCE_IRQ, |
@@ -362,19 +436,28 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
362 | [MPC85xx_CPM_FCC3] = { | 436 | [MPC85xx_CPM_FCC3] = { |
363 | .name = "fsl-cpm-fcc", | 437 | .name = "fsl-cpm-fcc", |
364 | .id = 3, | 438 | .id = 3, |
365 | .num_resources = 3, | 439 | .num_resources = 4, |
440 | .dev.platform_data = &mpc85xx_fcc3_pdata, | ||
366 | .resource = (struct resource[]) { | 441 | .resource = (struct resource[]) { |
367 | { | 442 | { |
443 | .name = "fcc_regs", | ||
368 | .start = 0x91340, | 444 | .start = 0x91340, |
369 | .end = 0x9135F, | 445 | .end = 0x9135F, |
370 | .flags = IORESOURCE_MEM, | 446 | .flags = IORESOURCE_MEM, |
371 | }, | 447 | }, |
372 | { | 448 | { |
449 | .name = "fcc_regs_c", | ||
373 | .start = 0x913D0, | 450 | .start = 0x913D0, |
374 | .end = 0x913FF, | 451 | .end = 0x913FF, |
375 | .flags = IORESOURCE_MEM, | 452 | .flags = IORESOURCE_MEM, |
376 | }, | 453 | }, |
377 | { | 454 | { |
455 | .name = "fcc_pram", | ||
456 | .start = 0x88600, | ||
457 | .end = 0x886ff, | ||
458 | .flags = IORESOURCE_MEM, | ||
459 | }, | ||
460 | { | ||
378 | .start = SIU_INT_FCC3, | 461 | .start = SIU_INT_FCC3, |
379 | .end = SIU_INT_FCC3, | 462 | .end = SIU_INT_FCC3, |
380 | .flags = IORESOURCE_IRQ, | 463 | .flags = IORESOURCE_IRQ, |
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index 6f536383866e..cf5ab47487a7 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -218,6 +218,14 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
218 | }, | 218 | }, |
219 | }, | 219 | }, |
220 | }, | 220 | }, |
221 | |||
222 | [MPC8xx_MDIO_FEC] = { | ||
223 | .name = "fsl-cpm-fec-mdio", | ||
224 | .id = 0, | ||
225 | .num_resources = 0, | ||
226 | |||
227 | }, | ||
228 | |||
221 | }; | 229 | }; |
222 | 230 | ||
223 | static int __init mach_mpc8xx_fixup(struct platform_device *pdev) | 231 | static int __init mach_mpc8xx_fixup(struct platform_device *pdev) |
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c index eee213284855..18ba1d7ff9f1 100644 --- a/arch/ppc/syslib/mpc8xx_sys.c +++ b/arch/ppc/syslib/mpc8xx_sys.c | |||
@@ -22,7 +22,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
22 | .ppc_sys_name = "MPC86X", | 22 | .ppc_sys_name = "MPC86X", |
23 | .mask = 0xFFFFFFFF, | 23 | .mask = 0xFFFFFFFF, |
24 | .value = 0x00000000, | 24 | .value = 0x00000000, |
25 | .num_devices = 7, | 25 | .num_devices = 8, |
26 | .device_list = (enum ppc_sys_devices[]) | 26 | .device_list = (enum ppc_sys_devices[]) |
27 | { | 27 | { |
28 | MPC8xx_CPM_FEC1, | 28 | MPC8xx_CPM_FEC1, |
@@ -32,13 +32,14 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
32 | MPC8xx_CPM_SCC4, | 32 | MPC8xx_CPM_SCC4, |
33 | MPC8xx_CPM_SMC1, | 33 | MPC8xx_CPM_SMC1, |
34 | MPC8xx_CPM_SMC2, | 34 | MPC8xx_CPM_SMC2, |
35 | MPC8xx_MDIO_FEC, | ||
35 | }, | 36 | }, |
36 | }, | 37 | }, |
37 | { | 38 | { |
38 | .ppc_sys_name = "MPC885", | 39 | .ppc_sys_name = "MPC885", |
39 | .mask = 0xFFFFFFFF, | 40 | .mask = 0xFFFFFFFF, |
40 | .value = 0x00000000, | 41 | .value = 0x00000000, |
41 | .num_devices = 8, | 42 | .num_devices = 9, |
42 | .device_list = (enum ppc_sys_devices[]) | 43 | .device_list = (enum ppc_sys_devices[]) |
43 | { | 44 | { |
44 | MPC8xx_CPM_FEC1, | 45 | MPC8xx_CPM_FEC1, |
@@ -49,6 +50,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
49 | MPC8xx_CPM_SCC4, | 50 | MPC8xx_CPM_SCC4, |
50 | MPC8xx_CPM_SMC1, | 51 | MPC8xx_CPM_SMC1, |
51 | MPC8xx_CPM_SMC2, | 52 | MPC8xx_CPM_SMC2, |
53 | MPC8xx_MDIO_FEC, | ||
52 | }, | 54 | }, |
53 | }, | 55 | }, |
54 | { /* default match */ | 56 | { /* default match */ |
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index 8692d00c08c4..fefbc217a56d 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -369,6 +369,11 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
369 | }, | 369 | }, |
370 | }, | 370 | }, |
371 | }, | 371 | }, |
372 | [MPC82xx_MDIO_BB] = { | ||
373 | .name = "fsl-bb-mdio", | ||
374 | .id = 0, | ||
375 | .num_resources = 0, | ||
376 | }, | ||
372 | }; | 377 | }; |
373 | 378 | ||
374 | static int __init mach_mpc82xx_fixup(struct platform_device *pdev) | 379 | static int __init mach_mpc82xx_fixup(struct platform_device *pdev) |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index fee8948162b9..f52600c0db20 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -139,13 +139,14 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
139 | .ppc_sys_name = "8272", | 139 | .ppc_sys_name = "8272", |
140 | .mask = 0x0000ff00, | 140 | .mask = 0x0000ff00, |
141 | .value = 0x00000c00, | 141 | .value = 0x00000c00, |
142 | .num_devices = 12, | 142 | .num_devices = 13, |
143 | .device_list = (enum ppc_sys_devices[]) | 143 | .device_list = (enum ppc_sys_devices[]) |
144 | { | 144 | { |
145 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | 145 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, |
146 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, | 146 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, |
147 | MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, | 147 | MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, |
148 | MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1, | 148 | MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1, |
149 | MPC82xx_MDIO_BB, | ||
149 | }, | 150 | }, |
150 | }, | 151 | }, |
151 | /* below is a list of the 8280 family of processors */ | 152 | /* below is a list of the 8280 family of processors */ |