Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-03 Thread Jisheng Zhang
Hi Andrew, On Tue, 3 Jun 2014 00:50:11 -0700 Andrew Lunn wrote: > > We don't support independently power off cpu on BG2 and BG2Q in linux > > kernel. So we can assume that bootloader has powered on the CPUs > > Can i assume from your answer that the hardware does actually support > independent

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-03 Thread Andrew Lunn
> We don't support independently power off cpu on BG2 and BG2Q in linux kernel. > So we can assume that bootloader has powered on the CPUs Can i assume from your answer that the hardware does actually support independent power off/on of CPUs? It could be added sometime in the future. Andr

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-03 Thread Jisheng Zhang
On Tue, 3 Jun 2014 00:10:17 -0700 Antoine Ténart wrote: > Hi Jisheng, > > On Tue, Jun 03, 2014 at 02:31:13PM +0800, Jisheng Zhang wrote: > > On Mon, 2 Jun 2014 02:21:02 -0700 > > Antoine Ténart wrote: > > > + > > > +extern void berlin_secondary_startup(void); > > > +extern u32 boot_inst; > > >

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-03 Thread Antoine Ténart
Hi Jisheng, On Tue, Jun 03, 2014 at 02:31:13PM +0800, Jisheng Zhang wrote: > On Mon, 2 Jun 2014 02:21:02 -0700 > Antoine Ténart wrote: > > + > > +extern void berlin_secondary_startup(void); > > +extern u32 boot_inst; > > + > > +static void __iomem *cpu_ctrl; > > + > > +static inline void berlin_r

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Jisheng Zhang
Hi Antoine, On Mon, 2 Jun 2014 02:21:02 -0700 Antoine Ténart wrote: > Adds SMP support for Berlin SoCs. Secondary CPUs are reseted, then > execute the instruction we put in the reset exception register, setting > the pc at the address contained in the software reset address register, > which is

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Jisheng Zhang
Hi Andrew, Antoine, On Mon, 2 Jun 2014 03:27:50 -0700 Antoine Ténart wrote: > On Mon, Jun 02, 2014 at 12:03:32PM +0200, Andrew Lunn wrote: > > On Mon, Jun 02, 2014 at 12:00:48PM +0200, Antoine Ténart wrote: > > > Hi Andrew, > > > > > > On Mon, Jun 02, 2014 at 11:47:15AM +0200, Andrew Lunn wrot

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Antoine Ténart
On Mon, Jun 02, 2014 at 12:03:32PM +0200, Andrew Lunn wrote: > On Mon, Jun 02, 2014 at 12:00:48PM +0200, Antoine Ténart wrote: > > Hi Andrew, > > > > On Mon, Jun 02, 2014 at 11:47:15AM +0200, Andrew Lunn wrote: > > > On Mon, Jun 02, 2014 at 11:21:02AM +0200, Antoine Ténart wrote: > > > > + > > > >

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Andrew Lunn
On Mon, Jun 02, 2014 at 12:00:48PM +0200, Antoine Ténart wrote: > Hi Andrew, > > On Mon, Jun 02, 2014 at 11:47:15AM +0200, Andrew Lunn wrote: > > On Mon, Jun 02, 2014 at 11:21:02AM +0200, Antoine Ténart wrote: > > > + > > > +static inline void berlin_reset_cpu(unsigned int cpu) > > > +{ > > > + u3

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Antoine Ténart
Hi Andrew, On Mon, Jun 02, 2014 at 11:47:15AM +0200, Andrew Lunn wrote: > On Mon, Jun 02, 2014 at 11:21:02AM +0200, Antoine Ténart wrote: > > + > > +static inline void berlin_reset_cpu(unsigned int cpu) > > +{ > > + u32 val; > > + > > + val = readl(cpu_ctrl + CPU_RESET); > > + val |= BIT(cpu

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Andrew Lunn
On Mon, Jun 02, 2014 at 11:21:02AM +0200, Antoine Ténart wrote: > + > +static inline void berlin_reset_cpu(unsigned int cpu) > +{ > + u32 val; > + > + val = readl(cpu_ctrl + CPU_RESET); > + val |= BIT(cpu_logical_map(cpu)); > + writel(val, cpu_ctrl + CPU_RESET); > +} Hi Antoine Is

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Antoine Ténart
On Mon, Jun 02, 2014 at 10:29:13AM +0100, Russell King - ARM Linux wrote: > On Mon, Jun 02, 2014 at 11:21:02AM +0200, Antoine Ténart wrote: > > diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig > > index d3c5f14dc142..e3733692f67a 100644 > > --- a/arch/arm/mach-berlin/Kconfig

Re: [PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Russell King - ARM Linux
On Mon, Jun 02, 2014 at 11:21:02AM +0200, Antoine Ténart wrote: > diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig > index d3c5f14dc142..e3733692f67a 100644 > --- a/arch/arm/mach-berlin/Kconfig > +++ b/arch/arm/mach-berlin/Kconfig > @@ -4,6 +4,7 @@ config ARCH_BERLIN >

[PATCH 1/5] ARM: berlin: add SMP support

2014-06-02 Thread Antoine Ténart
Adds SMP support for Berlin SoCs. Secondary CPUs are reseted, then execute the instruction we put in the reset exception register, setting the pc at the address contained in the software reset address register, which is the physical address of the Berlin secondary startup. This implementation avoi