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 static unsigned long ttc_dkb_pin_config
[] __initdata
= {
57 static struct mtd_partition ttc_dkb_onenand_partitions
[] = {
62 .mask_flags
= MTD_WRITEABLE
,
65 .offset
= MTDPART_OFS_APPEND
,
67 .mask_flags
= MTD_WRITEABLE
,
70 .offset
= MTDPART_OFS_APPEND
,
72 .mask_flags
= MTD_WRITEABLE
,
75 .offset
= MTDPART_OFS_APPEND
,
76 .size
= (SZ_2M
+ SZ_1M
),
80 .offset
= MTDPART_OFS_APPEND
,
86 static struct onenand_platform_data ttc_dkb_onenand_info
= {
87 .parts
= ttc_dkb_onenand_partitions
,
88 .nr_parts
= ARRAY_SIZE(ttc_dkb_onenand_partitions
),
91 static struct resource ttc_dkb_resource_onenand
[] = {
93 .start
= SMC_CS0_PHYS_BASE
,
94 .end
= SMC_CS0_PHYS_BASE
+ SZ_1M
,
95 .flags
= IORESOURCE_MEM
,
99 static struct platform_device ttc_dkb_device_onenand
= {
100 .name
= "onenand-flash",
102 .resource
= ttc_dkb_resource_onenand
,
103 .num_resources
= ARRAY_SIZE(ttc_dkb_resource_onenand
),
105 .platform_data
= &ttc_dkb_onenand_info
,
109 static struct platform_device
*ttc_dkb_devices
[] = {
110 &ttc_dkb_device_onenand
,
113 static void __init
ttc_dkb_init(void)
115 mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config
));
117 /* on-chip devices */
120 /* off-chip devices */
121 platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices
));
124 MACHINE_START(TTC_DKB
, "PXA910-based TTC_DKB Development Platform")
125 .phys_io
= APB_PHYS_BASE
,
126 .boot_params
= 0x00000100,
127 .io_pg_offst
= (APB_VIRT_BASE
>> 18) & 0xfffc,
128 .map_io
= pxa_map_io
,
129 .init_irq
= pxa910_init_irq
,
130 .timer
= &pxa910_timer
,
131 .init_machine
= ttc_dkb_init
,