1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-mmp/flint.c
5 * Support for the Marvell Flint Development Platform.
7 * Copyright (C) 2009 Marvell International Ltd.
10 #include <linux/init.h>
11 #include <linux/kernel.h>
12 #include <linux/platform_device.h>
13 #include <linux/smc91x.h>
15 #include <linux/gpio.h>
16 #include <linux/gpio-pxa.h>
17 #include <linux/interrupt.h>
19 #include <asm/mach-types.h>
20 #include <asm/mach/arch.h>
28 #define FLINT_NR_IRQS (MMP_NR_IRQS + 48)
30 static unsigned long flint_pin_config
[] __initdata
= {
78 static struct pxa_gpio_platform_data mmp2_gpio_pdata
= {
79 .irq_base
= MMP_GPIO_TO_IRQ(0),
82 static struct smc91x_platdata flint_smc91x_info
= {
83 .flags
= SMC91X_USE_16BIT
| SMC91X_NOWAIT
,
86 static struct resource smc91x_resources
[] = {
88 .start
= SMC_CS1_PHYS_BASE
+ 0x300,
89 .end
= SMC_CS1_PHYS_BASE
+ 0xfffff,
90 .flags
= IORESOURCE_MEM
,
93 .start
= MMP_GPIO_TO_IRQ(155),
94 .end
= MMP_GPIO_TO_IRQ(155),
95 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
,
99 static struct platform_device smc91x_device
= {
103 .platform_data
= &flint_smc91x_info
,
105 .num_resources
= ARRAY_SIZE(smc91x_resources
),
106 .resource
= smc91x_resources
,
109 static void __init
flint_init(void)
111 mfp_config(ARRAY_AND_SIZE(flint_pin_config
));
113 /* on-chip devices */
116 platform_device_add_data(&mmp2_device_gpio
, &mmp2_gpio_pdata
,
117 sizeof(struct pxa_gpio_platform_data
));
118 platform_device_register(&mmp2_device_gpio
);
120 /* off-chip devices */
121 platform_device_register(&smc91x_device
);
124 MACHINE_START(FLINT
, "Flint Development Platform")
125 .map_io
= mmp_map_io
,
126 .nr_irqs
= FLINT_NR_IRQS
,
127 .init_irq
= mmp2_init_irq
,
128 .init_time
= mmp2_timer_init
,
129 .init_machine
= flint_init
,
130 .restart
= mmp_restart
,