* [PATCH 42/51] ARM: mach-u300: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates mach-u300 to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mach-u300/Makefile | 2 +-
arch/arm/mach-u300/include/mach/system.h | 26 +-----------------
arch/arm/mach-u300/reset.c | 42 ++++++++++++++++++++++++++++++
3 files changed, 44 insertions(+), 26 deletions(-)
create mode 100644 arch/arm/mach-u300/reset.c
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile
index 8fd354a..599f4eb 100644
--- a/arch/arm/mach-u300/Makefile
+++ b/arch/arm/mach-u300/Makefile
@@ -2,7 +2,7 @@
# Makefile for the linux kernel, U300 machine.
#
-obj-y := core.o clock.o timer.o padmux.o
+obj-y := core.o clock.o timer.o padmux.o reset.o
obj-m :=
obj-n :=
obj- :=
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 8daf136..0ddf3cd 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -8,35 +8,11 @@
* System shutdown and reset functions.
* Author: Linus Walleij <linus.walleij@stericsson.com>
*/
-#include <mach/hardware.h>
-#include <asm/io.h>
-#include <asm/hardware/vic.h>
-#include <asm/irq.h>
-
-/* Forward declare this function from the watchdog */
-void coh901327_watchdog_reset(void);
-
static inline void arch_idle(void)
{
cpu_do_idle();
}
-static void arch_reset(char mode, const char *cmd)
+static inline void arch_reset(char mode, const char *cmd)
{
- switch (mode) {
- case 's':
- case 'h':
- printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
- /* Disable interrupts */
- local_irq_disable();
-#ifdef CONFIG_COH901327_WATCHDOG
- coh901327_watchdog_reset();
-#endif
- break;
- default:
- /* Do nothing */
- break;
- }
- /* Wait for system do die/reset. */
- while (1);
}
diff --git a/arch/arm/mach-u300/reset.c b/arch/arm/mach-u300/reset.c
new file mode 100644
index 0000000..607e7f8
--- /dev/null
+++ b/arch/arm/mach-u300/reset.c
@@ -0,0 +1,42 @@
+/*
+ * arch/arm/mach-u300/reset.c
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+
+#include <mach/hardware.h>
+
+#include <asm/io.h>
+#include <asm/hardware/vic.h>
+#include <asm/irq.h>
+
+/* Forward declare this function from the watchdog */
+void coh901327_watchdog_reset(void);
+
+static void u300_arch_reset(char mode, const char *cmd)
+{
+ switch (mode) {
+ case 's':
+ case 'h':
+ printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
+ /* Disable interrupts */
+ local_irq_disable();
+#ifdef CONFIG_COH901327_WATCHDOG
+ coh901327_watchdog_reset();
+#endif
+ break;
+ default:
+ /* Do nothing */
+ break;
+ }
+ /* Wait for system do die/reset. */
+ while (1);
+}
+
+static int __init u300_arch_reset_init(void)
+{
+ arm_arch_reset = u300_arch_reset;
+ return 0;
+}
+arch_initcall(u300_arch_reset_init);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 43/51] ARM: mach-versatile: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates mach-versatile to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mach-versatile/core.c | 14 ++++++++++++++
arch/arm/mach-versatile/include/mach/system.h | 8 --------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index e340a54..5d97b6e 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -756,6 +756,18 @@ void __init versatile_init_early(void)
versatile_sched_clock_init(sys + VERSATILE_SYS_24MHz_OFFSET, 24000000);
}
+static void versatile_arch_reset(char mode, const char *cmd)
+{
+ u32 val;
+
+ val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
+ val |= 0x105;
+
+ __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
+ __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
+ __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
+}
+
void __init versatile_init(void)
{
int i;
@@ -773,6 +785,8 @@ void __init versatile_init(void)
#ifdef CONFIG_LEDS
leds_event = versatile_leds_event;
#endif
+
+ arm_arch_reset = versatile_arch_reset;
}
/*
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
index 8ffc12a..ebc6348 100644
--- a/arch/arm/mach-versatile/include/mach/system.h
+++ b/arch/arm/mach-versatile/include/mach/system.h
@@ -36,14 +36,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
- u32 val;
-
- val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
- val |= 0x105;
-
- __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
- __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
- __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
}
#endif
--
1.7.4.1
^ permalink raw reply related
* [PATCH 44/51] ARM: mach-vt8500: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates mach-vt8500 to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mach-vt8500/Makefile | 2 +-
arch/arm/mach-vt8500/include/mach/system.h | 5 -----
arch/arm/mach-vt8500/reset.c | 21 +++++++++++++++++++++
3 files changed, 22 insertions(+), 6 deletions(-)
create mode 100644 arch/arm/mach-vt8500/reset.c
diff --git a/arch/arm/mach-vt8500/Makefile b/arch/arm/mach-vt8500/Makefile
index 81aedb7..1932b82 100644
--- a/arch/arm/mach-vt8500/Makefile
+++ b/arch/arm/mach-vt8500/Makefile
@@ -1,4 +1,4 @@
-obj-y += devices.o gpio.o irq.o timer.o
+obj-y += devices.o gpio.o irq.o reset.o timer.o
obj-$(CONFIG_VTWM_VERSION_VT8500) += devices-vt8500.o
obj-$(CONFIG_VTWM_VERSION_WM8505) += devices-wm8505.o
diff --git a/arch/arm/mach-vt8500/include/mach/system.h b/arch/arm/mach-vt8500/include/mach/system.h
index d6c757e..4bbcce4 100644
--- a/arch/arm/mach-vt8500/include/mach/system.h
+++ b/arch/arm/mach-vt8500/include/mach/system.h
@@ -2,10 +2,6 @@
* arch/arm/mach-vt8500/include/mach/system.h
*
*/
-#include <asm/io.h>
-
-/* PM Software Reset request register */
-#define VT8500_PMSR_VIRT 0xf8130060
static inline void arch_idle(void)
{
@@ -14,5 +10,4 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
- writel(1, VT8500_PMSR_VIRT);
}
diff --git a/arch/arm/mach-vt8500/reset.c b/arch/arm/mach-vt8500/reset.c
new file mode 100644
index 0000000..631721a
--- /dev/null
+++ b/arch/arm/mach-vt8500/reset.c
@@ -0,0 +1,21 @@
+/*
+ * arch/arm/mach-vt8500/reset.c
+ */
+
+#include <linux/init.h>
+#include <asm/io.h>
+
+/* PM Software Reset request register */
+#define VT8500_PMSR_VIRT 0xf8130060
+
+static void vt8500_arch_reset(char mode, const char *cmd)
+{
+ writel(1, VT8500_PMSR_VIRT);
+}
+
+static int __init vt8500_arch_reset_init(void)
+{
+ arm_arch_reset = vt8500_arch_reset;
+ return 0;
+}
+arch_initcall(vt8500_arch_reset_init);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 45/51] ARM: mach-w90x900: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates mach-w90x900 to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mach-w90x900/Makefile | 2 +-
arch/arm/mach-w90x900/include/mach/system.h | 19 +---------------
arch/arm/mach-w90x900/reset.c | 31 +++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 19 deletions(-)
create mode 100644 arch/arm/mach-w90x900/reset.c
diff --git a/arch/arm/mach-w90x900/Makefile b/arch/arm/mach-w90x900/Makefile
index 828c032..e771d1b 100644
--- a/arch/arm/mach-w90x900/Makefile
+++ b/arch/arm/mach-w90x900/Makefile
@@ -5,7 +5,7 @@
# Object file lists.
obj-y := irq.o time.o mfp.o gpio.o clock.o
-obj-y += clksel.o dev.o cpu.o
+obj-y += clksel.o dev.o cpu.o reset.o
# W90X900 CPU support files
obj-$(CONFIG_CPU_W90P910) += nuc910.o
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
index ce228bd..ed3478b 100644
--- a/arch/arm/mach-w90x900/include/mach/system.h
+++ b/arch/arm/mach-w90x900/include/mach/system.h
@@ -15,27 +15,10 @@
*
*/
-#include <linux/io.h>
-#include <asm/proc-fns.h>
-#include <mach/map.h>
-#include <mach/regs-timer.h>
-
-#define WTCR (TMR_BA + 0x1C)
-#define WTCLK (1 << 10)
-#define WTE (1 << 7)
-#define WTRE (1 << 1)
-
static void arch_idle(void)
{
}
-static void arch_reset(char mode, const char *cmd)
+static inline void arch_reset(char mode, const char *cmd)
{
- if (mode == 's') {
- /* Jump into ROM@address 0 */
- cpu_reset(0);
- } else {
- __raw_writel(WTE | WTRE | WTCLK, WTCR);
- }
}
-
diff --git a/arch/arm/mach-w90x900/reset.c b/arch/arm/mach-w90x900/reset.c
new file mode 100644
index 0000000..08f1953
--- /dev/null
+++ b/arch/arm/mach-w90x900/reset.c
@@ -0,0 +1,31 @@
+/*
+ * arch/arm/mach-w90x900/reset.c
+ */
+
+#include <linux/init.h>
+#include <linux/io.h>
+#include <asm/proc-fns.h>
+#include <mach/map.h>
+#include <mach/regs-timer.h>
+
+#define WTCR (TMR_BA + 0x1C)
+#define WTCLK (1 << 10)
+#define WTE (1 << 7)
+#define WTRE (1 << 1)
+
+static void w90x900_arch_reset(char mode, const char *cmd)
+{
+ if (mode == 's') {
+ /* Jump into ROM@address 0 */
+ cpu_reset(0);
+ } else {
+ __raw_writel(WTE | WTRE | WTCLK, WTCR);
+ }
+}
+
+static int __init w90x900_arch_reset_init(void)
+{
+ arm_arch_reset = w90x900_arch_reset;
+ return 0;
+}
+arch_initcall(w90x900_arch_reset_init);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 46/51] ARM: plat-spear: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates plat-spear to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/plat-spear/Makefile | 2 +-
arch/arm/plat-spear/include/plat/system.h | 11 -----------
arch/arm/plat-spear/reset.c | 29 +++++++++++++++++++++++++++++
3 files changed, 30 insertions(+), 12 deletions(-)
create mode 100644 arch/arm/plat-spear/reset.c
diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile
index b4f340b..cb70a42 100644
--- a/arch/arm/plat-spear/Makefile
+++ b/arch/arm/plat-spear/Makefile
@@ -3,6 +3,6 @@
#
# Common support
-obj-y := clock.o time.o
+obj-y := clock.o reset.o time.o
obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o padmux.o
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
index a235fa0..4a0d125 100644
--- a/arch/arm/plat-spear/include/plat/system.h
+++ b/arch/arm/plat-spear/include/plat/system.h
@@ -14,10 +14,6 @@
#ifndef __PLAT_SYSTEM_H
#define __PLAT_SYSTEM_H
-#include <linux/io.h>
-#include <asm/hardware/sp810.h>
-#include <mach/hardware.h>
-
static inline void arch_idle(void)
{
/*
@@ -29,13 +25,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
- if (mode == 's') {
- /* software reset, Jump into ROM at address 0 */
- cpu_reset(0);
- } else {
- /* hardware reset, Use on-chip reset capability */
- sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
- }
}
#endif /* __PLAT_SYSTEM_H */
diff --git a/arch/arm/plat-spear/reset.c b/arch/arm/plat-spear/reset.c
new file mode 100644
index 0000000..607efb3
--- /dev/null
+++ b/arch/arm/plat-spear/reset.c
@@ -0,0 +1,29 @@
+/*
+ * arch/arm/plat-spear/reset.c
+ */
+
+#include <linux/init.h>
+#include <linux/io.h>
+
+#include <asm/proc-fns.h>
+#include <asm/hardware/sp810.h>
+
+#include <mach/hardware.h>
+
+static void spear_arch_reset(char mode, const char *cmd)
+{
+ if (mode == 's') {
+ /* software reset, Jump into ROM at address 0 */
+ cpu_reset(0);
+ } else {
+ /* hardware reset, Use on-chip reset capability */
+ sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);
+ }
+}
+
+static int __init spear_arch_reset_init(void)
+{
+ arm_arch_reset = spear_arch_reset;
+ return 0;
+}
+arch_initcall(spear_arch_reset_init);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 47/51] ARM: plat-tcc: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates plat-tcc to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/plat-tcc/include/mach/system.h | 5 -----
arch/arm/plat-tcc/system.c | 10 +++++++++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/arm/plat-tcc/include/mach/system.h b/arch/arm/plat-tcc/include/mach/system.h
index 909e603..e97ae31 100644
--- a/arch/arm/plat-tcc/include/mach/system.h
+++ b/arch/arm/plat-tcc/include/mach/system.h
@@ -11,10 +11,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-#include <linux/clk.h>
-
-#include <asm/mach-types.h>
-#include <mach/hardware.h>
extern void plat_tcc_reboot(void);
@@ -25,7 +21,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
- plat_tcc_reboot();
}
#endif
diff --git a/arch/arm/plat-tcc/system.c b/arch/arm/plat-tcc/system.c
index cc208fa..c3badd5 100644
--- a/arch/arm/plat-tcc/system.c
+++ b/arch/arm/plat-tcc/system.c
@@ -7,12 +7,13 @@
*
*/
+#include <linux/init.h>
#include <linux/io.h>
#include <mach/tcc8k-regs.h>
/* System reboot */
-void plat_tcc_reboot(void)
+static void plat_tcc_reboot(char mode, const char *cmd)
{
/* Make sure clocks are on */
__raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);
@@ -23,3 +24,10 @@ void plat_tcc_reboot(void)
while(1)
;
}
+
+static int __init plat_tcc_reboot_init(void)
+{
+ arm_arch_reset = plat_tcc_reboot;
+ return 0;
+}
+arch_initcall(plat_tcc_reboot);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 48/51] ARM: plat-s5p: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates plat-s5p to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mach-exynos4/include/mach/system.h | 2 --
arch/arm/mach-s5p64x0/include/mach/system.h | 2 --
arch/arm/mach-s5pc100/include/mach/system.h | 2 --
arch/arm/mach-s5pv210/include/mach/system.h | 2 --
arch/arm/plat-s5p/Makefile | 1 +
.../plat/system-reset.h => system-reset.c} | 17 +++++++++++++----
6 files changed, 14 insertions(+), 12 deletions(-)
rename arch/arm/plat-s5p/{include/plat/system-reset.h => system-reset.c} (66%)
diff --git a/arch/arm/mach-exynos4/include/mach/system.h b/arch/arm/mach-exynos4/include/mach/system.h
index 5e3220c..0063a6d 100644
--- a/arch/arm/mach-exynos4/include/mach/system.h
+++ b/arch/arm/mach-exynos4/include/mach/system.h
@@ -13,8 +13,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__
-#include <plat/system-reset.h>
-
static void arch_idle(void)
{
/* nothing here yet */
diff --git a/arch/arm/mach-s5p64x0/include/mach/system.h b/arch/arm/mach-s5p64x0/include/mach/system.h
index 60f5753..cf26e09 100644
--- a/arch/arm/mach-s5p64x0/include/mach/system.h
+++ b/arch/arm/mach-s5p64x0/include/mach/system.h
@@ -13,8 +13,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__
-#include <plat/system-reset.h>
-
static void arch_idle(void)
{
/* nothing here yet */
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h
index a9ea57c..afc96c2 100644
--- a/arch/arm/mach-s5pc100/include/mach/system.h
+++ b/arch/arm/mach-s5pc100/include/mach/system.h
@@ -11,8 +11,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__
-#include <plat/system-reset.h>
-
static void arch_idle(void)
{
/* nothing here yet */
diff --git a/arch/arm/mach-s5pv210/include/mach/system.h b/arch/arm/mach-s5pv210/include/mach/system.h
index af8a200..bf288ce 100644
--- a/arch/arm/mach-s5pv210/include/mach/system.h
+++ b/arch/arm/mach-s5pv210/include/mach/system.h
@@ -13,8 +13,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__
-#include <plat/system-reset.h>
-
static void arch_idle(void)
{
/* nothing here yet */
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
index 4b53e04..2511d58 100644
--- a/arch/arm/plat-s5p/Makefile
+++ b/arch/arm/plat-s5p/Makefile
@@ -16,6 +16,7 @@ obj-y += dev-pmu.o
obj-y += dev-uart.o
obj-y += cpu.o
obj-y += clock.o
+obj-y += system-reset.o
obj-y += irq.o
obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o
obj-$(CONFIG_S5P_GPIO_INT) += irq-gpioint.o
diff --git a/arch/arm/plat-s5p/include/plat/system-reset.h b/arch/arm/plat-s5p/system-reset.c
similarity index 66%
rename from arch/arm/plat-s5p/include/plat/system-reset.h
rename to arch/arm/plat-s5p/system-reset.c
index f307f34..84a38ab 100644
--- a/arch/arm/plat-s5p/include/plat/system-reset.h
+++ b/arch/arm/plat-s5p/system-reset.c
@@ -1,22 +1,24 @@
-/* linux/arch/arm/plat-s5p/include/plat/system-reset.h
+/* linux/arch/arm/plat-s5p/system-reset.c
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* Based on arch/arm/mach-s3c2410/include/mach/system-reset.h
*
- * S5P - System define for arch_reset()
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <asm/system.h>
+
#include <plat/watchdog-reset.h>
void (*s5p_reset_hook)(void);
-static void arch_reset(char mode, const char *cmd)
+static void s5p_arch_reset(char mode, const char *cmd)
{
/* SWRESET support in s5p_reset_hook() */
@@ -29,3 +31,10 @@ static void arch_reset(char mode, const char *cmd)
arch_wdt_reset();
}
+
+static int __init s5p_arch_reset_init(void)
+{
+ arm_arch_reset = s5p_arch_reset;
+ return 0;
+}
+arch_initcall(s5p_arch_reset_init);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 49/51] ARM: plat-mxc: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates plat-mxc to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/plat-mxc/include/mach/system.h | 2 --
arch/arm/plat-mxc/system.c | 3 ++-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
index 51f02a9..0cce970 100644
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
@@ -56,6 +56,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-void arch_reset(char mode, const char *cmd);
-
#endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 8024f2a..107e0a6 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -33,7 +33,7 @@ static void __iomem *wdog_base;
/*
* Reset the system. It is called by machine_restart().
*/
-void arch_reset(char mode, const char *cmd)
+static void mxc_arch_reset(char mode, const char *cmd)
{
unsigned int wcr_enable;
@@ -73,4 +73,5 @@ void arch_reset(char mode, const char *cmd)
void mxc_arch_reset_init(void __iomem *base)
{
wdog_base = base;
+ arm_arch_reset = mxc_arch_reset;
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 50/51] ARM: plat-s3c24xx: use arm_arch_reset instead of arch_reset
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
This patch updates plat-s3c24xx to use arm_arch_reset instead of
arch_reset.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/mach-s3c2410/include/mach/system-reset.h | 32 ---------------------
arch/arm/mach-s3c2410/include/mach/system.h | 2 -
arch/arm/mach-s3c64xx/include/mach/system.h | 2 +-
arch/arm/plat-s3c24xx/cpu.c | 23 +++++++++++++--
4 files changed, 21 insertions(+), 38 deletions(-)
delete mode 100644 arch/arm/mach-s3c2410/include/mach/system-reset.h
diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
deleted file mode 100644
index 6faadce..0000000
--- a/arch/arm/mach-s3c2410/include/mach/system-reset.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/system-reset.h
- *
- * Copyright (c) 2008 Simtec Electronics
- * Ben Dooks <ben@simtec.co.uk>
- *
- * S3C2410 - System define for arch_reset() function
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <mach/hardware.h>
-#include <plat/watchdog-reset.h>
-
-extern void (*s3c24xx_reset_hook)(void);
-
-static void
-arch_reset(char mode, const char *cmd)
-{
- if (mode == 's') {
- cpu_reset(0);
- }
-
- if (s3c24xx_reset_hook)
- s3c24xx_reset_hook();
-
- arch_wdt_reset();
-
- /* we'll take a jump through zero as a poor second */
- cpu_reset(0);
-}
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h
index a8cbca6..a94e7a6 100644
--- a/arch/arm/mach-s3c2410/include/mach/system.h
+++ b/arch/arm/mach-s3c2410/include/mach/system.h
@@ -54,5 +54,3 @@ static void arch_idle(void)
else
s3c24xx_default_idle();
}
-
-#include <mach/system-reset.h>
diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
index 51bc8eb..436a8b3 100644
--- a/arch/arm/mach-s3c64xx/include/mach/system.h
+++ b/arch/arm/mach-s3c64xx/include/mach/system.h
@@ -16,7 +16,7 @@ static void arch_idle(void)
/* nothing here yet */
}
-static void arch_reset(char mode, const char *cmd)
+static inline void arch_reset(char mode, const char *cmd)
{
}
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index c1fc6c6..b8714db 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -38,8 +38,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
-#include <mach/system-reset.h>
-
#include <mach/regs-gpio.h>
#include <plat/regs-serial.h>
@@ -51,6 +49,7 @@
#include <plat/s3c2416.h>
#include <plat/s3c244x.h>
#include <plat/s3c2443.h>
+#include <plat/watchdog-reset.h>
/* table of supported CPUs */
@@ -205,7 +204,7 @@ static void s3c24xx_pm_restart(char mode, const char *cmd)
__cpuc_flush_kern_all();
__cpuc_flush_user_all();
- arch_reset(mode, cmd);
+ arm_arch_reset(mode, cmd);
local_irq_restore(flags);
}
@@ -213,6 +212,23 @@ static void s3c24xx_pm_restart(char mode, const char *cmd)
arm_machine_restart(mode, cmd);
}
+extern void (*s3c24xx_reset_hook)(void);
+
+static void s3c24xx_arch_reset(char mode, const char *cmd)
+{
+ if (mode == 's') {
+ cpu_reset(0);
+ }
+
+ if (s3c24xx_reset_hook)
+ s3c24xx_reset_hook();
+
+ arch_wdt_reset();
+
+ /* we'll take a jump through zero as a poor second */
+ cpu_reset(0);
+}
+
void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
{
unsigned long idcode = 0x0;
@@ -227,6 +243,7 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
idcode = s3c24xx_read_idcode_v4();
}
+ arm_arch_reset = s3c24xx_arch_reset;
arm_pm_restart = s3c24xx_pm_restart;
s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
--
1.7.4.1
^ permalink raw reply related
* [PATCH 51/51] ARM: reset: remove empty arch_reset definitions
From: Will Deacon @ 2011-10-28 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>
arch_reset is now an empty static inline function for all ARM platforms,
so remove it and the temporary_arm_arch_reset function.
I used this very basic Coccinelle script for the platform updates:
@@
@@
- arch_reset(...) { }
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/kernel/process.c | 7 +------
arch/arm/mach-at91/include/mach/system.h | 4 ----
arch/arm/mach-bcmring/include/mach/system.h | 4 ----
arch/arm/mach-clps711x/include/mach/system.h | 4 ----
arch/arm/mach-cns3xxx/include/mach/system.h | 4 ----
arch/arm/mach-davinci/include/mach/system.h | 4 ----
arch/arm/mach-dove/include/mach/system.h | 4 ----
arch/arm/mach-ebsa110/include/mach/system.h | 4 ----
arch/arm/mach-ep93xx/include/mach/system.h | 4 ----
| 4 ----
arch/arm/mach-gemini/include/mach/system.h | 4 ----
arch/arm/mach-h720x/include/mach/system.h | 5 -----
arch/arm/mach-integrator/include/mach/system.h | 4 ----
arch/arm/mach-iop13xx/include/mach/system.h | 4 ----
arch/arm/mach-iop32x/include/mach/system.h | 4 ----
arch/arm/mach-iop33x/include/mach/system.h | 4 ----
arch/arm/mach-ixp2000/include/mach/system.h | 4 ----
arch/arm/mach-ixp23xx/include/mach/system.h | 4 ----
arch/arm/mach-ixp4xx/include/mach/system.h | 5 -----
arch/arm/mach-kirkwood/include/mach/system.h | 4 ----
arch/arm/mach-ks8695/include/mach/system.h | 4 ----
arch/arm/mach-lpc32xx/include/mach/system.h | 4 ----
arch/arm/mach-mmp/include/mach/system.h | 4 ----
arch/arm/mach-msm/include/mach/system.h | 4 ----
arch/arm/mach-mv78xx0/include/mach/system.h | 4 ----
arch/arm/mach-mxs/include/mach/system.h | 4 ----
arch/arm/mach-netx/include/mach/system.h | 4 ----
arch/arm/mach-nomadik/include/mach/system.h | 4 ----
arch/arm/mach-nuc93x/include/mach/system.h | 4 ----
arch/arm/mach-orion5x/include/mach/system.h | 4 ----
arch/arm/mach-pnx4008/include/mach/system.h | 4 ----
arch/arm/mach-prima2/include/mach/system.h | 4 ----
arch/arm/mach-pxa/include/mach/system.h | 5 -----
arch/arm/mach-realview/include/mach/system.h | 4 ----
arch/arm/mach-rpc/include/mach/system.h | 4 ----
arch/arm/mach-s3c64xx/include/mach/system.h | 4 ----
arch/arm/mach-sa1100/include/mach/system.h | 4 ----
arch/arm/mach-shark/include/mach/system.h | 3 ---
arch/arm/mach-shmobile/include/mach/system.h | 4 ----
arch/arm/mach-tegra/include/mach/system.h | 3 ---
arch/arm/mach-u300/include/mach/system.h | 4 ----
arch/arm/mach-ux500/include/mach/system.h | 5 -----
arch/arm/mach-versatile/include/mach/system.h | 4 ----
arch/arm/mach-vexpress/include/mach/system.h | 4 ----
arch/arm/mach-vt8500/include/mach/system.h | 4 ----
arch/arm/mach-w90x900/include/mach/system.h | 4 ----
arch/arm/mach-zynq/include/mach/system.h | 5 -----
arch/arm/plat-omap/include/plat/system.h | 3 ---
arch/arm/plat-spear/include/plat/system.h | 4 ----
arch/arm/plat-tcc/include/mach/system.h | 4 ----
50 files changed, 1 insertions(+), 204 deletions(-)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 13e68c5..0594f4c 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -129,11 +129,6 @@ void arm_machine_restart(char mode, const char *cmd)
while (1);
}
-static void temporary_arm_arch_reset(char mode, const char *cmd)
-{
- arch_reset(mode, cmd);
-}
-
/*
* Function pointers to optional machine specific functions
*/
@@ -143,7 +138,7 @@ EXPORT_SYMBOL(pm_power_off);
void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
EXPORT_SYMBOL_GPL(arm_pm_restart);
-void (*arm_arch_reset)(char mode, const char *cmd) = temporary_arm_arch_reset;
+void (*arm_arch_reset)(char mode, const char *cmd);
EXPORT_SYMBOL_GPL(arm_arch_reset);
static void do_nothing(void *unused)
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
index 079eb12..cbd64f3 100644
--- a/arch/arm/mach-at91/include/mach/system.h
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -47,8 +47,4 @@ static inline void arch_idle(void)
#endif
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-bcmring/include/mach/system.h b/arch/arm/mach-bcmring/include/mach/system.h
index 6cd872d..e7343c5 100644
--- a/arch/arm/mach-bcmring/include/mach/system.h
+++ b/arch/arm/mach-bcmring/include/mach/system.h
@@ -27,8 +27,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
index 9982deb..23d6ef8 100644
--- a/arch/arm/mach-clps711x/include/mach/system.h
+++ b/arch/arm/mach-clps711x/include/mach/system.h
@@ -32,8 +32,4 @@ static inline void arch_idle(void)
mov r0, r0");
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
index 092d774..7f43a64 100644
--- a/arch/arm/mach-cns3xxx/include/mach/system.h
+++ b/arch/arm/mach-cns3xxx/include/mach/system.h
@@ -23,8 +23,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h
index 6bd1dc0..fcb7a01 100644
--- a/arch/arm/mach-davinci/include/mach/system.h
+++ b/arch/arm/mach-davinci/include/mach/system.h
@@ -18,8 +18,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
index ce3e749..21d651a 100644
--- a/arch/arm/mach-dove/include/mach/system.h
+++ b/arch/arm/mach-dove/include/mach/system.h
@@ -16,8 +16,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
index 574e633..2e4af65 100644
--- a/arch/arm/mach-ebsa110/include/mach/system.h
+++ b/arch/arm/mach-ebsa110/include/mach/system.h
@@ -34,8 +34,4 @@ static inline void arch_idle(void)
asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
index ce48083..a2f0967 100644
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -8,7 +8,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
--git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
index 0c19392..85f44ab 100644
--- a/arch/arm/mach-footbridge/include/mach/system.h
+++ b/arch/arm/mach-footbridge/include/mach/system.h
@@ -17,7 +17,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-gemini/include/mach/system.h b/arch/arm/mach-gemini/include/mach/system.h
index 7df8e48..3c4f114 100644
--- a/arch/arm/mach-gemini/include/mach/system.h
+++ b/arch/arm/mach-gemini/include/mach/system.h
@@ -28,8 +28,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif /* __MACH_SYSTEM_H */
diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
index 4c2fba9..16ac46e 100644
--- a/arch/arm/mach-h720x/include/mach/system.h
+++ b/arch/arm/mach-h720x/include/mach/system.h
@@ -24,9 +24,4 @@ static void arch_idle(void)
nop();
}
-
-static __inline__ void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
index 6e5adbf..37314a2 100644
--- a/arch/arm/mach-integrator/include/mach/system.h
+++ b/arch/arm/mach-integrator/include/mach/system.h
@@ -32,8 +32,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
index 6b9bba7..9f0d83e 100644
--- a/arch/arm/mach-iop13xx/include/mach/system.h
+++ b/arch/arm/mach-iop13xx/include/mach/system.h
@@ -12,7 +12,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
index 094714d..0ee7dae 100644
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -15,7 +15,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
index df98c56..04500c8 100644
--- a/arch/arm/mach-iop33x/include/mach/system.h
+++ b/arch/arm/mach-iop33x/include/mach/system.h
@@ -13,7 +13,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
index d79c7ad..47c8757 100644
--- a/arch/arm/mach-ixp2000/include/mach/system.h
+++ b/arch/arm/mach-ixp2000/include/mach/system.h
@@ -13,7 +13,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
index 4569003..3b89dd5 100644
--- a/arch/arm/mach-ixp23xx/include/mach/system.h
+++ b/arch/arm/mach-ixp23xx/include/mach/system.h
@@ -15,7 +15,3 @@ static inline void arch_idle(void)
cpu_do_idle();
#endif
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
index ed5964c..5ac2578 100644
--- a/arch/arm/mach-ixp4xx/include/mach/system.h
+++ b/arch/arm/mach-ixp4xx/include/mach/system.h
@@ -18,8 +18,3 @@ static inline void arch_idle(void)
cpu_do_idle();
#endif
}
-
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
index f094431..f85cf7f 100644
--- a/arch/arm/mach-kirkwood/include/mach/system.h
+++ b/arch/arm/mach-kirkwood/include/mach/system.h
@@ -14,9 +14,5 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
index b73ee70..59fe992 100644
--- a/arch/arm/mach-ks8695/include/mach/system.h
+++ b/arch/arm/mach-ks8695/include/mach/system.h
@@ -24,8 +24,4 @@ static void arch_idle(void)
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
index 9c6cc0c..bf176c9 100644
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ b/arch/arm/mach-lpc32xx/include/mach/system.h
@@ -24,8 +24,4 @@ static void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
index b09c19a..f5add75 100644
--- a/arch/arm/mach-mmp/include/mach/system.h
+++ b/arch/arm/mach-mmp/include/mach/system.h
@@ -15,8 +15,4 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
#endif /* __ASM_MACH_SYSTEM_H */
diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
index ab6590b..a8a53b2 100644
--- a/arch/arm/mach-msm/include/mach/system.h
+++ b/arch/arm/mach-msm/include/mach/system.h
@@ -16,7 +16,3 @@
#include <mach/hardware.h>
void arch_idle(void);
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
index 1a41dc5..dd7a016 100644
--- a/arch/arm/mach-mv78xx0/include/mach/system.h
+++ b/arch/arm/mach-mv78xx0/include/mach/system.h
@@ -16,9 +16,5 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
index bcd8989..e7ad1bb 100644
--- a/arch/arm/mach-mxs/include/mach/system.h
+++ b/arch/arm/mach-mxs/include/mach/system.h
@@ -22,8 +22,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif /* __MACH_MXS_SYSTEM_H__ */
diff --git a/arch/arm/mach-netx/include/mach/system.h b/arch/arm/mach-netx/include/mach/system.h
index 83ae2b1..b38fa36 100644
--- a/arch/arm/mach-netx/include/mach/system.h
+++ b/arch/arm/mach-netx/include/mach/system.h
@@ -24,9 +24,5 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h
index 16f59f6..25e198b 100644
--- a/arch/arm/mach-nomadik/include/mach/system.h
+++ b/arch/arm/mach-nomadik/include/mach/system.h
@@ -29,8 +29,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-nuc93x/include/mach/system.h b/arch/arm/mach-nuc93x/include/mach/system.h
index a4d39a3..08188e7 100644
--- a/arch/arm/mach-nuc93x/include/mach/system.h
+++ b/arch/arm/mach-nuc93x/include/mach/system.h
@@ -18,7 +18,3 @@
static void arch_idle(void)
{
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
index 91a933c..997b13e 100644
--- a/arch/arm/mach-orion5x/include/mach/system.h
+++ b/arch/arm/mach-orion5x/include/mach/system.h
@@ -18,8 +18,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
index 6710ed3..60cfe71 100644
--- a/arch/arm/mach-pnx4008/include/mach/system.h
+++ b/arch/arm/mach-pnx4008/include/mach/system.h
@@ -26,8 +26,4 @@ static void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
index 1d14a77..98e5d83 100644
--- a/arch/arm/mach-prima2/include/mach/system.h
+++ b/arch/arm/mach-prima2/include/mach/system.h
@@ -16,8 +16,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
index 0687110..2ff62d6 100644
--- a/arch/arm/mach-pxa/include/mach/system.h
+++ b/arch/arm/mach-pxa/include/mach/system.h
@@ -16,8 +16,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
index 1630766..471b671 100644
--- a/arch/arm/mach-realview/include/mach/system.h
+++ b/arch/arm/mach-realview/include/mach/system.h
@@ -30,8 +30,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
index e9fb593..359bab9 100644
--- a/arch/arm/mach-rpc/include/mach/system.h
+++ b/arch/arm/mach-rpc/include/mach/system.h
@@ -11,7 +11,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
index 436a8b3..353ed43 100644
--- a/arch/arm/mach-s3c64xx/include/mach/system.h
+++ b/arch/arm/mach-s3c64xx/include/mach/system.h
@@ -16,8 +16,4 @@ static void arch_idle(void)
/* nothing here yet */
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
index ac3bdb8..6bcafe3 100644
--- a/arch/arm/mach-sa1100/include/mach/system.h
+++ b/arch/arm/mach-sa1100/include/mach/system.h
@@ -8,7 +8,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
index 2cc363a..c543685 100644
--- a/arch/arm/mach-shark/include/mach/system.h
+++ b/arch/arm/mach-shark/include/mach/system.h
@@ -6,9 +6,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
static inline void arch_idle(void)
{
diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
index 4f2bea5..e150937 100644
--- a/arch/arm/mach-shmobile/include/mach/system.h
+++ b/arch/arm/mach-shmobile/include/mach/system.h
@@ -6,8 +6,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
index b87b8a4..bc51978 100644
--- a/arch/arm/mach-tegra/include/mach/system.h
+++ b/arch/arm/mach-tegra/include/mach/system.h
@@ -21,9 +21,6 @@
#ifndef __MACH_TEGRA_SYSTEM_H
#define __MACH_TEGRA_SYSTEM_H
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
static inline void arch_idle(void)
{
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 0ddf3cd..574d46e 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -12,7 +12,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
index c0cd800..258e5c9 100644
--- a/arch/arm/mach-ux500/include/mach/system.h
+++ b/arch/arm/mach-ux500/include/mach/system.h
@@ -17,9 +17,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
- /* yet to be implemented - TODO */
-}
-
#endif
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
index ebc6348..cc5cdd9 100644
--- a/arch/arm/mach-versatile/include/mach/system.h
+++ b/arch/arm/mach-versatile/include/mach/system.h
@@ -34,8 +34,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-vexpress/include/mach/system.h b/arch/arm/mach-vexpress/include/mach/system.h
index 899a4e6..f653a8e 100644
--- a/arch/arm/mach-vexpress/include/mach/system.h
+++ b/arch/arm/mach-vexpress/include/mach/system.h
@@ -30,8 +30,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
diff --git a/arch/arm/mach-vt8500/include/mach/system.h b/arch/arm/mach-vt8500/include/mach/system.h
index 4bbcce4..6daf809 100644
--- a/arch/arm/mach-vt8500/include/mach/system.h
+++ b/arch/arm/mach-vt8500/include/mach/system.h
@@ -7,7 +7,3 @@ static inline void arch_idle(void)
{
cpu_do_idle();
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
index ed3478b..da6e4e8 100644
--- a/arch/arm/mach-w90x900/include/mach/system.h
+++ b/arch/arm/mach-w90x900/include/mach/system.h
@@ -18,7 +18,3 @@
static void arch_idle(void)
{
}
-
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
index 1b84d70..8e88e0b 100644
--- a/arch/arm/mach-zynq/include/mach/system.h
+++ b/arch/arm/mach-zynq/include/mach/system.h
@@ -20,9 +20,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
- /* Add architecture specific reset processing here */
-}
-
#endif
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index ac32d88..91db6db 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -12,9 +12,6 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-/* To be removed in a future ARM-wide cleanup */
-static inline void arch_reset(char mode, const char *cmd) {}
-
extern void omap1_arch_reset(char mode, const char *cmd);
extern void omap_prcm_arch_reset(char mode, const char *cmd);
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
index 4a0d125..86c6f83 100644
--- a/arch/arm/plat-spear/include/plat/system.h
+++ b/arch/arm/plat-spear/include/plat/system.h
@@ -23,8 +23,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif /* __PLAT_SYSTEM_H */
diff --git a/arch/arm/plat-tcc/include/mach/system.h b/arch/arm/plat-tcc/include/mach/system.h
index e97ae31..da3f019 100644
--- a/arch/arm/plat-tcc/include/mach/system.h
+++ b/arch/arm/plat-tcc/include/mach/system.h
@@ -19,8 +19,4 @@ static inline void arch_idle(void)
cpu_do_idle();
}
-static inline void arch_reset(char mode, const char *cmd)
-{
-}
-
#endif
--
1.7.4.1
^ permalink raw reply related
* [PATCH] AMBA: Use suspend_noriq to force devices into runtime suspend
From: Alan Stern @ 2011-10-28 15:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4EAA63FA.8050506@stericsson.com>
On Fri, 28 Oct 2011, Ulf Hansson wrote:
> The idea with having them as separate functions and something with
> "runtime" in the name is because it is only when having
> CONFIG_PM_RUNTIME the functions actually does something.
No, that's off the main point.
In fact, you're not really using these terms properly. You shouldn't
think of "runtime suspend" as a single verb -- that is, you shouldn't
think "Okay, let's runtime-suspend this device now".
The verb is just "suspend", and it means the same thing as "put into a
low-power state". The "runtime" part refers to _when_ the low-power
transition takes place: while the rest of the system is running (as
opposed to while the rest of the system is going to sleep).
Thus, it makes no sense at all for a comment in a suspend_noirq
callback to say "let's runtime-suspend the device". That's a
contradiction in terms. The right way to think about it is more like
this: "If the device isn't already in a low-power state, let's put it
in a low-power state now".
In your case, the device already is (or should be) at low power. A
better way to phrase this might be: "If the device's power hasn't
already been turned off, and the device doesn't need to generate wakeup
requests, turn off the power now".
Alan Stern
^ permalink raw reply
* [PATCH 2/6] arm/tegra: prepare pinmux code for multiple tegra variants
From: Stephen Warren @ 2011-10-28 16:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20111028081738.GA12383@tbergstrom-lnx.Nvidia.com>
Peter De Schrijver wrote at Friday, October 28, 2011 2:18 AM:
> On Thu, Oct 27, 2011 at 09:59:49PM +0200, Stephen Warren wrote:
> > Peter De Schrijver wrote at Tuesday, October 25, 2011 10:54 AM:
> > > This patch modifies the pinmux code to be useable for multiple tegra variants.
> > > Some tegra20 specific constants will be replaced by variables which will be
> > > initialized to the appropriate value at runtime.
...
> > > @@ -668,11 +668,24 @@ void tegra_pinmux_config_pullupdown_table(const struct tegra_pingroup_config *co
> > > }
> > > }
> > >
> > > +static struct of_device_id tegra_pinmux_of_match[] __devinitdata = {
> > > + { .compatible = "nvidia,tegra20-pinmux", tegra20_pinmux_init },
> > > + { },
> > > +};
> > > +
> > > static int __devinit tegra_pinmux_probe(struct platform_device *pdev)
> > > {
> > > struct resource *res;
> > > int i;
> > > int config_bad = 0;
> > > + const struct of_device_id *match;
> > > +
> > > +#ifdef CONFIG_OF
> > > + match = of_match_device(tegra_pinmux_of_match, &pdev->dev);
> >
> > What if match==NULL? I suppose that "can't" happen with DT, since the
> > device wouldn't have been probed unless there was a matching entry...
>
> Exactly. That was my reasoning as well. We can't get here unless there is a
> match.
>
> > Does this work when booting without DT; IIRC the internal patches I saw
> > fell back to hard-coding a call to tegra20_pinmux_init() when booting
> > a static board file (i.e. not booting device-tree)? Perhaps that's in a
>
> Unfortunately I don't have a tegra20 board which is supported without
> devicetree.
Oh, that's quite unfortunate. Still, you need to write the code so it's
expected to work for the non-DT case. Once you've fixed this, if you
push a complete branch somewhere, I can boot-test it on a few non-DT
boards. Hopefully I can test on Cardhu too.
--
nvpublic
^ permalink raw reply
* [PATCH 3/6] arm/tegra: prepare early init for multiple tegra variants
From: Will Deacon @ 2011-10-28 16:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20111027201657.GP19187@n2100.arm.linux.org.uk>
On Thu, Oct 27, 2011 at 09:16:57PM +0100, Russell King - ARM Linux wrote:
> On Thu, Oct 27, 2011 at 01:06:13PM -0700, Stephen Warren wrote:
> > Peter De Schrijver wrote at Tuesday, October 25, 2011 10:54 AM:
> > > -static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
> > > +void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
> >
> > I'm not sure why you moved that, but I suppose it's fine.
>
> Note that Nicolas has a patch set during KS which cleans the arch_reset
> business out of mach/system.h, and effectively gets rid of arch_reset
> entirely, so this probably conflicts with those changes.
I've spammed the ARM list with this patch series now, so the state of the
conflicts should be evident.
Will
^ permalink raw reply
* [PATCH] arch: arm: tegra: Enable headphone detection gpio
From: Taylor Hutt @ 2011-10-28 16:27 UTC (permalink / raw)
To: linux-arm-kernel
From: Yufeng Shen <miletus@chromium.org>
Enable the headphone detection gpio on tegra platform.
Signed-off-by: Yufeng Shen <miletus@chromium.org>
---
arch/arm/mach-tegra/board-seaboard-pinmux.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c
index 9d0ba80..14e9d576 100644
--- a/arch/arm/mach-tegra/board-seaboard-pinmux.c
+++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c
@@ -205,6 +205,7 @@ static struct tegra_gpio_table common_gpio_table[] = {
{ .gpio = TEGRA_GPIO_NCT1008_THERM2_IRQ,.enable = true },
{ .gpio = TEGRA_GPIO_WLAN_POWER, .enable = true },
{ .gpio = TEGRA_GPIO_AC_ONLINE, .enable = true },
+ { .gpio = TEGRA_GPIO_HP_DET, .enable = true },
{ .gpio = TEGRA_GPIO_MXT_IRQ, .enable = true },
{ .gpio = TEGRA_GPIO_HDMI_ENB, .enable = true },
{ .gpio = TEGRA_GPIO_MPU3050_IRQ, .enable = true },
--
1.7.3.1
^ permalink raw reply related
* [PATCH v2 2/3] arm/dt: tegra: add dts file for paz00
From: Stephen Warren @ 2011-10-28 16:49 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <3520326.MNh26pzpGT@fb07-iapwap2>
Marc Dietrich wrote at Friday, October 28, 2011 4:30 AM:
> Am Donnerstag, 27. Oktober 2011, 09:50:03 schrieb Stephen Warren:
> > Marc Dietrich wrote at Wednesday, October 26, 2011 1:59 PM:
> > > This adds a dts file for paz00. As a side effect, this also enables
> > > the embedded controller which controls the keyboard, touchpad, power,
> > > leds, and some other functions.
> > ...
> > > +++ b/arch/arm/boot/dts/tegra-paz00.dts
> > > @@ -0,0 +1,70 @@
> > > +/dts-v1/;
> > > +
> > > +/memreserve/ 0x1c000000 0x04000000;
> > > +/include/ "tegra20.dtsi"
> > > +
> > > +/ {
> > > + model = "Toshiba AC100 / Dynabook AZ";
> > > + compatible = "compal,paz00", "nvidia,tegra20";
> > > +
> > > + chosen {
> > > + bootargs = "mem=448 at 0 console=ttyS0,115200n8 root=/dev/mmcblk1p1";
> >
> > You shouldn't need the mem= parameter here; it wasn't in your first patch set.
>
> that's because I forgot it. Sorry, I didn't mentioned it in the changelog. I wonder
> why mem= is still needed.
I wonder if this is some conflict between ATAGs and the DT-specified
memory node.
As far as I can tell, the kernel's memory information typically comes
from ATAGs. Some boards override what's in the ATAGs in their machine
descriptor's fixup routine, e.g. see tegra_paz00_fixup(). Presumably,
this is because of buggy bootloaders sending incorrect memory information
in the ATAGs. Do you have any way to check the ATAGs that the bootloader
is sending? Probably, you could enable DEBUG_LL and using the low-level
debugging functions to dump some of that information to the UART early
during boot.
When boards boot from DT, there is no fixup function to override the
bootloader's ATAGs. I also see a bunch of code to set up the memory
information from DT e.g. setup_machine_fdt()'s call to:
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
... but I assume that happens before the ATAGs are processed, and the
buggy ATAGs end up overriding the information in the DT file. And further,
I assume that specifying "mem=" on the command-line overrides that, thus
solving the problem.
It'd be awesome if you could validate this; the simplest way is probably
to:
a) Remove mem= from the command-line
b) Modify arch/arm/kernel/setup.c:parse_tag_mem32() to do nothing;
comment out the call to arm_add_memory()
c) Test booting, and check what RAM size the kernel thinks you have.
If that works, then ATAGs are the problem. We probably need to modify the
core ARM code not to use memory ATAGs when there is a DT?
I'm mainly pushing on this because adding "mem=" to the command-line in
the DT file isn't a great solution; when people start using bootloaders
that rewrite the DT to include the user-specified command-line, then every
user is going to have to start specifying "mem=" in their command-lines.
> I've seen patches on the chromeos tree which try to reserve the gpu
> memory on demand. While we are at it, what is the vmalloc=192M used
> by most other boards for?
I'm not sure what vmalloc= does exactly. I somewhat doubt it's necessary
until we have code that uses the GPU in mainline. The same goes for the
/memreserve/ DT entries. I've been thinking of submitting a patch to
remove this cruft, but haven't gotten around to it yet.
--
nvpublic
^ permalink raw reply
* [PATCH] arch: arm: tegra: Enable headphone detection gpio
From: Stephen Warren @ 2011-10-28 17:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319819226-19098-1-git-send-email-thutt@chromium.org>
Taylor Hutt wrote at Friday, October 28, 2011 10:27 AM:
> From: Yufeng Shen <miletus@chromium.org>
>
> Enable the headphone detection gpio on tegra platform.
>
> Signed-off-by: Yufeng Shen <miletus@chromium.org>
Aha, that explains why this seemed to have stopped working when I tried
it on Seaboard recently; I guess it never did. Harmony already does this
correctly, and that's where I must have tested the feature initially.
Acked-by: Stephen Warren <swarren@nvidia.com>
--
nvpublic
^ permalink raw reply
* [RFC] Shrink sched_clock some more
From: Stephen Boyd @ 2011-10-28 18:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E7C48E2.5040907@arm.com>
On 09/23/11 01:52, Marc Zyngier wrote:
> On 22/09/11 16:36, Russell King - ARM Linux wrote:
>> ... by getting rid of the fixed-constant optimization, and moving the
>> update code into arch/arm/kernel/sched_clock.c.
>>
>> Platforms now only have to supply a function to read the sched_clock
>> register, and some basic information such as the number of significant
>> bits and the tick rate.
> This looks similar to a patch I posted a while ago:
> http://patchwork.ozlabs.org/patch/112318/
>
>
Can we get one of these two patches merged next merge window? I'd like
to add sched_clock support to MSM and building on top of this patch is
easier than the other way around.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply
* [PATCH 1/3] ARM: EXYNOS: Add ASV feature for Exynos4 series
From: Sylwester Nawrocki @ 2011-10-28 18:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319677938-25732-2-git-send-email-boyko.lee@samsung.com>
Hi,
On 10/27/2011 03:12 AM, Jongpill Lee wrote:
> This patch adds ASV feature for exynos4 seires.
s/seires/series
> Asv(Adoptive support voltage) feature support to get spec of SoC.
So is this "Adoptive support voltage" or Adaptive Supply Voltage as commented
further in the patch ?
> And we can use to adjust voltage for operation SoC usign by ASV result.
s/usign/using
In general I find this commit description hard to understand. Could you please
provide a bit more detailed description, perhaps in the cover letter, of what
this patch series does and why ?
>
> Signed-off-by: Jongpill Lee<boyko.lee@samsung.com>
> ---
> arch/arm/mach-exynos4/Makefile | 2 +-
> arch/arm/mach-exynos4/asv.c | 78 ++++++++++++++++++++++++++++++
> arch/arm/mach-exynos4/include/mach/asv.h | 42 ++++++++++++++++
> 3 files changed, 121 insertions(+), 1 deletions(-)
> create mode 100644 arch/arm/mach-exynos4/asv.c
> create mode 100644 arch/arm/mach-exynos4/include/mach/asv.h
>
> diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
> index 2bb18f4..0f3affe 100644
> --- a/arch/arm/mach-exynos4/Makefile
> +++ b/arch/arm/mach-exynos4/Makefile
> @@ -12,7 +12,7 @@ obj- :=
>
> # Core support for EXYNOS4 system
>
> -obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o
> +obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o asv.o
> obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o
> obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o
> obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o
> diff --git a/arch/arm/mach-exynos4/asv.c b/arch/arm/mach-exynos4/asv.c
> new file mode 100644
> index 0000000..498fac0
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/asv.c
> @@ -0,0 +1,78 @@
> +/* linux/arch/arm/mach-exynos4/asv.c
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com/
> + *
> + * EXYNOS4 - ASV(Adaptive Supply Voltage) driver
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#include<linux/init.h>
> +#include<linux/types.h>
> +#include<linux/kernel.h>
> +#include<linux/err.h>
> +#include<linux/io.h>
> +#include<linux/slab.h>
> +
> +#include<mach/map.h>
> +#include<mach/asv.h>
> +
> +static struct samsung_asv *exynos_asv;
> +
> +static int __init exynos_asv_init(void)
> +{
> + exynos_asv = kzalloc(sizeof(struct samsung_asv), GFP_KERNEL);
> + if (!exynos_asv)
> + goto out1;
Just return -ENOMEM here.
> +
> + /* I will add asv driver of exynos4 series to regist */
> +
> + if (exynos_asv->check_vdd_arm) {
> + if (exynos_asv->check_vdd_arm()) {
> + pr_info("EXYNOS: It is wrong vdd_arm\n");
> + goto out2;
> + }
> + }
> +
> + /* Get HPM Delay value */
> + if (exynos_asv->get_hpm) {
> + if (exynos_asv->get_hpm(exynos_asv)) {
> + pr_info("EXYNOS: Fail to get HPM Value\n");
> + goto out2;
> + }
> + } else {
> + pr_info("EXYNOS: There is no get hpm function\n");
Are you sure all these info printks are needed in the mainline kernel?
> + goto out2;
> + }
> +
> + /* Get IDS ARM Value */
> + if (exynos_asv->get_ids) {
> + if (exynos_asv->get_ids(exynos_asv)) {
> + pr_info("EXYNOS: Fail to get IDS Value\n");
> + goto out2;
> + }
> + } else {
> + pr_info("EXYNOS: There is no get ids function\n");
> + goto out2;
> + }
> +
> + if (exynos_asv->store_result) {
> + if (exynos_asv->store_result(exynos_asv)) {
> + pr_info("EXYNOS: Can not success to store result\n");
> + goto out2;
> + }
> + } else {
> + pr_info("EXYNOS: No store_result function\n");
> + goto out2;
> + }
> +
> + return 0;
> +out2:
> + kfree(exynos_asv);
> +out1:
> + return -EINVAL;
> +}
> +device_initcall_sync(exynos_asv_init);
> diff --git a/arch/arm/mach-exynos4/include/mach/asv.h b/arch/arm/mach-exynos4/include/mach/asv.h
> new file mode 100644
> index 0000000..038a872
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/include/mach/asv.h
> @@ -0,0 +1,42 @@
> +/* linux/arch/arm/mach-exynos4/include/mach/asv.h
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com/
> + *
> + * EXYNOS4 - Adoptive Support Voltage Header file
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#ifndef __ASM_ARCH_ASV_H
> +#define __ASM_ARCH_ASV_H __FILE__
> +
> +#define JUDGE_TABLE_END NULL
> +
> +#define LOOP_CNT 10
These defines seem quite generic, if really needed perhaps it's worth to add
a prefix, e.g. EXYNOS4_.
> +
> +struct asv_judge_table {
> + unsigned int hpm_limit; /* HPM value to decide group of target */
> + unsigned int ids_limit; /* IDS value to decide group of target */
> +};
> +
> +struct samsung_asv {
Wouldn't it be more appropriate to use more specific name, something like 'struct exynos_asv' ?
> + unsigned int pkg_id; /* fused value for pakage */
^^^^^^
> + unsigned int ids_offset; /* ids_offset of chip */
> + unsigned int ids_mask; /* ids_mask of chip */
> + unsigned int hpm_result; /* hpm value of chip */
> + unsigned int ids_result; /* ids value of chip */
> + int (*check_vdd_arm)(void); /* check vdd_arm value, this function is selectable */
> + int (*pre_clock_init)(void); /* clock init function to get hpm */
> + int (*pre_clock_setup)(void); /* clock setup function to get hpm */
> + /* specific get ids function */
> + int (*get_ids)(struct samsung_asv *asv_info);
> + /* specific get hpm function */
> + int (*get_hpm)(struct samsung_asv *asv_info);
> + /* store into some repository to send result of asv */
> + int (*store_result)(struct samsung_asv *asv_info);
> +};
> +
> +#endif /* __ASM_ARCH_ASV_H */
You're putting whole driver under arch/arm/, I'm wondering whether the functionality
it provides could be handled by some generic framework, like cpufreq or devfreq.
How this driver is different from cpufreq drivers ?
--
Thanks,
Sylwester
^ permalink raw reply
* [PATCH 42/51] ARM: mach-u300: use arm_arch_reset instead of arch_reset
From: Linus Walleij @ 2011-10-28 19:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319813059-8914-43-git-send-email-will.deacon@arm.com>
On Fri, Oct 28, 2011 at 4:44 PM, Will Deacon <will.deacon@arm.com> wrote:
> This patch updates mach-u300 to use arm_arch_reset instead of
> arch_reset.
>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Looks like a good idea so I applied patch 1 and this patch, and it JustWorks,
compiles, performs reset on the U300.
Tested-by: Linus Walleij <linus.walleij@linaro.org>
For patch 1 and 42.
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH] pinctrl: Fix "warning: 'struct pinctrl_dev' declared inside parameter list"
From: Linus Walleij @ 2011-10-28 20:03 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319773104-3541-1-git-send-email-Barry.Song@csr.com>
On Fri, Oct 28, 2011 at 5:38 AM, Barry Song <Barry.Song@csr.com> wrote:
> From: Barry Song <Baohua.Song@csr.com>
>
> when pinctl subsystem is not selected, when compiling drivers including
> the include/linux/pinctrl/pinctrl.h, we will get the warning as below:
> In file included from include/linux/pinctrl/pinmux.h:17,
> ? ? ? ? ? ? ? ? from drivers/tty/serial/sirfsoc_uart.c:25:
> include/linux/pinctrl/pinctrl.h:126: warning: 'struct pinctrl_dev'
> ? ? ? ? ? ? ? ?declared inside parameter list
> include/linux/pinctrl/pinctrl.h:126: warning: its scope is only this
> ? ? ?definition or declaration, which is probably not what you want
>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>
OK applied.
Thanks,
Linus Walleij
^ permalink raw reply
* [PATCH 3/3] ARM: EXYNOS: Support ASV for Exynos4210
From: Sylwester Nawrocki @ 2011-10-28 20:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319677938-25732-4-git-send-email-boyko.lee@samsung.com>
On 10/27/2011 03:12 AM, Jongpill Lee wrote:
> This patch adds function for exynos4210's asv driver.
> On Exynos4210, we can get ASV result using by HPM and IDS value.
> And asv result is sent through INFORM2 register.
>
> Signed-off-by: Jongpill Lee<boyko.lee@samsung.com>
> ---
> arch/arm/mach-exynos4/Makefile | 2 +-
> arch/arm/mach-exynos4/asv-4210.c | 338 +++++++++++++++++++++++
> arch/arm/mach-exynos4/asv.c | 8 +
> arch/arm/mach-exynos4/include/mach/asv.h | 2 +
> arch/arm/mach-exynos4/include/mach/map.h | 2 +
> arch/arm/mach-exynos4/include/mach/regs-clock.h | 18 ++
> arch/arm/mach-exynos4/include/mach/regs-iem.h | 27 ++
> 7 files changed, 396 insertions(+), 1 deletions(-)
> create mode 100644 arch/arm/mach-exynos4/asv-4210.c
> create mode 100644 arch/arm/mach-exynos4/include/mach/regs-iem.h
>
> diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
> index 0f3affe..8627669 100644
> --- a/arch/arm/mach-exynos4/Makefile
> +++ b/arch/arm/mach-exynos4/Makefile
> @@ -12,7 +12,7 @@ obj- :=
>
> # Core support for EXYNOS4 system
>
> -obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o asv.o
> +obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o asv.o asv-4210.o
> obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o
> obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o
> obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o
> diff --git a/arch/arm/mach-exynos4/asv-4210.c b/arch/arm/mach-exynos4/asv-4210.c
> new file mode 100644
> index 0000000..81a1c67
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/asv-4210.c
> @@ -0,0 +1,338 @@
> +/* linux/arch/arm/mach-exynos/asv-4210.c
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com/
> + *
> + * EXYNOS4210 - ASV(Adaptive Supply Voltage) driver
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#include<linux/init.h>
> +#include<linux/types.h>
> +#include<linux/kernel.h>
> +#include<linux/err.h>
> +#include<linux/clk.h>
> +#include<linux/io.h>
> +
> +#include<plat/clock.h>
> +
> +#include<mach/regs-iem.h>
> +#include<mach/regs-clock.h>
> +#include<mach/asv.h>
> +
> +enum target_asv {
> + EXYNOS4210_1200,
> + EXYNOS4210_1400,
> + EXYNOS4210_SINGLE_1200,
> +};
> +
> +struct asv_judge_table exynos4210_1200_limit[] = {
> + /* HPM , IDS */
> + {8 , 4},
> + {11 , 8},
> + {14 , 12},
> + {18 , 17},
> + {21 , 27},
> + {23 , 45},
> + {25 , 55},
> +};
> +
> +static struct asv_judge_table exynos4210_1400_limit[] = {
> + /* HPM , IDS */
> + {13 , 8},
> + {17 , 12},
> + {22 , 32},
> + {26 , 52},
> +};
> +
> +static struct asv_judge_table exynos4210_single_1200_limit[] = {
> + /* HPM , IDS */
> + {8 , 4},
> + {14 , 12},
> + {21 , 27},
> + {25 , 55},
> +};
> +
> +static int exynos4210_check_vdd_arm(void)
> +{
> + /* It will be support */
> + return 0;
> +}
If this function is empty might be better to have it removed now.
> +
> +static int exynos4210_asv_pre_clock_init(void)
> +{
> + struct clk *clk_hpm;
> + struct clk *clk_copy;
> + struct clk *clk_parent;
> +
> + /* PWI clock setting */
> + clk_copy = clk_get(NULL, "sclk_pwi");
> + if (IS_ERR(clk_copy)) {
> + pr_info("EXYNOS4210: ASV : SCLK_PWI clock get error\n");
> + return -EINVAL;
How about just doing:
return ERR_PTR(clk_copy);
?
> + } else {
> + clk_parent = clk_get(NULL, "xusbxti");
> +
> + if (IS_ERR(clk_parent)) {
> + pr_info("EXYNOS4210: ASV: MOUT_APLL clock get error\n");
> + clk_put(clk_copy);
> + return -EINVAL;
> + }
> + if (clk_set_parent(clk_copy, clk_parent))
> + pr_info("EXYNOS4210: ASV: Unable to set parent %s of clock %s.\n",
If I'm not mistaken, you could omit all occurrences of "EXYNOS4210: ASV: " string used with pr_<level>
functions if you have added at the beginning of this file:
#define pr_fmt(fmt) "EXYNOS4210: ASV: " fmt
> + clk_parent->name, clk_copy->name);
> +
> + clk_put(clk_parent);
> + }
> + clk_set_rate(clk_copy, 4800000);
> +
> + clk_put(clk_copy);
> +
> + /* HPM clock setting */
> + clk_copy = clk_get(NULL, "dout_copy");
> + if (IS_ERR(clk_copy)) {
> + pr_info("EXYNOS4210: ASV: DOUT_COPY clock get error\n");
> + return -EINVAL;
> + } else {
> + clk_parent = clk_get(NULL, "mout_mpll");
> + if (IS_ERR(clk_parent)) {
> + pr_info("EXYNOS4210: ASV: MOUT_APLL clock get error\n");
> + clk_put(clk_copy);
> + return -EINVAL;
> + }
> + if (clk_set_parent(clk_copy, clk_parent))
> + pr_info("EXYNOS4210: ASV: Unable to set parent %s of clock %s.\n",
> + clk_parent->name, clk_copy->name);
> +
> + clk_put(clk_parent);
> + }
> +
> + clk_set_rate(clk_copy, (400 * 1000 * 1000));
> +
> + clk_put(clk_copy);
The above looks like 2 copies of same thing. Ever considered making a function
out of one of these and using it here instead ?
> +
> + clk_hpm = clk_get(NULL, "sclk_hpm");
> + if (IS_ERR(clk_hpm)) {
> + pr_info("EXYNOS4210: ASV: Fail to get sclk_hpm\n");
> + return -EINVAL;
> + }
> +
> + clk_set_rate(clk_hpm, (200 * 1000 * 1000));
> +
> + clk_put(clk_hpm);
> +
> + return 0;
> +}
> +
> +static int exynos4210_asv_pre_clock_setup(void)
> +{
> + /* APLL_CON0 level register */
> + __raw_writel(0x80FA0601, S5P_APLL_CON0L8);
> + __raw_writel(0x80C80601, S5P_APLL_CON0L7);
> + __raw_writel(0x80C80602, S5P_APLL_CON0L6);
> + __raw_writel(0x80C80604, S5P_APLL_CON0L5);
> + __raw_writel(0x80C80601, S5P_APLL_CON0L4);
> + __raw_writel(0x80C80601, S5P_APLL_CON0L3);
> + __raw_writel(0x80C80601, S5P_APLL_CON0L2);
> + __raw_writel(0x80C80601, S5P_APLL_CON0L1);
> +
> + /* IEM Divider register */
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L8);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L7);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L6);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L5);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L4);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L3);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L2);
> + __raw_writel(0x00500000, S5P_CLKDIV_IEM_L1);
hmm... lots of magic numbers here...
> +
> + return 0;
> +}
> +
> +static int exynos4210_find_group(struct samsung_asv *asv_info,
> + enum target_asv exynos4_target)
> +{
> + unsigned int ret = 0;
> + unsigned int i;
> +
> + if (exynos4_target == EXYNOS4210_1200) {
> + ret = ARRAY_SIZE(exynos4210_1200_limit);
> +
> + for (i = 0; i< ARRAY_SIZE(exynos4210_1200_limit); i++) {
> + if (asv_info->hpm_result<= exynos4210_1200_limit[i].hpm_limit ||
> + asv_info->ids_result<= exynos4210_1200_limit[i].ids_limit) {
> + ret = i;
> + break;
Perhaps it's just enough to return i directly.
> + }
> + }
> + } else if (exynos4_target == EXYNOS4210_1400) {
> + ret = ARRAY_SIZE(exynos4210_1400_limit);
> +
> + for (i = 0; i< ARRAY_SIZE(exynos4210_1400_limit); i++) {
> + if (asv_info->hpm_result<= exynos4210_1400_limit[i].hpm_limit ||
> + asv_info->ids_result<= exynos4210_1400_limit[i].ids_limit) {
> + ret = i;
> + break;
> + }
> + }
> + } else if (exynos4_target == EXYNOS4210_SINGLE_1200) {
> + ret = ARRAY_SIZE(exynos4210_single_1200_limit);
> +
> + for (i = 0; i< ARRAY_SIZE(exynos4210_single_1200_limit); i++) {
> + if (asv_info->hpm_result<= exynos4210_single_1200_limit[i].hpm_limit ||
> + asv_info->ids_result<= exynos4210_single_1200_limit[i].ids_limit) {
> + ret = i;
> + break;
> + }
> + }
> + }
> +
> + return ret;
> +}
> +
> +#define PACK_ID 8
> +#define PACK_MASK 0x3
> +
> +#define SUPPORT_1400MHZ (1<<31)
> +#define SUPPORT_1200MHZ (1<<30)
> +#define SUPPORT_1000MHZ (1<<29)
? Do these happen to be S5P_INFORM2 register bit definitions ?
If so the names should tell it explicitly. And there are whitespaces
missing around '<<'.
> +
> +static int exynos4210_get_hpm(struct samsung_asv *asv_info)
> +{
> + unsigned int i;
> + unsigned int tmp;
> + unsigned int hpm_delay = 0;
> + void __iomem *iem_base;
> +
> + iem_base = ioremap(EXYNOS4_PA_IEM, (128 * 1024));
More magic numbers...
> +
> + if (!iem_base) {
> + pr_info("EXYNOS: ioremap fail\n");
pr_info at an error level ?
> + return -EPERM;
> + }
> +
> + /* Clock setting to get asv value */
> + if (!asv_info->pre_clock_init) {
> + pr_info("EXYNOS: No Pre-setup function\n");
ditto
> + goto err;
> + } else {
'else' is not needed
> + if (asv_info->pre_clock_init()) {
> + pr_info("EXYNOS: pre_clock_init function fail");
> + goto err;
ditto
> + } else {
> + /* HPM enable */
> + tmp = __raw_readl(iem_base + EXYNOS4_APC_CONTROL);
> + tmp |= APC_HPM_EN;
> + __raw_writel(tmp, (iem_base + EXYNOS4_APC_CONTROL));
> +
> + asv_info->pre_clock_setup();
> +
> + /* IEM enable */
> + tmp = __raw_readl(iem_base + EXYNOS4_IECDPCCR);
> + tmp |= IEC_EN;
> + __raw_writel(tmp, (iem_base + EXYNOS4_IECDPCCR));
> + }
> + }
> +
> + /* Get HPM Delay value */
> + for (i = 0; i< LOOP_CNT; i++) {
> + tmp = __raw_readb(iem_base + EXYNOS4_APC_DBG_DLYCODE);
> + hpm_delay += tmp;
> + }
> +
> + hpm_delay /= LOOP_CNT;
> +
> + /* Store result of hpm value */
This type of comments doesn't seem to add much value.
> + asv_info->hpm_result = hpm_delay;
> +
> + return 0;
> +
> +err:
> + iounmap(iem_base);
> +
> + return -EPERM;
> +}
> +
> +static int exynos4210_get_ids(struct samsung_asv *asv_info)
> +{
> + unsigned int pkg_id_val;
> +
> + if (!asv_info->ids_offset || !asv_info->ids_mask) {
> + pr_info("EXYNOS4: No ids_offset or No ids_mask\n");
> + return -EPERM;
> + }
> +
> + pkg_id_val = __raw_readl(S5P_VA_CHIPID + 0x4);
> + asv_info->pkg_id = pkg_id_val;
> + asv_info->ids_result = ((pkg_id_val>> asv_info->ids_offset)&
> + asv_info->ids_mask);
> +
> + return 0;
> +}
> +
> +static int exynos4210_asv_store_result(struct samsung_asv *asv_info)
> +{
> + unsigned int result_grp;
> + char *support_freq;
> + unsigned int exynos_idcode = 0x0;
Assigment to 0 is unneeded, since exynos_idcode is overwritten right below.
Also might be better to use u32 rather than 'unsigned int' in this case.
> +
> + exynos_idcode = __raw_readl(S5P_VA_CHIPID);
> +
> + /* Single chip is only support 1.2GHz */
> + if (!((exynos_idcode>> PACK_ID)& PACK_MASK)) {
> + result_grp = exynos4210_find_group(asv_info, EXYNOS4210_SINGLE_1200);
> + result_grp |= SUPPORT_1200MHZ;
> + support_freq = "1.2GHz";
> +
> + goto set_reg;
> + }
> +
> + /* Check support freq */
supported frequencies ?
> + switch (asv_info->pkg_id& 0x7) {
> + /* Support 1.2GHz */
> + case 1:
> + case 7:
> + result_grp = exynos4210_find_group(asv_info, EXYNOS4210_1200);
> + result_grp |= SUPPORT_1200MHZ;
> + support_freq = "1.2GHz";
> + break;
> + /* Support 1.4GHz */
> + case 5:
> + result_grp = exynos4210_find_group(asv_info, EXYNOS4210_1400);
> + result_grp |= SUPPORT_1200MHZ;
typo ?
> + support_freq = "1.4GHz";
> + break;
> + /* Defalut support 1.0GHz */
s/Defalut/Default
I'm just wondering what exactly 'support' refers here to..
> + default:
> + result_grp = exynos4210_find_group(asv_info, EXYNOS4210_1200);
> + result_grp |= SUPPORT_1000MHZ;
> + support_freq = "1.0GHz";
> + break;
> + }
> +
> +set_reg:
> + __raw_writel(result_grp, S5P_INFORM2);
> +
> + pr_info("Support %s\n", support_freq);
> + pr_info("ASV Group for This Exynos4210 is 0x%x\n", result_grp);
> +
> + return 0;
> +}
> +
> +void exynos4210_asv_init(struct samsung_asv *asv_info)
> +{
> + pr_info("EXYNOS4210: Adaptive Support Voltage init\n");
> +
> + asv_info->ids_offset = 24;
> + asv_info->ids_mask = 0xFF;
In the kernel lower case hex numbers are preferred.
> +
> + asv_info->get_ids = exynos4210_get_ids;
> + asv_info->get_hpm = exynos4210_get_hpm;
> + asv_info->check_vdd_arm = exynos4210_check_vdd_arm;
> + asv_info->pre_clock_init = exynos4210_asv_pre_clock_init;
> + asv_info->pre_clock_setup = exynos4210_asv_pre_clock_setup;
> + asv_info->store_result = exynos4210_asv_store_result;
> +}
> diff --git a/arch/arm/mach-exynos4/asv.c b/arch/arm/mach-exynos4/asv.c
> index 498fac0..5acc8b1 100644
> --- a/arch/arm/mach-exynos4/asv.c
> +++ b/arch/arm/mach-exynos4/asv.c
> @@ -17,6 +17,8 @@
> #include<linux/io.h>
> #include<linux/slab.h>
>
> +#include<plat/cpu.h>
> +
> #include<mach/map.h>
> #include<mach/asv.h>
>
> @@ -29,6 +31,12 @@ static int __init exynos_asv_init(void)
> goto out1;
>
> /* I will add asv driver of exynos4 series to regist */
Is this comment still relevant ?
> + if (soc_is_exynos4210())
> + exynos4210_asv_init(exynos_asv);
> + else {
> + pr_info("EXYNOS: No MACH ASV driver\n");
> + goto out2;
> + }
>
> if (exynos_asv->check_vdd_arm) {
> if (exynos_asv->check_vdd_arm()) {
> diff --git a/arch/arm/mach-exynos4/include/mach/asv.h b/arch/arm/mach-exynos4/include/mach/asv.h
> index 038a872..f84a11d 100644
> --- a/arch/arm/mach-exynos4/include/mach/asv.h
> +++ b/arch/arm/mach-exynos4/include/mach/asv.h
> @@ -39,4 +39,6 @@ struct samsung_asv {
> int (*store_result)(struct samsung_asv *asv_info);
> };
>
> +extern void exynos4210_asv_init(struct samsung_asv *asv_info);
> +
> #endif /* __ASM_ARCH_ASV_H */
> diff --git a/arch/arm/mach-exynos4/include/mach/map.h b/arch/arm/mach-exynos4/include/mach/map.h
> index 918a979..81fa158 100644
> --- a/arch/arm/mach-exynos4/include/mach/map.h
> +++ b/arch/arm/mach-exynos4/include/mach/map.h
> @@ -60,6 +60,8 @@
>
> #define EXYNOS4_PA_COMBINER 0x10440000
>
> +#define EXYNOS4_PA_IEM 0x10460000
> +
> #define EXYNOS4_PA_GIC_CPU 0x10480000
> #define EXYNOS4_PA_GIC_DIST 0x10490000
>
> diff --git a/arch/arm/mach-exynos4/include/mach/regs-clock.h b/arch/arm/mach-exynos4/include/mach/regs-clock.h
> index 6c37ebe..23ee10f 100644
> --- a/arch/arm/mach-exynos4/include/mach/regs-clock.h
> +++ b/arch/arm/mach-exynos4/include/mach/regs-clock.h
> @@ -130,6 +130,24 @@
> #define S5P_CLKGATE_SCLKCPU S5P_CLKREG(0x14800)
> #define S5P_CLKGATE_IP_CPU S5P_CLKREG(0x14900)
>
> +#define S5P_APLL_CON0L8 S5P_CLKREG(0x15100)
> +#define S5P_APLL_CON0L7 S5P_CLKREG(0x15104)
> +#define S5P_APLL_CON0L6 S5P_CLKREG(0x15108)
> +#define S5P_APLL_CON0L5 S5P_CLKREG(0x1510C)
> +#define S5P_APLL_CON0L4 S5P_CLKREG(0x15110)
> +#define S5P_APLL_CON0L3 S5P_CLKREG(0x15114)
> +#define S5P_APLL_CON0L2 S5P_CLKREG(0x15118)
> +#define S5P_APLL_CON0L1 S5P_CLKREG(0x1511C)
Do you think, instead of the above 8 lines, you could use something like:
#define S5P_APLL_CON0L(n) S5P_CLKREG(0x15100 + (8 - (n)) * 4)
> +
> +#define S5P_CLKDIV_IEM_L8 S5P_CLKREG(0x15300)
> +#define S5P_CLKDIV_IEM_L7 S5P_CLKREG(0x15304)
> +#define S5P_CLKDIV_IEM_L6 S5P_CLKREG(0x15308)
> +#define S5P_CLKDIV_IEM_L5 S5P_CLKREG(0x1530C)
> +#define S5P_CLKDIV_IEM_L4 S5P_CLKREG(0x15310)
> +#define S5P_CLKDIV_IEM_L3 S5P_CLKREG(0x15314)
> +#define S5P_CLKDIV_IEM_L2 S5P_CLKREG(0x15318)
> +#define S5P_CLKDIV_IEM_L1 S5P_CLKREG(0x1531C)
and
#define S5P_CLKDIV_IEM_L(n) S5P_CLKREG(0x15300 + (8 - (n)) * 4)
(n = 1...8) ?
> +
> #define S5P_APLL_LOCKTIME (0x1C20) /* 300us */
>
> #define S5P_APLLCON0_ENABLE_SHIFT (31)
> diff --git a/arch/arm/mach-exynos4/include/mach/regs-iem.h b/arch/arm/mach-exynos4/include/mach/regs-iem.h
> new file mode 100644
> index 0000000..d9bf177
> --- /dev/null
> +++ b/arch/arm/mach-exynos4/include/mach/regs-iem.h
> @@ -0,0 +1,27 @@
> +/* linux/arch/arm/mach-exynos/include/mach/regs-iem.h
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com/
> + *
> + * EXYNOS4 - IEM(INTELLIGENT ENERGY MANAGEMENT) register discription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Really need this in upper case ?
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#ifndef __ASM_ARCH_REGS_IEM_H
> +#define __ASM_ARCH_REGS_IEM_H __FILE__
> +
> +/* Register for IEC */
> +#define EXYNOS4_IECDPCCR (0x00000)
> +
> +/* Register for APC */
> +#define EXYNOS4_APC_CONTROL (0x10010)
> +#define EXYNOS4_APC_PREDLYSEL (0x10024)
> +#define EXYNOS4_APC_DBG_DLYCODE (0x100E0)
Is there any specific reason to have parentheses around the numbers ?
^ permalink raw reply
* [PATCH] ARM: mark empty gpio.h files empty
From: Linus Walleij @ 2011-10-28 20:19 UTC (permalink / raw)
To: linux-arm-kernel
It is generally a better idea to make intentionally empty files
contain the human-readable /* empty */ comment, also it makes
the files play nice with "make distclean".
Reported-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/mach-lpc32xx/include/mach/gpio.h | 1 +
arch/arm/mach-tegra/include/mach/gpio.h | 1 +
arch/arm/mach-u300/include/mach/gpio.h | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio.h b/arch/arm/mach-lpc32xx/include/mach/gpio.h
index e69de29..40a8c17 100644
--- a/arch/arm/mach-lpc32xx/include/mach/gpio.h
+++ b/arch/arm/mach-lpc32xx/include/mach/gpio.h
@@ -0,0 +1 @@
+/* empty */
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index e69de29..40a8c17 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -0,0 +1 @@
+/* empty */
diff --git a/arch/arm/mach-u300/include/mach/gpio.h b/arch/arm/mach-u300/include/mach/gpio.h
index e69de29..40a8c17 100644
--- a/arch/arm/mach-u300/include/mach/gpio.h
+++ b/arch/arm/mach-u300/include/mach/gpio.h
@@ -0,0 +1 @@
+/* empty */
--
1.7.3.2
^ permalink raw reply related
* [PATCH] ARM: mark empty gpio.h files empty
From: Jeff Garzik @ 2011-10-28 20:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319833142-4764-1-git-send-email-linus.walleij@linaro.org>
On 10/28/2011 04:19 PM, Linus Walleij wrote:
> It is generally a better idea to make intentionally empty files
> contain the human-readable /* empty */ comment, also it makes
> the files play nice with "make distclean".
>
> Reported-by: Jeff Garzik<jeff@garzik.org>
> Signed-off-by: Linus Walleij<linus.walleij@linaro.org>
Thanks!
Acked-by: Jeff Garzik <jgarzik@redhat.com>
^ permalink raw reply
* [PATCH] DaVinci: only poll EPCPR on DM644x and DM355
From: Sergei Shtylyov @ 2011-10-28 20:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB5930328B2DF8C@dbde02.ent.ti.com>
Hello.
On 23.10.2011 18:18, Nori, Sekhar wrote:
>>> OMAP-L137 and OMAP-L138 have additional power domains for DSP
>>> and Shared RAM, but do not support powering them down.
>> I haven't found such words in either OMAP-L137 or OMAP-L138 datasheets.
>> What they say is:
>>
>> <<
>> - On PSC0 PD1/PD_DSP Domain: Controls the sleep state for DSP L1 and L2 Memories
>> - On PSC1 PD1/PD_SHRAM Domain: Controls the sleep state for the 128K Shared RAM
>> >>
>>
>> Although "OMAP-L137 Application Processor System Reference Guide" indeed
>> said that powering off domain 1 is not supported.
> Right. There is a statement put in for shared ram as well.
That's domain 1 too, just on PSC1. :-)
> "
> Currently powering down the RAMs via the pseudo/RAM power domain is not
> supported; therefore, these domains and the RAM should be left in their
> default power on state.
> "
>
> BTW, it looks like a separate "System Reference Guide" doesn't exist
> anymore and all the OMAP-L1x user guides have been consolidated to a
> single "Technical Reference Manual".
Thanks, didn't know it...
>> Actually, I was able to power down DSP/shared RAM domains on DA830 (at
>> least the state transition completed); although the domains were on, at least
>> after U-Boot. That's how I checked that the code powering up these domains
>> actually locks up on this SoC.
> Okay. Surely there must have been some corner case issues found
> which probably led the chip design team to make this feature
> unsupported.
>
>>> So, looks like the only SoC where PDSTAT might indicate a powered
>>> down domain is DM644x and existing code to looks alright for
>>> that SoC.
>>> At this time, it would be better to leave the code as-is and
>>> revisit it if/when a new SoC with programmable power domain
>>> support comes along.
>> At least on DA830 power domains appear to be programmable. So I'd still
>> like the patch to be applied (I could drop DM355 check though).
> The problem would be that power domain state transition procedure isn't
> documented for any SoC other than DM644x. So, we can never be sure
> that just avoiding EPCR poll is sufficient for DA830. Software attempting
> this would be operating out of spec.
>
> So, how about allowing a power domain transition for DM644x and bailing
> out with a warning if a power domain on any other SoC is found to be off?
>
> This way users attempting this will be warned and fix their boot loader.
Good idea. I probably won't be able to recast the patch soon as I'm
on vacations and don't have Linux on my laptop (yet).
> Thanks,
> Sekhar
WBR, Sergei
^ permalink raw reply
* [GIT PULL] GIC DT binding support
From: Rob Herring @ 2011-10-28 21:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4EA5DADC.7030805@gmail.com>
Arnd,
On 10/24/2011 04:38 PM, Rob Herring wrote:
> Arnd,
>
> I'm not sure if you want a rebased branch to fix merge conflicts or not.
> If that's okay, please pull. I've also fixed the msm compile failure.
>
> The dependencies are v3.1-rc9 and rmk's devel-stable.
>
Here's an updated pull request to fix missing export.h include. Now it's
also dependent on module.h clean-up branch:
git://openlinux.windriver.com/people/paulg/linux-next for-sfr
The following changes since commit fa1d6d372245a160eecf5f57d64d2b21ea248e08:
Merge branch 'for-sfr' of
git://openlinux.windriver.com/people/paulg/linux-next into HEAD
(2011-10-28 15:51:07 -0500)
are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git gic-dt
Rob Herring (5):
of/irq: introduce of_irq_init
irq: support domains with non-zero hwirq base
ARM: gic: add irq_domain support
ARM: gic: add OF based initialization
ARM: gic: fix irq_alloc_descs handling for sparse irq
Documentation/devicetree/bindings/arm/gic.txt | 55 +++++++
arch/arm/common/Kconfig | 1 +
arch/arm/common/gic.c | 188
++++++++++++++++--------
arch/arm/include/asm/hardware/gic.h | 10 +-
drivers/of/irq.c | 107 ++++++++++++++
include/linux/irqdomain.h | 16 ++-
include/linux/of_irq.h | 3 +
kernel/irq/irqdomain.c | 12 +-
8 files changed, 320 insertions(+), 72 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/gic.txt
Rob
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox