2 * arch/arm/mach-kirkwood/rd88f6281-setup.c
4 * Marvell RD-88F6281 Reference Board Setup
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/irq.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/ata_platform.h>
17 #include <linux/mv643xx_eth.h>
18 #include <linux/ethtool.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <mach/kirkwood.h>
23 #include <linux/platform_data/mmc-mvsdio.h>
27 static struct mtd_partition rd88f6281_nand_parts
[] = {
34 .offset
= MTDPART_OFS_NXTBLK
,
38 .offset
= MTDPART_OFS_NXTBLK
,
39 .size
= MTDPART_SIZ_FULL
43 static struct mv643xx_eth_platform_data rd88f6281_ge00_data
= {
44 .phy_addr
= MV643XX_ETH_PHY_NONE
,
46 .duplex
= DUPLEX_FULL
,
49 static struct dsa_chip_data rd88f6281_switch_chip_data
= {
50 .port_names
[0] = "lan1",
51 .port_names
[1] = "lan2",
52 .port_names
[2] = "lan3",
53 .port_names
[3] = "lan4",
54 .port_names
[5] = "cpu",
57 static struct dsa_platform_data rd88f6281_switch_plat_data
= {
59 .chip
= &rd88f6281_switch_chip_data
,
62 static struct mv643xx_eth_platform_data rd88f6281_ge01_data
= {
63 .phy_addr
= MV643XX_ETH_PHY_ADDR(11),
66 static struct mv_sata_platform_data rd88f6281_sata_data
= {
70 static struct mvsdio_platform_data rd88f6281_mvsdio_data
= {
71 .gpio_card_detect
= 28,
72 .gpio_write_protect
= -1,
75 static unsigned int rd88f6281_mpp_config
[] __initdata
= {
80 static void __init
rd88f6281_init(void)
85 * Basic setup. Needs to be called early.
88 kirkwood_mpp_conf(rd88f6281_mpp_config
);
90 kirkwood_nand_init(ARRAY_AND_SIZE(rd88f6281_nand_parts
), 25);
93 kirkwood_ge00_init(&rd88f6281_ge00_data
);
94 kirkwood_pcie_id(&dev
, &rev
);
95 if (rev
== MV88F6281_REV_A0
) {
96 rd88f6281_switch_chip_data
.sw_addr
= 10;
97 kirkwood_ge01_init(&rd88f6281_ge01_data
);
99 rd88f6281_switch_chip_data
.port_names
[4] = "wan";
101 kirkwood_ge00_switch_init(&rd88f6281_switch_plat_data
, NO_IRQ
);
103 kirkwood_sata_init(&rd88f6281_sata_data
);
104 kirkwood_sdio_init(&rd88f6281_mvsdio_data
);
105 kirkwood_uart0_init();
108 static int __init
rd88f6281_pci_init(void)
110 if (machine_is_rd88f6281())
111 kirkwood_pcie_init(KW_PCIE0
);
115 subsys_initcall(rd88f6281_pci_init
);
117 MACHINE_START(RD88F6281
, "Marvell RD-88F6281 Reference Board")
118 /* Maintainer: Saeed Bishara <saeed@marvell.com> */
119 .atag_offset
= 0x100,
120 .init_machine
= rd88f6281_init
,
121 .map_io
= kirkwood_map_io
,
122 .init_early
= kirkwood_init_early
,
123 .init_irq
= kirkwood_init_irq
,
124 .init_time
= kirkwood_timer_init
,
125 .restart
= kirkwood_restart
,