aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-03-29 04:25:43 -0400
committerShawn Guo <shawn.guo@linaro.org>2013-04-04 09:15:58 -0400
commitd696e3f6585ddeb7bddbf0783b649fa669459a5c (patch)
tree42a08a0df82fa61f7e3764e42a5120af0d239bba
parente91411b44d54db96c3d2d365b195b112e513d4ba (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>
-rw-r--r--arch/arm/Kconfig17
-rw-r--r--arch/arm/configs/mxs_defconfig2
-rw-r--r--arch/arm/mach-mxs/Kconfig22
-rw-r--r--arch/arm/mach-mxs/Makefile2
-rw-r--r--arch/arm/mach-mxs/Makefile.boot1
-rw-r--r--arch/arm/mach-mxs/include/mach/timex.h21
-rw-r--r--arch/arm/mach-mxs/include/mach/uncompress.h76
7 files changed, 14 insertions, 127 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e4386cba23c..31ca6527421e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -468,23 +468,6 @@ config ARCH_FOOTBRIDGE
468 Support for systems based on the DC21285 companion chip 468 Support for systems based on the DC21285 companion chip
469 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. 469 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
470 470
471config ARCH_MXS
472 bool "Freescale MXS-based"
473 select ARCH_REQUIRE_GPIOLIB
474 select CLKDEV_LOOKUP
475 select CLKSRC_MMIO
476 select CLKSRC_OF
477 select COMMON_CLK
478 select GENERIC_CLOCKEVENTS
479 select HAVE_CLK_PREPARE
480 select MULTI_IRQ_HANDLER
481 select PINCTRL
482 select SPARSE_IRQ
483 select STMP_DEVICE
484 select USE_OF
485 help
486 Support for Freescale MXS-based family of processors
487
488config ARCH_NETX 471config ARCH_NETX
489 bool "Hilscher NetX based" 472 bool "Hilscher NetX based"
490 select ARM_VIC 473 select ARM_VIC
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index 6a99e30f81d2..023c4e148634 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -22,8 +22,8 @@ CONFIG_MODVERSIONS=y
22CONFIG_BLK_DEV_INTEGRITY=y 22CONFIG_BLK_DEV_INTEGRITY=y
23# CONFIG_IOSCHED_DEADLINE is not set 23# CONFIG_IOSCHED_DEADLINE is not set
24# CONFIG_IOSCHED_CFQ is not set 24# CONFIG_IOSCHED_CFQ is not set
25# CONFIG_ARCH_MULTI_V7 is not set
25CONFIG_ARCH_MXS=y 26CONFIG_ARCH_MXS=y
26CONFIG_MACH_MXS_DT=y
27# CONFIG_ARM_THUMB is not set 27# CONFIG_ARM_THUMB is not set
28CONFIG_PREEMPT_VOLUNTARY=y 28CONFIG_PREEMPT_VOLUNTARY=y
29CONFIG_AEABI=y 29CONFIG_AEABI=y
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 @@
1if ARCH_MXS
2
3config SOC_IMX23 1config 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
18comment "MXS platforms:" 16config ARCH_MXS
19 17 bool "Freescale MXS (i.MX23, i.MX28) support"
20config 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
28endif
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 @@
1obj-$(CONFIG_PM) += pm.o 1obj-$(CONFIG_PM) += pm.o
2obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o 2obj-$(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 @@
1zreladdr-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
21unsigned 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
37static 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
50static 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
58static 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__ */