1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-mmp/tavorevb.c
5 * Support for the Marvell PXA910-based TavorEVB Development Platform.
7 #include <linux/gpio.h>
8 #include <linux/gpio-pxa.h>
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/platform_device.h>
12 #include <linux/smc91x.h>
14 #include <asm/mach-types.h>
15 #include <asm/mach/arch.h>
17 #include "mfp-pxa910.h"
23 static unsigned long tavorevb_pin_config
[] __initdata
= {
61 static struct pxa_gpio_platform_data pxa910_gpio_pdata
= {
62 .irq_base
= MMP_GPIO_TO_IRQ(0),
65 static struct smc91x_platdata tavorevb_smc91x_info
= {
66 .flags
= SMC91X_USE_16BIT
| SMC91X_NOWAIT
,
69 static struct resource smc91x_resources
[] = {
71 .start
= SMC_CS1_PHYS_BASE
+ 0x300,
72 .end
= SMC_CS1_PHYS_BASE
+ 0xfffff,
73 .flags
= IORESOURCE_MEM
,
76 .start
= MMP_GPIO_TO_IRQ(80),
77 .end
= MMP_GPIO_TO_IRQ(80),
78 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
,
82 static struct platform_device smc91x_device
= {
86 .platform_data
= &tavorevb_smc91x_info
,
88 .num_resources
= ARRAY_SIZE(smc91x_resources
),
89 .resource
= smc91x_resources
,
92 static void __init
tavorevb_init(void)
94 mfp_config(ARRAY_AND_SIZE(tavorevb_pin_config
));
98 platform_device_add_data(&pxa910_device_gpio
, &pxa910_gpio_pdata
,
99 sizeof(struct pxa_gpio_platform_data
));
100 platform_device_register(&pxa910_device_gpio
);
102 /* off-chip devices */
103 platform_device_register(&smc91x_device
);
106 MACHINE_START(TAVOREVB
, "PXA910 Evaluation Board (aka TavorEVB)")
107 .map_io
= mmp_map_io
,
108 .nr_irqs
= MMP_NR_IRQS
,
109 .init_irq
= pxa910_init_irq
,
110 .init_time
= pxa910_timer_init
,
111 .init_machine
= tavorevb_init
,
112 .restart
= mmp_restart
,