Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-mmp/avengers_lite.c |
| 3 | * |
| 4 | * Support for the Marvell PXA168-based Avengers lite Development Platform. |
| 5 | * |
| 6 | * Copyright (C) 2009-2010 Marvell International Ltd. |
| 7 | * |
| 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. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/init.h> |
| 14 | #include <linux/kernel.h> |
Haojian Zhuang | b8f649f | 2013-04-09 18:12:04 +0800 | [diff] [blame] | 15 | #include <linux/gpio-pxa.h> |
Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 16 | #include <linux/platform_device.h> |
| 17 | |
| 18 | #include <asm/mach-types.h> |
| 19 | #include <asm/mach/arch.h> |
| 20 | #include <mach/addr-map.h> |
| 21 | #include <mach/mfp-pxa168.h> |
| 22 | #include <mach/pxa168.h> |
| 23 | #include <mach/irqs.h> |
| 24 | |
| 25 | |
| 26 | #include "common.h" |
| 27 | #include <linux/delay.h> |
| 28 | |
| 29 | /* Avengers lite MFP configurations */ |
| 30 | static unsigned long avengers_lite_pin_config_V16F[] __initdata = { |
| 31 | /* DEBUG_UART */ |
| 32 | GPIO88_UART2_TXD, |
| 33 | GPIO89_UART2_RXD, |
| 34 | }; |
| 35 | |
Haojian Zhuang | b8f649f | 2013-04-09 18:12:04 +0800 | [diff] [blame] | 36 | static struct pxa_gpio_platform_data pxa168_gpio_pdata = { |
| 37 | .irq_base = MMP_GPIO_TO_IRQ(0), |
| 38 | }; |
| 39 | |
Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 40 | static void __init avengers_lite_init(void) |
| 41 | { |
| 42 | mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F)); |
| 43 | |
| 44 | /* on-chip devices */ |
| 45 | pxa168_add_uart(2); |
Haojian Zhuang | b8f649f | 2013-04-09 18:12:04 +0800 | [diff] [blame] | 46 | platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata, |
| 47 | sizeof(struct pxa_gpio_platform_data)); |
Haojian Zhuang | 157d264 | 2011-10-17 20:37:52 +0800 | [diff] [blame] | 48 | platform_device_register(&pxa168_device_gpio); |
Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform") |
Eric Miao | 8022887 | 2010-07-15 17:50:13 +0800 | [diff] [blame] | 52 | .map_io = mmp_map_io, |
Rob Herring | 8661fb9 | 2012-01-03 16:50:40 -0600 | [diff] [blame] | 53 | .nr_irqs = MMP_NR_IRQS, |
Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 54 | .init_irq = pxa168_init_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 55 | .init_time = pxa168_timer_init, |
Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 56 | .init_machine = avengers_lite_init, |
Russell King | 9854a38 | 2011-11-05 15:40:09 +0000 | [diff] [blame] | 57 | .restart = pxa168_restart, |
Haojian Zhuang | 9896de7 | 2010-01-12 08:54:50 +0800 | [diff] [blame] | 58 | MACHINE_END |