Skip to contentSkip to conversation

ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

PATCH New Dongsheng Wang 4 participants 17 messages Jun 4, 2015 – Jul 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

arch/arm/cpu/armv7/sunxi/psci_sun6i.S +2 -20
index d4cb51e..4ff46e4 100644
@@ -18,6 +18,8 @@
  */
 
 #include <config.h>
+
+#include <asm/arch-armv7/generictimer.h>
 #include <asm/gic.h>
 #include <asm/macro.h>
 #include <asm/psci.h>
@@ -43,26 +45,6 @@
 #define	GICD_BASE		0x1c81000
 #define	GICC_BASE		0x1c82000
 
-.macro	timer_wait	reg, ticks
-	@ Program CNTP_TVAL
-	movw	\reg, #(\ticks & 0xffff)
-	movt	\reg, #(\ticks >> 16)
-	mcr	p15, 0, \reg, c14, c2, 0
-	isb
-	@ Enable physical timer, mask interrupt
-	mov	\reg, #3
-	mcr	p15, 0, \reg, c14, c2, 1
-	@ Poll physical timer until ISTATUS is on
-1:	isb
-	mrc	p15, 0, \reg, c14, c2, 1
-	ands	\reg, \reg, #4
-	bne	1b
-	@ Disable timer
-	mov	\reg, #0
-	mcr	p15, 0, \reg, c14, c2, 1
-	isb
-.endm
-
 .globl	psci_fiq_enter
 psci_fiq_enter:
 	push	{r0-r12}
arch/arm/cpu/armv7/sunxi/psci_sun7i.S +2 -20
index bbfeec8..e15d587 100644
@@ -18,6 +18,8 @@
  */
 
 #include <config.h>
+
+#include <asm/arch-armv7/generictimer.h>
 #include <asm/gic.h>
 #include <asm/macro.h>
 #include <asm/psci.h>
@@ -43,26 +45,6 @@
 #define	GICD_BASE		0x1c81000
 #define	GICC_BASE		0x1c82000
 
-.macro	timer_wait	reg, ticks
-	@ Program CNTP_TVAL
-	movw	\reg, #(\ticks & 0xffff)
-	movt	\reg, #(\ticks >> 16)
-	mcr	p15, 0, \reg, c14, c2, 0
-	isb
-	@ Enable physical timer, mask interrupt
-	mov	\reg, #3
-	mcr	p15, 0, \reg, c14, c2, 1
-	@ Poll physical timer until ISTATUS is on
-1:	isb
-	mrc	p15, 0, \reg, c14, c2, 1
-	ands	\reg, \reg, #4
-	bne	1b
-	@ Disable timer
-	mov	\reg, #0
-	mcr	p15, 0, \reg, c14, c2, 1
-	isb
-.endm
-
 .globl	psci_fiq_enter
 psci_fiq_enter:
 	push	{r0-r12}
arch/arm/include/asm/arch-armv7/generictimer.h new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi all,

Sorry I was too busy recently, and I forgot to tag version information.

The patches should be marked for V2 version.

*V2*:
1. Retain the original author's Copyright.
2. Based on Chen-Yu Tsai's patch rebase this patch, factor out time_wait Macro from psci_sun7i.S and psci_sun6i.S.

Regards,
-Dongsheng

Quoted 159 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 04, 2015 12:01 PM
To: Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

arch/arm/cpu/armv7/sunxi/psci_sun6i.S +2 -20
index d4cb51e..4ff46e4 100644
@@ -18,6 +18,8 @@
  */
 
 #include <config.h>
+
+#include <asm/arch-armv7/generictimer.h>
 #include <asm/gic.h>
 #include <asm/macro.h>
 #include <asm/psci.h>
@@ -43,26 +45,6 @@
 #define	GICD_BASE		0x1c81000
 #define	GICC_BASE		0x1c82000
 
-.macro	timer_wait	reg, ticks
-	@ Program CNTP_TVAL
-	movw	\reg, #(\ticks & 0xffff)
-	movt	\reg, #(\ticks >> 16)
-	mcr	p15, 0, \reg, c14, c2, 0
-	isb
-	@ Enable physical timer, mask interrupt
-	mov	\reg, #3
-	mcr	p15, 0, \reg, c14, c2, 1
-	@ Poll physical timer until ISTATUS is on
-1:	isb
-	mrc	p15, 0, \reg, c14, c2, 1
-	ands	\reg, \reg, #4
-	bne	1b
-	@ Disable timer
-	mov	\reg, #0
-	mcr	p15, 0, \reg, c14, c2, 1
-	isb
-.endm
-
 .globl	psci_fiq_enter
 psci_fiq_enter:
 	push	{r0-r12}
arch/arm/cpu/armv7/sunxi/psci_sun7i.S +2 -20
index bbfeec8..e15d587 100644
@@ -18,6 +18,8 @@
  */
 
 #include <config.h>
+
+#include <asm/arch-armv7/generictimer.h>
 #include <asm/gic.h>
 #include <asm/macro.h>
 #include <asm/psci.h>
@@ -43,26 +45,6 @@
 #define	GICD_BASE		0x1c81000
 #define	GICC_BASE		0x1c82000
 
-.macro	timer_wait	reg, ticks
-	@ Program CNTP_TVAL
-	movw	\reg, #(\ticks & 0xffff)
-	movt	\reg, #(\ticks >> 16)
-	mcr	p15, 0, \reg, c14, c2, 0
-	isb
-	@ Enable physical timer, mask interrupt
-	mov	\reg, #3
-	mcr	p15, 0, \reg, c14, c2, 1
-	@ Poll physical timer until ISTATUS is on
-1:	isb
-	mrc	p15, 0, \reg, c14, c2, 1
-	ands	\reg, \reg, #4
-	bne	1b
-	@ Disable timer
-	mov	\reg, #0
-	mcr	p15, 0, \reg, c14, c2, 1
-	isb
-.endm
-
 .globl	psci_fiq_enter
 psci_fiq_enter:
 	push	{r0-r12}
arch/arm/include/asm/arch-armv7/generictimer.h new file +50 -1
new file mode 100644
index 0000000..0956d7c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2013 - ARM Ltd
+ * Author: Marc Zyngier <[email protected]>
+ *
+ * Based on code by Carl van Schaik <[email protected]>.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _GENERICTIMER_H_
+#define _GENERICTIMER_H_
+
+#ifdef __ASSEMBLY__
+
+/*
+ * This macro provide a physical timer that can be used for delay in the code.
+ * The macro is moved from sunxi/psci_sun7i.S
+ *
+ * reg: is used in this macro.
+ * ticks: The freq is based on generic timer.
+ */
+.macro	timer_wait	reg, ticks
+	movw	\reg, #(\ticks & 0xffff)
+	movt	\reg, #(\ticks >> 16)
+	mcr	p15, 0, \reg, c14, c2, 0
+	isb
+	mov	\reg, #3
+	mcr	p15, 0, \reg, c14, c2, 1
+1 :	isb
+	mrc	p15, 0, \reg, c14, c2, 1
+	ands	\reg, \reg, #4
+	bne	1b
+	mov	\reg, #0
+	mcr	p15, 0, \reg, c14, c2, 1
+	isb
+.endm
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _GENERICTIMER_H_ */
--

2.1.0.27.g96db324

#2 lore raw

PATCH 2/2 arm/ls102xa: Add PSCI support for ls102xa

In reply to Dongsheng Wang

From: Wang Dongsheng <[email protected]>

Base on PSCI services, implement CPU_ON/CPU_OFF for ls102xa platform.

Tested on LS1021AQDS, LS1021ATWR.
Test CPU hotplug times: 60K
Test kernel boot times: 1.2K

arch/arm/cpu/armv7/ls102xa/Makefile +4 -0
index 2e6a207..2d55782 100644
@@ -12,3 +12,7 @@ obj-y	+= fsl_epu.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
 obj-$(CONFIG_SPL) += spl.o
+
+ifdef CONFIG_ARMV7_PSCI
+obj-y  += psci.o
+endif
arch/arm/cpu/armv7/ls102xa/psci.S new file +126 -0

126 lines not on this page · raw message

include/configs/ls1021aqds.h +2 -0
index ca913b0..7232cd9 100644
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
include/configs/ls1021atwr.h +2 -0
index 6b6f2ba..b618be5 100644
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
Signature · 1 line
2.1.0.27.g96db324
#3 lore raw

PATCH 2/2 arm/ls102xa: Add PSCI support for ls102xa

Should be marked for V2 version.

*V2*:
Nothing has changed.

Regards,
-Dongsheng

Quoted 192 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 04, 2015 12:01 PM
To: Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

From: Wang Dongsheng <[email protected]>

Base on PSCI services, implement CPU_ON/CPU_OFF for ls102xa platform.

Tested on LS1021AQDS, LS1021ATWR.
Test CPU hotplug times: 60K
Test kernel boot times: 1.2K

arch/arm/cpu/armv7/ls102xa/Makefile +4 -0
index 2e6a207..2d55782 100644
@@ -12,3 +12,7 @@ obj-y	+= fsl_epu.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
 obj-$(CONFIG_SPL) += spl.o
+
+ifdef CONFIG_ARMV7_PSCI
+obj-y  += psci.o
+endif
arch/arm/cpu/armv7/ls102xa/psci.S new file +125 -0
new file mode 100644
index 0000000..cf5cd48
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2015 Freescale Semiconductor, Inc.
+ * Author: Wang Dongsheng <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/linkage.h>
+
+#include <asm/armv7.h>
+#include <asm/arch-armv7/generictimer.h> #include <asm/psci.h>
+
+#define SCFG_CORE0_SFT_RST      0x130
+#define SCFG_CORESRENCR         0x204
+
+#define DCFG_CCSR_BRR           0x0E4
+#define DCFG_CCSR_SCRATCHRW1    0x200
+
+	.pushsection ._secure.text, "ax"
+
+	.arch_extension sec
+
+#define	ONE_MS		(GENERIC_TIMER_CLK / 1000)
+#define	RESET_WAIT	(30 * ONE_MS)
+
+	@ r1 = target CPU
+	@ r2 = target PC
+.globl	psci_cpu_on
+psci_cpu_on:
+	push	{lr}
+
+	@ Clear and Get the correct CPU number
+	@ r1 = 0xf01
+	and	r1, r1, #0xff
+
+	mov	r0, r1
+	bl	psci_get_cpu_stack_top
+	str	r2, [r0]
+	dsb
+
+	@ Get DCFG base address
+	movw	r4, #(CONFIG_SYS_FSL_GUTS_ADDR & 0xffff)
+	movt	r4, #(CONFIG_SYS_FSL_GUTS_ADDR >> 16)
+
+	@ Detect target CPU state
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	rev	r2, r2
+	lsr	r2, r2, r1
+	ands	r2, r2, #1
+	beq	holdoff_release
+
+	@ Reset target CPU
+	@ Get SCFG base address
+	movw	r0, #(CONFIG_SYS_FSL_SCFG_ADDR & 0xffff)
+	movt	r0, #(CONFIG_SYS_FSL_SCFG_ADDR >> 16)
+
+	@ Enable CORE Soft Reset
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+	@ Get CPUx offset register
+	mov	r6, #0x4
+	mul	r6, r6, r1
+	add	r2, r0, r6
+
+	@ Do reset on target CPU
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r2, #SCFG_CORE0_SFT_RST]
+
+	@ Wait target CPU up
+	timer_wait	r2, RESET_WAIT
+
+	@ Disable CORE soft reset
+	mov	r5, #0
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+holdoff_release:
+	@ Release on target CPU
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	mov	r6, #1
+	lsl	r6, r6, r1	@ 32 bytes per CPU
+
+	rev	r6, r6
+	orr	r2, r2, r6
+	str	r2, [r4, #DCFG_CCSR_BRR]
+
+	@ Set secondary boot entry
+	ldr	r6, =psci_cpu_entry
+	rev	r6, r6
+	str	r6, [r4, #DCFG_CCSR_SCRATCHRW1]
+
+	isb
+	dsb
+
+	@ Return
+	mov	r0, #ARM_PSCI_RET_SUCCESS
+
+	pop	{lr}
+	bx	lr
+
+.globl	psci_cpu_off
+psci_cpu_off:
+	bl	psci_cpu_off_common
+
+1:	wfi
+	b	1b
+
+.globl	psci_arch_init
+psci_arch_init:
+	mov	r6, lr
+
+	bl	psci_get_cpu_id
+	bl	psci_get_cpu_stack_top
+	mov	sp, r0
+
+	bx	r6
+
+	.globl psci_text_end
+psci_text_end:
+	.popsection
include/configs/ls1021aqds.h index renamed from include/configs/ls1021aqds.h +0 -0

ca913b0..7232cd9 100644

include/configs/ls1021aqds.h +2 -0
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
include/configs/ls1021atwr.h index renamed from include/configs/ls1021atwr.h +0 -0

6b6f2ba..b618be5 100644

include/configs/ls1021atwr.h +2 -1
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
--

2.1.0.27.g96db324

#4 lore raw

PATCH 2/2 arm/ls102xa: Add PSCI support for ls102xa

Hi York,

Could you ACK this patch?

Regards,
-Dongsheng

Quoted 212 lines

-----Original Message-----
From: Wang Dongsheng-B40534
Sent: Thursday, June 04, 2015 12:18 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de
Subject: RE: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

Should be marked for V2 version.

*V2*:
Nothing has changed.

Regards,
-Dongsheng

Quoted 195 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 04, 2015 12:01 PM
To: Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

From: Wang Dongsheng <[email protected]>

Base on PSCI services, implement CPU_ON/CPU_OFF for ls102xa platform.

Tested on LS1021AQDS, LS1021ATWR.
Test CPU hotplug times: 60K
Test kernel boot times: 1.2K

arch/arm/cpu/armv7/ls102xa/Makefile +4 -0
index 2e6a207..2d55782 100644
@@ -12,3 +12,7 @@ obj-y	+= fsl_epu.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
 obj-$(CONFIG_SPL) += spl.o
+
+ifdef CONFIG_ARMV7_PSCI
+obj-y  += psci.o
+endif
arch/arm/cpu/armv7/ls102xa/psci.S new file +125 -0
new file mode 100644
index 0000000..cf5cd48
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2015 Freescale Semiconductor, Inc.
+ * Author: Wang Dongsheng <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/linkage.h>
+
+#include <asm/armv7.h>
+#include <asm/arch-armv7/generictimer.h> #include <asm/psci.h>
+
+#define SCFG_CORE0_SFT_RST      0x130
+#define SCFG_CORESRENCR         0x204
+
+#define DCFG_CCSR_BRR           0x0E4
+#define DCFG_CCSR_SCRATCHRW1    0x200
+
+	.pushsection ._secure.text, "ax"
+
+	.arch_extension sec
+
+#define	ONE_MS		(GENERIC_TIMER_CLK / 1000)
+#define	RESET_WAIT	(30 * ONE_MS)
+
+	@ r1 = target CPU
+	@ r2 = target PC
+.globl	psci_cpu_on
+psci_cpu_on:
+	push	{lr}
+
+	@ Clear and Get the correct CPU number
+	@ r1 = 0xf01
+	and	r1, r1, #0xff
+
+	mov	r0, r1
+	bl	psci_get_cpu_stack_top
+	str	r2, [r0]
+	dsb
+
+	@ Get DCFG base address
+	movw	r4, #(CONFIG_SYS_FSL_GUTS_ADDR & 0xffff)
+	movt	r4, #(CONFIG_SYS_FSL_GUTS_ADDR >> 16)
+
+	@ Detect target CPU state
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	rev	r2, r2
+	lsr	r2, r2, r1
+	ands	r2, r2, #1
+	beq	holdoff_release
+
+	@ Reset target CPU
+	@ Get SCFG base address
+	movw	r0, #(CONFIG_SYS_FSL_SCFG_ADDR & 0xffff)
+	movt	r0, #(CONFIG_SYS_FSL_SCFG_ADDR >> 16)
+
+	@ Enable CORE Soft Reset
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+	@ Get CPUx offset register
+	mov	r6, #0x4
+	mul	r6, r6, r1
+	add	r2, r0, r6
+
+	@ Do reset on target CPU
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r2, #SCFG_CORE0_SFT_RST]
+
+	@ Wait target CPU up
+	timer_wait	r2, RESET_WAIT
+
+	@ Disable CORE soft reset
+	mov	r5, #0
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+holdoff_release:
+	@ Release on target CPU
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	mov	r6, #1
+	lsl	r6, r6, r1	@ 32 bytes per CPU
+
+	rev	r6, r6
+	orr	r2, r2, r6
+	str	r2, [r4, #DCFG_CCSR_BRR]
+
+	@ Set secondary boot entry
+	ldr	r6, =psci_cpu_entry
+	rev	r6, r6
+	str	r6, [r4, #DCFG_CCSR_SCRATCHRW1]
+
+	isb
+	dsb
+
+	@ Return
+	mov	r0, #ARM_PSCI_RET_SUCCESS
+
+	pop	{lr}
+	bx	lr
+
+.globl	psci_cpu_off
+psci_cpu_off:
+	bl	psci_cpu_off_common
+
+1:	wfi
+	b	1b
+
+.globl	psci_arch_init
+psci_arch_init:
+	mov	r6, lr
+
+	bl	psci_get_cpu_id
+	bl	psci_get_cpu_stack_top
+	mov	sp, r0
+
+	bx	r6
+
+	.globl psci_text_end
+psci_text_end:
+	.popsection
(quoted diff) +0 -0

b/include/configs/ls1021aqds.h index
ca913b0..7232cd9 100644

include/configs/ls1021aqds.h +2 -0
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
(quoted diff) +0 -0

b/include/configs/ls1021atwr.h index
6b6f2ba..b618be5 100644

include/configs/ls1021atwr.h +2 -1
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
--

2.1.0.27.g96db324

#5 lore raw

PATCH 2/2 arm/ls102xa: Add PSCI support for ls102xa

Hi Alison,

Could you ACK this patch? If there is not feedback.

Regards,
-Dongsheng

Quoted 233 lines

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Wang Dongsheng
Sent: Tuesday, July 14, 2015 3:14 PM
To: Sun York-R58495
Cc: Wang Huan-B18965; u-boot at lists.denx.de; jan.kiszka at siemens.com; ijc at hellion.org.uk
Subject: Re: [U-Boot] [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

Hi York,

Could you ACK this patch?

Regards,
-Dongsheng

Quoted 206 lines

-----Original Message-----
From: Wang Dongsheng-B40534
Sent: Thursday, June 04, 2015 12:18 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de
Subject: RE: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

Should be marked for V2 version.

*V2*:
Nothing has changed.

Regards,
-Dongsheng

Quoted 188 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 04, 2015 12:01 PM
To: Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

From: Wang Dongsheng <[email protected]>

Base on PSCI services, implement CPU_ON/CPU_OFF for ls102xa platform.

Tested on LS1021AQDS, LS1021ATWR.
Test CPU hotplug times: 60K
Test kernel boot times: 1.2K

arch/arm/cpu/armv7/ls102xa/Makefile +4 -0
index 2e6a207..2d55782 100644
@@ -12,3 +12,7 @@ obj-y	+= fsl_epu.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
 obj-$(CONFIG_SPL) += spl.o
+
+ifdef CONFIG_ARMV7_PSCI
+obj-y  += psci.o
+endif
arch/arm/cpu/armv7/ls102xa/psci.S new file +125 -0
new file mode 100644
index 0000000..cf5cd48
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2015 Freescale Semiconductor, Inc.
+ * Author: Wang Dongsheng <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/linkage.h>
+
+#include <asm/armv7.h>
+#include <asm/arch-armv7/generictimer.h> #include <asm/psci.h>
+
+#define SCFG_CORE0_SFT_RST      0x130
+#define SCFG_CORESRENCR         0x204
+
+#define DCFG_CCSR_BRR           0x0E4
+#define DCFG_CCSR_SCRATCHRW1    0x200
+
+	.pushsection ._secure.text, "ax"
+
+	.arch_extension sec
+
+#define	ONE_MS		(GENERIC_TIMER_CLK / 1000)
+#define	RESET_WAIT	(30 * ONE_MS)
+
+	@ r1 = target CPU
+	@ r2 = target PC
+.globl	psci_cpu_on
+psci_cpu_on:
+	push	{lr}
+
+	@ Clear and Get the correct CPU number
+	@ r1 = 0xf01
+	and	r1, r1, #0xff
+
+	mov	r0, r1
+	bl	psci_get_cpu_stack_top
+	str	r2, [r0]
+	dsb
+
+	@ Get DCFG base address
+	movw	r4, #(CONFIG_SYS_FSL_GUTS_ADDR & 0xffff)
+	movt	r4, #(CONFIG_SYS_FSL_GUTS_ADDR >> 16)
+
+	@ Detect target CPU state
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	rev	r2, r2
+	lsr	r2, r2, r1
+	ands	r2, r2, #1
+	beq	holdoff_release
+
+	@ Reset target CPU
+	@ Get SCFG base address
+	movw	r0, #(CONFIG_SYS_FSL_SCFG_ADDR & 0xffff)
+	movt	r0, #(CONFIG_SYS_FSL_SCFG_ADDR >> 16)
+
+	@ Enable CORE Soft Reset
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+	@ Get CPUx offset register
+	mov	r6, #0x4
+	mul	r6, r6, r1
+	add	r2, r0, r6
+
+	@ Do reset on target CPU
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r2, #SCFG_CORE0_SFT_RST]
+
+	@ Wait target CPU up
+	timer_wait	r2, RESET_WAIT
+
+	@ Disable CORE soft reset
+	mov	r5, #0
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+holdoff_release:
+	@ Release on target CPU
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	mov	r6, #1
+	lsl	r6, r6, r1	@ 32 bytes per CPU
+
+	rev	r6, r6
+	orr	r2, r2, r6
+	str	r2, [r4, #DCFG_CCSR_BRR]
+
+	@ Set secondary boot entry
+	ldr	r6, =psci_cpu_entry
+	rev	r6, r6
+	str	r6, [r4, #DCFG_CCSR_SCRATCHRW1]
+
+	isb
+	dsb
+
+	@ Return
+	mov	r0, #ARM_PSCI_RET_SUCCESS
+
+	pop	{lr}
+	bx	lr
+
+.globl	psci_cpu_off
+psci_cpu_off:
+	bl	psci_cpu_off_common
+
+1:	wfi
+	b	1b
+
+.globl	psci_arch_init
+psci_arch_init:
+	mov	r6, lr
+
+	bl	psci_get_cpu_id
+	bl	psci_get_cpu_stack_top
+	mov	sp, r0
+
+	bx	r6
+
+	.globl psci_text_end
+psci_text_end:
+	.popsection
(quoted diff) +0 -0

b/include/configs/ls1021aqds.h index
ca913b0..7232cd9 100644

include/configs/ls1021aqds.h +2 -0
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
(quoted diff) +0 -0

b/include/configs/ls1021atwr.h index
6b6f2ba..b618be5 100644

include/configs/ls1021atwr.h +0 -0
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
Quoted 7 lines
Quoted 7 lines
include/configs/ls1021atwr.h +2 -1
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw

PATCH 2/2 arm/ls102xa: Add PSCI support for ls102xa

Hi, dongsheng,

It looks ok for me.

Best Regards,
Alison Wang

Quoted 252 lines

-----Original Message-----
From: Wang Dongsheng-B40534
Sent: Wednesday, July 15, 2015 10:11 AM
To: Wang Huan-B18965; Kushwaha Prabhakar-B32579
Cc: Wang Huan-B18965; u-boot at lists.denx.de; jan.kiszka at siemens.com; ijc at hellion.org.uk; Sun York-R58495
Subject: RE: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

Hi Alison,

Could you ACK this patch? If there is not feedback.

Regards,
-Dongsheng

Quoted 10 lines

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Wang Dongsheng
Sent: Tuesday, July 14, 2015 3:14 PM
To: Sun York-R58495
Cc: Wang Huan-B18965; u-boot at lists.denx.de; jan.kiszka at siemens.com; ijc at hellion.org.uk
Subject: Re: [U-Boot] [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

Quoted 38 lines

Hi York,

Could you ACK this patch?

Regards,
-Dongsheng

Quoted 31 lines

-----Original Message-----
From: Wang Dongsheng-B40534
Sent: Thursday, June 04, 2015 12:18 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de
Subject: RE: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

Should be marked for V2 version.

*V2*:
Nothing has changed.

Regards,
-Dongsheng

Quoted 13 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 04, 2015 12:01 PM
To: Sun York-R58495
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH 2/2] arm/ls102xa: Add PSCI support for ls102xa

From: Wang Dongsheng <[email protected]>

Base on PSCI services, implement CPU_ON/CPU_OFF for ls102xa

platform.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Tested on LS1021AQDS, LS1021ATWR.
Test CPU hotplug times: 60K
Test kernel boot times: 1.2K

Quoted 8 lines
Quoted 8 lines

arch/arm/cpu/armv7/ls102xa/Makefile obj-y += fsl_epu.o · line 13

Quoted 8 lines
arch/arm/cpu/armv7/ls102xa/Makefile +0 -0
index 2e6a207..2d55782 100644
@@ -12,3 +12,7 @@ obj-y	+= fsl_epu.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o

ls102xa_serdes.o

Quoted 172 lines
Quoted 160 lines
Quoted 160 lines
arch/arm/cpu/armv7/ls102xa/Makefile +4 -0
 obj-$(CONFIG_SPL) += spl.o
+
+ifdef CONFIG_ARMV7_PSCI
+obj-y  += psci.o
+endif
arch/arm/cpu/armv7/ls102xa/psci.S new file +125 -0
new file mode 100644
index 0000000..cf5cd48
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2015 Freescale Semiconductor, Inc.
+ * Author: Wang Dongsheng <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/linkage.h>
+
+#include <asm/armv7.h>
+#include <asm/arch-armv7/generictimer.h> #include <asm/psci.h>
+
+#define SCFG_CORE0_SFT_RST      0x130
+#define SCFG_CORESRENCR         0x204
+
+#define DCFG_CCSR_BRR           0x0E4
+#define DCFG_CCSR_SCRATCHRW1    0x200
+
+	.pushsection ._secure.text, "ax"
+
+	.arch_extension sec
+
+#define	ONE_MS		(GENERIC_TIMER_CLK / 1000)
+#define	RESET_WAIT	(30 * ONE_MS)
+
+	@ r1 = target CPU
+	@ r2 = target PC
+.globl	psci_cpu_on
+psci_cpu_on:
+	push	{lr}
+
+	@ Clear and Get the correct CPU number
+	@ r1 = 0xf01
+	and	r1, r1, #0xff
+
+	mov	r0, r1
+	bl	psci_get_cpu_stack_top
+	str	r2, [r0]
+	dsb
+
+	@ Get DCFG base address
+	movw	r4, #(CONFIG_SYS_FSL_GUTS_ADDR & 0xffff)
+	movt	r4, #(CONFIG_SYS_FSL_GUTS_ADDR >> 16)
+
+	@ Detect target CPU state
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	rev	r2, r2
+	lsr	r2, r2, r1
+	ands	r2, r2, #1
+	beq	holdoff_release
+
+	@ Reset target CPU
+	@ Get SCFG base address
+	movw	r0, #(CONFIG_SYS_FSL_SCFG_ADDR & 0xffff)
+	movt	r0, #(CONFIG_SYS_FSL_SCFG_ADDR >> 16)
+
+	@ Enable CORE Soft Reset
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+	@ Get CPUx offset register
+	mov	r6, #0x4
+	mul	r6, r6, r1
+	add	r2, r0, r6
+
+	@ Do reset on target CPU
+	movw	r5, #0
+	movt	r5, #(1 << 15)
+	rev	r5, r5
+	str	r5, [r2, #SCFG_CORE0_SFT_RST]
+
+	@ Wait target CPU up
+	timer_wait	r2, RESET_WAIT
+
+	@ Disable CORE soft reset
+	mov	r5, #0
+	str	r5, [r0, #SCFG_CORESRENCR]
+
+holdoff_release:
+	@ Release on target CPU
+	ldr	r2, [r4, #DCFG_CCSR_BRR]
+	mov	r6, #1
+	lsl	r6, r6, r1	@ 32 bytes per CPU
+
+	rev	r6, r6
+	orr	r2, r2, r6
+	str	r2, [r4, #DCFG_CCSR_BRR]
+
+	@ Set secondary boot entry
+	ldr	r6, =psci_cpu_entry
+	rev	r6, r6
+	str	r6, [r4, #DCFG_CCSR_SCRATCHRW1]
+
+	isb
+	dsb
+
+	@ Return
+	mov	r0, #ARM_PSCI_RET_SUCCESS
+
+	pop	{lr}
+	bx	lr
+
+.globl	psci_cpu_off
+psci_cpu_off:
+	bl	psci_cpu_off_common
+
+1:	wfi
+	b	1b
+
+.globl	psci_arch_init
+psci_arch_init:
+	mov	r6, lr
+
+	bl	psci_get_cpu_id
+	bl	psci_get_cpu_stack_top
+	mov	sp, r0
+
+	bx	r6
+
+	.globl psci_text_end
+psci_text_end:
+	.popsection
(quoted diff) +0 -0

b/include/configs/ls1021aqds.h index
ca913b0..7232cd9 100644

include/configs/ls1021aqds.h +2 -0
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
(quoted diff) +0 -0

b/include/configs/ls1021atwr.h index
6b6f2ba..b618be5 100644

include/configs/ls1021atwr.h +0 -0
@@ -11,6 +11,8 @@
 
 #define CONFIG_LS102XA
 
Quoted 7 lines
Quoted 7 lines
include/configs/ls1021atwr.h +2 -1
+#define CONFIG_ARMV7_PSCI
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_DISPLAY_CPUINFO
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#8 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

In reply to Dongsheng Wang

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any issues).

Regards,

Hans

Quoted 138 lines
arch/arm/cpu/armv7/sunxi/psci_sun6i.S +2 -20
index d4cb51e..4ff46e4 100644
@@ -18,6 +18,8 @@
   */
 
  #include <config.h>
+
+#include <asm/arch-armv7/generictimer.h>
  #include <asm/gic.h>
  #include <asm/macro.h>
  #include <asm/psci.h>
@@ -43,26 +45,6 @@
  #define	GICD_BASE		0x1c81000
  #define	GICC_BASE		0x1c82000
 
-.macro	timer_wait	reg, ticks
-	@ Program CNTP_TVAL
-	movw	\reg, #(\ticks & 0xffff)
-	movt	\reg, #(\ticks >> 16)
-	mcr	p15, 0, \reg, c14, c2, 0
-	isb
-	@ Enable physical timer, mask interrupt
-	mov	\reg, #3
-	mcr	p15, 0, \reg, c14, c2, 1
-	@ Poll physical timer until ISTATUS is on
-1:	isb
-	mrc	p15, 0, \reg, c14, c2, 1
-	ands	\reg, \reg, #4
-	bne	1b
-	@ Disable timer
-	mov	\reg, #0
-	mcr	p15, 0, \reg, c14, c2, 1
-	isb
-.endm
-
  .globl	psci_fiq_enter
  psci_fiq_enter:
  	push	{r0-r12}
arch/arm/cpu/armv7/sunxi/psci_sun7i.S +2 -20
index bbfeec8..e15d587 100644
@@ -18,6 +18,8 @@
   */
 
  #include <config.h>
+
+#include <asm/arch-armv7/generictimer.h>
  #include <asm/gic.h>
  #include <asm/macro.h>
  #include <asm/psci.h>
@@ -43,26 +45,6 @@
  #define	GICD_BASE		0x1c81000
  #define	GICC_BASE		0x1c82000
 
-.macro	timer_wait	reg, ticks
-	@ Program CNTP_TVAL
-	movw	\reg, #(\ticks & 0xffff)
-	movt	\reg, #(\ticks >> 16)
-	mcr	p15, 0, \reg, c14, c2, 0
-	isb
-	@ Enable physical timer, mask interrupt
-	mov	\reg, #3
-	mcr	p15, 0, \reg, c14, c2, 1
-	@ Poll physical timer until ISTATUS is on
-1:	isb
-	mrc	p15, 0, \reg, c14, c2, 1
-	ands	\reg, \reg, #4
-	bne	1b
-	@ Disable timer
-	mov	\reg, #0
-	mcr	p15, 0, \reg, c14, c2, 1
-	isb
-.endm
-
  .globl	psci_fiq_enter
  psci_fiq_enter:
  	push	{r0-r12}
arch/arm/include/asm/arch-armv7/generictimer.h new file +50 -0
new file mode 100644
index 0000000..0956d7c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2013 - ARM Ltd
+ * Author: Marc Zyngier <[email protected]>
+ *
+ * Based on code by Carl van Schaik <[email protected]>.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _GENERICTIMER_H_
+#define _GENERICTIMER_H_
+
+#ifdef __ASSEMBLY__
+
+/*
+ * This macro provide a physical timer that can be used for delay in the code.
+ * The macro is moved from sunxi/psci_sun7i.S
+ *
+ * reg: is used in this macro.
+ * ticks: The freq is based on generic timer.
+ */
+.macro	timer_wait	reg, ticks
+	movw	\reg, #(\ticks & 0xffff)
+	movt	\reg, #(\ticks >> 16)
+	mcr	p15, 0, \reg, c14, c2, 0
+	isb
+	mov	\reg, #3
+	mcr	p15, 0, \reg, c14, c2, 1
+1 :	isb
+	mrc	p15, 0, \reg, c14, c2, 1
+	ands	\reg, \reg, #4
+	bne	1b
+	mov	\reg, #0
+	mcr	p15, 0, \reg, c14, c2, 1
+	isb
+.endm
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _GENERICTIMER_H_ */
#9 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 22 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Thursday, June 04, 2015 6:15 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

Quoted 9 lines

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any issues).

Thanks for your review.

Sorry, I'm confused in your comments.
I based on git://git.denx.de/u-boot.git, master branch. Need I change the tree? Or ?

Regards,
-Dongsheng

#10 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 30 lines · Wang Dongsheng

Hi,

Quoted 28 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Thursday, June 04, 2015 6:15 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

Quoted 8 lines
Quoted 3 lines

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any issues).

Thanks for your review.

Sorry, I'm confused in your comments.
I based on git://git.denx.de/u-boot.git, master branch. Need I change the tree? Or ?

No everything is fine.

What I'm trying to say is that these patches should probably be merged by the ls102xa maintainer.

Regards,

Hans

#11 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi Hans,

Thanks.

Regards,
-Dongsheng

Quoted 61 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Friday, June 05, 2015 5:35 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 31 lines · Wang Dongsheng

Hi,

Quoted 29 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Thursday, June 04, 2015 6:15 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

Quoted 8 lines
Quoted 3 lines

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any issues).

Thanks for your review.

Sorry, I'm confused in your comments.
I based on git://git.denx.de/u-boot.git, master branch. Need I change the tree?

Or ?

No everything is fine.

What I'm trying to say is that these patches should probably be merged by the ls102xa maintainer.

Regards,

Hans

#12 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Quoted 65 lines · On 06/05/2015 02:39 AM, Wang Dongsheng-B40534 wrote:

Hi Hans,

Thanks.

Regards,
-Dongsheng

Quoted 58 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Friday, June 05, 2015 5:35 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 31 lines · Wang Dongsheng

Hi,

Quoted 29 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Thursday, June 04, 2015 6:15 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

Quoted 8 lines
Quoted 3 lines

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any issues).

Thanks for your review.

Sorry, I'm confused in your comments.
I based on git://git.denx.de/u-boot.git, master branch. Need I change the tree?

Or ?

No everything is fine.

What I'm trying to say is that these patches should probably be merged by the ls102xa maintainer.

I can take this set into fsl-qoriq.

York

#13 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 63 lines · York Sun
Quoted 60 lines · On 06/05/2015 02:39 AM, Wang Dongsheng-B40534 wrote:

Hi Hans,

Thanks.

Regards,
-Dongsheng

Quoted 53 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Friday, June 05, 2015 5:35 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 31 lines · Wang Dongsheng

Hi,

Quoted 29 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Thursday, June 04, 2015 6:15 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

Quoted 8 lines
Quoted 3 lines

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any issues).

Thanks for your review.

Sorry, I'm confused in your comments.
I based on git://git.denx.de/u-boot.git, master branch. Need I change the tree?

Or ?

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

No everything is fine.

What I'm trying to say is that these patches should probably be merged by the ls102xa maintainer.

I can take this set into fsl-qoriq.

That is fine with me.

Regards,

Hans

#14 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi York,

Could you apply this patch?

Regards,
-Dongsheng

Quoted 91 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Saturday, June 06, 2015 3:18 AM
To: Sun York-R58495; Wang Dongsheng-B40534
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 48 lines · York Sun
Quoted 45 lines · On 06/05/2015 02:39 AM, Wang Dongsheng-B40534 wrote:

Hi Hans,

Thanks.

Regards,
-Dongsheng

Quoted 38 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Friday, June 05, 2015 5:35 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 25 lines · Wang Dongsheng

Hi,

Quoted 23 lines

-----Original Message-----
From: Hans de Goede [mailto:hdegoede at redhat.com]
Sent: Thursday, June 04, 2015 6:15 PM
To: Wang Dongsheng-B40534; Sun York-R58495
Cc: ijc at hellion.org.uk; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Hi,

Quoted 7 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Thanks for rebasing this, looks good:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

As for upstreaming this, it is probably best for the entire set to go upstream through the same tree, although if people want I can upstream this one through the sunxi tree.

In the mean time I'll add this to the sunxi-wip branch of my personal repo so that it sees some testing (not that I'm expecting any

issues).

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

Thanks for your review.

Sorry, I'm confused in your comments.
I based on git://git.denx.de/u-boot.git, master branch. Need I change the

tree?

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines

Or ?

No everything is fine.

What I'm trying to say is that these patches should probably be merged by the ls102xa maintainer.

I can take this set into fsl-qoriq.

That is fine with me.

Regards,

Hans

#16 lore raw

PATCH 1/2 ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Thanks. :)

Regards,
-Dongsheng

Quoted 25 lines

-----Original Message-----
From: Sun York-R58495
Sent: Tuesday, July 21, 2015 5:14 AM
To: Wang Dongsheng-B40534
Cc: ijc at hellion.org.uk; hdegoede at redhat.com; albert.u.boot at aribaud.net; jan.kiszka at siemens.com; Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui- B35336; u-boot at lists.denx.de
Subject: Re: [PATCH 1/2] ARMv7: Factor out reusable timer_wait from sunxi/psci_sun7i.S

Quoted 8 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

timer_wait is moved from sunxi/psci_sun7i.S, and it can be converted completely into a reusable armv7 generic timer. LS1021A will use it as well.

Applied to u-boot-fsl-qoriq master branch.

York