2 * arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
4 * Buffalo WXL (Terastation Duo) Setup routines
6 * sebastien requiem <sebastien@requiem.fr>
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/platform_device.h>
16 #include <linux/ata_platform.h>
17 #include <linux/mv643xx_eth.h>
18 #include <linux/ethtool.h>
19 #include <linux/i2c.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
27 /* This arch has 2 Giga Ethernet */
29 static struct mv643xx_eth_platform_data db78x00_ge00_data
= {
30 .phy_addr
= MV643XX_ETH_PHY_ADDR(0),
33 static struct mv643xx_eth_platform_data db78x00_ge01_data
= {
34 .phy_addr
= MV643XX_ETH_PHY_ADDR(8),
38 /* 2 SATA controller supporting HotPlug */
40 static struct mv_sata_platform_data db78x00_sata_data
= {
44 static struct i2c_board_info __initdata db78x00_i2c_rtc
= {
45 I2C_BOARD_INFO("ds1338", 0x68),
49 static unsigned int wxl_mpp_config
[] __initdata
= {
104 static void __init
wxl_init(void)
107 * Basic MV78xx0 setup. Needs to be called early.
110 mv78xx0_mpp_conf(wxl_mpp_config
);
113 * Partition on-chip peripherals between the two CPU cores.
115 mv78xx0_ehci0_init();
116 mv78xx0_ehci1_init();
117 mv78xx0_ehci2_init();
118 mv78xx0_ge00_init(&db78x00_ge00_data
);
119 mv78xx0_ge01_init(&db78x00_ge01_data
);
120 mv78xx0_sata_init(&db78x00_sata_data
);
121 mv78xx0_uart0_init();
122 mv78xx0_uart1_init();
123 mv78xx0_uart2_init();
124 mv78xx0_uart3_init();
126 i2c_register_board_info(0, &db78x00_i2c_rtc
, 1);
129 static int __init
wxl_pci_init(void)
131 if (machine_is_terastation_wxl()) {
133 * Assign the x16 PCIe slot on the board to CPU core
134 * #0, and let CPU core #1 have the four x1 slots.
136 if (mv78xx0_core_index() == 0)
137 mv78xx0_pcie_init(0, 1);
139 mv78xx0_pcie_init(1, 0);
144 subsys_initcall(wxl_pci_init
);
146 MACHINE_START(TERASTATION_WXL
, "Buffalo Nas WXL")
147 /* Maintainer: Sebastien Requiem <sebastien@requiem.fr> */
148 .atag_offset
= 0x100,
149 .nr_irqs
= MV78XX0_NR_IRQS
,
150 .init_machine
= wxl_init
,
151 .map_io
= mv78xx0_map_io
,
152 .init_early
= mv78xx0_init_early
,
153 .init_irq
= mv78xx0_init_irq
,
154 .init_time
= mv78xx0_timer_init
,
155 .restart
= mv78xx0_restart
,