1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  *  linux/arch/arm/mach-mmp/avengers_lite.c
4  *
5  *  Support for the Marvell PXA168-based Avengers lite Development Platform.
6  *
7  *  Copyright (C) 2009-2010 Marvell International Ltd.
8  */
9 
10 #include <linux/init.h>
11 #include <linux/kernel.h>
12 #include <linux/gpio-pxa.h>
13 #include <linux/platform_device.h>
14 
15 #include <asm/mach-types.h>
16 #include <asm/mach/arch.h>
17 #include "addr-map.h"
18 #include "mfp-pxa168.h"
19 #include "pxa168.h"
20 #include "irqs.h"
21 
22 
23 #include "common.h"
24 #include <linux/delay.h>
25 
26 /* Avengers lite MFP configurations */
27 static unsigned long avengers_lite_pin_config_V16F[] __initdata = {
28 	/* DEBUG_UART */
29 	GPIO88_UART2_TXD,
30 	GPIO89_UART2_RXD,
31 };
32 
33 static struct pxa_gpio_platform_data pxa168_gpio_pdata = {
34 	.irq_base	= MMP_GPIO_TO_IRQ(0),
35 };
36 
avengers_lite_init(void)37 static void __init avengers_lite_init(void)
38 {
39 	mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F));
40 
41 	/* on-chip devices */
42 	pxa168_add_uart(2);
43 	platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata,
44 				 sizeof(struct pxa_gpio_platform_data));
45 	platform_device_register(&pxa168_device_gpio);
46 }
47 
48 MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
49 	.map_io		= mmp_map_io,
50 	.nr_irqs	= MMP_NR_IRQS,
51 	.init_irq       = pxa168_init_irq,
52 	.init_time	= pxa168_timer_init,
53 	.init_machine   = avengers_lite_init,
54 	.restart	= pxa168_restart,
55 MACHINE_END
56