aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorShadi Ammouri <shadi@marvell.com>2009-02-24 15:26:23 -0500
committerNicolas Pitre <nico@cam.org>2009-03-15 22:04:54 -0400
commit4640fa606bf996d275a6e208e3654e9e943afe60 (patch)
treef7a66d78eed2bb2e2e23cea20a4a1b9294a86fc8 /arch/arm/mach-kirkwood
parentd6f818f71fa5db79969aaecba302745199376169 (diff)
[ARM] Kirkwood: Marvell SheevaPlug support
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/Kconfig6
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/sheevaplug-setup.c98
3 files changed, 105 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 3600cd9f0519..532443622a17 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -20,6 +20,12 @@ config MACH_RD88F6281
20 Say 'Y' here if you want your kernel to support the 20 Say 'Y' here if you want your kernel to support the
21 Marvell RD-88F6281 Reference Board. 21 Marvell RD-88F6281 Reference Board.
22 22
23config MACH_SHEEVAPLUG
24 bool "Marvell SheevaPlug Reference Board"
25 help
26 Say 'Y' here if you want your kernel to support the
27 Marvell SheevaPlug Reference Board.
28
23endmenu 29endmenu
24 30
25endif 31endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index fdff35cc8d5a..de81b4b5bd33 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -3,3 +3,4 @@ obj-y += common.o addr-map.o irq.o pcie.o mpp.o
3obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o 3obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
4obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o 4obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
5obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o 5obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
6obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
new file mode 100644
index 000000000000..d48989dfe4d1
--- /dev/null
+++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
@@ -0,0 +1,98 @@
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