2009-03-20 06:33:49 +01:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-mmp/ttc_dkb.c
|
|
|
|
*
|
|
|
|
* Support for the Marvell PXA910-based TTC_DKB Development Platform.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* publishhed by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/platform_device.h>
|
2009-09-22 19:57:35 +02:00
|
|
|
#include <linux/mtd/mtd.h>
|
|
|
|
#include <linux/mtd/partitions.h>
|
|
|
|
#include <linux/mtd/onenand.h>
|
2010-09-08 15:42:42 +02:00
|
|
|
#include <linux/interrupt.h>
|
2009-03-20 06:33:49 +01:00
|
|
|
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
2009-09-22 19:57:35 +02:00
|
|
|
#include <asm/mach/flash.h>
|
2009-03-20 06:33:49 +01:00
|
|
|
#include <mach/addr-map.h>
|
|
|
|
#include <mach/mfp-pxa910.h>
|
|
|
|
#include <mach/pxa910.h>
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2010-09-08 15:42:42 +02:00
|
|
|
#define TTCDKB_NR_IRQS (IRQ_BOARD_START + 24)
|
|
|
|
|
2009-03-20 06:33:49 +01:00
|
|
|
static unsigned long ttc_dkb_pin_config[] __initdata = {
|
|
|
|
/* UART2 */
|
|
|
|
GPIO47_UART2_RXD,
|
|
|
|
GPIO48_UART2_TXD,
|
2009-09-22 19:57:35 +02:00
|
|
|
|
|
|
|
/* DFI */
|
|
|
|
DF_IO0_ND_IO0,
|
|
|
|
DF_IO1_ND_IO1,
|
|
|
|
DF_IO2_ND_IO2,
|
|
|
|
DF_IO3_ND_IO3,
|
|
|
|
DF_IO4_ND_IO4,
|
|
|
|
DF_IO5_ND_IO5,
|
|
|
|
DF_IO6_ND_IO6,
|
|
|
|
DF_IO7_ND_IO7,
|
|
|
|
DF_IO8_ND_IO8,
|
|
|
|
DF_IO9_ND_IO9,
|
|
|
|
DF_IO10_ND_IO10,
|
|
|
|
DF_IO11_ND_IO11,
|
|
|
|
DF_IO12_ND_IO12,
|
|
|
|
DF_IO13_ND_IO13,
|
|
|
|
DF_IO14_ND_IO14,
|
|
|
|
DF_IO15_ND_IO15,
|
|
|
|
DF_nCS0_SM_nCS2_nCS0,
|
|
|
|
DF_ALE_SM_WEn_ND_ALE,
|
|
|
|
DF_CLE_SM_OEn_ND_CLE,
|
|
|
|
DF_WEn_DF_WEn,
|
|
|
|
DF_REn_DF_REn,
|
|
|
|
DF_RDY0_DF_RDY0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct mtd_partition ttc_dkb_onenand_partitions[] = {
|
|
|
|
{
|
|
|
|
.name = "bootloader",
|
|
|
|
.offset = 0,
|
|
|
|
.size = SZ_1M,
|
|
|
|
.mask_flags = MTD_WRITEABLE,
|
|
|
|
}, {
|
|
|
|
.name = "reserved",
|
|
|
|
.offset = MTDPART_OFS_APPEND,
|
|
|
|
.size = SZ_128K,
|
|
|
|
.mask_flags = MTD_WRITEABLE,
|
|
|
|
}, {
|
|
|
|
.name = "reserved",
|
|
|
|
.offset = MTDPART_OFS_APPEND,
|
|
|
|
.size = SZ_8M,
|
|
|
|
.mask_flags = MTD_WRITEABLE,
|
|
|
|
}, {
|
|
|
|
.name = "kernel",
|
|
|
|
.offset = MTDPART_OFS_APPEND,
|
|
|
|
.size = (SZ_2M + SZ_1M),
|
|
|
|
.mask_flags = 0,
|
|
|
|
}, {
|
|
|
|
.name = "filesystem",
|
|
|
|
.offset = MTDPART_OFS_APPEND,
|
|
|
|
.size = SZ_48M,
|
|
|
|
.mask_flags = 0,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2009-11-20 16:57:16 +01:00
|
|
|
static struct onenand_platform_data ttc_dkb_onenand_info = {
|
2009-09-22 19:57:35 +02:00
|
|
|
.parts = ttc_dkb_onenand_partitions,
|
|
|
|
.nr_parts = ARRAY_SIZE(ttc_dkb_onenand_partitions),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource ttc_dkb_resource_onenand[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = SMC_CS0_PHYS_BASE,
|
|
|
|
.end = SMC_CS0_PHYS_BASE + SZ_1M,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device ttc_dkb_device_onenand = {
|
|
|
|
.name = "onenand-flash",
|
|
|
|
.id = -1,
|
|
|
|
.resource = ttc_dkb_resource_onenand,
|
|
|
|
.num_resources = ARRAY_SIZE(ttc_dkb_resource_onenand),
|
|
|
|
.dev = {
|
|
|
|
.platform_data = &ttc_dkb_onenand_info,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device *ttc_dkb_devices[] = {
|
|
|
|
&ttc_dkb_device_onenand,
|
2009-03-20 06:33:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static void __init ttc_dkb_init(void)
|
|
|
|
{
|
|
|
|
mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config));
|
|
|
|
|
|
|
|
/* on-chip devices */
|
|
|
|
pxa910_add_uart(1);
|
2009-09-22 19:57:35 +02:00
|
|
|
|
|
|
|
/* off-chip devices */
|
|
|
|
platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices));
|
2009-03-20 06:33:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
|
2010-07-15 11:50:13 +02:00
|
|
|
.map_io = mmp_map_io,
|
2010-09-08 15:42:42 +02:00
|
|
|
.nr_irqs = TTCDKB_NR_IRQS,
|
2009-03-20 06:33:49 +01:00
|
|
|
.init_irq = pxa910_init_irq,
|
|
|
|
.timer = &pxa910_timer,
|
|
|
|
.init_machine = ttc_dkb_init,
|
|
|
|
MACHINE_END
|