mbox

[GIT,PULL] Renesas ARM based r8a7778 SoC updates for v3.11

Message ID 1369648773-7941-1-git-send-email-horms+renesas@verge.net.au
State New
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-r8a7778-for-v3.11

Message

Simon Horman May 27, 2013, 9:59 a.m. UTC
Hi Arnd, Hi Olof,

The following changes since commit c7788792a5e7b0d5d7f96d0766b4cb6112d47d75:

  Linux 3.10-rc2 (2013-05-20 14:37:38 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-r8a7778-for-v3.11

for you to fetch changes up to 35019d7f4aba4c4ccece584b872a8ebcdd62e6fa:

  ARM: shmobile: r8a7778: correct model name in Kconfig (2013-05-27 18:22:42 +0900)

----------------------------------------------------------------
Renesas ARM based sh7778 SoC updates for v3.11

* Correction of model name in Kconfig by Sergei Shtylyov
* Registration of SDHI and PFC devices by Kuninori Morimoto
* Extended clock coverage by Kuninori Morimoto
* Correction of ethernet device's platform driver name by Sergei Shtylyov

----------------------------------------------------------------
Kuninori Morimoto (7):
      ARM: shmobile: use do{ }while() on SH_CLK_SET_RATIO()
      ARM: shmobile: add GPIO IRQ macro
      ARM: shmobile: r8a7778: fixup Ether setup code position
      ARM: shmobile: r8a7778: use fixed ratio clock
      ARM: shmobile: r8a7778: Register PFC device
      ARM: shmobile: r8a7778: add SDHI clock support
      ARM: shmobile: r8a7778: Register SDHI device

Sergei Shtylyov (2):
      ARM: shmobile: r8a7778: fix Ether device name
      ARM: shmobile: r8a7778: correct model name in Kconfig

 arch/arm/mach-shmobile/Kconfig                |    3 +-
 arch/arm/mach-shmobile/clock-r8a7778.c        |  156 ++++++++++++++++++++++---
 arch/arm/mach-shmobile/include/mach/clock.h   |    4 +-
 arch/arm/mach-shmobile/include/mach/irqs.h    |    5 +
 arch/arm/mach-shmobile/include/mach/r8a7778.h |    3 +
 arch/arm/mach-shmobile/setup-r8a7778.c        |   65 ++++++++---
 6 files changed, 206 insertions(+), 30 deletions(-)

Comments

Olof Johansson May 28, 2013, 4:07 a.m. UTC | #1
On Mon, May 27, 2013 at 06:59:26PM +0900, Simon Horman wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> R-Car series gpio_rcar driver can control GPIO IRQ today.
> It needs base IRQ number for gpio_rcar_config :: .irq_base
> This patch adds macro for GPIO IRQ.
> This patch was tested on Bock-W board
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  arch/arm/mach-shmobile/include/mach/irqs.h |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
> index b2074e2..d241bfd 100644
> --- a/arch/arm/mach-shmobile/include/mach/irqs.h
> +++ b/arch/arm/mach-shmobile/include/mach/irqs.h
> @@ -16,4 +16,9 @@
>  #define IRQPIN_BASE		2000
>  #define irq_pin(nr)		((nr) + IRQPIN_BASE)
>  
> +/* GPIO IRQ */
> +#define _GPIO_IRQ_BASE		2500
> +#define GPIO_IRQ_BASE(x)	(_GPIO_IRQ_BASE + (32 * x))
> +#define GPIO_IRQ(x, y)		(_GPIO_IRQ_BASE + (32 * x) + y)
> +
>  #endif /* __ASM_MACH_IRQS_H */

Hmm. It'd be real nice to see some effort on moving this over to sparse
irq instead. That'll be needed for full device tree conversion anyway. And
with that, the static irq bases will be gone, so drivers and some of
the platform code will need to be adjusted accordingly.


-Olof
Magnus Damm May 28, 2013, 5:53 a.m. UTC | #2
Hi Olof,

On Tue, May 28, 2013 at 1:07 PM, Olof Johansson <olof@lixom.net> wrote:
> On Mon, May 27, 2013 at 06:59:26PM +0900, Simon Horman wrote:
>> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>
>> R-Car series gpio_rcar driver can control GPIO IRQ today.
>> It needs base IRQ number for gpio_rcar_config :: .irq_base
>> This patch adds macro for GPIO IRQ.
>> This patch was tested on Bock-W board
>>
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>> ---
>>  arch/arm/mach-shmobile/include/mach/irqs.h |    5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
>> index b2074e2..d241bfd 100644
>> --- a/arch/arm/mach-shmobile/include/mach/irqs.h
>> +++ b/arch/arm/mach-shmobile/include/mach/irqs.h
>> @@ -16,4 +16,9 @@
>>  #define IRQPIN_BASE          2000
>>  #define irq_pin(nr)          ((nr) + IRQPIN_BASE)
>>
>> +/* GPIO IRQ */
>> +#define _GPIO_IRQ_BASE               2500
>> +#define GPIO_IRQ_BASE(x)     (_GPIO_IRQ_BASE + (32 * x))
>> +#define GPIO_IRQ(x, y)               (_GPIO_IRQ_BASE + (32 * x) + y)
>> +
>>  #endif /* __ASM_MACH_IRQS_H */
>
> Hmm. It'd be real nice to see some effort on moving this over to sparse
> irq instead. That'll be needed for full device tree conversion anyway. And
> with that, the static irq bases will be gone, so drivers and some of
> the platform code will need to be adjusted accordingly.

I believe we've been doing sparse IRQ for ages, this is just to make
non-DT stuff more readable.

Or was there some particular other interface you wanted us to use for
non-DT board code?

Cheers,

/ magnus
Olof Johansson May 28, 2013, 6:18 a.m. UTC | #3
On Tue, May 28, 2013 at 02:53:04PM +0900, Magnus Damm wrote:
> Hi Olof,
> 
> On Tue, May 28, 2013 at 1:07 PM, Olof Johansson <olof@lixom.net> wrote:
> > On Mon, May 27, 2013 at 06:59:26PM +0900, Simon Horman wrote:
> >> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >>
> >> R-Car series gpio_rcar driver can control GPIO IRQ today.
> >> It needs base IRQ number for gpio_rcar_config :: .irq_base
> >> This patch adds macro for GPIO IRQ.
> >> This patch was tested on Bock-W board
> >>
> >> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >> ---
> >>  arch/arm/mach-shmobile/include/mach/irqs.h |    5 +++++
> >>  1 file changed, 5 insertions(+)
> >>
> >> diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
> >> index b2074e2..d241bfd 100644
> >> --- a/arch/arm/mach-shmobile/include/mach/irqs.h
> >> +++ b/arch/arm/mach-shmobile/include/mach/irqs.h
> >> @@ -16,4 +16,9 @@
> >>  #define IRQPIN_BASE          2000
> >>  #define irq_pin(nr)          ((nr) + IRQPIN_BASE)
> >>
> >> +/* GPIO IRQ */
> >> +#define _GPIO_IRQ_BASE               2500
> >> +#define GPIO_IRQ_BASE(x)     (_GPIO_IRQ_BASE + (32 * x))
> >> +#define GPIO_IRQ(x, y)               (_GPIO_IRQ_BASE + (32 * x) + y)
> >> +
> >>  #endif /* __ASM_MACH_IRQS_H */
> >
> > Hmm. It'd be real nice to see some effort on moving this over to sparse
> > irq instead. That'll be needed for full device tree conversion anyway. And
> > with that, the static irq bases will be gone, so drivers and some of
> > the platform code will need to be adjusted accordingly.
> 
> I believe we've been doing sparse IRQ for ages, this is just to make
> non-DT stuff more readable.
> 
> Or was there some particular other interface you wanted us to use for
> non-DT board code?

Sorry, terminology confusion on my side. Most other platforms sorted
this out when they moved to sparse irq, removing most hardcoded interrupt
numbers at the same time and handling it through DT. But since shmobile
still has a ways to go on DT conversion things are a bit different.

Either way, once things have been converted fully to DT, most of these
static numberings can/should be possible to remove.


-Olof
Magnus Damm May 30, 2013, 1:32 a.m. UTC | #4
Hey Olof,

On Tue, May 28, 2013 at 3:18 PM, Olof Johansson <olof@lixom.net> wrote:
> On Tue, May 28, 2013 at 02:53:04PM +0900, Magnus Damm wrote:
>> Hi Olof,
>>
>> On Tue, May 28, 2013 at 1:07 PM, Olof Johansson <olof@lixom.net> wrote:
>> > On Mon, May 27, 2013 at 06:59:26PM +0900, Simon Horman wrote:
>> >> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> >>
>> >> R-Car series gpio_rcar driver can control GPIO IRQ today.
>> >> It needs base IRQ number for gpio_rcar_config :: .irq_base
>> >> This patch adds macro for GPIO IRQ.
>> >> This patch was tested on Bock-W board
>> >>
>> >> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> >> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>> >> ---
>> >>  arch/arm/mach-shmobile/include/mach/irqs.h |    5 +++++
>> >>  1 file changed, 5 insertions(+)
>> >>
>> >> diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
>> >> index b2074e2..d241bfd 100644
>> >> --- a/arch/arm/mach-shmobile/include/mach/irqs.h
>> >> +++ b/arch/arm/mach-shmobile/include/mach/irqs.h
>> >> @@ -16,4 +16,9 @@
>> >>  #define IRQPIN_BASE          2000
>> >>  #define irq_pin(nr)          ((nr) + IRQPIN_BASE)
>> >>
>> >> +/* GPIO IRQ */
>> >> +#define _GPIO_IRQ_BASE               2500
>> >> +#define GPIO_IRQ_BASE(x)     (_GPIO_IRQ_BASE + (32 * x))
>> >> +#define GPIO_IRQ(x, y)               (_GPIO_IRQ_BASE + (32 * x) + y)
>> >> +
>> >>  #endif /* __ASM_MACH_IRQS_H */
>> >
>> > Hmm. It'd be real nice to see some effort on moving this over to sparse
>> > irq instead. That'll be needed for full device tree conversion anyway. And
>> > with that, the static irq bases will be gone, so drivers and some of
>> > the platform code will need to be adjusted accordingly.
>>
>> I believe we've been doing sparse IRQ for ages, this is just to make
>> non-DT stuff more readable.
>>
>> Or was there some particular other interface you wanted us to use for
>> non-DT board code?
>
> Sorry, terminology confusion on my side. Most other platforms sorted
> this out when they moved to sparse irq, removing most hardcoded interrupt
> numbers at the same time and handling it through DT. But since shmobile
> still has a ways to go on DT conversion things are a bit different.
>
> Either way, once things have been converted fully to DT, most of these
> static numberings can/should be possible to remove.

Yes, exactly! Please note that the current drivers are written to be
DT aware and the IRQ code makes use of IRQ domains, so like you say
the DT -reference board code does not need to make use of these kind
of macros.

However, we are still not able to swith to DT fully due to lack of DT
support for PINMUX/GPIO. One even larger road block is the common
clock framework. And then we have the I/O power domains used with
Runtime PM on sh7372.

Thanks for your help,

/ magnus