2019-05-30 07:57:46 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2010-01-12 08:54:50 +08:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-mmp/avengers_lite.c
|
|
|
|
*
|
|
|
|
* Support for the Marvell PXA168-based Avengers lite Development Platform.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009-2010 Marvell International Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/kernel.h>
|
2013-04-09 18:12:04 +08:00
|
|
|
#include <linux/gpio-pxa.h>
|
2010-01-12 08:54:50 +08:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
2014-04-16 02:38:32 +08:00
|
|
|
#include "addr-map.h"
|
|
|
|
#include "mfp-pxa168.h"
|
|
|
|
#include "pxa168.h"
|
|
|
|
#include "irqs.h"
|
2010-01-12 08:54:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include <linux/delay.h>
|
|
|
|
|
|
|
|
/* Avengers lite MFP configurations */
|
|
|
|
static unsigned long avengers_lite_pin_config_V16F[] __initdata = {
|
|
|
|
/* DEBUG_UART */
|
|
|
|
GPIO88_UART2_TXD,
|
|
|
|
GPIO89_UART2_RXD,
|
|
|
|
};
|
|
|
|
|
2013-04-09 18:12:04 +08:00
|
|
|
static struct pxa_gpio_platform_data pxa168_gpio_pdata = {
|
|
|
|
.irq_base = MMP_GPIO_TO_IRQ(0),
|
|
|
|
};
|
|
|
|
|
2010-01-12 08:54:50 +08:00
|
|
|
static void __init avengers_lite_init(void)
|
|
|
|
{
|
|
|
|
mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F));
|
|
|
|
|
|
|
|
/* on-chip devices */
|
|
|
|
pxa168_add_uart(2);
|
2013-04-09 18:12:04 +08:00
|
|
|
platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata,
|
|
|
|
sizeof(struct pxa_gpio_platform_data));
|
2011-10-17 20:37:52 +08:00
|
|
|
platform_device_register(&pxa168_device_gpio);
|
2010-01-12 08:54:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
|
2010-07-15 17:50:13 +08:00
|
|
|
.map_io = mmp_map_io,
|
2012-01-04 06:50:40 +08:00
|
|
|
.nr_irqs = MMP_NR_IRQS,
|
2010-01-12 08:54:50 +08:00
|
|
|
.init_irq = pxa168_init_irq,
|
2012-11-09 03:40:59 +08:00
|
|
|
.init_time = pxa168_timer_init,
|
2010-01-12 08:54:50 +08:00
|
|
|
.init_machine = avengers_lite_init,
|
2011-11-05 23:40:09 +08:00
|
|
|
.restart = pxa168_restart,
|
2010-01-12 08:54:50 +08:00
|
|
|
MACHINE_END
|