diff options
author | Lennert Buytenhek <buytenh@marvell.com> | 2008-06-22 16:45:02 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-06-22 16:45:02 -0400 |
commit | 777f9bebad3476b7dbf5cd8abbd3414139ca0e48 (patch) | |
tree | f58bb3a02ae8f30463d33a131d17707cf3308843 /arch/arm/mach-loki/lb88rc8480-setup.c | |
parent | 1219715de70956557b9dedf3ee021a73d4f4ec52 (diff) |
[ARM] add Marvell Loki (88RC8480) SoC support
The Marvell Loki (88RC8480) is an ARM SoC based on a Feroceon CPU
core running at between 400 MHz and 1.0 GHz, and features a 64 bit
DDR controller, 512K of internal SRAM, two x4 PCI-Express ports,
two Gigabit Ethernet ports, two 4x SAS/SATA controllers, two UARTs,
two TWSI controllers, and IDMA/XOR engines.
This patch adds support for the Marvell LB88RC8480 Development
Board, enabling the use of the PCIe interfaces, the ethernet
interfaces, the TWSI interfaces and the UARTs.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-loki/lb88rc8480-setup.c')
-rw-r--r-- | arch/arm/mach-loki/lb88rc8480-setup.c | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/arch/arm/mach-loki/lb88rc8480-setup.c b/arch/arm/mach-loki/lb88rc8480-setup.c new file mode 100644 index 000000000000..d1b9e6e6253a --- /dev/null +++ b/arch/arm/mach-loki/lb88rc8480-setup.c | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-loki/lb88rc8480-setup.c | ||
3 | * | ||
4 | * Marvell LB88RC8480 Development Board Setup | ||
5 | * | ||
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. | ||
9 | */ | ||
10 | |||
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 <asm/arch/loki.h> | ||
23 | #include "common.h" | ||
24 | |||
25 | #define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000 | ||
26 | #define LB88RC8480_FLASH_BOOT_CS_SIZE SZ_128M | ||
27 | |||
28 | #define LB88RC8480_NOR_BOOT_BASE 0xff000000 | ||
29 | #define LB88RC8480_NOR_BOOT_SIZE SZ_16M | ||
30 | |||
31 | static struct mtd_partition lb88rc8480_boot_flash_parts[] = { | ||
32 | { | ||
33 | .name = "kernel", | ||
34 | .offset = 0, | ||
35 | .size = SZ_2M, | ||
36 | }, { | ||
37 | .name = "root-fs", | ||
38 | .offset = SZ_2M, | ||
39 | .size = (SZ_8M + SZ_4M + SZ_1M), | ||
40 | }, { | ||
41 | .name = "u-boot", | ||
42 | .offset = (SZ_8M + SZ_4M + SZ_2M + SZ_1M), | ||
43 | .size = SZ_1M, | ||
44 | }, | ||
45 | }; | ||
46 | |||
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 */ | ||
51 | }; | ||
52 | |||
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, | ||
57 | }; | ||
58 | |||
59 | static struct platform_device lb88rc8480_boot_flash = { | ||
60 | .name = "physmap-flash", | ||
61 | .id = 0, | ||
62 | .dev = { | ||
63 | .platform_data = &lb88rc8480_boot_flash_data, | ||
64 | }, | ||
65 | .num_resources = 1, | ||
66 | .resource = &lb88rc8480_boot_flash_resource, | ||
67 | }; | ||
68 | |||
69 | static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = { | ||
70 | .phy_addr = 1, | ||
71 | .mac_addr = { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 }, | ||
72 | }; | ||
73 | |||
74 | static void __init lb88rc8480_init(void) | ||
75 | { | ||
76 | /* | ||
77 | * Basic setup. Needs to be called early. | ||
78 | */ | ||
79 | loki_init(); | ||
80 | |||
81 | loki_ge0_init(&lb88rc8480_ge0_data); | ||
82 | loki_sas_init(); | ||
83 | loki_uart0_init(); | ||
84 | loki_uart1_init(); | ||
85 | |||
86 | loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE, | ||
87 | LB88RC8480_FLASH_BOOT_CS_SIZE); | ||
88 | platform_device_register(&lb88rc8480_boot_flash); | ||
89 | } | ||
90 | |||
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, | ||
99 | .timer = &loki_timer, | ||
100 | MACHINE_END | ||