Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / mach-mmp / tavorevb.c
blob143e52ede8ef14350dac15279ec53b654ae4a716
1 /*
2 * linux/arch/arm/mach-mmp/tavorevb.c
4 * Support for the Marvell PXA910-based TavorEVB 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.
9 */
10 #include <linux/gpio.h>
11 #include <linux/init.h>
12 #include <linux/kernel.h>
13 #include <linux/platform_device.h>
14 #include <linux/smc91x.h>
16 #include <asm/mach-types.h>
17 #include <asm/mach/arch.h>
18 #include <mach/addr-map.h>
19 #include <mach/mfp-pxa910.h>
20 #include <mach/pxa910.h>
22 #include "common.h"
24 static unsigned long tavorevb_pin_config[] __initdata = {
25 /* UART2 */
26 GPIO47_UART2_RXD,
27 GPIO48_UART2_TXD,
29 /* SMC */
30 SM_nCS0_nCS0,
31 SM_ADV_SM_ADV,
32 SM_SCLK_SM_SCLK,
33 SM_SCLK_SM_SCLK,
34 SM_BE0_SM_BE0,
35 SM_BE1_SM_BE1,
37 /* DFI */
38 DF_IO0_ND_IO0,
39 DF_IO1_ND_IO1,
40 DF_IO2_ND_IO2,
41 DF_IO3_ND_IO3,
42 DF_IO4_ND_IO4,
43 DF_IO5_ND_IO5,
44 DF_IO6_ND_IO6,
45 DF_IO7_ND_IO7,
46 DF_IO8_ND_IO8,
47 DF_IO9_ND_IO9,
48 DF_IO10_ND_IO10,
49 DF_IO11_ND_IO11,
50 DF_IO12_ND_IO12,
51 DF_IO13_ND_IO13,
52 DF_IO14_ND_IO14,
53 DF_IO15_ND_IO15,
54 DF_nCS0_SM_nCS2_nCS0,
55 DF_ALE_SM_WEn_ND_ALE,
56 DF_CLE_SM_OEn_ND_CLE,
57 DF_WEn_DF_WEn,
58 DF_REn_DF_REn,
59 DF_RDY0_DF_RDY0,
62 static struct smc91x_platdata tavorevb_smc91x_info = {
63 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
66 static struct resource smc91x_resources[] = {
67 [0] = {
68 .start = SMC_CS1_PHYS_BASE + 0x300,
69 .end = SMC_CS1_PHYS_BASE + 0xfffff,
70 .flags = IORESOURCE_MEM,
72 [1] = {
73 .start = gpio_to_irq(80),
74 .end = gpio_to_irq(80),
75 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
79 static struct platform_device smc91x_device = {
80 .name = "smc91x",
81 .id = 0,
82 .dev = {
83 .platform_data = &tavorevb_smc91x_info,
85 .num_resources = ARRAY_SIZE(smc91x_resources),
86 .resource = smc91x_resources,
89 static void __init tavorevb_init(void)
91 mfp_config(ARRAY_AND_SIZE(tavorevb_pin_config));
93 /* on-chip devices */
94 pxa910_add_uart(1);
96 /* off-chip devices */
97 platform_device_register(&smc91x_device);
100 MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
101 .map_io = mmp_map_io,
102 .init_irq = pxa910_init_irq,
103 .timer = &pxa910_timer,
104 .init_machine = tavorevb_init,
105 MACHINE_END