diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2010-01-12 08:54:50 +0800 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-03-02 07:40:53 +0800 |
commit | 9896de72d20686f4dbc9cdd64ca178c80d6838b6 (patch) | |
tree | 623929b963795e1aa498a6c01e152cb5bb19433a /arch/arm/mach-mmp | |
parent | 0925e2f0fc5a55621cb80afbb6d4543c62e6a653 (diff) | |
download | blackbird-op-linux-9896de72d20686f4dbc9cdd64ca178c80d6838b6.tar.gz blackbird-op-linux-9896de72d20686f4dbc9cdd64ca178c80d6838b6.zip |
[ARM] mmp: avengers lite (pxa168) board bring up
Signed-off-by: Gavin Gu <gavin.gu@marvell.com>
Signed-off-by: Jing Xiang <jxiang@marvell.com>
Signed-off-by: Jack Ren <jack.ren@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/avengers_lite.c | 51 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/mfp-pxa168.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/uncompress.h | 13 |
5 files changed, 72 insertions, 4 deletions
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index c6a564fc4a7c..daddbefebf44 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig @@ -16,6 +16,13 @@ config MACH_ZYLONITE2 Say 'Y' here if you want to support the Marvell PXA168-based Zylonite2 Development Board. +config MACH_AVENGERS_LITE + bool "Marvell's PXA168 Avengers Lite Development Board" + select CPU_PXA168 + help + Say 'Y' here if you want to support the Marvell PXA168-based + Avengers Lite Development Board. + config MACH_TAVOREVB bool "Marvell's PXA910 TavorEVB Development Board" select CPU_PXA910 diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile index 6883e6584883..854f0ab322ba 100644 --- a/arch/arm/mach-mmp/Makefile +++ b/arch/arm/mach-mmp/Makefile @@ -11,5 +11,6 @@ obj-$(CONFIG_CPU_PXA910) += pxa910.o # board support obj-$(CONFIG_MACH_ASPENITE) += aspenite.o obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o +obj-$(CONFIG_MACH_AVENGERS_LITE)+= avengers_lite.o obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o obj-$(CONFIG_MACH_TTC_DKB) += ttc_dkb.o diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c new file mode 100644 index 000000000000..8c3fa5d14f4b --- /dev/null +++ b/arch/arm/mach-mmp/avengers_lite.c @@ -0,0 +1,51 @@ +/* + * 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. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * publishhed by the Free Software Foundation. + */ + +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/platform_device.h> + +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <mach/addr-map.h> +#include <mach/mfp-pxa168.h> +#include <mach/pxa168.h> +#include <mach/irqs.h> + + +#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, +}; + +static void __init avengers_lite_init(void) +{ + mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F)); + + /* on-chip devices */ + pxa168_add_uart(2); +} + +MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform") + .phys_io = APB_PHYS_BASE, + .boot_params = 0x00000100, + .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, + .map_io = pxa_map_io, + .init_irq = pxa168_init_irq, + .timer = &pxa168_timer, + .init_machine = avengers_lite_init, +MACHINE_END diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index 3b216bf41e7f..ded43c455ec3 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h @@ -193,7 +193,9 @@ #define GPIO32_CF_nCD1 MFP_CFG(GPIO32, AF3) #define GPIO33_CF_nCD2 MFP_CFG(GPIO33, AF3) -/* UART1 */ +/* UART */ +#define GPIO88_UART2_TXD MFP_CFG(GPIO88, AF2) +#define GPIO89_UART2_RXD MFP_CFG(GPIO89, AF2) #define GPIO107_UART1_TXD MFP_CFG_DRV(GPIO107, AF1, FAST) #define GPIO107_UART1_RXD MFP_CFG_DRV(GPIO107, AF2, FAST) #define GPIO108_UART1_RXD MFP_CFG_DRV(GPIO108, AF1, FAST) diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h index c93d5fa5865c..a7dcc5307216 100644 --- a/arch/arm/mach-mmp/include/mach/uncompress.h +++ b/arch/arm/mach-mmp/include/mach/uncompress.h @@ -8,15 +8,16 @@ #include <linux/serial_reg.h> #include <mach/addr-map.h> +#include <asm/mach-types.h> #define UART1_BASE (APB_PHYS_BASE + 0x36000) #define UART2_BASE (APB_PHYS_BASE + 0x17000) #define UART3_BASE (APB_PHYS_BASE + 0x18000) +static volatile unsigned long *UART = (unsigned long *)UART2_BASE; + static inline void putc(char c) { - volatile unsigned long *UART = (unsigned long *)UART2_BASE; - /* UART enabled? */ if (!(UART[UART_IER] & UART_IER_UUE)) return; @@ -34,8 +35,14 @@ static inline void flush(void) { } +static inline void arch_decomp_setup(void) +{ + if (machine_is_avengers_lite()) + UART = (unsigned long *)UART3_BASE; +} + /* * nothing to do */ -#define arch_decomp_setup() + #define arch_decomp_wdog() |