GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-mmp / flint.c
blobe4312d238eae3ec4e3a4b9a93564a5a265619549
1 /*
2 * linux/arch/arm/mach-mmp/flint.c
4 * Support for the Marvell Flint Development Platform.
6 * Copyright (C) 2009 Marvell International Ltd.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * publishhed by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/smc91x.h>
17 #include <linux/io.h>
18 #include <linux/gpio.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <mach/addr-map.h>
23 #include <mach/mfp-mmp2.h>
24 #include <mach/mmp2.h>
26 #include "common.h"
28 static unsigned long flint_pin_config[] __initdata = {
29 /* UART1 */
30 GPIO45_UART1_RXD,
31 GPIO46_UART1_TXD,
33 /* UART2 */
34 GPIO47_UART2_RXD,
35 GPIO48_UART2_TXD,
37 /* SMC */
38 GPIO151_SMC_SCLK,
39 GPIO145_SMC_nCS0,
40 GPIO146_SMC_nCS1,
41 GPIO152_SMC_BE0,
42 GPIO153_SMC_BE1,
43 GPIO154_SMC_IRQ,
44 GPIO113_SMC_RDY,
46 /*Ethernet*/
47 GPIO155_GPIO155,
49 /* DFI */
50 GPIO168_DFI_D0,
51 GPIO167_DFI_D1,
52 GPIO166_DFI_D2,
53 GPIO165_DFI_D3,
54 GPIO107_DFI_D4,
55 GPIO106_DFI_D5,
56 GPIO105_DFI_D6,
57 GPIO104_DFI_D7,
58 GPIO111_DFI_D8,
59 GPIO164_DFI_D9,
60 GPIO163_DFI_D10,
61 GPIO162_DFI_D11,
62 GPIO161_DFI_D12,
63 GPIO110_DFI_D13,
64 GPIO109_DFI_D14,
65 GPIO108_DFI_D15,
66 GPIO143_ND_nCS0,
67 GPIO144_ND_nCS1,
68 GPIO147_ND_nWE,
69 GPIO148_ND_nRE,
70 GPIO150_ND_ALE,
71 GPIO149_ND_CLE,
72 GPIO112_ND_RDY0,
73 GPIO160_ND_RDY1,
76 static struct smc91x_platdata flint_smc91x_info = {
77 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
80 static struct resource smc91x_resources[] = {
81 [0] = {
82 .start = SMC_CS1_PHYS_BASE + 0x300,
83 .end = SMC_CS1_PHYS_BASE + 0xfffff,
84 .flags = IORESOURCE_MEM,
86 [1] = {
87 .start = gpio_to_irq(155),
88 .end = gpio_to_irq(155),
89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
93 static struct platform_device smc91x_device = {
94 .name = "smc91x",
95 .id = 0,
96 .dev = {
97 .platform_data = &flint_smc91x_info,
99 .num_resources = ARRAY_SIZE(smc91x_resources),
100 .resource = smc91x_resources,
103 static void __init flint_init(void)
105 mfp_config(ARRAY_AND_SIZE(flint_pin_config));
107 /* on-chip devices */
108 mmp2_add_uart(1);
109 mmp2_add_uart(2);
111 /* off-chip devices */
112 platform_device_register(&smc91x_device);
115 MACHINE_START(FLINT, "Flint Development Platform")
116 .phys_io = APB_PHYS_BASE,
117 .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc,
118 .map_io = mmp_map_io,
119 .init_irq = mmp2_init_irq,
120 .timer = &mmp2_timer,
121 .init_machine = flint_init,
122 MACHINE_END