All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
@ 2013-03-18 16:38 Phil Edworthy
  2013-03-18 17:13 ` Sergei Shtylyov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Phil Edworthy @ 2013-03-18 16:38 UTC (permalink / raw)
  To: linux-sh


Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
Depends on "r8a7779: Add Display Unit clock support"

 arch/arm/mach-shmobile/clock-r8a7779.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 9ea6087..a017418 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -87,6 +87,7 @@ static struct clk div4_clks[DIV4_NR] = {
 };
 
 enum { MSTP323, MSTP322, MSTP321, MSTP320,
+	MSTP116,
 	MSTP103, MSTP101, MSTP100,
 	MSTP030,
 	MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
@@ -99,6 +100,7 @@ static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */
 	[MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */
 	[MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */
+	[MSTP116] = SH_CLK_MSTP32(&div4_clks[DIV4_S], MSTPCR1, 16, 0), /* PCIe */
 	[MSTP103] = SH_CLK_MSTP32(&div4_clks[DIV4_S], MSTPCR1,  3, 0), /* DU */
 	[MSTP101] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1,  1, 0), /* USB2 */
 	[MSTP100] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1,  0, 0), /* USB0/1 */
@@ -182,6 +184,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */
 	CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */
+	CLKDEV_DEV_ID("rcar-pcie.0", &mstp_clks[MSTP116]), /* PCIe */
 };
 
 void __init r8a7779_clock_init(void)
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
  2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
@ 2013-03-18 17:13 ` Sergei Shtylyov
  2013-03-18 17:20 ` phil.edworthy
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2013-03-18 17:13 UTC (permalink / raw)
  To: linux-sh

Hello.

On 18-03-2013 20:38, Phil Edworthy wrote:

> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> ---
> Depends on "r8a7779: Add Display Unit clock support"

>   arch/arm/mach-shmobile/clock-r8a7779.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
> index 9ea6087..a017418 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7779.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7779.c
[...]
> @@ -182,6 +184,7 @@ static struct clk_lookup lookups[] = {
>   	CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
>   	CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */
>   	CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */
> +	CLKDEV_DEV_ID("rcar-pcie.0", &mstp_clks[MSTP116]), /* PCIe */

   Hm, why this name? Is there going to be a driver somewhere in drivers/pci/, 
and is there goiung to be more than one instance of PCIe?

WBR, Sergei


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
  2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
  2013-03-18 17:13 ` Sergei Shtylyov
@ 2013-03-18 17:20 ` phil.edworthy
  2013-03-18 17:24 ` Sergei Shtylyov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: phil.edworthy @ 2013-03-18 17:20 UTC (permalink / raw)
  To: linux-sh

Hi,

> Date: 18/03/2013 17:14
> Subject: Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
> 
> Hello.
> 
> On 18-03-2013 20:38, Phil Edworthy wrote:
> 
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > ---
> > Depends on "r8a7779: Add Display Unit clock support"
> 
> >   arch/arm/mach-shmobile/clock-r8a7779.c |    3 +++
> >   1 files changed, 3 insertions(+), 0 deletions(-)
> 
> > diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/
> mach-shmobile/clock-r8a7779.c
> > index 9ea6087..a017418 100644
> > --- a/arch/arm/mach-shmobile/clock-r8a7779.c
> > +++ b/arch/arm/mach-shmobile/clock-r8a7779.c
> [...]
> > @@ -182,6 +184,7 @@ static struct clk_lookup lookups[] = {
> >      CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 
*/
> >      CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 
*/
> >      CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */
> > +   CLKDEV_DEV_ID("rcar-pcie.0", &mstp_clks[MSTP116]), /* PCIe */
> 
>    Hm, why this name? Is there going to be a driver somewhere in 
> drivers/pci/, 
> and is there goiung to be more than one instance of PCIe?

Yes, I am writing a PCIe driver at the moment, the same hardware is used 
on a number of R-Car devices. For r8a7779 there is only one instance, but 
older SH devices have had multiple instances.

Thanks
Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
  2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
  2013-03-18 17:13 ` Sergei Shtylyov
  2013-03-18 17:20 ` phil.edworthy
@ 2013-03-18 17:24 ` Sergei Shtylyov
  2013-03-19  0:30 ` Simon Horman
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2013-03-18 17:24 UTC (permalink / raw)
  To: linux-sh

Hello.

On 18-03-2013 21:20, phil.edworthy@renesas.com wrote:

>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>>> ---
>>> Depends on "r8a7779: Add Display Unit clock support"

>>>    arch/arm/mach-shmobile/clock-r8a7779.c |    3 +++
>>>    1 files changed, 3 insertions(+), 0 deletions(-)

>>> diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/
>> mach-shmobile/clock-r8a7779.c
>>> index 9ea6087..a017418 100644
>>> --- a/arch/arm/mach-shmobile/clock-r8a7779.c
>>> +++ b/arch/arm/mach-shmobile/clock-r8a7779.c
>> [...]
>>> @@ -182,6 +184,7 @@ static struct clk_lookup lookups[] = {
>>>       CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2
> */
>>>       CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3
> */
>>>       CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */
>>> +   CLKDEV_DEV_ID("rcar-pcie.0", &mstp_clks[MSTP116]), /* PCIe */

>>     Hm, why this name? Is there going to be a driver somewhere in
>> drivers/pci/,
>> and is there goiung to be more than one instance of PCIe?

> Yes, I am writing a PCIe driver at the moment,

    But I assume it will live under arch/arm/mach-shmobile/, and will it be a 
true driver?

> the same hardware is used
> on a number of R-Car devices. For r8a7779 there is only one instance,

    Then remove ".0" please, and use 'id' field of -1 in the platform device 
(if there's going to be any).

> Thanks
> Phil

WBR, Sergei


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
  2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
                   ` (2 preceding siblings ...)
  2013-03-18 17:24 ` Sergei Shtylyov
@ 2013-03-19  0:30 ` Simon Horman
  2013-03-19  8:58 ` phil.edworthy
  2013-03-19  9:08 ` phil.edworthy
  5 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2013-03-19  0:30 UTC (permalink / raw)
  To: linux-sh

On Mon, Mar 18, 2013 at 04:38:52PM +0000, Phil Edworthy wrote:
> 
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> ---
> Depends on "r8a7779: Add Display Unit clock support"

Hi Phil,

could you rebase this patch on top of the current soc or next branch in
the renesas tree on kernel.org?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
  2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
                   ` (3 preceding siblings ...)
  2013-03-19  0:30 ` Simon Horman
@ 2013-03-19  8:58 ` phil.edworthy
  2013-03-19  9:08 ` phil.edworthy
  5 siblings, 0 replies; 7+ messages in thread
From: phil.edworthy @ 2013-03-19  8:58 UTC (permalink / raw)
  To: linux-sh

Hi Sergei,

> On 18-03-2013 21:20, phil.edworthy@renesas.com wrote:
> 
> >>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> >>> ---
> >>> Depends on "r8a7779: Add Display Unit clock support"
> 
> >>>    arch/arm/mach-shmobile/clock-r8a7779.c |    3 +++
> >>>    1 files changed, 3 insertions(+), 0 deletions(-)
> 
> >>> diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/
> >> mach-shmobile/clock-r8a7779.c
> >>> index 9ea6087..a017418 100644
> >>> --- a/arch/arm/mach-shmobile/clock-r8a7779.c
> >>> +++ b/arch/arm/mach-shmobile/clock-r8a7779.c
> >> [...]
> >>> @@ -182,6 +184,7 @@ static struct clk_lookup lookups[] = {
> >>>       CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* 
SDHI2
> > */
> >>>       CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* 
SDHI3
> > */
> >>>       CLKDEV_DEV_ID("rcar-du.0", &mstp_clks[MSTP103]), /* DU */
> >>> +   CLKDEV_DEV_ID("rcar-pcie.0", &mstp_clks[MSTP116]), /* PCIe */
> 
> >>     Hm, why this name? Is there going to be a driver somewhere in
> >> drivers/pci/,
> >> and is there goiung to be more than one instance of PCIe?
> 
> > Yes, I am writing a PCIe driver at the moment,
> 
>     But I assume it will live under arch/arm/mach-shmobile/, and will it 
be a 
> true driver?

Actually, the plan is to implement the driver under /driver/pci/host. This 
is based on the work done for Marvell Armada and Tegra PCIe drivers. 
Please see http://www.spinics.net/lists/arm-kernel/msg228739.html and 
http://comments.gmane.org/gmane.linux.kernel/1419327

> > the same hardware is used
> > on a number of R-Car devices. For r8a7779 there is only one instance,
> 
>     Then remove ".0" please, and use 'id' field of -1 in the platform 
device 
> (if there's going to be any).
Ok, will do.

Thanks
Phil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
  2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
                   ` (4 preceding siblings ...)
  2013-03-19  8:58 ` phil.edworthy
@ 2013-03-19  9:08 ` phil.edworthy
  5 siblings, 0 replies; 7+ messages in thread
From: phil.edworthy @ 2013-03-19  9:08 UTC (permalink / raw)
  To: linux-sh

Hi Simon,

> From: Simon Horman <horms@verge.net.au>
> To: Phil Edworthy <phil.edworthy@renesas.com>, 
> Cc: linux-sh@vger.kernel.org, Magnus <magnus.damm@gmail.com>
> Date: 19/03/2013 00:30
> Subject: Re: [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support
> 
> On Mon, Mar 18, 2013 at 04:38:52PM +0000, Phil Edworthy wrote:
> > 
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > ---
> > Depends on "r8a7779: Add Display Unit clock support"
> 
> Hi Phil,
> 
> could you rebase this patch on top of the current soc or next branch in
> the renesas tree on kernel.org?

Will do!

Thanks
Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-19  9:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-18 16:38 [PATCH] ARM: shmobile: r8a7779: Add PCIe clock support Phil Edworthy
2013-03-18 17:13 ` Sergei Shtylyov
2013-03-18 17:20 ` phil.edworthy
2013-03-18 17:24 ` Sergei Shtylyov
2013-03-19  0:30 ` Simon Horman
2013-03-19  8:58 ` phil.edworthy
2013-03-19  9:08 ` phil.edworthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.