2 * linux/arch/arm/mach-mmp/aspenite.c
4 * Support for the Marvell PXA168-based Aspenite and Zylonite2
5 * Development Platform.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * publishhed by the Free Software Foundation.
12 #include <linux/init.h>
13 #include <linux/kernel.h>
14 #include <linux/platform_device.h>
15 #include <linux/smc91x.h>
16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/partitions.h>
18 #include <linux/mtd/nand.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <mach/addr-map.h>
23 #include <mach/mfp-pxa168.h>
24 #include <mach/pxa168.h>
25 #include <mach/gpio.h>
29 static unsigned long common_pin_config[] __initdata = {
30 /* Data Flash Interface */
48 /* Static Memory Controller */
57 GPIO27_GPIO, /* Ethernet IRQ */
64 static struct smc91x_platdata smc91x_info = {
65 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
68 static struct resource smc91x_resources[] = {
70 .start = SMC_CS1_PHYS_BASE + 0x300,
71 .end = SMC_CS1_PHYS_BASE + 0xfffff,
72 .flags = IORESOURCE_MEM,
75 .start = gpio_to_irq(27),
76 .end = gpio_to_irq(27),
77 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
81 static struct platform_device smc91x_device = {
85 .platform_data = &smc91x_info,
87 .num_resources = ARRAY_SIZE(smc91x_resources),
88 .resource = smc91x_resources,
91 static struct mtd_partition aspenite_nand_partitions[] = {
96 .mask_flags = MTD_WRITEABLE,
99 .offset = MTDPART_OFS_APPEND,
101 .mask_flags = MTD_WRITEABLE,
104 .offset = MTDPART_OFS_APPEND,
106 .mask_flags = MTD_WRITEABLE,
109 .offset = MTDPART_OFS_APPEND,
110 .size = (SZ_2M + SZ_1M),
113 .name = "filesystem",
114 .offset = MTDPART_OFS_APPEND,
120 static struct pxa3xx_nand_platform_data aspenite_nand_info = {
122 .parts = aspenite_nand_partitions,
123 .nr_parts = ARRAY_SIZE(aspenite_nand_partitions),
126 static void __init common_init(void)
128 mfp_config(ARRAY_AND_SIZE(common_pin_config));
130 /* on-chip devices */
132 pxa168_add_nand(&aspenite_nand_info);
134 /* off-chip devices */
135 platform_device_register(&smc91x_device);
138 MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
139 .phys_io = APB_PHYS_BASE,
140 .boot_params = 0x00000100,
141 .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
142 .map_io = pxa_map_io,
143 .init_irq = pxa168_init_irq,
144 .timer = &pxa168_timer,
145 .init_machine = common_init,
148 MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
149 .phys_io = APB_PHYS_BASE,
150 .boot_params = 0x00000100,
151 .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
152 .map_io = pxa_map_io,
153 .init_irq = pxa168_init_irq,
154 .timer = &pxa168_timer,
155 .init_machine = common_init,