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>
18 #include <linux/gpio.h>
19 #include <linux/gpio-pxa.h>
20 #include <linux/interrupt.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
31 #define FLINT_NR_IRQS (MMP_NR_IRQS + 48)
33 static unsigned long flint_pin_config
[] __initdata
= {
81 static struct pxa_gpio_platform_data mmp2_gpio_pdata
= {
82 .irq_base
= MMP_GPIO_TO_IRQ(0),
85 static struct smc91x_platdata flint_smc91x_info
= {
86 .flags
= SMC91X_USE_16BIT
| SMC91X_NOWAIT
,
89 static struct resource smc91x_resources
[] = {
91 .start
= SMC_CS1_PHYS_BASE
+ 0x300,
92 .end
= SMC_CS1_PHYS_BASE
+ 0xfffff,
93 .flags
= IORESOURCE_MEM
,
96 .start
= MMP_GPIO_TO_IRQ(155),
97 .end
= MMP_GPIO_TO_IRQ(155),
98 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
,
102 static struct platform_device smc91x_device
= {
106 .platform_data
= &flint_smc91x_info
,
108 .num_resources
= ARRAY_SIZE(smc91x_resources
),
109 .resource
= smc91x_resources
,
112 static void __init
flint_init(void)
114 mfp_config(ARRAY_AND_SIZE(flint_pin_config
));
116 /* on-chip devices */
119 platform_device_add_data(&mmp2_device_gpio
, &mmp2_gpio_pdata
,
120 sizeof(struct pxa_gpio_platform_data
));
121 platform_device_register(&mmp2_device_gpio
);
123 /* off-chip devices */
124 platform_device_register(&smc91x_device
);
127 MACHINE_START(FLINT
, "Flint Development Platform")
128 .map_io
= mmp_map_io
,
129 .nr_irqs
= FLINT_NR_IRQS
,
130 .init_irq
= mmp2_init_irq
,
131 .init_time
= mmp2_timer_init
,
132 .init_machine
= flint_init
,
133 .restart
= mmp_restart
,