2 * arch/arm/mach-kirkwood/openrd-setup.c
4 * Marvell OpenRD (Base|Client) 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/mtd/nand.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/ata_platform.h>
17 #include <linux/mv643xx_eth.h>
18 #include <asm/mach-types.h>
19 #include <asm/mach/arch.h>
20 #include <mach/kirkwood.h>
21 #include <plat/mvsdio.h>
25 static struct mtd_partition openrd_nand_parts[] = {
30 .mask_flags = MTD_WRITEABLE
33 .offset = MTDPART_OFS_NXTBLK,
37 .offset = MTDPART_OFS_NXTBLK,
38 .size = MTDPART_SIZ_FULL
42 static struct mv643xx_eth_platform_data openrd_ge00_data = {
43 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
46 static struct mv643xx_eth_platform_data openrd_ge01_data = {
47 .phy_addr = MV643XX_ETH_PHY_ADDR(24),
50 static struct mv_sata_platform_data openrd_sata_data = {
54 static struct mvsdio_platform_data openrd_mvsdio_data = {
55 .gpio_card_detect = 29, /* MPP29 used as SD card detect */
58 static unsigned int openrd_mpp_config[] __initdata = {
63 static void __init openrd_init(void)
66 * Basic setup. Needs to be called early.
69 kirkwood_mpp_conf(openrd_mpp_config);
71 kirkwood_uart0_init();
72 kirkwood_nand_init(ARRAY_AND_SIZE(openrd_nand_parts), 25);
76 kirkwood_ge00_init(&openrd_ge00_data);
77 if (machine_is_openrd_client())
78 kirkwood_ge01_init(&openrd_ge01_data);
79 kirkwood_sata_init(&openrd_sata_data);
80 kirkwood_sdio_init(&openrd_mvsdio_data);
85 static int __init openrd_pci_init(void)
87 if (machine_is_openrd_base() || machine_is_openrd_client())
92 subsys_initcall(openrd_pci_init);
94 #ifdef CONFIG_MACH_OPENRD_BASE
95 MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
96 /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
97 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
98 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
99 .boot_params = 0x00000100,
100 .init_machine = openrd_init,
101 .map_io = kirkwood_map_io,
102 .init_irq = kirkwood_init_irq,
103 .timer = &kirkwood_timer,
107 #ifdef CONFIG_MACH_OPENRD_CLIENT
108 MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
109 /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
110 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
111 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
112 .boot_params = 0x00000100,
113 .init_machine = openrd_init,
114 .map_io = kirkwood_map_io,
115 .init_irq = kirkwood_init_irq,
116 .timer = &kirkwood_timer,