diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2006-09-21 14:38:05 -0400 |
---|---|---|
committer | Vitaly Bordug <vbordug@ru.mvista.com> | 2006-09-21 14:38:05 -0400 |
commit | 611a15afcdaacec6efba984c7eb089b853564bdf (patch) | |
tree | 6d33fdbb9354d4548fa44e5115de7186f38ac8c0 /arch | |
parent | d3465c921f79cfef0a4a8ceeeef9a3721bbbb57d (diff) |
POWERPC: Bring the fs_no calculation to the relevant SoC enumeration
The fs_no mean used to be fs_enet driver driven, hence it was an
enumeration across all the possible fs_enet "users" in the SoC. Now, with
QE on the pipeline, and to make DTS descriptions more clear, fs_no features
relevant SoC part number, with additional field to describe the SoC type.
Another reason for that is now not only fs_enet is going to utilize those
stuff. There might be UART, HLDC, and even USB, so to prevent confusion and
be ready for upcoming OF_device transfer, fs_enet and cpm_uart drivers were
updated in that concern, as well as the relevant DTS.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/dts/mpc8560ads.dts | 8 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts index ba5c943a6fe9..2b168486aeba 100644 --- a/arch/powerpc/boot/dts/mpc8560ads.dts +++ b/arch/powerpc/boot/dts/mpc8560ads.dts | |||
@@ -244,7 +244,7 @@ | |||
244 | device_type = "serial"; | 244 | device_type = "serial"; |
245 | compatible = "cpm_uart"; | 245 | compatible = "cpm_uart"; |
246 | model = "SCC"; | 246 | model = "SCC"; |
247 | device-id = <2>; | 247 | device-id = <1>; |
248 | reg = <91a00 20 88000 100>; | 248 | reg = <91a00 20 88000 100>; |
249 | clock-setup = <00ffffff 0>; | 249 | clock-setup = <00ffffff 0>; |
250 | rx-clock = <1>; | 250 | rx-clock = <1>; |
@@ -258,7 +258,7 @@ | |||
258 | device_type = "serial"; | 258 | device_type = "serial"; |
259 | compatible = "cpm_uart"; | 259 | compatible = "cpm_uart"; |
260 | model = "SCC"; | 260 | model = "SCC"; |
261 | device-id = <3>; | 261 | device-id = <2>; |
262 | reg = <91a20 20 88100 100>; | 262 | reg = <91a20 20 88100 100>; |
263 | clock-setup = <ff00ffff 90000>; | 263 | clock-setup = <ff00ffff 90000>; |
264 | rx-clock = <2>; | 264 | rx-clock = <2>; |
@@ -272,7 +272,7 @@ | |||
272 | device_type = "network"; | 272 | device_type = "network"; |
273 | compatible = "fs_enet"; | 273 | compatible = "fs_enet"; |
274 | model = "FCC"; | 274 | model = "FCC"; |
275 | device-id = <3>; | 275 | device-id = <2>; |
276 | reg = <91320 20 88500 100 913a0 30>; | 276 | reg = <91320 20 88500 100 913a0 30>; |
277 | mac-address = [ 00 00 0C 00 02 FD ]; | 277 | mac-address = [ 00 00 0C 00 02 FD ]; |
278 | clock-setup = <ff00ffff 250000>; | 278 | clock-setup = <ff00ffff 250000>; |
@@ -287,7 +287,7 @@ | |||
287 | device_type = "network"; | 287 | device_type = "network"; |
288 | compatible = "fs_enet"; | 288 | compatible = "fs_enet"; |
289 | model = "FCC"; | 289 | model = "FCC"; |
290 | device-id = <4>; | 290 | device-id = <3>; |
291 | reg = <91340 20 88600 100 913d0 30>; | 291 | reg = <91340 20 88600 100 913d0 30>; |
292 | mac-address = [ 00 00 0C 00 03 FD ]; | 292 | mac-address = [ 00 00 0C 00 03 FD ]; |
293 | clock-setup = <ffff00ff 3700>; | 293 | clock-setup = <ffff00ff 3700>; |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 4e72bb983636..022ed275ea68 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -622,6 +622,7 @@ static int __init fs_enet_of_init(void) | |||
622 | 622 | ||
623 | id = get_property(np, "device-id", NULL); | 623 | id = get_property(np, "device-id", NULL); |
624 | fs_enet_data.fs_no = *id; | 624 | fs_enet_data.fs_no = *id; |
625 | strcpy(fs_enet_data.fs_type, model); | ||
625 | 626 | ||
626 | mdio = of_get_parent(phy); | 627 | mdio = of_get_parent(phy); |
627 | ret = of_address_to_resource(mdio, 0, &res); | 628 | ret = of_address_to_resource(mdio, 0, &res); |
@@ -635,7 +636,7 @@ static int __init fs_enet_of_init(void) | |||
635 | fs_enet_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL)); | 636 | fs_enet_data.clk_tx = *((u32 *) get_property(np, "tx-clock", NULL)); |
636 | 637 | ||
637 | if (strstr(model, "FCC")) { | 638 | if (strstr(model, "FCC")) { |
638 | int fcc_index = fs_get_fcc_index(*id); | 639 | int fcc_index = *id - 1; |
639 | 640 | ||
640 | fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0); | 641 | fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0); |
641 | fs_enet_data.rx_ring = 32; | 642 | fs_enet_data.rx_ring = 32; |
@@ -688,6 +689,7 @@ static int __init cpm_uart_of_init(void) | |||
688 | struct resource r[3]; | 689 | struct resource r[3]; |
689 | struct fs_uart_platform_info cpm_uart_data; | 690 | struct fs_uart_platform_info cpm_uart_data; |
690 | const int *id; | 691 | const int *id; |
692 | const char *model; | ||
691 | 693 | ||
692 | memset(r, 0, sizeof(r)); | 694 | memset(r, 0, sizeof(r)); |
693 | memset(&cpm_uart_data, 0, sizeof(cpm_uart_data)); | 695 | memset(&cpm_uart_data, 0, sizeof(cpm_uart_data)); |
@@ -716,6 +718,10 @@ static int __init cpm_uart_of_init(void) | |||
716 | 718 | ||
717 | id = get_property(np, "device-id", NULL); | 719 | id = get_property(np, "device-id", NULL); |
718 | cpm_uart_data.fs_no = *id; | 720 | cpm_uart_data.fs_no = *id; |
721 | |||
722 | model = (char*)get_property(np, "model", NULL); | ||
723 | strcpy(cpm_uart_data.fs_type, model); | ||
724 | |||
719 | cpm_uart_data.uart_clk = ppc_proc_freq; | 725 | cpm_uart_data.uart_clk = ppc_proc_freq; |
720 | 726 | ||
721 | cpm_uart_data.tx_num_fifo = 4; | 727 | cpm_uart_data.tx_num_fifo = 4; |