diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-29 04:25:43 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-04 09:15:58 -0400 |
commit | d696e3f6585ddeb7bddbf0783b649fa669459a5c (patch) | |
tree | 42a08a0df82fa61f7e3764e42a5120af0d239bba /arch/arm/mach-mxs | |
parent | e91411b44d54db96c3d2d365b195b112e513d4ba (diff) |
ARM: mxs: enable multiplatform build
Remove files that are not needed by multiplatform build, and make
necessary changes on Kconfig to enable multiplatform build.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/Kconfig | 22 | ||||
-rw-r--r-- | arch/arm/mach-mxs/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-mxs/Makefile.boot | 1 | ||||
-rw-r--r-- | arch/arm/mach-mxs/include/mach/timex.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-mxs/include/mach/uncompress.h | 76 |
5 files changed, 13 insertions, 109 deletions
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index ecc431909d6f..02e693537f36 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -1,5 +1,3 @@ | |||
1 | if ARCH_MXS | ||
2 | |||
3 | config SOC_IMX23 | 1 | config SOC_IMX23 |
4 | bool | 2 | bool |
5 | select ARM_AMBA | 3 | select ARM_AMBA |
@@ -15,14 +13,18 @@ config SOC_IMX28 | |||
15 | select HAVE_PWM | 13 | select HAVE_PWM |
16 | select PINCTRL_IMX28 | 14 | select PINCTRL_IMX28 |
17 | 15 | ||
18 | comment "MXS platforms:" | 16 | config ARCH_MXS |
19 | 17 | bool "Freescale MXS (i.MX23, i.MX28) support" | |
20 | config MACH_MXS_DT | 18 | depends on ARCH_MULTI_V5 |
21 | bool "Support MXS platforms from device tree" | 19 | select ARCH_REQUIRE_GPIOLIB |
20 | select CLKDEV_LOOKUP | ||
21 | select CLKSRC_MMIO | ||
22 | select CLKSRC_OF | ||
23 | select GENERIC_CLOCKEVENTS | ||
24 | select HAVE_CLK_PREPARE | ||
25 | select PINCTRL | ||
22 | select SOC_IMX23 | 26 | select SOC_IMX23 |
23 | select SOC_IMX28 | 27 | select SOC_IMX28 |
28 | select STMP_DEVICE | ||
24 | help | 29 | help |
25 | Include support for Freescale MXS platforms(i.MX23 and i.MX28) | 30 | Support for Freescale MXS-based family of processors |
26 | using the device tree for discovery | ||
27 | |||
28 | endif | ||
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile index 80db7269760e..cc2bf6748ade 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile | |||
@@ -1,2 +1,2 @@ | |||
1 | obj-$(CONFIG_PM) += pm.o | 1 | obj-$(CONFIG_PM) += pm.o |
2 | obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o | 2 | obj-$(CONFIG_ARCH_MXS) += mach-mxs.o |
diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot deleted file mode 100644 index 07b11fe6453f..000000000000 --- a/arch/arm/mach-mxs/Makefile.boot +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | zreladdr-y += 0x40008000 | ||
diff --git a/arch/arm/mach-mxs/include/mach/timex.h b/arch/arm/mach-mxs/include/mach/timex.h deleted file mode 100644 index 734ce8984a64..000000000000 --- a/arch/arm/mach-mxs/include/mach/timex.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999 ARM Limited | ||
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef __MACH_MXS_TIMEX_H__ | ||
17 | #define __MACH_MXS_TIMEX_H__ | ||
18 | |||
19 | #define CLOCK_TICK_RATE 32000 /* 32K */ | ||
20 | |||
21 | #endif /* __MACH_MXS_TIMEX_H__ */ | ||
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h deleted file mode 100644 index 533f5186e200..000000000000 --- a/arch/arm/mach-mxs/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mxs/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) Shane Nay (shane@minirl.com) | ||
6 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | #ifndef __MACH_MXS_UNCOMPRESS_H__ | ||
19 | #define __MACH_MXS_UNCOMPRESS_H__ | ||
20 | |||
21 | unsigned long mxs_duart_base; | ||
22 | |||
23 | #define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x))) | ||
24 | |||
25 | #define MXS_DUART_DR 0x00 | ||
26 | #define MXS_DUART_FR 0x18 | ||
27 | #define MXS_DUART_FR_TXFE (1 << 7) | ||
28 | #define MXS_DUART_CR 0x30 | ||
29 | #define MXS_DUART_CR_UARTEN (1 << 0) | ||
30 | |||
31 | /* | ||
32 | * The following code assumes the serial port has already been | ||
33 | * initialized by the bootloader. If it's not, the output is | ||
34 | * simply discarded. | ||
35 | */ | ||
36 | |||
37 | static void putc(int ch) | ||
38 | { | ||
39 | if (!mxs_duart_base) | ||
40 | return; | ||
41 | if (!(MXS_DUART(MXS_DUART_CR) & MXS_DUART_CR_UARTEN)) | ||
42 | return; | ||
43 | |||
44 | while (!(MXS_DUART(MXS_DUART_FR) & MXS_DUART_FR_TXFE)) | ||
45 | barrier(); | ||
46 | |||
47 | MXS_DUART(MXS_DUART_DR) = ch; | ||
48 | } | ||
49 | |||
50 | static inline void flush(void) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | #define MX23_DUART_BASE_ADDR 0x80070000 | ||
55 | #define MX28_DUART_BASE_ADDR 0x80074000 | ||
56 | #define MXS_DIGCTL_CHIPID 0x8001c310 | ||
57 | |||
58 | static inline void __arch_decomp_setup(unsigned long arch_id) | ||
59 | { | ||
60 | u16 chipid = (*(volatile unsigned long *) MXS_DIGCTL_CHIPID) >> 16; | ||
61 | |||
62 | switch (chipid) { | ||
63 | case 0x3780: | ||
64 | mxs_duart_base = MX23_DUART_BASE_ADDR; | ||
65 | break; | ||
66 | case 0x2800: | ||
67 | mxs_duart_base = MX28_DUART_BASE_ADDR; | ||
68 | break; | ||
69 | default: | ||
70 | break; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | #define arch_decomp_setup() __arch_decomp_setup(arch_id) | ||
75 | |||
76 | #endif /* __MACH_MXS_UNCOMPRESS_H__ */ | ||