2 * linux/arch/arm/mach-w90x900/mach-w90p910evb.c
4 * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche
6 * Copyright (C) 2008 Nuvoton technology corporation
9 * Wan ZongShun <mcuos.com@gmail.com>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
18 #include <linux/kernel.h>
19 #include <linux/types.h>
20 #include <linux/interrupt.h>
21 #include <linux/list.h>
22 #include <linux/timer.h>
23 #include <linux/init.h>
24 #include <linux/platform_device.h>
25 #include <linux/mtd/physmap.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
29 #include <asm/mach/irq.h>
30 #include <asm/mach-types.h>
32 #include <mach/regs-serial.h>
36 /*w90p910 evb norflash driver data */
38 #define W90P910_FLASH_BASE 0xA0000000
39 #define W90P910_FLASH_SIZE 0x400000
41 static struct mtd_partition w90p910_flash_partitions[] = {
43 .name = "NOR Partition 1 for kernel (960K)",
48 .name = "NOR Partition 2 for image (1M)",
53 .name = "NOR Partition 3 for user (2M)",
59 static struct physmap_flash_data w90p910_flash_data = {
61 .parts = w90p910_flash_partitions,
62 .nr_parts = ARRAY_SIZE(w90p910_flash_partitions),
65 static struct resource w90p910_flash_resources[] = {
67 .start = W90P910_FLASH_BASE,
68 .end = W90P910_FLASH_BASE + W90P910_FLASH_SIZE - 1,
69 .flags = IORESOURCE_MEM,
73 static struct platform_device w90p910_flash_device = {
74 .name = "physmap-flash",
77 .platform_data = &w90p910_flash_data,
79 .resource = w90p910_flash_resources,
80 .num_resources = ARRAY_SIZE(w90p910_flash_resources),
83 static struct map_desc w90p910_iodesc[] __initdata = {
86 /*Here should be your evb resourse,such as LCD*/
88 static struct platform_device *w90p910evb_dev[] __initdata = {
89 &w90p910_serial_device,
90 &w90p910_flash_device,
93 static void __init w90p910evb_map_io(void)
95 w90p910_map_io(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc));
96 w90p910_init_clocks(0);
99 static void __init w90p910evb_init(void)
101 platform_add_devices(w90p910evb_dev, ARRAY_SIZE(w90p910evb_dev));
104 MACHINE_START(W90P910EVB, "W90P910EVB")
105 /* Maintainer: Wan ZongShun */
106 .phys_io = W90X900_PA_UART,
107 .io_pg_offst = (((u32)W90X900_VA_UART) >> 18) & 0xfffc,
109 .map_io = w90p910evb_map_io,
110 .init_irq = w90x900_init_irq,
111 .init_machine = w90p910evb_init,
112 .timer = &w90x900_timer,