diff options
Diffstat (limited to 'arch/arm/plat-orion/common.c')
-rw-r--r-- | arch/arm/plat-orion/common.c | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 9e5451b3c8e3..e5a2fde29b19 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/serial_8250.h> | 15 | #include <linux/serial_8250.h> |
16 | #include <linux/mbus.h> | ||
17 | #include <linux/ata_platform.h> | 16 | #include <linux/ata_platform.h> |
18 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
19 | #include <linux/mv643xx_i2c.h> | 18 | #include <linux/mv643xx_i2c.h> |
@@ -203,13 +202,12 @@ void __init orion_rtc_init(unsigned long mapbase, | |||
203 | ****************************************************************************/ | 202 | ****************************************************************************/ |
204 | static __init void ge_complete( | 203 | static __init void ge_complete( |
205 | struct mv643xx_eth_shared_platform_data *orion_ge_shared_data, | 204 | struct mv643xx_eth_shared_platform_data *orion_ge_shared_data, |
206 | struct mbus_dram_target_info *mbus_dram_info, int tclk, | 205 | int tclk, |
207 | struct resource *orion_ge_resource, unsigned long irq, | 206 | struct resource *orion_ge_resource, unsigned long irq, |
208 | struct platform_device *orion_ge_shared, | 207 | struct platform_device *orion_ge_shared, |
209 | struct mv643xx_eth_platform_data *eth_data, | 208 | struct mv643xx_eth_platform_data *eth_data, |
210 | struct platform_device *orion_ge) | 209 | struct platform_device *orion_ge) |
211 | { | 210 | { |
212 | orion_ge_shared_data->dram = mbus_dram_info; | ||
213 | orion_ge_shared_data->t_clk = tclk; | 211 | orion_ge_shared_data->t_clk = tclk; |
214 | orion_ge_resource->start = irq; | 212 | orion_ge_resource->start = irq; |
215 | orion_ge_resource->end = irq; | 213 | orion_ge_resource->end = irq; |
@@ -259,7 +257,6 @@ static struct platform_device orion_ge00 = { | |||
259 | }; | 257 | }; |
260 | 258 | ||
261 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | 259 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, |
262 | struct mbus_dram_target_info *mbus_dram_info, | ||
263 | unsigned long mapbase, | 260 | unsigned long mapbase, |
264 | unsigned long irq, | 261 | unsigned long irq, |
265 | unsigned long irq_err, | 262 | unsigned long irq_err, |
@@ -267,7 +264,7 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | |||
267 | { | 264 | { |
268 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, | 265 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, |
269 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 266 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
270 | ge_complete(&orion_ge00_shared_data, mbus_dram_info, tclk, | 267 | ge_complete(&orion_ge00_shared_data, tclk, |
271 | orion_ge00_resources, irq, &orion_ge00_shared, | 268 | orion_ge00_resources, irq, &orion_ge00_shared, |
272 | eth_data, &orion_ge00); | 269 | eth_data, &orion_ge00); |
273 | } | 270 | } |
@@ -313,7 +310,6 @@ static struct platform_device orion_ge01 = { | |||
313 | }; | 310 | }; |
314 | 311 | ||
315 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 312 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
316 | struct mbus_dram_target_info *mbus_dram_info, | ||
317 | unsigned long mapbase, | 313 | unsigned long mapbase, |
318 | unsigned long irq, | 314 | unsigned long irq, |
319 | unsigned long irq_err, | 315 | unsigned long irq_err, |
@@ -321,7 +317,7 @@ void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | |||
321 | { | 317 | { |
322 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, | 318 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, |
323 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 319 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
324 | ge_complete(&orion_ge01_shared_data, mbus_dram_info, tclk, | 320 | ge_complete(&orion_ge01_shared_data, tclk, |
325 | orion_ge01_resources, irq, &orion_ge01_shared, | 321 | orion_ge01_resources, irq, &orion_ge01_shared, |
326 | eth_data, &orion_ge01); | 322 | eth_data, &orion_ge01); |
327 | } | 323 | } |
@@ -367,7 +363,6 @@ static struct platform_device orion_ge10 = { | |||
367 | }; | 363 | }; |
368 | 364 | ||
369 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | 365 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, |
370 | struct mbus_dram_target_info *mbus_dram_info, | ||
371 | unsigned long mapbase, | 366 | unsigned long mapbase, |
372 | unsigned long irq, | 367 | unsigned long irq, |
373 | unsigned long irq_err, | 368 | unsigned long irq_err, |
@@ -375,7 +370,7 @@ void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | |||
375 | { | 370 | { |
376 | fill_resources(&orion_ge10_shared, orion_ge10_shared_resources, | 371 | fill_resources(&orion_ge10_shared, orion_ge10_shared_resources, |
377 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 372 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
378 | ge_complete(&orion_ge10_shared_data, mbus_dram_info, tclk, | 373 | ge_complete(&orion_ge10_shared_data, tclk, |
379 | orion_ge10_resources, irq, &orion_ge10_shared, | 374 | orion_ge10_resources, irq, &orion_ge10_shared, |
380 | eth_data, &orion_ge10); | 375 | eth_data, &orion_ge10); |
381 | } | 376 | } |
@@ -421,7 +416,6 @@ static struct platform_device orion_ge11 = { | |||
421 | }; | 416 | }; |
422 | 417 | ||
423 | void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, | 418 | void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, |
424 | struct mbus_dram_target_info *mbus_dram_info, | ||
425 | unsigned long mapbase, | 419 | unsigned long mapbase, |
426 | unsigned long irq, | 420 | unsigned long irq, |
427 | unsigned long irq_err, | 421 | unsigned long irq_err, |
@@ -429,7 +423,7 @@ void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, | |||
429 | { | 423 | { |
430 | fill_resources(&orion_ge11_shared, orion_ge11_shared_resources, | 424 | fill_resources(&orion_ge11_shared, orion_ge11_shared_resources, |
431 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 425 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
432 | ge_complete(&orion_ge11_shared_data, mbus_dram_info, tclk, | 426 | ge_complete(&orion_ge11_shared_data, tclk, |
433 | orion_ge11_resources, irq, &orion_ge11_shared, | 427 | orion_ge11_resources, irq, &orion_ge11_shared, |
434 | eth_data, &orion_ge11); | 428 | eth_data, &orion_ge11); |
435 | } | 429 | } |
@@ -592,8 +586,6 @@ void __init orion_wdt_init(unsigned long tclk) | |||
592 | /***************************************************************************** | 586 | /***************************************************************************** |
593 | * XOR | 587 | * XOR |
594 | ****************************************************************************/ | 588 | ****************************************************************************/ |
595 | static struct mv_xor_platform_shared_data orion_xor_shared_data; | ||
596 | |||
597 | static u64 orion_xor_dmamask = DMA_BIT_MASK(32); | 589 | static u64 orion_xor_dmamask = DMA_BIT_MASK(32); |
598 | 590 | ||
599 | void __init orion_xor_init_channels( | 591 | void __init orion_xor_init_channels( |
@@ -632,9 +624,6 @@ static struct resource orion_xor0_shared_resources[] = { | |||
632 | static struct platform_device orion_xor0_shared = { | 624 | static struct platform_device orion_xor0_shared = { |
633 | .name = MV_XOR_SHARED_NAME, | 625 | .name = MV_XOR_SHARED_NAME, |
634 | .id = 0, | 626 | .id = 0, |
635 | .dev = { | ||
636 | .platform_data = &orion_xor_shared_data, | ||
637 | }, | ||
638 | .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), | 627 | .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), |
639 | .resource = orion_xor0_shared_resources, | 628 | .resource = orion_xor0_shared_resources, |
640 | }; | 629 | }; |
@@ -687,14 +676,11 @@ static struct platform_device orion_xor01_channel = { | |||
687 | }, | 676 | }, |
688 | }; | 677 | }; |
689 | 678 | ||
690 | void __init orion_xor0_init(struct mbus_dram_target_info *mbus_dram_info, | 679 | void __init orion_xor0_init(unsigned long mapbase_low, |
691 | unsigned long mapbase_low, | ||
692 | unsigned long mapbase_high, | 680 | unsigned long mapbase_high, |
693 | unsigned long irq_0, | 681 | unsigned long irq_0, |
694 | unsigned long irq_1) | 682 | unsigned long irq_1) |
695 | { | 683 | { |
696 | orion_xor_shared_data.dram = mbus_dram_info; | ||
697 | |||
698 | orion_xor0_shared_resources[0].start = mapbase_low; | 684 | orion_xor0_shared_resources[0].start = mapbase_low; |
699 | orion_xor0_shared_resources[0].end = mapbase_low + 0xff; | 685 | orion_xor0_shared_resources[0].end = mapbase_low + 0xff; |
700 | orion_xor0_shared_resources[1].start = mapbase_high; | 686 | orion_xor0_shared_resources[1].start = mapbase_high; |
@@ -727,9 +713,6 @@ static struct resource orion_xor1_shared_resources[] = { | |||
727 | static struct platform_device orion_xor1_shared = { | 713 | static struct platform_device orion_xor1_shared = { |
728 | .name = MV_XOR_SHARED_NAME, | 714 | .name = MV_XOR_SHARED_NAME, |
729 | .id = 1, | 715 | .id = 1, |
730 | .dev = { | ||
731 | .platform_data = &orion_xor_shared_data, | ||
732 | }, | ||
733 | .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), | 716 | .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), |
734 | .resource = orion_xor1_shared_resources, | 717 | .resource = orion_xor1_shared_resources, |
735 | }; | 718 | }; |
@@ -828,11 +811,9 @@ static struct platform_device orion_ehci = { | |||
828 | }, | 811 | }, |
829 | }; | 812 | }; |
830 | 813 | ||
831 | void __init orion_ehci_init(struct mbus_dram_target_info *mbus_dram_info, | 814 | void __init orion_ehci_init(unsigned long mapbase, |
832 | unsigned long mapbase, | ||
833 | unsigned long irq) | 815 | unsigned long irq) |
834 | { | 816 | { |
835 | orion_ehci_data.dram = mbus_dram_info; | ||
836 | fill_resources(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, | 817 | fill_resources(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, |
837 | irq); | 818 | irq); |
838 | 819 | ||
@@ -854,11 +835,9 @@ static struct platform_device orion_ehci_1 = { | |||
854 | }, | 835 | }, |
855 | }; | 836 | }; |
856 | 837 | ||
857 | void __init orion_ehci_1_init(struct mbus_dram_target_info *mbus_dram_info, | 838 | void __init orion_ehci_1_init(unsigned long mapbase, |
858 | unsigned long mapbase, | ||
859 | unsigned long irq) | 839 | unsigned long irq) |
860 | { | 840 | { |
861 | orion_ehci_data.dram = mbus_dram_info; | ||
862 | fill_resources(&orion_ehci_1, orion_ehci_1_resources, | 841 | fill_resources(&orion_ehci_1, orion_ehci_1_resources, |
863 | mapbase, SZ_4K - 1, irq); | 842 | mapbase, SZ_4K - 1, irq); |
864 | 843 | ||
@@ -880,11 +859,9 @@ static struct platform_device orion_ehci_2 = { | |||
880 | }, | 859 | }, |
881 | }; | 860 | }; |
882 | 861 | ||
883 | void __init orion_ehci_2_init(struct mbus_dram_target_info *mbus_dram_info, | 862 | void __init orion_ehci_2_init(unsigned long mapbase, |
884 | unsigned long mapbase, | ||
885 | unsigned long irq) | 863 | unsigned long irq) |
886 | { | 864 | { |
887 | orion_ehci_data.dram = mbus_dram_info; | ||
888 | fill_resources(&orion_ehci_2, orion_ehci_2_resources, | 865 | fill_resources(&orion_ehci_2, orion_ehci_2_resources, |
889 | mapbase, SZ_4K - 1, irq); | 866 | mapbase, SZ_4K - 1, irq); |
890 | 867 | ||
@@ -911,11 +888,9 @@ static struct platform_device orion_sata = { | |||
911 | }; | 888 | }; |
912 | 889 | ||
913 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data, | 890 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data, |
914 | struct mbus_dram_target_info *mbus_dram_info, | ||
915 | unsigned long mapbase, | 891 | unsigned long mapbase, |
916 | unsigned long irq) | 892 | unsigned long irq) |
917 | { | 893 | { |
918 | sata_data->dram = mbus_dram_info; | ||
919 | orion_sata.dev.platform_data = sata_data; | 894 | orion_sata.dev.platform_data = sata_data; |
920 | fill_resources(&orion_sata, orion_sata_resources, | 895 | fill_resources(&orion_sata, orion_sata_resources, |
921 | mapbase, 0x5000 - 1, irq); | 896 | mapbase, 0x5000 - 1, irq); |