diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2010-01-11 19:54:50 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-03-01 18:40:53 -0500 |
commit | 9896de72d20686f4dbc9cdd64ca178c80d6838b6 (patch) | |
tree | 623929b963795e1aa498a6c01e152cb5bb19433a /arch/arm/mach-mmp | |
parent | 0925e2f0fc5a55621cb80afbb6d4543c62e6a653 (diff) |
[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 | |||
16 | Say 'Y' here if you want to support the Marvell PXA168-based | 16 | Say 'Y' here if you want to support the Marvell PXA168-based |
17 | Zylonite2 Development Board. | 17 | Zylonite2 Development Board. |
18 | 18 | ||
19 | config MACH_AVENGERS_LITE | ||
20 | bool "Marvell's PXA168 Avengers Lite Development Board" | ||
21 | select CPU_PXA168 | ||
22 | help | ||
23 | Say 'Y' here if you want to support the Marvell PXA168-based | ||
24 | Avengers Lite Development Board. | ||
25 | |||
19 | config MACH_TAVOREVB | 26 | config MACH_TAVOREVB |
20 | bool "Marvell's PXA910 TavorEVB Development Board" | 27 | bool "Marvell's PXA910 TavorEVB Development Board" |
21 | select CPU_PXA910 | 28 | 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 | |||
11 | # board support | 11 | # board support |
12 | obj-$(CONFIG_MACH_ASPENITE) += aspenite.o | 12 | obj-$(CONFIG_MACH_ASPENITE) += aspenite.o |
13 | obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o | 13 | obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o |
14 | obj-$(CONFIG_MACH_AVENGERS_LITE)+= avengers_lite.o | ||
14 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o | 15 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o |
15 | obj-$(CONFIG_MACH_TTC_DKB) += ttc_dkb.o | 16 | 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 @@ | |||
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> | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
17 | #include <asm/mach-types.h> | ||
18 | #include <asm/mach/arch.h> | ||
19 | #include <mach/addr-map.h> | ||
20 | #include <mach/mfp-pxa168.h> | ||
21 | #include <mach/pxa168.h> | ||
22 | #include <mach/irqs.h> | ||
23 | |||
24 | |||
25 | #include "common.h" | ||
26 | #include <linux/delay.h> | ||
27 | |||
28 | /* Avengers lite MFP configurations */ | ||
29 | static unsigned long avengers_lite_pin_config_V16F[] __initdata = { | ||
30 | /* DEBUG_UART */ | ||
31 | GPIO88_UART2_TXD, | ||
32 | GPIO89_UART2_RXD, | ||
33 | }; | ||
34 | |||
35 | static void __init avengers_lite_init(void) | ||
36 | { | ||
37 | mfp_config(ARRAY_AND_SIZE(avengers_lite_pin_config_V16F)); | ||
38 | |||
39 | /* on-chip devices */ | ||
40 | pxa168_add_uart(2); | ||
41 | } | ||
42 | |||
43 | MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform") | ||
44 | .phys_io = APB_PHYS_BASE, | ||
45 | .boot_params = 0x00000100, | ||
46 | .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, | ||
47 | .map_io = pxa_map_io, | ||
48 | .init_irq = pxa168_init_irq, | ||
49 | .timer = &pxa168_timer, | ||
50 | .init_machine = avengers_lite_init, | ||
51 | 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 @@ | |||
193 | #define GPIO32_CF_nCD1 MFP_CFG(GPIO32, AF3) | 193 | #define GPIO32_CF_nCD1 MFP_CFG(GPIO32, AF3) |
194 | #define GPIO33_CF_nCD2 MFP_CFG(GPIO33, AF3) | 194 | #define GPIO33_CF_nCD2 MFP_CFG(GPIO33, AF3) |
195 | 195 | ||
196 | /* UART1 */ | 196 | /* UART */ |
197 | #define GPIO88_UART2_TXD MFP_CFG(GPIO88, AF2) | ||
198 | #define GPIO89_UART2_RXD MFP_CFG(GPIO89, AF2) | ||
197 | #define GPIO107_UART1_TXD MFP_CFG_DRV(GPIO107, AF1, FAST) | 199 | #define GPIO107_UART1_TXD MFP_CFG_DRV(GPIO107, AF1, FAST) |
198 | #define GPIO107_UART1_RXD MFP_CFG_DRV(GPIO107, AF2, FAST) | 200 | #define GPIO107_UART1_RXD MFP_CFG_DRV(GPIO107, AF2, FAST) |
199 | #define GPIO108_UART1_RXD MFP_CFG_DRV(GPIO108, AF1, FAST) | 201 | #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 @@ | |||
8 | 8 | ||
9 | #include <linux/serial_reg.h> | 9 | #include <linux/serial_reg.h> |
10 | #include <mach/addr-map.h> | 10 | #include <mach/addr-map.h> |
11 | #include <asm/mach-types.h> | ||
11 | 12 | ||
12 | #define UART1_BASE (APB_PHYS_BASE + 0x36000) | 13 | #define UART1_BASE (APB_PHYS_BASE + 0x36000) |
13 | #define UART2_BASE (APB_PHYS_BASE + 0x17000) | 14 | #define UART2_BASE (APB_PHYS_BASE + 0x17000) |
14 | #define UART3_BASE (APB_PHYS_BASE + 0x18000) | 15 | #define UART3_BASE (APB_PHYS_BASE + 0x18000) |
15 | 16 | ||
17 | static volatile unsigned long *UART = (unsigned long *)UART2_BASE; | ||
18 | |||
16 | static inline void putc(char c) | 19 | static inline void putc(char c) |
17 | { | 20 | { |
18 | volatile unsigned long *UART = (unsigned long *)UART2_BASE; | ||
19 | |||
20 | /* UART enabled? */ | 21 | /* UART enabled? */ |
21 | if (!(UART[UART_IER] & UART_IER_UUE)) | 22 | if (!(UART[UART_IER] & UART_IER_UUE)) |
22 | return; | 23 | return; |
@@ -34,8 +35,14 @@ static inline void flush(void) | |||
34 | { | 35 | { |
35 | } | 36 | } |
36 | 37 | ||
38 | static inline void arch_decomp_setup(void) | ||
39 | { | ||
40 | if (machine_is_avengers_lite()) | ||
41 | UART = (unsigned long *)UART3_BASE; | ||
42 | } | ||
43 | |||
37 | /* | 44 | /* |
38 | * nothing to do | 45 | * nothing to do |
39 | */ | 46 | */ |
40 | #define arch_decomp_setup() | 47 | |
41 | #define arch_decomp_wdog() | 48 | #define arch_decomp_wdog() |