2 * arch/arm/mach-loki/lb88rc8480-setup.c
4 * Marvell LB88RC8480 Development 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/physmap.h>
16 #include <linux/mtd/nand.h>
17 #include <linux/timer.h>
18 #include <linux/ata_platform.h>
19 #include <linux/mv643xx_eth.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <mach/loki.h>
25 #define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000
26 #define LB88RC8480_FLASH_BOOT_CS_SIZE SZ_128M
28 #define LB88RC8480_NOR_BOOT_BASE 0xff000000
29 #define LB88RC8480_NOR_BOOT_SIZE SZ_16M
31 static struct mtd_partition lb88rc8480_boot_flash_parts
[] = {
39 .size
= (SZ_8M
+ SZ_4M
+ SZ_1M
),
42 .offset
= (SZ_8M
+ SZ_4M
+ SZ_2M
+ SZ_1M
),
47 static struct physmap_flash_data lb88rc8480_boot_flash_data
= {
48 .parts
= lb88rc8480_boot_flash_parts
,
49 .nr_parts
= ARRAY_SIZE(lb88rc8480_boot_flash_parts
),
50 .width
= 1, /* 8 bit bus width */
53 static struct resource lb88rc8480_boot_flash_resource
= {
54 .flags
= IORESOURCE_MEM
,
55 .start
= LB88RC8480_NOR_BOOT_BASE
,
56 .end
= LB88RC8480_NOR_BOOT_BASE
+ LB88RC8480_NOR_BOOT_SIZE
- 1,
59 static struct platform_device lb88rc8480_boot_flash
= {
60 .name
= "physmap-flash",
63 .platform_data
= &lb88rc8480_boot_flash_data
,
66 .resource
= &lb88rc8480_boot_flash_resource
,
69 static struct mv643xx_eth_platform_data lb88rc8480_ge0_data
= {
70 .phy_addr
= MV643XX_ETH_PHY_ADDR(1),
71 .mac_addr
= { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
74 static void __init
lb88rc8480_init(void)
77 * Basic setup. Needs to be called early.
81 loki_ge0_init(&lb88rc8480_ge0_data
);
86 loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE
,
87 LB88RC8480_FLASH_BOOT_CS_SIZE
);
88 platform_device_register(&lb88rc8480_boot_flash
);
91 MACHINE_START(LB88RC8480
, "Marvell LB88RC8480 Development Board")
92 /* Maintainer: Ke Wei <kewei@marvell.com> */
93 .phys_io
= LOKI_REGS_PHYS_BASE
,
94 .io_pg_offst
= ((LOKI_REGS_VIRT_BASE
) >> 18) & 0xfffc,
95 .boot_params
= 0x00000100,
96 .init_machine
= lb88rc8480_init
,
97 .map_io
= loki_map_io
,
98 .init_irq
= loki_init_irq
,