diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 09:57:59 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 10:02:41 -0400 |
commit | d93bea007ab3d77b796eb99fb4ff4eeb013e0dfa (patch) | |
tree | fa4f48cd3b0efc23f2378caa1c8eb28d0ba0a4db /arch/arm | |
parent | 71f6424023cb9fa381efc7237ca05926b2b1ca9a (diff) | |
parent | d696e3f6585ddeb7bddbf0783b649fa669459a5c (diff) |
Merge tag 'mxs-multiplatform-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/multiplatform
From Shawn Guo <shawn.guo@linaro.org>:
The mxs multiplatform support for 3.10:
* It enables the multiplatform build for mach-mxs platform.
* tag 'mxs-multiplatform-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6:
ARM: mxs: enable multiplatform build
ARM: mxs: rename debug-macro.S for multiplatform build
ARM: mxs: call mxs_pm_init() as a machine_desc hook
Conflicts:
arch/arm/Kconfig.debug
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 17 | ||||
-rw-r--r-- | arch/arm/Kconfig.debug | 1 | ||||
-rw-r--r-- | arch/arm/configs/mxs_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/include/debug/mxs.S (renamed from arch/arm/mach-mxs/include/mach/debug-macro.S) | 0 | ||||
-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 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mxs/pm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mxs/pm.h | 14 |
12 files changed, 33 insertions, 130 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 74d8d4f66109..65aa5ef17734 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -422,23 +422,6 @@ config ARCH_FOOTBRIDGE | |||
422 | Support for systems based on the DC21285 companion chip | 422 | Support for systems based on the DC21285 companion chip |
423 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 423 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
424 | 424 | ||
425 | config ARCH_MXS | ||
426 | bool "Freescale MXS-based" | ||
427 | select ARCH_REQUIRE_GPIOLIB | ||
428 | select CLKDEV_LOOKUP | ||
429 | select CLKSRC_MMIO | ||
430 | select CLKSRC_OF | ||
431 | select COMMON_CLK | ||
432 | select GENERIC_CLOCKEVENTS | ||
433 | select HAVE_CLK_PREPARE | ||
434 | select MULTI_IRQ_HANDLER | ||
435 | select PINCTRL | ||
436 | select SPARSE_IRQ | ||
437 | select STMP_DEVICE | ||
438 | select USE_OF | ||
439 | help | ||
440 | Support for Freescale MXS-based family of processors | ||
441 | |||
442 | config ARCH_NETX | 425 | config ARCH_NETX |
443 | bool "Hilscher NetX based" | 426 | bool "Hilscher NetX based" |
444 | select ARM_VIC | 427 | select ARM_VIC |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index edb496b656b1..e00bd4d4ab63 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -618,6 +618,7 @@ config DEBUG_LL_INCLUDE | |||
618 | DEBUG_IMX6Q_UART | 618 | DEBUG_IMX6Q_UART |
619 | default "debug/highbank.S" if DEBUG_HIGHBANK_UART | 619 | default "debug/highbank.S" if DEBUG_HIGHBANK_UART |
620 | default "debug/mvebu.S" if DEBUG_MVEBU_UART | 620 | default "debug/mvebu.S" if DEBUG_MVEBU_UART |
621 | default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART | ||
621 | default "debug/nomadik.S" if DEBUG_NOMADIK_UART | 622 | default "debug/nomadik.S" if DEBUG_NOMADIK_UART |
622 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART | 623 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART |
623 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART | 624 | default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART |
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 | |||
22 | CONFIG_BLK_DEV_INTEGRITY=y | 22 | CONFIG_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 | ||
25 | CONFIG_ARCH_MXS=y | 26 | CONFIG_ARCH_MXS=y |
26 | CONFIG_MACH_MXS_DT=y | ||
27 | # CONFIG_ARM_THUMB is not set | 27 | # CONFIG_ARM_THUMB is not set |
28 | CONFIG_PREEMPT_VOLUNTARY=y | 28 | CONFIG_PREEMPT_VOLUNTARY=y |
29 | CONFIG_AEABI=y | 29 | CONFIG_AEABI=y |
diff --git a/arch/arm/mach-mxs/include/mach/debug-macro.S b/arch/arm/include/debug/mxs.S index d86951551ca1..d86951551ca1 100644 --- a/arch/arm/mach-mxs/include/mach/debug-macro.S +++ b/arch/arm/include/debug/mxs.S | |||
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__ */ | ||
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 16870bf853b8..b5c1bdd3dcdf 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
33 | #include <asm/system_misc.h> | 33 | #include <asm/system_misc.h> |
34 | 34 | ||
35 | #include "pm.h" | ||
36 | |||
35 | /* MXS DIGCTL SAIF CLKMUX */ | 37 | /* MXS DIGCTL SAIF CLKMUX */ |
36 | #define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0 | 38 | #define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0 |
37 | #define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1 | 39 | #define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1 |
@@ -607,6 +609,7 @@ DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") | |||
607 | .handle_irq = icoll_handle_irq, | 609 | .handle_irq = icoll_handle_irq, |
608 | .init_time = mxs_timer_init, | 610 | .init_time = mxs_timer_init, |
609 | .init_machine = mxs_machine_init, | 611 | .init_machine = mxs_machine_init, |
612 | .init_late = mxs_pm_init, | ||
610 | .dt_compat = mxs_dt_compat, | 613 | .dt_compat = mxs_dt_compat, |
611 | .restart = mxs_restart, | 614 | .restart = mxs_restart, |
612 | MACHINE_END | 615 | MACHINE_END |
diff --git a/arch/arm/mach-mxs/pm.c b/arch/arm/mach-mxs/pm.c index a9b4bbcdafb4..b2494d2db2c4 100644 --- a/arch/arm/mach-mxs/pm.c +++ b/arch/arm/mach-mxs/pm.c | |||
@@ -34,9 +34,7 @@ static struct platform_suspend_ops mxs_suspend_ops = { | |||
34 | .valid = suspend_valid_only_mem, | 34 | .valid = suspend_valid_only_mem, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static int __init mxs_pm_init(void) | 37 | void __init mxs_pm_init(void) |
38 | { | 38 | { |
39 | suspend_set_ops(&mxs_suspend_ops); | 39 | suspend_set_ops(&mxs_suspend_ops); |
40 | return 0; | ||
41 | } | 40 | } |
42 | device_initcall(mxs_pm_init); | ||
diff --git a/arch/arm/mach-mxs/pm.h b/arch/arm/mach-mxs/pm.h new file mode 100644 index 000000000000..f57e7cdece2e --- /dev/null +++ b/arch/arm/mach-mxs/pm.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ARCH_MXS_PM_H | ||
10 | #define __ARCH_MXS_PM_H | ||
11 | |||
12 | void mxs_pm_init(void); | ||
13 | |||
14 | #endif | ||