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>
17 #include <linux/interrupt.h>
19 #include <asm/mach-types.h>
20 #include <asm/mach/arch.h>
21 #include <asm/mach/flash.h>
22 #include <mach/addr-map.h>
23 #include <mach/mfp-pxa910.h>
24 #include <mach/pxa910.h>
28 #define TTCDKB_NR_IRQS (IRQ_BOARD_START + 24)
30 static unsigned long ttc_dkb_pin_config
[] __initdata
= {
60 static struct mtd_partition ttc_dkb_onenand_partitions
[] = {
65 .mask_flags
= MTD_WRITEABLE
,
68 .offset
= MTDPART_OFS_APPEND
,
70 .mask_flags
= MTD_WRITEABLE
,
73 .offset
= MTDPART_OFS_APPEND
,
75 .mask_flags
= MTD_WRITEABLE
,
78 .offset
= MTDPART_OFS_APPEND
,
79 .size
= (SZ_2M
+ SZ_1M
),
83 .offset
= MTDPART_OFS_APPEND
,
89 static struct onenand_platform_data ttc_dkb_onenand_info
= {
90 .parts
= ttc_dkb_onenand_partitions
,
91 .nr_parts
= ARRAY_SIZE(ttc_dkb_onenand_partitions
),
94 static struct resource ttc_dkb_resource_onenand
[] = {
96 .start
= SMC_CS0_PHYS_BASE
,
97 .end
= SMC_CS0_PHYS_BASE
+ SZ_1M
,
98 .flags
= IORESOURCE_MEM
,
102 static struct platform_device ttc_dkb_device_onenand
= {
103 .name
= "onenand-flash",
105 .resource
= ttc_dkb_resource_onenand
,
106 .num_resources
= ARRAY_SIZE(ttc_dkb_resource_onenand
),
108 .platform_data
= &ttc_dkb_onenand_info
,
112 static struct platform_device
*ttc_dkb_devices
[] = {
113 &ttc_dkb_device_onenand
,
116 static void __init
ttc_dkb_init(void)
118 mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config
));
120 /* on-chip devices */
123 /* off-chip devices */
124 platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices
));
127 MACHINE_START(TTC_DKB
, "PXA910-based TTC_DKB Development Platform")
128 .map_io
= mmp_map_io
,
129 .nr_irqs
= TTCDKB_NR_IRQS
,
130 .init_irq
= pxa910_init_irq
,
131 .timer
= &pxa910_timer
,
132 .init_machine
= ttc_dkb_init
,