2 * linux/arch/arm/mach-mmp/ttc_dkb.c
4 * Support for the Marvell PXA910-based TTC_DKB Development Platform.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * publishhed by the Free Software Foundation.
11 #include <linux/init.h>
12 #include <linux/kernel.h>
13 #include <linux/platform_device.h>
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/onenand.h>
18 #include <asm/mach-types.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach/flash.h>
21 #include <mach/addr-map.h>
22 #include <mach/mfp-pxa910.h>
23 #include <mach/pxa910.h>
27 #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
29 static unsigned long ttc_dkb_pin_config[] __initdata = {
59 static struct mtd_partition ttc_dkb_onenand_partitions[] = {
64 .mask_flags = MTD_WRITEABLE,
67 .offset = MTDPART_OFS_APPEND,
69 .mask_flags = MTD_WRITEABLE,
72 .offset = MTDPART_OFS_APPEND,
74 .mask_flags = MTD_WRITEABLE,
77 .offset = MTDPART_OFS_APPEND,
78 .size = (SZ_2M + SZ_1M),
82 .offset = MTDPART_OFS_APPEND,
88 static struct onenand_platform_data ttc_dkb_onenand_info = {
89 .parts = ttc_dkb_onenand_partitions,
90 .nr_parts = ARRAY_SIZE(ttc_dkb_onenand_partitions),
93 static struct resource ttc_dkb_resource_onenand[] = {
95 .start = SMC_CS0_PHYS_BASE,
96 .end = SMC_CS0_PHYS_BASE + SZ_1M,
97 .flags = IORESOURCE_MEM,
101 static struct platform_device ttc_dkb_device_onenand = {
102 .name = "onenand-flash",
104 .resource = ttc_dkb_resource_onenand,
105 .num_resources = ARRAY_SIZE(ttc_dkb_resource_onenand),
107 .platform_data = &ttc_dkb_onenand_info,
111 static struct platform_device *ttc_dkb_devices[] = {
112 &ttc_dkb_device_onenand,
115 static void __init ttc_dkb_init(void)
117 mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config));
119 /* on-chip devices */
122 /* off-chip devices */
123 platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices));
126 MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
127 .phys_io = APB_PHYS_BASE,
128 .boot_params = 0x00000100,
129 .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
130 .map_io = pxa_map_io,
131 .init_irq = pxa910_init_irq,
132 .timer = &pxa910_timer,
133 .init_machine = ttc_dkb_init,