From 2c408d149299e99c89fc4be80fb4fe00a7016f02 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 27 Jun 2013 08:48:07 +0900 Subject: ARM: shmobile: Update romImage to relocate appended DTB Instead of relying of MACH_TYPE for board identification, update the romImage code to relocate an appended DTB to the beginning of RAM. This implementation is independent of ARM_APPENDED_DTB, this because it is necessary to copy the DTB to memory so the kernel can access it. Without this patch Mackerel does not boot via the Mask ROM over USB (r_usb_boot) - this since non-DT boot was broken ages ago in commit: 0ce53cd ARM: mach-shmobile: Use DT_MACHINE for mackerel Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/zboot.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index f2d8744c1f1..c3c4669a2d7 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h @@ -1,7 +1,6 @@ #ifndef ZBOOT_H #define ZBOOT_H -#include #include /************************************************** @@ -11,7 +10,6 @@ **************************************************/ #ifdef CONFIG_MACH_MACKEREL -#define MACH_TYPE MACH_TYPE_MACKEREL #define MEMORY_START 0x40000000 #include "mach/head-mackerel.txt" #else -- cgit v1.2.3-70-g09d2 From bdea6c657e15a709e666ea707e72327c555e8e04 Mon Sep 17 00:00:00 2001 From: Tetsuyuki Kobayashi Date: Wed, 10 Jul 2013 10:56:35 +0900 Subject: ARM: shmobile: fix compile error when CONFIG_THUMB2_KERNEL=y On KZM-A9-GT board (SMP), when CONFIG_THUMB2_KERNEL=y it fails to compile AS arch/arm/mach-shmobile/headsmp-scu.o /proj/koba/kernel/arm-soc/arch/arm/mach-shmobile/headsmp-scu.S: Assembler messages: /proj/koba/kernel/arm-soc/arch/arm/mach-shmobile/headsmp-scu.S:41: Error: shift must be constant -- `bic r2,r2,r3,lsl r1' make[2]: *** [arch/arm/mach-shmobile/headsmp-scu.o] Error 1 make[1]: *** [arch/arm/mach-shmobile] Error 2 make: *** [sub-make] Error 2 Instruction `bic r2,r2,r3,lsl r1' is not supported in thumb mode. This patch split it into 2 instructions. Signed-off-by: Tetsuyuki Kobayashi Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/headsmp-scu.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/headsmp-scu.S b/arch/arm/mach-shmobile/headsmp-scu.S index 6f986546725..5ce416c090e 100644 --- a/arch/arm/mach-shmobile/headsmp-scu.S +++ b/arch/arm/mach-shmobile/headsmp-scu.S @@ -38,7 +38,8 @@ ENTRY(shmobile_boot_scu) lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits ldr r2, [r0, #8] @ SCU Power Status Register mov r3, #3 - bic r2, r2, r3, lsl r1 @ Clear bits of our CPU (Run Mode) + lsl r3, r3, r1 + bic r2, r2, r3 @ Clear bits of our CPU (Run Mode) str r2, [r0, #8] @ write back b shmobile_invalidate_start -- cgit v1.2.3-70-g09d2 From c1d7e2e80079148626e6c411e56708d86311d31a Mon Sep 17 00:00:00 2001 From: Tetsuyuki Kobayashi Date: Wed, 10 Jul 2013 10:56:36 +0900 Subject: ARM: shmobile: Force ARM mode to compile reset vector for secondary CPUs Instructions start from boot vector must be ARM mode. This patch specify ARM mode explicitly and use 'bx' instruction to be able to change to Thumb mode. Signed-off-by: Tetsuyuki Kobayashi Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/headsmp.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index 559d1ce5f57..afed58e52ae 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S @@ -26,10 +26,13 @@ ENDPROC(shmobile_invalidate_start) * This will be mapped at address 0 by SBAR register. * We need _long_ jump to the physical address. */ + .arm .align 12 ENTRY(shmobile_boot_vector) ldr r0, 2f - ldr pc, 1f + ldr r1, 1f + bx r1 + ENDPROC(shmobile_boot_vector) .globl shmobile_boot_fn -- cgit v1.2.3-70-g09d2 From 0b933cb305e7a987e0a711ee15457bd70055d682 Mon Sep 17 00:00:00 2001 From: Tetsuyuki Kobayashi Date: Wed, 10 Jul 2013 10:56:37 +0900 Subject: ARM: shmobile: Insert align directives before 4 bytes data In thumb2 mode instructions are not align to 4 byte. This patch insert align directives before putting 4 byte data. Signed-off-by: Tetsuyuki Kobayashi Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/headsmp-scu.S | 1 + arch/arm/mach-shmobile/headsmp.S | 1 + arch/arm/mach-shmobile/sleep-sh7372.S | 2 ++ 3 files changed, 4 insertions(+) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/headsmp-scu.S b/arch/arm/mach-shmobile/headsmp-scu.S index 5ce416c090e..0a77488df87 100644 --- a/arch/arm/mach-shmobile/headsmp-scu.S +++ b/arch/arm/mach-shmobile/headsmp-scu.S @@ -46,6 +46,7 @@ ENTRY(shmobile_boot_scu) ENDPROC(shmobile_boot_scu) .text + .align 2 .globl shmobile_scu_base shmobile_scu_base: .space 4 diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index afed58e52ae..dfb41dfc894 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S @@ -35,6 +35,7 @@ ENTRY(shmobile_boot_vector) ENDPROC(shmobile_boot_vector) + .align 2 .globl shmobile_boot_fn shmobile_boot_fn: 1: .space 4 diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S index 53f4840e494..9782862899e 100644 --- a/arch/arm/mach-shmobile/sleep-sh7372.S +++ b/arch/arm/mach-shmobile/sleep-sh7372.S @@ -41,6 +41,7 @@ sh7372_resume_core_standby_sysc: ldr pc, 1f + .align 2 .globl sh7372_cpu_resume sh7372_cpu_resume: 1: .space 4 @@ -96,6 +97,7 @@ sh7372_do_idle_sysc: 1: b 1b + .align 2 kernel_flush: .word v7_flush_dcache_all #endif -- cgit v1.2.3-70-g09d2 From 93d8a6fbe69a629a7bb37bb546699a5c49963dc5 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 16 Jul 2013 12:32:04 +0200 Subject: ARM: shmobile: r8a7740: Fix TPU clock name The TPU device is called renesas-tpu-pwm, not renesas_tpu_pwm. Fix the clock name accordingly. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/clock-r8a7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index de10fd78bf2..f4265e52432 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c @@ -596,7 +596,7 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]), - CLKDEV_DEV_ID("renesas_tpu_pwm", &mstp_clks[MSTP304]), + CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]), CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), -- cgit v1.2.3-70-g09d2 From ab40900b70dc31a64f23b1b4dbb0917afb039775 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 19 Jul 2013 18:02:16 +0200 Subject: ARM: shmobile: armadillo800eva-reference: fix compiler warning Fix the compiler warning: arch/arm/mach-shmobile/board-armadillo800eva-reference.c:196:2: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-shmobile/board-armadillo800eva-reference.c:196:2: warning: (near initialization for '__mach_desc_ARMADILLO800EVA_DT.restart') [enabled by default] While at it also remove superfluous parenthesis. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c index 03b85fec2dd..8f677df2d4c 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c @@ -190,10 +190,10 @@ static void __init eva_init(void) } #define RESCNT2 IOMEM(0xe6188020) -static void eva_restart(char mode, const char *cmd) +static void eva_restart(enum reboot_mode mode, const char *cmd) { /* Do soft power on reset */ - writel((1 << 31), RESCNT2); + writel(1 << 31, RESCNT2); } static const char *eva_boards_compat_dt[] __initdata = { -- cgit v1.2.3-70-g09d2