2 * linux/arch/arm/mach-imx/mach-apf9328.c
6 * This work is based on mach-scb9328.c which is:
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/init.h>
17 #include <linux/kernel.h>
18 #include <linux/platform_device.h>
19 #include <linux/mtd/physmap.h>
20 #include <linux/dm9000.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/time.h>
26 #include <mach/common.h>
27 #include <mach/hardware.h>
28 #include <mach/irqs.h>
29 #include <mach/iomux-mx1.h>
31 #include "devices-imx1.h"
33 static const int apf9328_pins[] __initconst = {
47 * The APF9328 can have up to 32MB NOR Flash
49 static struct resource flash_resource = {
50 .start = MX1_CS0_PHYS,
51 .end = MX1_CS0_PHYS + SZ_32M - 1,
52 .flags = IORESOURCE_MEM,
55 static struct physmap_flash_data apf9328_flash_data = {
59 static struct platform_device apf9328_flash_device = {
60 .name = "physmap-flash",
63 .platform_data = &apf9328_flash_data,
65 .resource = &flash_resource,
70 * APF9328 has a DM9000 Ethernet controller
72 static struct dm9000_plat_data dm9000_setup = {
73 .flags = DM9000_PLATF_16BITONLY
76 static struct resource dm9000_resources[] = {
78 .start = MX1_CS4_PHYS + 0x00C00000,
79 .end = MX1_CS4_PHYS + 0x00C00001,
80 .flags = IORESOURCE_MEM,
82 .start = MX1_CS4_PHYS + 0x00C00002,
83 .end = MX1_CS4_PHYS + 0x00C00003,
84 .flags = IORESOURCE_MEM,
86 .start = IRQ_GPIOB(14),
88 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
92 static struct platform_device dm9000x_device = {
95 .num_resources = ARRAY_SIZE(dm9000_resources),
96 .resource = dm9000_resources,
98 .platform_data = &dm9000_setup,
102 static const struct imxuart_platform_data uart1_pdata __initconst = {
103 .flags = IMXUART_HAVE_RTSCTS,
106 static struct platform_device *devices[] __initdata = {
107 &apf9328_flash_device,
111 static void __init apf9328_init(void)
115 mxc_gpio_setup_multiple_pins(apf9328_pins,
116 ARRAY_SIZE(apf9328_pins),
119 imx1_add_imx_uart0(NULL);
120 imx1_add_imx_uart1(&uart1_pdata);
122 platform_add_devices(devices, ARRAY_SIZE(devices));
125 static void __init apf9328_timer_init(void)
127 mx1_clocks_init(32768);
130 static struct sys_timer apf9328_timer = {
131 .init = apf9328_timer_init,
134 MACHINE_START(APF9328, "Armadeus APF9328")
135 /* Maintainer: Gwenhael Goavec-Merou, ARMadeus Systems */
136 .map_io = mx1_map_io,
137 .init_early = imx1_init_early,
138 .init_irq = mx1_init_irq,
139 .timer = &apf9328_timer,
140 .init_machine = apf9328_init,