Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-12-08 Thread Pankaj Dubey
On 18 November 2016 at 19:02, Arnd Bergmann wrote: > On Friday, November 18, 2016 12:48:07 PM CET Russell King - ARM Linux wrote: >> On Fri, Nov 18, 2016 at 01:14:35PM +0100, Arnd Bergmann wrote: >> > @@ -41,6 +43,9 @@ void scu_enable(void __iomem *scu_base) >> > { >> > u32

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-12-08 Thread Pankaj Dubey
On 18 November 2016 at 19:02, Arnd Bergmann wrote: > On Friday, November 18, 2016 12:48:07 PM CET Russell King - ARM Linux wrote: >> On Fri, Nov 18, 2016 at 01:14:35PM +0100, Arnd Bergmann wrote: >> > @@ -41,6 +43,9 @@ void scu_enable(void __iomem *scu_base) >> > { >> > u32 scu_ctrl; >> >

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-18 Thread Arnd Bergmann
On Friday, November 18, 2016 12:48:07 PM CET Russell King - ARM Linux wrote: > On Fri, Nov 18, 2016 at 01:14:35PM +0100, Arnd Bergmann wrote: > > @@ -41,6 +43,9 @@ void scu_enable(void __iomem *scu_base) > > { > > u32 scu_ctrl; > > > > + if (scu_base) > > + scu_base =

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-18 Thread Arnd Bergmann
On Friday, November 18, 2016 12:48:07 PM CET Russell King - ARM Linux wrote: > On Fri, Nov 18, 2016 at 01:14:35PM +0100, Arnd Bergmann wrote: > > @@ -41,6 +43,9 @@ void scu_enable(void __iomem *scu_base) > > { > > u32 scu_ctrl; > > > > + if (scu_base) > > + scu_base =

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-18 Thread Russell King - ARM Linux
On Fri, Nov 18, 2016 at 01:14:35PM +0100, Arnd Bergmann wrote: > @@ -41,6 +43,9 @@ void scu_enable(void __iomem *scu_base) > { > u32 scu_ctrl; > > + if (scu_base) > + scu_base = scu_base_addr; > + This looks to me like nonsense. > #ifdef CONFIG_ARM_ERRATA_764369 >

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-18 Thread Russell King - ARM Linux
On Fri, Nov 18, 2016 at 01:14:35PM +0100, Arnd Bergmann wrote: > @@ -41,6 +43,9 @@ void scu_enable(void __iomem *scu_base) > { > u32 scu_ctrl; > > + if (scu_base) > + scu_base = scu_base_addr; > + This looks to me like nonsense. > #ifdef CONFIG_ARM_ERRATA_764369 >

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-18 Thread Arnd Bergmann
On Friday, November 18, 2016 8:54:30 AM CET pankaj.dubey wrote: > >> Please let me know if any concern in this approach. > > > > I think ideally we wouldn't even need to know the virtual address > > outside of smp_scu.c. If we can move all users of the address > > into that file directly, it

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-18 Thread Arnd Bergmann
On Friday, November 18, 2016 8:54:30 AM CET pankaj.dubey wrote: > >> Please let me know if any concern in this approach. > > > > I think ideally we wouldn't even need to know the virtual address > > outside of smp_scu.c. If we can move all users of the address > > into that file directly, it

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-17 Thread pankaj.dubey
On Thursday 17 November 2016 10:33 PM, Arnd Bergmann wrote: > On Thursday, November 17, 2016 9:50:27 AM CET pankaj.dubey wrote: >> > of_scu_enable() which _only_ looks up the SCU address in DT and enables > it if it finds it, otherwise returning failure. > > a9_scu_enable() which

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-17 Thread pankaj.dubey
On Thursday 17 November 2016 10:33 PM, Arnd Bergmann wrote: > On Thursday, November 17, 2016 9:50:27 AM CET pankaj.dubey wrote: >> > of_scu_enable() which _only_ looks up the SCU address in DT and enables > it if it finds it, otherwise returning failure. > > a9_scu_enable() which

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-17 Thread Arnd Bergmann
On Thursday, November 17, 2016 9:50:27 AM CET pankaj.dubey wrote: > > >>> of_scu_enable() which _only_ looks up the SCU address in DT and enables > >>> it if it finds it, otherwise returning failure. > >>> > >>> a9_scu_enable() which tries to use the A9 provided SCU address and > >>> enables it

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-17 Thread Arnd Bergmann
On Thursday, November 17, 2016 9:50:27 AM CET pankaj.dubey wrote: > > >>> of_scu_enable() which _only_ looks up the SCU address in DT and enables > >>> it if it finds it, otherwise returning failure. > >>> > >>> a9_scu_enable() which tries to use the A9 provided SCU address and > >>> enables it

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-16 Thread pankaj.dubey
Hi Russell, On Monday 14 November 2016 08:21 PM, Russell King - ARM Linux wrote: > On Mon, Nov 14, 2016 at 03:37:44PM +0100, Arnd Bergmann wrote: >> On Monday, November 14, 2016 1:50:18 PM CET Russell King - ARM Linux wrote: >>> On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote:

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-16 Thread pankaj.dubey
Hi Russell, On Monday 14 November 2016 08:21 PM, Russell King - ARM Linux wrote: > On Mon, Nov 14, 2016 at 03:37:44PM +0100, Arnd Bergmann wrote: >> On Monday, November 14, 2016 1:50:18 PM CET Russell King - ARM Linux wrote: >>> On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote:

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-16 Thread pankaj.dubey
Hi Russell, On Monday 14 November 2016 07:18 PM, Russell King - ARM Linux wrote: > This should be sent _to_ me because it's touching generic ARM code. > Thanks. > Sorry for this. I had included your email in CC for this patch, but looks like my email client had some issue and this patch could

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-16 Thread pankaj.dubey
Hi Russell, On Monday 14 November 2016 07:18 PM, Russell King - ARM Linux wrote: > This should be sent _to_ me because it's touching generic ARM code. > Thanks. > Sorry for this. I had included your email in CC for this patch, but looks like my email client had some issue and this patch could

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Russell King - ARM Linux
On Mon, Nov 14, 2016 at 03:37:44PM +0100, Arnd Bergmann wrote: > On Monday, November 14, 2016 1:50:18 PM CET Russell King - ARM Linux wrote: > > On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote: > > > On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > > > > >> +

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Russell King - ARM Linux
On Mon, Nov 14, 2016 at 03:37:44PM +0100, Arnd Bergmann wrote: > On Monday, November 14, 2016 1:50:18 PM CET Russell King - ARM Linux wrote: > > On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote: > > > On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > > > > >> +

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Arnd Bergmann
On Monday, November 14, 2016 1:50:18 PM CET Russell King - ARM Linux wrote: > On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote: > > On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > > > >> +scu_base = of_iomap(np, 0); > > > >> +of_node_put(np); > > > >> +if

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Arnd Bergmann
On Monday, November 14, 2016 1:50:18 PM CET Russell King - ARM Linux wrote: > On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote: > > On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > > > >> +scu_base = of_iomap(np, 0); > > > >> +of_node_put(np); > > > >> +if

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Russell King - ARM Linux
On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote: > On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > > >> +scu_base = of_iomap(np, 0); > > >> +of_node_put(np); > > >> +if (!scu_base) { > > >> +pr_err("%s failed to map scu_base via DT\n",

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Russell King - ARM Linux
On Mon, Nov 14, 2016 at 01:03:09PM +0100, Arnd Bergmann wrote: > On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > > >> +scu_base = of_iomap(np, 0); > > >> +of_node_put(np); > > >> +if (!scu_base) { > > >> +pr_err("%s failed to map scu_base via DT\n",

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Russell King - ARM Linux
This should be sent _to_ me because it's touching generic ARM code. Thanks. On Mon, Nov 14, 2016 at 10:31:56AM +0530, Pankaj Dubey wrote: > Many platforms are duplicating code for enabling SCU, lets add > common code to enable SCU by parsing SCU device node so the duplication > in each platform

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Russell King - ARM Linux
This should be sent _to_ me because it's touching generic ARM code. Thanks. On Mon, Nov 14, 2016 at 10:31:56AM +0530, Pankaj Dubey wrote: > Many platforms are duplicating code for enabling SCU, lets add > common code to enable SCU by parsing SCU device node so the duplication > in each platform

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Arnd Bergmann
On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > >> +scu_base = of_iomap(np, 0); > >> +of_node_put(np); > >> +if (!scu_base) { > >> +pr_err("%s failed to map scu_base via DT\n", __func__); > > > > For non-ca5, non-ca9 based SoCs, we'll see this error msg.

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Arnd Bergmann
On Monday, November 14, 2016 2:10:16 PM CET pankaj.dubey wrote: > >> +scu_base = of_iomap(np, 0); > >> +of_node_put(np); > >> +if (!scu_base) { > >> +pr_err("%s failed to map scu_base via DT\n", __func__); > > > > For non-ca5, non-ca9 based SoCs, we'll see this error msg.

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Jisheng Zhang
Hi Pankaj, On Mon, 14 Nov 2016 14:54:59 +0800 Jisheng Zhang wrote: > On Mon, 14 Nov 2016 14:12:51 +0800 Jisheng Zhang wrote: > > > Hi Pankaj, > > > > On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: > > > > > Many platforms are duplicating code for enabling SCU, lets add > > > common

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread Jisheng Zhang
Hi Pankaj, On Mon, 14 Nov 2016 14:54:59 +0800 Jisheng Zhang wrote: > On Mon, 14 Nov 2016 14:12:51 +0800 Jisheng Zhang wrote: > > > Hi Pankaj, > > > > On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: > > > > > Many platforms are duplicating code for enabling SCU, lets add > > > common

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread pankaj.dubey
Hi Jisheng, On Monday 14 November 2016 12:24 PM, Jisheng Zhang wrote: > > On Mon, 14 Nov 2016 14:12:51 +0800 Jisheng Zhang wrote: > >> Hi Pankaj, >> >>> + * Helper API to get SCU base address >>> + * In case platform DT do not have SCU node, or iomap fails >>> + * this call will fallback and

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread pankaj.dubey
Hi Jisheng, On Monday 14 November 2016 12:24 PM, Jisheng Zhang wrote: > > On Mon, 14 Nov 2016 14:12:51 +0800 Jisheng Zhang wrote: > >> Hi Pankaj, >> >>> + * Helper API to get SCU base address >>> + * In case platform DT do not have SCU node, or iomap fails >>> + * this call will fallback and

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread pankaj.dubey
Hi Jisheng, On Monday 14 November 2016 11:42 AM, Jisheng Zhang wrote: > Hi Pankaj, > > On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: >> + >> +np = of_find_matching_node(NULL, scu_match); > > could we check np before calling of_iomap()? > of_iomap takes care of that, and will

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-14 Thread pankaj.dubey
Hi Jisheng, On Monday 14 November 2016 11:42 AM, Jisheng Zhang wrote: > Hi Pankaj, > > On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: >> + >> +np = of_find_matching_node(NULL, scu_match); > > could we check np before calling of_iomap()? > of_iomap takes care of that, and will

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-13 Thread Jisheng Zhang
On Mon, 14 Nov 2016 14:12:51 +0800 Jisheng Zhang wrote: > Hi Pankaj, > > On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: > > > Many platforms are duplicating code for enabling SCU, lets add > > common code to enable SCU by parsing SCU device node so the duplication > > in each platform

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-13 Thread Jisheng Zhang
On Mon, 14 Nov 2016 14:12:51 +0800 Jisheng Zhang wrote: > Hi Pankaj, > > On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: > > > Many platforms are duplicating code for enabling SCU, lets add > > common code to enable SCU by parsing SCU device node so the duplication > > in each platform

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-13 Thread Jisheng Zhang
Hi Pankaj, On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: > Many platforms are duplicating code for enabling SCU, lets add > common code to enable SCU by parsing SCU device node so the duplication > in each platform can be avoided. > > CC: Krzysztof Kozlowski > CC:

Re: [PATCH 01/16] ARM: scu: Provide support for parsing SCU device node to enable SCU

2016-11-13 Thread Jisheng Zhang
Hi Pankaj, On Mon, 14 Nov 2016 10:31:56 +0530 Pankaj Dubey wrote: > Many platforms are duplicating code for enabling SCU, lets add > common code to enable SCU by parsing SCU device node so the duplication > in each platform can be avoided. > > CC: Krzysztof Kozlowski > CC: Jisheng Zhang > CC: