aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-02-12 18:31:57 -0500
committerOlof Johansson <olof@lixom.net>2013-02-12 18:31:57 -0500
commit02ea21331e6e516b30eff563b98c742e9cadb373 (patch)
treedb4c66a3f61d70efc5af0415a8af7c935ddac9f0
parent836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff)
parent5af044f472501c8e9bd6bb274fb3d71d07a038cd (diff)
Merge tag 'omap-for-v3.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into late/omap
From Tony Lindgren: am33xx specific updates for restart and revision detection. Also get rid of OMAP_32K_TIMER_HZ as that no longer is needed. * tag 'omap-for-v3.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2: AM33XX: id: Add support for AM335x PG2.0 ARM: OMAP2+: Get rid of custom OMAP_32K_TIMER_HZ ARM: OMAP2+: AM33xx: Add SoC specific restart hook
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/am33xx-restart.c34
-rw-r--r--arch/arm/mach-omap2/board-generic.c1
-rw-r--r--arch/arm/mach-omap2/common.h8
-rw-r--r--arch/arm/mach-omap2/id.c14
-rw-r--r--arch/arm/mach-omap2/soc.h1
-rw-r--r--arch/arm/plat-omap/Kconfig9
-rw-r--r--arch/arm/plat-omap/include/plat/timex.h8
9 files changed, 57 insertions, 20 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 67874b82a4ed..c407edb43fe4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1650,7 +1650,6 @@ config HZ
1650 int 1650 int
1651 default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \ 1651 default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \
1652 ARCH_S5PV210 || ARCH_EXYNOS4 1652 ARCH_S5PV210 || ARCH_EXYNOS4
1653 default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
1654 default AT91_TIMER_HZ if ARCH_AT91 1653 default AT91_TIMER_HZ if ARCH_AT91
1655 default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE 1654 default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE
1656 default 100 1655 default 100
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 947cafe65aef..d1156cfa9745 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -53,6 +53,7 @@ AFLAGS_sram34xx.o :=-Wa,-march=armv7-a
53# Restart code (OMAP4/5 currently in omap4-common.c) 53# Restart code (OMAP4/5 currently in omap4-common.c)
54obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o 54obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o
55obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o 55obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o
56obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o
56obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o 57obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
57 58
58# Pin multiplexing 59# Pin multiplexing
diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c
new file mode 100644
index 000000000000..88e4fa8af031
--- /dev/null
+++ b/arch/arm/mach-omap2/am33xx-restart.c
@@ -0,0 +1,34 @@
1/*
2 * am33xx-restart.c - Code common to all AM33xx machines.
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#include <linux/kernel.h>
9
10#include "common.h"
11#include "prm-regbits-33xx.h"
12#include "prm33xx.h"
13
14/**
15 * am3xx_restart - trigger a software restart of the SoC
16 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
17 * @cmd: passed from the userspace program rebooting the system (if provided)
18 *
19 * Resets the SoC. For @cmd, see the 'reboot' syscall in
20 * kernel/sys.c. No return value.
21 */
22void am33xx_restart(char mode, const char *cmd)
23{
24 /* TODO: Handle mode and cmd if necessary */
25
26 am33xx_prm_rmw_reg_bits(AM33XX_GLOBAL_WARM_SW_RST_MASK,
27 AM33XX_GLOBAL_WARM_SW_RST_MASK,
28 AM33XX_PRM_DEVICE_MOD,
29 AM33XX_PRM_RSTCTRL_OFFSET);
30
31 /* OCP barrier */
32 (void)am33xx_prm_read_reg(AM33XX_PRM_DEVICE_MOD,
33 AM33XX_PRM_RSTCTRL_OFFSET);
34}
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 53cb380b7877..fac00f0960be 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -141,6 +141,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
141 .init_machine = omap_generic_init, 141 .init_machine = omap_generic_init,
142 .timer = &omap3_am33xx_timer, 142 .timer = &omap3_am33xx_timer,
143 .dt_compat = am33xx_boards_compat, 143 .dt_compat = am33xx_boards_compat,
144 .restart = am33xx_restart,
144MACHINE_END 145MACHINE_END
145#endif 146#endif
146 147
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 948bcaa82eb6..0c3a991a240e 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -119,6 +119,14 @@ static inline void omap2xxx_restart(char mode, const char *cmd)
119} 119}
120#endif 120#endif
121 121
122#ifdef CONFIG_SOC_AM33XX
123void am33xx_restart(char mode, const char *cmd);
124#else
125static inline void am33xx_restart(char mode, const char *cmd)
126{
127}
128#endif
129
122#ifdef CONFIG_ARCH_OMAP3 130#ifdef CONFIG_ARCH_OMAP3
123void omap3xxx_restart(char mode, const char *cmd); 131void omap3xxx_restart(char mode, const char *cmd);
124#else 132#else
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 45cc7ed4dd58..8a68f1ec66b9 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -399,8 +399,18 @@ void __init omap3xxx_check_revision(void)
399 } 399 }
400 break; 400 break;
401 case 0xb944: 401 case 0xb944:
402 omap_revision = AM335X_REV_ES1_0; 402 switch (rev) {
403 cpu_rev = "1.0"; 403 case 0:
404 omap_revision = AM335X_REV_ES1_0;
405 cpu_rev = "1.0";
406 break;
407 case 1:
408 /* FALLTHROUGH */
409 default:
410 omap_revision = AM335X_REV_ES2_0;
411 cpu_rev = "2.0";
412 break;
413 }
404 break; 414 break;
405 case 0xb8f2: 415 case 0xb8f2:
406 switch (rev) { 416 switch (rev) {
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index f31d90774de0..15e959111e23 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -387,6 +387,7 @@ IS_OMAP_TYPE(3430, 0x3430)
387 387
388#define AM335X_CLASS 0x33500033 388#define AM335X_CLASS 0x33500033
389#define AM335X_REV_ES1_0 AM335X_CLASS 389#define AM335X_REV_ES1_0 AM335X_CLASS
390#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8))
390 391
391#define OMAP443X_CLASS 0x44300044 392#define OMAP443X_CLASS 0x44300044
392#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) 393#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 665870dce3c8..1fbac364bd4c 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -177,15 +177,6 @@ config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
177 help 177 help
178 PPA routine service ID for setting L2 auxiliary control register. 178 PPA routine service ID for setting L2 auxiliary control register.
179 179
180config OMAP_32K_TIMER_HZ
181 int "Kernel internal timer frequency for 32KHz timer"
182 range 32 1024
183 depends on OMAP_32K_TIMER
184 default "128"
185 help
186 Kernel internal timer frequency should be a divisor of 32768,
187 such as 64 or 128.
188
189config OMAP_DM_TIMER 180config OMAP_DM_TIMER
190 bool "Use dual-mode timer" 181 bool "Use dual-mode timer"
191 depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS 182 depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
diff --git a/arch/arm/plat-omap/include/plat/timex.h b/arch/arm/plat-omap/include/plat/timex.h
index 6d35767bc48f..e27d2daa7790 100644
--- a/arch/arm/plat-omap/include/plat/timex.h
+++ b/arch/arm/plat-omap/include/plat/timex.h
@@ -28,14 +28,6 @@
28#if !defined(__ASM_ARCH_OMAP_TIMEX_H) 28#if !defined(__ASM_ARCH_OMAP_TIMEX_H)
29#define __ASM_ARCH_OMAP_TIMEX_H 29#define __ASM_ARCH_OMAP_TIMEX_H
30 30
31/*
32 * OMAP 32KHz timer updates time one jiffie at a time from a secondary timer,
33 * and that's why the CLOCK_TICK_RATE is not 32768.
34 */
35#ifdef CONFIG_OMAP_32K_TIMER
36#define CLOCK_TICK_RATE (CONFIG_OMAP_32K_TIMER_HZ)
37#else
38#define CLOCK_TICK_RATE (HZ * 100000UL) 31#define CLOCK_TICK_RATE (HZ * 100000UL)
39#endif
40 32
41#endif /* __ASM_ARCH_OMAP_TIMEX_H */ 33#endif /* __ASM_ARCH_OMAP_TIMEX_H */