[ARM] Kirkwood: Marvell SheevaPlug support
[deliverable/linux.git] / arch / arm / mach-kirkwood / sheevaplug-setup.c
CommitLineData
4640fa60
SA
1/*
2 * arch/arm/mach-kirkwood/sheevaplug-setup.c
3 *
4 * Marvell SheevaPlug Reference 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/mtd/nand.h>
15#include <linux/mtd/partitions.h>
16#include <linux/mv643xx_eth.h>
17#include <asm/mach-types.h>
18#include <asm/mach/arch.h>
19#include <mach/kirkwood.h>
20#include <plat/mvsdio.h>
21#include <plat/orion_nand.h>
22#include "common.h"
23
24static struct mtd_partition sheevaplug_nand_parts[] = {
25 {
26 .name = "u-boot",
27 .offset = 0,
28 .size = SZ_1M
29 }, {
30 .name = "uImage",
31 .offset = MTDPART_OFS_NXTBLK,
32 .size = SZ_4M
33 }, {
34 .name = "root",
35 .offset = MTDPART_OFS_NXTBLK,
36 .size = MTDPART_SIZ_FULL
37 },
38};
39
40static struct resource sheevaplug_nand_resource = {
41 .flags = IORESOURCE_MEM,
42 .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
43 .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
44 KIRKWOOD_NAND_MEM_SIZE - 1,
45};
46
47static struct orion_nand_data sheevaplug_nand_data = {
48 .parts = sheevaplug_nand_parts,
49 .nr_parts = ARRAY_SIZE(sheevaplug_nand_parts),
50 .cle = 0,
51 .ale = 1,
52 .width = 8,
53 .chip_delay = 25,
54};
55
56static struct platform_device sheevaplug_nand_flash = {
57 .name = "orion_nand",
58 .id = -1,
59 .dev = {
60 .platform_data = &sheevaplug_nand_data,
61 },
62 .resource = &sheevaplug_nand_resource,
63 .num_resources = 1,
64};
65
66static struct mv643xx_eth_platform_data sheevaplug_ge00_data = {
67 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
68};
69
70static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
71 // unfortunately the CD signal has not been connected */
72};
73
74static void __init sheevaplug_init(void)
75{
76 /*
77 * Basic setup. Needs to be called early.
78 */
79 kirkwood_init();
80
81 kirkwood_uart0_init();
82 kirkwood_ehci_init();
83 kirkwood_ge00_init(&sheevaplug_ge00_data);
84 kirkwood_sdio_init(&sheevaplug_mvsdio_data);
85
86 platform_device_register(&sheevaplug_nand_flash);
87}
88
89MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
90 /* Maintainer: shadi Ammouri <shadi@marvell.com> */
91 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
92 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
93 .boot_params = 0x00000100,
94 .init_machine = sheevaplug_init,
95 .map_io = kirkwood_map_io,
96 .init_irq = kirkwood_init_irq,
97 .timer = &kirkwood_timer,
98MACHINE_END
This page took 0.051319 seconds and 5 git commands to generate.