Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
flint.c
Go to the documentation of this file.
1 /*
2  * linux/arch/arm/mach-mmp/flint.c
3  *
4  * Support for the Marvell Flint Development Platform.
5  *
6  * Copyright (C) 2009 Marvell International Ltd.
7  *
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.
11  */
12 
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>
19 #include <linux/interrupt.h>
20 
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
23 #include <mach/addr-map.h>
24 #include <mach/mfp-mmp2.h>
25 #include <mach/mmp2.h>
26 #include <mach/irqs.h>
27 
28 #include "common.h"
29 
30 #define FLINT_NR_IRQS (MMP_NR_IRQS + 48)
31 
32 static unsigned long flint_pin_config[] __initdata = {
33  /* UART1 */
36 
37  /* UART2 */
40 
41  /* SMC */
49 
50  /*Ethernet*/
52 
53  /* DFI */
78 };
79 
80 static struct smc91x_platdata flint_smc91x_info = {
82 };
83 
84 static struct resource smc91x_resources[] = {
85  [0] = {
86  .start = SMC_CS1_PHYS_BASE + 0x300,
87  .end = SMC_CS1_PHYS_BASE + 0xfffff,
88  .flags = IORESOURCE_MEM,
89  },
90  [1] = {
91  .start = MMP_GPIO_TO_IRQ(155),
92  .end = MMP_GPIO_TO_IRQ(155),
94  }
95 };
96 
97 static struct platform_device smc91x_device = {
98  .name = "smc91x",
99  .id = 0,
100  .dev = {
101  .platform_data = &flint_smc91x_info,
102  },
103  .num_resources = ARRAY_SIZE(smc91x_resources),
104  .resource = smc91x_resources,
105 };
106 
107 static void __init flint_init(void)
108 {
109  mfp_config(ARRAY_AND_SIZE(flint_pin_config));
110 
111  /* on-chip devices */
112  mmp2_add_uart(1);
113  mmp2_add_uart(2);
115 
116  /* off-chip devices */
117  platform_device_register(&smc91x_device);
118 }
119 
120 MACHINE_START(FLINT, "Flint Development Platform")
121  .map_io = mmp_map_io,
122  .nr_irqs = FLINT_NR_IRQS,
123  .init_irq = mmp2_init_irq,
124  .timer = &mmp2_timer,
125  .init_machine = flint_init,
126  .restart = mmp_restart,