aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/db88f6281-bp-setup.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
index 5c3b40d6e093..a513e1017c17 100644
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
@@ -13,8 +13,8 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/mtd/physmap.h>
17#include <linux/mtd/nand.h> 16#include <linux/mtd/nand.h>
17#include <linux/mtd/partitions.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/ata_platform.h> 19#include <linux/ata_platform.h>
20#include <linux/mv643xx_eth.h> 20#include <linux/mv643xx_eth.h>
@@ -22,10 +22,53 @@
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <mach/kirkwood.h> 24#include <mach/kirkwood.h>
25#include <plat/orion_nand.h>
25#include <plat/mvsdio.h> 26#include <plat/mvsdio.h>
26#include "common.h" 27#include "common.h"
27#include "mpp.h" 28#include "mpp.h"
28 29
30static struct mtd_partition db88f6281_nand_parts[] = {
31 {
32 .name = "u-boot",
33 .offset = 0,
34 .size = SZ_1M
35 }, {
36 .name = "uImage",
37 .offset = MTDPART_OFS_NXTBLK,
38 .size = SZ_4M
39 }, {
40 .name = "root",
41 .offset = MTDPART_OFS_NXTBLK,
42 .size = MTDPART_SIZ_FULL
43 },
44};
45
46static struct resource db88f6281_nand_resource = {
47 .flags = IORESOURCE_MEM,
48 .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
49 .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
50 KIRKWOOD_NAND_MEM_SIZE - 1,
51};
52
53static struct orion_nand_data db88f6281_nand_data = {
54 .parts = db88f6281_nand_parts,
55 .nr_parts = ARRAY_SIZE(db88f6281_nand_parts),
56 .cle = 0,
57 .ale = 1,
58 .width = 8,
59 .chip_delay = 25,
60};
61
62static struct platform_device db88f6281_nand_flash = {
63 .name = "orion_nand",
64 .id = -1,
65 .dev = {
66 .platform_data = &db88f6281_nand_data,
67 },
68 .resource = &db88f6281_nand_resource,
69 .num_resources = 1,
70};
71
29static struct mv643xx_eth_platform_data db88f6281_ge00_data = { 72static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
30 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 73 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
31}; 74};
@@ -59,6 +102,8 @@ static void __init db88f6281_init(void)
59 kirkwood_sata_init(&db88f6281_sata_data); 102 kirkwood_sata_init(&db88f6281_sata_data);
60 kirkwood_uart0_init(); 103 kirkwood_uart0_init();
61 kirkwood_sdio_init(&db88f6281_mvsdio_data); 104 kirkwood_sdio_init(&db88f6281_mvsdio_data);
105
106 platform_device_register(&db88f6281_nand_flash);
62} 107}
63 108
64static int __init db88f6281_pci_init(void) 109static int __init db88f6281_pci_init(void)