diff options
Diffstat (limited to 'arch/arm/mach-kirkwood/rd88f6281-setup.c')
-rw-r--r-- | arch/arm/mach-kirkwood/rd88f6281-setup.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index 9a0e905d10cd..31e996d65fc4 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c | |||
@@ -11,21 +11,20 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/pci.h> | ||
15 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
16 | #include <linux/mtd/physmap.h> | ||
17 | #include <linux/mtd/nand.h> | 15 | #include <linux/mtd/nand.h> |
18 | #include <linux/timer.h> | 16 | #include <linux/mtd/partitions.h> |
19 | #include <linux/ata_platform.h> | 17 | #include <linux/ata_platform.h> |
20 | #include <linux/mv643xx_eth.h> | 18 | #include <linux/mv643xx_eth.h> |
21 | #include <linux/ethtool.h> | 19 | #include <linux/ethtool.h> |
22 | #include <net/dsa.h> | 20 | #include <net/dsa.h> |
23 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/pci.h> | ||
26 | #include <mach/kirkwood.h> | 23 | #include <mach/kirkwood.h> |
24 | #include <plat/mvsdio.h> | ||
27 | #include <plat/orion_nand.h> | 25 | #include <plat/orion_nand.h> |
28 | #include "common.h" | 26 | #include "common.h" |
27 | #include "mpp.h" | ||
29 | 28 | ||
30 | static struct mtd_partition rd88f6281_nand_parts[] = { | 29 | static struct mtd_partition rd88f6281_nand_parts[] = { |
31 | { | 30 | { |
@@ -75,7 +74,7 @@ static struct mv643xx_eth_platform_data rd88f6281_ge00_data = { | |||
75 | .duplex = DUPLEX_FULL, | 74 | .duplex = DUPLEX_FULL, |
76 | }; | 75 | }; |
77 | 76 | ||
78 | static struct dsa_platform_data rd88f6281_switch_data = { | 77 | static struct dsa_chip_data rd88f6281_switch_chip_data = { |
79 | .port_names[0] = "lan1", | 78 | .port_names[0] = "lan1", |
80 | .port_names[1] = "lan2", | 79 | .port_names[1] = "lan2", |
81 | .port_names[2] = "lan3", | 80 | .port_names[2] = "lan3", |
@@ -83,6 +82,11 @@ static struct dsa_platform_data rd88f6281_switch_data = { | |||
83 | .port_names[5] = "cpu", | 82 | .port_names[5] = "cpu", |
84 | }; | 83 | }; |
85 | 84 | ||
85 | static struct dsa_platform_data rd88f6281_switch_plat_data = { | ||
86 | .nr_chips = 1, | ||
87 | .chip = &rd88f6281_switch_chip_data, | ||
88 | }; | ||
89 | |||
86 | static struct mv643xx_eth_platform_data rd88f6281_ge01_data = { | 90 | static struct mv643xx_eth_platform_data rd88f6281_ge01_data = { |
87 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | 91 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), |
88 | }; | 92 | }; |
@@ -91,6 +95,15 @@ static struct mv_sata_platform_data rd88f6281_sata_data = { | |||
91 | .n_ports = 2, | 95 | .n_ports = 2, |
92 | }; | 96 | }; |
93 | 97 | ||
98 | static struct mvsdio_platform_data rd88f6281_mvsdio_data = { | ||
99 | .gpio_card_detect = 28, | ||
100 | }; | ||
101 | |||
102 | static unsigned int rd88f6281_mpp_config[] __initdata = { | ||
103 | MPP28_GPIO, | ||
104 | 0 | ||
105 | }; | ||
106 | |||
94 | static void __init rd88f6281_init(void) | 107 | static void __init rd88f6281_init(void) |
95 | { | 108 | { |
96 | u32 dev, rev; | 109 | u32 dev, rev; |
@@ -99,21 +112,22 @@ static void __init rd88f6281_init(void) | |||
99 | * Basic setup. Needs to be called early. | 112 | * Basic setup. Needs to be called early. |
100 | */ | 113 | */ |
101 | kirkwood_init(); | 114 | kirkwood_init(); |
115 | kirkwood_mpp_conf(rd88f6281_mpp_config); | ||
102 | 116 | ||
103 | kirkwood_ehci_init(); | 117 | kirkwood_ehci_init(); |
104 | 118 | ||
105 | kirkwood_ge00_init(&rd88f6281_ge00_data); | 119 | kirkwood_ge00_init(&rd88f6281_ge00_data); |
106 | kirkwood_pcie_id(&dev, &rev); | 120 | kirkwood_pcie_id(&dev, &rev); |
107 | if (rev == MV88F6281_REV_A0) { | 121 | if (rev == MV88F6281_REV_A0) { |
108 | rd88f6281_switch_data.sw_addr = 10; | 122 | rd88f6281_switch_chip_data.sw_addr = 10; |
109 | kirkwood_ge01_init(&rd88f6281_ge01_data); | 123 | kirkwood_ge01_init(&rd88f6281_ge01_data); |
110 | } else { | 124 | } else { |
111 | rd88f6281_switch_data.port_names[4] = "wan"; | 125 | rd88f6281_switch_chip_data.port_names[4] = "wan"; |
112 | } | 126 | } |
113 | kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); | 127 | kirkwood_ge00_switch_init(&rd88f6281_switch_plat_data, NO_IRQ); |
114 | 128 | ||
115 | kirkwood_rtc_init(); | ||
116 | kirkwood_sata_init(&rd88f6281_sata_data); | 129 | kirkwood_sata_init(&rd88f6281_sata_data); |
130 | kirkwood_sdio_init(&rd88f6281_mvsdio_data); | ||
117 | kirkwood_uart0_init(); | 131 | kirkwood_uart0_init(); |
118 | 132 | ||
119 | platform_device_register(&rd88f6281_nand_flash); | 133 | platform_device_register(&rd88f6281_nand_flash); |