2 * arch/arm/mach-orion5x/rd88f6183-ap-ge-setup.c
4 * Marvell Orion-1-90 AP GE Reference Design 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/pci.h>
15 #include <linux/irq.h>
16 #include <linux/mtd/physmap.h>
17 #include <linux/mv643xx_eth.h>
18 #include <linux/spi/spi.h>
19 #include <linux/spi/orion_spi.h>
20 #include <linux/spi/flash.h>
21 #include <linux/ethtool.h>
23 #include <asm/mach-types.h>
26 #include <asm/mach/arch.h>
27 #include <asm/mach/pci.h>
28 #include <mach/orion5x.h>
32 static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = {
35 .duplex = DUPLEX_FULL,
38 static struct dsa_platform_data rd88f6183ap_ge_switch_data = {
39 .port_names[0] = "lan1",
40 .port_names[1] = "lan2",
41 .port_names[2] = "lan3",
42 .port_names[3] = "lan4",
43 .port_names[4] = "wan",
44 .port_names[5] = "cpu",
47 static struct mtd_partition rd88f6183ap_ge_partitions[] = {
63 static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = {
65 .nr_parts = ARRAY_SIZE(rd88f6183ap_ge_partitions),
66 .parts = rd88f6183ap_ge_partitions,
69 static struct spi_board_info __initdata rd88f6183ap_ge_spi_slave_info[] = {
72 .platform_data = &rd88f6183ap_ge_spi_slave_data,
74 .max_speed_hz = 20000000,
80 static void __init rd88f6183ap_ge_init(void)
83 * Setup basic Orion functions. Need to be called early.
88 * Configure peripherals.
91 orion5x_eth_init(&rd88f6183ap_ge_eth_data);
92 orion5x_eth_switch_init(&rd88f6183ap_ge_switch_data, gpio_to_irq(3));
93 spi_register_board_info(rd88f6183ap_ge_spi_slave_info,
94 ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info));
99 static struct hw_pci rd88f6183ap_ge_pci __initdata = {
101 .swizzle = pci_std_swizzle,
102 .setup = orion5x_pci_sys_setup,
103 .scan = orion5x_pci_sys_scan_bus,
104 .map_irq = orion5x_pci_map_irq,
107 static int __init rd88f6183ap_ge_pci_init(void)
109 if (machine_is_rd88f6183ap_ge()) {
110 orion5x_pci_disable();
111 pci_common_init(&rd88f6183ap_ge_pci);
116 subsys_initcall(rd88f6183ap_ge_pci_init);
118 MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
119 /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
120 .phys_io = ORION5X_REGS_PHYS_BASE,
121 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
122 .boot_params = 0x00000100,
123 .init_machine = rd88f6183ap_ge_init,
124 .map_io = orion5x_map_io,
125 .init_irq = orion5x_init_irq,
126 .timer = &orion5x_timer,
127 .fixup = tag_fixup_mem32,