1 #include <linux/platform_device.h>
2 #include <linux/mtd/mtd.h>
3 #include <linux/mtd/physmap.h>
4 #include <linux/gpio.h>
5 #include <linux/leds.h>
7 #include <mach/common.h>
8 #include <mach/hardware.h>
9 #include <asm/mach-types.h>
10 #include <asm/mach/arch.h>
11 #include <asm/mach/time.h>
12 #include <asm/mach/map.h>
13 #include <mach/imx-uart.h>
14 #include <mach/imxfb.h>
15 #include <mach/iomux-mx21.h>
16 #include <mach/board-vp6500.h>
20 #include <linux/input.h>
21 #include <linux/input/matrix_keypad.h>
23 static unsigned int vp6500_pins[] = {
56 static struct physmap_flash_data vp6500_flash_data = {
60 static struct resource vp6500_flash_resource = {
61 .start = MX21_CS0_BASE_ADDR,
62 .end = MX21_CS0_BASE_ADDR + SZ_64M - 1,
63 .flags = IORESOURCE_MEM,
66 static struct platform_device vp6500_nor_mtd_device = {
67 .name = "physmap-flash",
70 .platform_data = &vp6500_flash_data,
73 .resource = &vp6500_flash_resource,
76 static struct gpio_led vp6500_leds[] = {
78 .name = "vp6500:orange:keypad",
79 .gpio = VP6500_GPIO_KEYPAD_LEDS,
83 static struct gpio_led_platform_data vp6500_leds_data = {
85 .num_leds = ARRAY_SIZE(vp6500_leds),
88 static struct platform_device vp6500_leds_device = {
92 .platform_data = &vp6500_leds_data,
96 static struct platform_device *platform_devices[] __initdata = {
97 &vp6500_nor_mtd_device,
101 static void __init vp6500_board_init(void)
103 mxc_gpio_setup_multiple_pins(vp6500_pins, ARRAY_SIZE(vp6500_pins),
106 mxc_register_device(&mxc_uart_device0, NULL);
108 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
111 static void __init vp6500_timer_init(void)
113 mx21_clocks_init(32768, 26000000);
116 static struct sys_timer vp6500_timer = {
117 .init = vp6500_timer_init,
120 MACHINE_START(VP6500, "Phillips VP6500")
121 .phys_io = MX21_AIPI_BASE_ADDR,
122 .io_pg_offst = ((MX21_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
123 .boot_params = MX21_PHYS_OFFSET + 0x100,
124 .map_io = mx21_map_io,
125 .init_irq = mx21_init_irq,
126 .init_machine = vp6500_board_init,
127 .timer = &vp6500_timer,