* [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
@ 2014-04-30 0:31 Laurent Pinchart
2014-04-30 0:59 ` Simon Horman
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Laurent Pinchart @ 2014-04-30 0:31 UTC (permalink / raw)
To: linux-sh
SCIF0 and SCIF1 are used as debug serial ports. Enable them and
configure pinmuxing appropriately. We can now remove the clkdev
registration hack for SCIF devices from the Lager reference board file.
As a side effect of switching to DT-based serial port instantiation,
ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
source if now shared between lager and lager-reference, we need to
update the serial ports in C code as well.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++++++-
arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
3 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 86d676f..4913b75 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -18,6 +18,11 @@
model = "Lager";
compatible = "renesas,lager", "renesas,r8a7790";
+ aliases {
+ serial6 = &scif0;
+ serial7 = &scif1;
+ };
+
chosen {
bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
};
@@ -146,7 +151,7 @@
};
&pfc {
- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
+ pinctrl-0 = <&du_pins>;
pinctrl-names = "default";
du_pins: du {
@@ -280,6 +285,20 @@
};
+&scif0 {
+ pinctrl-0 = <&scif0_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&scif1 {
+ pinctrl-0 = <&scif1_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&sdhi0 {
pinctrl-0 = <&sdhi0_pins>;
pinctrl-names = "default";
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 1eb48cf..013c42b 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
*/
static const struct clk_name clk_names[] __initconst = {
{ "cmt0", NULL, "sh_cmt.0" },
- { "scifa0", NULL, "sh-sci.0" },
- { "scifa1", NULL, "sh-sci.1" },
- { "scifb0", NULL, "sh-sci.2" },
- { "scifb1", NULL, "sh-sci.3" },
- { "scifb2", NULL, "sh-sci.4" },
- { "scifa2", NULL, "sh-sci.5" },
- { "scif0", NULL, "sh-sci.6" },
- { "scif1", NULL, "sh-sci.7" },
- { "hscif0", NULL, "sh-sci.8" },
- { "hscif1", NULL, "sh-sci.9" },
{ "du0", "du.0", "rcar-du-r8a7790" },
{ "du1", "du.1", "rcar-du-r8a7790" },
{ "du2", "du.2", "rcar-du-r8a7790" },
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index a901d9e..b22afb2 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -284,6 +284,11 @@ static const struct resource cmt00_resources[] __initconst = {
void __init r8a7790_add_dt_devices(void)
{
+ r8a7790_register_cmt(00);
+}
+
+void __init r8a7790_add_standard_devices(void)
+{
r8a7790_register_scif(0);
r8a7790_register_scif(1);
r8a7790_register_scif(2);
@@ -294,11 +299,6 @@ void __init r8a7790_add_dt_devices(void)
r8a7790_register_scif(7);
r8a7790_register_scif(8);
r8a7790_register_scif(9);
- r8a7790_register_cmt(00);
-}
-
-void __init r8a7790_add_standard_devices(void)
-{
r8a7790_add_dt_devices();
r8a7790_register_irqc(0);
r8a7790_register_thermal();
--
1.8.3.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
@ 2014-04-30 0:59 ` Simon Horman
2014-04-30 1:02 ` Laurent Pinchart
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-04-30 0:59 UTC (permalink / raw)
To: linux-sh
On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> configure pinmuxing appropriately. We can now remove the clkdev
> registration hack for SCIF devices from the Lager reference board file.
>
> As a side effect of switching to DT-based serial port instantiation,
> ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
> source if now shared between lager and lager-reference, we need to
> update the serial ports in C code as well.
I believe the second paragraph is no longer correct.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++++++-
> arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
> arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
> 3 files changed, 25 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index 86d676f..4913b75 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> @@ -18,6 +18,11 @@
> model = "Lager";
> compatible = "renesas,lager", "renesas,r8a7790";
>
> + aliases {
> + serial6 = &scif0;
> + serial7 = &scif1;
> + };
> +
> chosen {
> bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
> };
> @@ -146,7 +151,7 @@
> };
>
> &pfc {
> - pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
> + pinctrl-0 = <&du_pins>;
> pinctrl-names = "default";
>
> du_pins: du {
> @@ -280,6 +285,20 @@
>
> };
>
> +&scif0 {
> + pinctrl-0 = <&scif0_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> +&scif1 {
> + pinctrl-0 = <&scif1_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +};
> +
> &sdhi0 {
> pinctrl-0 = <&sdhi0_pins>;
> pinctrl-names = "default";
> diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
> index 1eb48cf..013c42b 100644
> --- a/arch/arm/mach-shmobile/board-lager-reference.c
> +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
> */
> static const struct clk_name clk_names[] __initconst = {
> { "cmt0", NULL, "sh_cmt.0" },
> - { "scifa0", NULL, "sh-sci.0" },
> - { "scifa1", NULL, "sh-sci.1" },
> - { "scifb0", NULL, "sh-sci.2" },
> - { "scifb1", NULL, "sh-sci.3" },
> - { "scifb2", NULL, "sh-sci.4" },
> - { "scifa2", NULL, "sh-sci.5" },
> - { "scif0", NULL, "sh-sci.6" },
> - { "scif1", NULL, "sh-sci.7" },
> - { "hscif0", NULL, "sh-sci.8" },
> - { "hscif1", NULL, "sh-sci.9" },
> { "du0", "du.0", "rcar-du-r8a7790" },
> { "du1", "du.1", "rcar-du-r8a7790" },
> { "du2", "du.2", "rcar-du-r8a7790" },
Is this correct. Magnus seemed to think otherwise for a slightly
different change I proposed for Marzen.
> diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
> index a901d9e..b22afb2 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> @@ -284,6 +284,11 @@ static const struct resource cmt00_resources[] __initconst = {
>
> void __init r8a7790_add_dt_devices(void)
> {
> + r8a7790_register_cmt(00);
> +}
> +
> +void __init r8a7790_add_standard_devices(void)
> +{
> r8a7790_register_scif(0);
> r8a7790_register_scif(1);
> r8a7790_register_scif(2);
> @@ -294,11 +299,6 @@ void __init r8a7790_add_dt_devices(void)
> r8a7790_register_scif(7);
> r8a7790_register_scif(8);
> r8a7790_register_scif(9);
> - r8a7790_register_cmt(00);
> -}
> -
> -void __init r8a7790_add_standard_devices(void)
> -{
> r8a7790_add_dt_devices();
> r8a7790_register_irqc(0);
> r8a7790_register_thermal();
> --
> 1.8.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
2014-04-30 0:59 ` Simon Horman
@ 2014-04-30 1:02 ` Laurent Pinchart
2014-04-30 1:29 ` Simon Horman
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2014-04-30 1:02 UTC (permalink / raw)
To: linux-sh
Hi Simon,
On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > configure pinmuxing appropriately. We can now remove the clkdev
> > registration hack for SCIF devices from the Lager reference board file.
> >
> > As a side effect of switching to DT-based serial port instantiation,
> > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
> > source if now shared between lager and lager-reference, we need to
> > update the serial ports in C code as well.
>
> I believe the second paragraph is no longer correct.
Oops, you're right. If no other problem is found with the series, could you
please just drop that paragraph ?
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++++++-
> > arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
> > arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
> > 3 files changed, 25 insertions(+), 16 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/r8a7790-lager.dts
> > b/arch/arm/boot/dts/r8a7790-lager.dts index 86d676f..4913b75 100644
> > --- a/arch/arm/boot/dts/r8a7790-lager.dts
> > +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> > @@ -18,6 +18,11 @@
> >
> > model = "Lager";
> > compatible = "renesas,lager", "renesas,r8a7790";
> >
> > + aliases {
> > + serial6 = &scif0;
> > + serial7 = &scif1;
> > + };
> > +
> >
> > chosen {
> >
> > bootargs = "console=ttySC6,115200 ignore_loglevel rw
root=/dev/nfs
> > ip=dhcp";>
> > };
> >
> > @@ -146,7 +151,7 @@
> >
> > };
> >
> > &pfc {
> >
> > - pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
> > + pinctrl-0 = <&du_pins>;
> >
> > pinctrl-names = "default";
> >
> > du_pins: du {
> >
> > @@ -280,6 +285,20 @@
> >
> > };
> >
> > +&scif0 {
> > + pinctrl-0 = <&scif0_pins>;
> > + pinctrl-names = "default";
> > +
> > + status = "okay";
> > +};
> > +
> > +&scif1 {
> > + pinctrl-0 = <&scif1_pins>;
> > + pinctrl-names = "default";
> > +
> > + status = "okay";
> > +};
> > +
> >
> > &sdhi0 {
> >
> > pinctrl-0 = <&sdhi0_pins>;
> > pinctrl-names = "default";
> >
> > diff --git a/arch/arm/mach-shmobile/board-lager-reference.c
> > b/arch/arm/mach-shmobile/board-lager-reference.c index 1eb48cf..013c42b
> > 100644
> > --- a/arch/arm/mach-shmobile/board-lager-reference.c
> > +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> > @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
> >
> > */
> >
> > static const struct clk_name clk_names[] __initconst = {
> >
> > { "cmt0", NULL, "sh_cmt.0" },
> >
> > - { "scifa0", NULL, "sh-sci.0" },
> > - { "scifa1", NULL, "sh-sci.1" },
> > - { "scifb0", NULL, "sh-sci.2" },
> > - { "scifb1", NULL, "sh-sci.3" },
> > - { "scifb2", NULL, "sh-sci.4" },
> > - { "scifa2", NULL, "sh-sci.5" },
> > - { "scif0", NULL, "sh-sci.6" },
> > - { "scif1", NULL, "sh-sci.7" },
> > - { "hscif0", NULL, "sh-sci.8" },
> > - { "hscif1", NULL, "sh-sci.9" },
> >
> > { "du0", "du.0", "rcar-du-r8a7790" },
> > { "du1", "du.1", "rcar-du-r8a7790" },
> > { "du2", "du.2", "rcar-du-r8a7790" },
>
> Is this correct. Magnus seemed to think otherwise for a slightly
> different change I proposed for Marzen.
>
> > diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c
> > b/arch/arm/mach-shmobile/setup-r8a7790.c index a901d9e..b22afb2 100644
> > --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> > +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> > @@ -284,6 +284,11 @@ static const struct resource cmt00_resources[]
> > __initconst = {>
> > void __init r8a7790_add_dt_devices(void)
> > {
> >
> > + r8a7790_register_cmt(00);
> > +}
> > +
> > +void __init r8a7790_add_standard_devices(void)
> > +{
> >
> > r8a7790_register_scif(0);
> > r8a7790_register_scif(1);
> > r8a7790_register_scif(2);
> >
> > @@ -294,11 +299,6 @@ void __init r8a7790_add_dt_devices(void)
> >
> > r8a7790_register_scif(7);
> > r8a7790_register_scif(8);
> > r8a7790_register_scif(9);
> >
> > - r8a7790_register_cmt(00);
> > -}
> > -
> > -void __init r8a7790_add_standard_devices(void)
> > -{
> >
> > r8a7790_add_dt_devices();
> > r8a7790_register_irqc(0);
> > r8a7790_register_thermal();
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
2014-04-30 0:59 ` Simon Horman
2014-04-30 1:02 ` Laurent Pinchart
@ 2014-04-30 1:29 ` Simon Horman
2014-04-30 1:34 ` Simon Horman
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-04-30 1:29 UTC (permalink / raw)
To: linux-sh
On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > configure pinmuxing appropriately. We can now remove the clkdev
> > > registration hack for SCIF devices from the Lager reference board file.
> > >
> > > As a side effect of switching to DT-based serial port instantiation,
> > > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
> > > source if now shared between lager and lager-reference, we need to
> > > update the serial ports in C code as well.
> >
> > I believe the second paragraph is no longer correct.
>
> Oops, you're right. If no other problem is found with the series, could you
> please just drop that paragraph ?
Yes. But could you look at my other comment below?
I'm unsure why the clock workaround is no longer needed.
>
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > >
> > > arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++++++-
> > > arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
> > > arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
> > > 3 files changed, 25 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/r8a7790-lager.dts
> > > b/arch/arm/boot/dts/r8a7790-lager.dts index 86d676f..4913b75 100644
> > > --- a/arch/arm/boot/dts/r8a7790-lager.dts
> > > +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> > > @@ -18,6 +18,11 @@
> > >
> > > model = "Lager";
> > > compatible = "renesas,lager", "renesas,r8a7790";
> > >
> > > + aliases {
> > > + serial6 = &scif0;
> > > + serial7 = &scif1;
> > > + };
> > > +
> > >
> > > chosen {
> > >
> > > bootargs = "console=ttySC6,115200 ignore_loglevel rw
> root=/dev/nfs
> > > ip=dhcp";>
> > > };
> > >
> > > @@ -146,7 +151,7 @@
> > >
> > > };
> > >
> > > &pfc {
> > >
> > > - pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
> > > + pinctrl-0 = <&du_pins>;
> > >
> > > pinctrl-names = "default";
> > >
> > > du_pins: du {
> > >
> > > @@ -280,6 +285,20 @@
> > >
> > > };
> > >
> > > +&scif0 {
> > > + pinctrl-0 = <&scif0_pins>;
> > > + pinctrl-names = "default";
> > > +
> > > + status = "okay";
> > > +};
> > > +
> > > +&scif1 {
> > > + pinctrl-0 = <&scif1_pins>;
> > > + pinctrl-names = "default";
> > > +
> > > + status = "okay";
> > > +};
> > > +
> > >
> > > &sdhi0 {
> > >
> > > pinctrl-0 = <&sdhi0_pins>;
> > > pinctrl-names = "default";
> > >
> > > diff --git a/arch/arm/mach-shmobile/board-lager-reference.c
> > > b/arch/arm/mach-shmobile/board-lager-reference.c index 1eb48cf..013c42b
> > > 100644
> > > --- a/arch/arm/mach-shmobile/board-lager-reference.c
> > > +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> > > @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
> > >
> > > */
> > >
> > > static const struct clk_name clk_names[] __initconst = {
> > >
> > > { "cmt0", NULL, "sh_cmt.0" },
> > >
> > > - { "scifa0", NULL, "sh-sci.0" },
> > > - { "scifa1", NULL, "sh-sci.1" },
> > > - { "scifb0", NULL, "sh-sci.2" },
> > > - { "scifb1", NULL, "sh-sci.3" },
> > > - { "scifb2", NULL, "sh-sci.4" },
> > > - { "scifa2", NULL, "sh-sci.5" },
> > > - { "scif0", NULL, "sh-sci.6" },
> > > - { "scif1", NULL, "sh-sci.7" },
> > > - { "hscif0", NULL, "sh-sci.8" },
> > > - { "hscif1", NULL, "sh-sci.9" },
> > >
> > > { "du0", "du.0", "rcar-du-r8a7790" },
> > > { "du1", "du.1", "rcar-du-r8a7790" },
> > > { "du2", "du.2", "rcar-du-r8a7790" },
> >
> > Is this correct. Magnus seemed to think otherwise for a slightly
> > different change I proposed for Marzen.
> >
> > > diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c
> > > b/arch/arm/mach-shmobile/setup-r8a7790.c index a901d9e..b22afb2 100644
> > > --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> > > +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> > > @@ -284,6 +284,11 @@ static const struct resource cmt00_resources[]
> > > __initconst = {>
> > > void __init r8a7790_add_dt_devices(void)
> > > {
> > >
> > > + r8a7790_register_cmt(00);
> > > +}
> > > +
> > > +void __init r8a7790_add_standard_devices(void)
> > > +{
> > >
> > > r8a7790_register_scif(0);
> > > r8a7790_register_scif(1);
> > > r8a7790_register_scif(2);
> > >
> > > @@ -294,11 +299,6 @@ void __init r8a7790_add_dt_devices(void)
> > >
> > > r8a7790_register_scif(7);
> > > r8a7790_register_scif(8);
> > > r8a7790_register_scif(9);
> > >
> > > - r8a7790_register_cmt(00);
> > > -}
> > > -
> > > -void __init r8a7790_add_standard_devices(void)
> > > -{
> > >
> > > r8a7790_add_dt_devices();
> > > r8a7790_register_irqc(0);
> > > r8a7790_register_thermal();
>
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (2 preceding siblings ...)
2014-04-30 1:29 ` Simon Horman
@ 2014-04-30 1:34 ` Simon Horman
2014-04-30 16:21 ` Laurent Pinchart
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-04-30 1:34 UTC (permalink / raw)
To: linux-sh
On Wed, Apr 30, 2014 at 10:29:23AM +0900, Simon Horman wrote:
> On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> >
> > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > registration hack for SCIF devices from the Lager reference board file.
> > > >
> > > > As a side effect of switching to DT-based serial port instantiation,
> > > > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
> > > > source if now shared between lager and lager-reference, we need to
> > > > update the serial ports in C code as well.
> > >
> > > I believe the second paragraph is no longer correct.
> >
> > Oops, you're right. If no other problem is found with the series, could you
> > please just drop that paragraph ?
>
> Yes. But could you look at my other comment below?
I mean yes with the following caveat.
It seems to me that each of patch 4 and 5 could applied independently
of the earlier patches in the series. This seems nice.
It seems to me that patches 3 and 4 depend on patch 2 which in turn
depends on patch 1. This is less fun. So I was thinking of waiting
for at least patch 2 to be accepted (by Greg) before applying
3 and 4.
With regards to patch 1. Perhaps it would be best for Greg to take
that with patch 2?
> I'm unsure why the clock workaround is no longer needed.
>
> >
> > > > Signed-off-by: Laurent Pinchart
> > > > <laurent.pinchart+renesas@ideasonboard.com>
> > > > ---
> > > >
> > > > arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++++++-
> > > > arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
> > > > arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
> > > > 3 files changed, 25 insertions(+), 16 deletions(-)
> > > >
> > > > diff --git a/arch/arm/boot/dts/r8a7790-lager.dts
> > > > b/arch/arm/boot/dts/r8a7790-lager.dts index 86d676f..4913b75 100644
> > > > --- a/arch/arm/boot/dts/r8a7790-lager.dts
> > > > +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> > > > @@ -18,6 +18,11 @@
> > > >
> > > > model = "Lager";
> > > > compatible = "renesas,lager", "renesas,r8a7790";
> > > >
> > > > + aliases {
> > > > + serial6 = &scif0;
> > > > + serial7 = &scif1;
> > > > + };
> > > > +
> > > >
> > > > chosen {
> > > >
> > > > bootargs = "console=ttySC6,115200 ignore_loglevel rw
> > root=/dev/nfs
> > > > ip=dhcp";>
> > > > };
> > > >
> > > > @@ -146,7 +151,7 @@
> > > >
> > > > };
> > > >
> > > > &pfc {
> > > >
> > > > - pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
> > > > + pinctrl-0 = <&du_pins>;
> > > >
> > > > pinctrl-names = "default";
> > > >
> > > > du_pins: du {
> > > >
> > > > @@ -280,6 +285,20 @@
> > > >
> > > > };
> > > >
> > > > +&scif0 {
> > > > + pinctrl-0 = <&scif0_pins>;
> > > > + pinctrl-names = "default";
> > > > +
> > > > + status = "okay";
> > > > +};
> > > > +
> > > > +&scif1 {
> > > > + pinctrl-0 = <&scif1_pins>;
> > > > + pinctrl-names = "default";
> > > > +
> > > > + status = "okay";
> > > > +};
> > > > +
> > > >
> > > > &sdhi0 {
> > > >
> > > > pinctrl-0 = <&sdhi0_pins>;
> > > > pinctrl-names = "default";
> > > >
> > > > diff --git a/arch/arm/mach-shmobile/board-lager-reference.c
> > > > b/arch/arm/mach-shmobile/board-lager-reference.c index 1eb48cf..013c42b
> > > > 100644
> > > > --- a/arch/arm/mach-shmobile/board-lager-reference.c
> > > > +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> > > > @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
> > > >
> > > > */
> > > >
> > > > static const struct clk_name clk_names[] __initconst = {
> > > >
> > > > { "cmt0", NULL, "sh_cmt.0" },
> > > >
> > > > - { "scifa0", NULL, "sh-sci.0" },
> > > > - { "scifa1", NULL, "sh-sci.1" },
> > > > - { "scifb0", NULL, "sh-sci.2" },
> > > > - { "scifb1", NULL, "sh-sci.3" },
> > > > - { "scifb2", NULL, "sh-sci.4" },
> > > > - { "scifa2", NULL, "sh-sci.5" },
> > > > - { "scif0", NULL, "sh-sci.6" },
> > > > - { "scif1", NULL, "sh-sci.7" },
> > > > - { "hscif0", NULL, "sh-sci.8" },
> > > > - { "hscif1", NULL, "sh-sci.9" },
> > > >
> > > > { "du0", "du.0", "rcar-du-r8a7790" },
> > > > { "du1", "du.1", "rcar-du-r8a7790" },
> > > > { "du2", "du.2", "rcar-du-r8a7790" },
> > >
> > > Is this correct. Magnus seemed to think otherwise for a slightly
> > > different change I proposed for Marzen.
> > >
> > > > diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c
> > > > b/arch/arm/mach-shmobile/setup-r8a7790.c index a901d9e..b22afb2 100644
> > > > --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> > > > +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> > > > @@ -284,6 +284,11 @@ static const struct resource cmt00_resources[]
> > > > __initconst = {>
> > > > void __init r8a7790_add_dt_devices(void)
> > > > {
> > > >
> > > > + r8a7790_register_cmt(00);
> > > > +}
> > > > +
> > > > +void __init r8a7790_add_standard_devices(void)
> > > > +{
> > > >
> > > > r8a7790_register_scif(0);
> > > > r8a7790_register_scif(1);
> > > > r8a7790_register_scif(2);
> > > >
> > > > @@ -294,11 +299,6 @@ void __init r8a7790_add_dt_devices(void)
> > > >
> > > > r8a7790_register_scif(7);
> > > > r8a7790_register_scif(8);
> > > > r8a7790_register_scif(9);
> > > >
> > > > - r8a7790_register_cmt(00);
> > > > -}
> > > > -
> > > > -void __init r8a7790_add_standard_devices(void)
> > > > -{
> > > >
> > > > r8a7790_add_dt_devices();
> > > > r8a7790_register_irqc(0);
> > > > r8a7790_register_thermal();
> >
> > --
> > Regards,
> >
> > Laurent Pinchart
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (3 preceding siblings ...)
2014-04-30 1:34 ` Simon Horman
@ 2014-04-30 16:21 ` Laurent Pinchart
2014-04-30 16:23 ` Laurent Pinchart
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2014-04-30 16:21 UTC (permalink / raw)
To: linux-sh
Hi Simon,
On Wednesday 30 April 2014 10:29:23 Simon Horman wrote:
> On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > registration hack for SCIF devices from the Lager reference board
> > > > file.
> > > >
> > > > As a side effect of switching to DT-based serial port instantiation,
> > > > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
> > > > source if now shared between lager and lager-reference, we need to
> > > > update the serial ports in C code as well.
> > >
> > > I believe the second paragraph is no longer correct.
> >
> > Oops, you're right. If no other problem is found with the series, could
> > you please just drop that paragraph ?
>
> Yes. But could you look at my other comment below?
Oops, I've missed that.
> I'm unsure why the clock workaround is no longer needed.
>
> > > > Signed-off-by: Laurent Pinchart
> > > > <laurent.pinchart+renesas@ideasonboard.com>
> > > > ---
> > > >
> > > > arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++-
> > > > arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
> > > > arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
> > > > 3 files changed, 25 insertions(+), 16 deletions(-)
[snip]
> > > > diff --git a/arch/arm/mach-shmobile/board-lager-reference.c
> > > > b/arch/arm/mach-shmobile/board-lager-reference.c index
> > > > 1eb48cf..013c42b
> > > > 100644
> > > > --- a/arch/arm/mach-shmobile/board-lager-reference.c
> > > > +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> > > > @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
> > > > */
> > > > static const struct clk_name clk_names[] __initconst = {
> > > > { "cmt0", NULL, "sh_cmt.0" },
> > > > - { "scifa0", NULL, "sh-sci.0" },
> > > > - { "scifa1", NULL, "sh-sci.1" },
> > > > - { "scifb0", NULL, "sh-sci.2" },
> > > > - { "scifb1", NULL, "sh-sci.3" },
> > > > - { "scifb2", NULL, "sh-sci.4" },
> > > > - { "scifa2", NULL, "sh-sci.5" },
> > > > - { "scif0", NULL, "sh-sci.6" },
> > > > - { "scif1", NULL, "sh-sci.7" },
> > > > - { "hscif0", NULL, "sh-sci.8" },
> > > > - { "hscif1", NULL, "sh-sci.9" },
> > > > { "du0", "du.0", "rcar-du-r8a7790" },
> > > > { "du1", "du.1", "rcar-du-r8a7790" },
> > > > { "du2", "du.2", "rcar-du-r8a7790" },
> > >
> > > Is this correct. Magnus seemed to think otherwise for a slightly
> > > different change I proposed for Marzen.
The clk_names array workaround is only needed to expose DT-defined clocks to
non-DT devices. Now that the SCIF devices are instantiated from DT, we don't
need SCIF entries in the array anymore.
The clk_enables array workaround is needed for drivers that don't enable the
device clock(s) manually and instead rely on runtime PM to do so. As the sh-
sci driver enables the clock manually there's no need to add SCIF entries to
the clk_enables array.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (4 preceding siblings ...)
2014-04-30 16:21 ` Laurent Pinchart
@ 2014-04-30 16:23 ` Laurent Pinchart
2014-04-30 20:09 ` Geert Uytterhoeven
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2014-04-30 16:23 UTC (permalink / raw)
To: linux-sh
Hi Simon,
On Wednesday 30 April 2014 10:34:12 Simon Horman wrote:
> On Wed, Apr 30, 2014 at 10:29:23AM +0900, Simon Horman wrote:
> > On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > > registration hack for SCIF devices from the Lager reference board
> > > > > file.
> > > > >
> > > > > As a side effect of switching to DT-based serial port instantiation,
> > > > > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device
> > > > > tree source if now shared between lager and lager-reference, we need
> > > > > to update the serial ports in C code as well.
> > > >
> > > > I believe the second paragraph is no longer correct.
> > >
> > > Oops, you're right. If no other problem is found with the series, could
> > > you please just drop that paragraph ?
> >
> > Yes. But could you look at my other comment below?
>
> I mean yes with the following caveat.
>
> It seems to me that each of patch 4 and 5 could applied independently
> of the earlier patches in the series. This seems nice.
I suppose you mean patches 5 and 6.
> It seems to me that patches 3 and 4 depend on patch 2 which in turn
> depends on patch 1. This is less fun. So I was thinking of waiting
> for at least patch 2 to be accepted (by Greg) before applying
> 3 and 4.
That's fine with me.
> With regards to patch 1. Perhaps it would be best for Greg to take
> that with patch 2?
That's fine with me as well.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (5 preceding siblings ...)
2014-04-30 16:23 ` Laurent Pinchart
@ 2014-04-30 20:09 ` Geert Uytterhoeven
2014-04-30 21:44 ` Simon Horman
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2014-04-30 20:09 UTC (permalink / raw)
To: linux-sh
On Wed, Apr 30, 2014 at 6:21 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> > > > --- a/arch/arm/mach-shmobile/board-lager-reference.c
>> > > > +++ b/arch/arm/mach-shmobile/board-lager-reference.c
>> > > > @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
>> > > > */
>> > > > static const struct clk_name clk_names[] __initconst = {
>> > > > { "cmt0", NULL, "sh_cmt.0" },
>> > > > - { "scifa0", NULL, "sh-sci.0" },
>> > > > - { "scifa1", NULL, "sh-sci.1" },
>> > > > - { "scifb0", NULL, "sh-sci.2" },
>> > > > - { "scifb1", NULL, "sh-sci.3" },
>> > > > - { "scifb2", NULL, "sh-sci.4" },
>> > > > - { "scifa2", NULL, "sh-sci.5" },
>> > > > - { "scif0", NULL, "sh-sci.6" },
>> > > > - { "scif1", NULL, "sh-sci.7" },
>> > > > - { "hscif0", NULL, "sh-sci.8" },
>> > > > - { "hscif1", NULL, "sh-sci.9" },
>> > > > { "du0", "du.0", "rcar-du-r8a7790" },
>> > > > { "du1", "du.1", "rcar-du-r8a7790" },
>> > > > { "du2", "du.2", "rcar-du-r8a7790" },
>> > >
>> > > Is this correct. Magnus seemed to think otherwise for a slightly
>> > > different change I proposed for Marzen.
>
> The clk_names array workaround is only needed to expose DT-defined clocks to
> non-DT devices. Now that the SCIF devices are instantiated from DT, we don't
> need SCIF entries in the array anymore.
>
> The clk_enables array workaround is needed for drivers that don't enable the
> device clock(s) manually and instead rely on runtime PM to do so. As the sh-
> sci driver enables the clock manually there's no need to add SCIF entries to
> the clk_enables array.
Yes indeed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (6 preceding siblings ...)
2014-04-30 20:09 ` Geert Uytterhoeven
@ 2014-04-30 21:44 ` Simon Horman
2014-04-30 21:47 ` Laurent Pinchart
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-04-30 21:44 UTC (permalink / raw)
To: linux-sh
Hi Laurent,
On Wed, Apr 30, 2014 at 06:23:40PM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Wednesday 30 April 2014 10:34:12 Simon Horman wrote:
> > On Wed, Apr 30, 2014 at 10:29:23AM +0900, Simon Horman wrote:
> > > On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > > > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > > > registration hack for SCIF devices from the Lager reference board
> > > > > > file.
> > > > > >
> > > > > > As a side effect of switching to DT-based serial port instantiation,
> > > > > > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device
> > > > > > tree source if now shared between lager and lager-reference, we need
> > > > > > to update the serial ports in C code as well.
> > > > >
> > > > > I believe the second paragraph is no longer correct.
> > > >
> > > > Oops, you're right. If no other problem is found with the series, could
> > > > you please just drop that paragraph ?
> > >
> > > Yes. But could you look at my other comment below?
> >
> > I mean yes with the following caveat.
> >
> > It seems to me that each of patch 4 and 5 could applied independently
> > of the earlier patches in the series. This seems nice.
>
> I suppose you mean patches 5 and 6.
Yes, that is what I meant :)
> > It seems to me that patches 3 and 4 depend on patch 2 which in turn
> > depends on patch 1. This is less fun. So I was thinking of waiting
> > for at least patch 2 to be accepted (by Greg) before applying
> > 3 and 4.
>
> That's fine with me.
>
> > With regards to patch 1. Perhaps it would be best for Greg to take
> > that with patch 2?
>
> That's fine with me as well.
I wrote the above asuming that patch 2 maintained compatibility with
for existing DT nodes (in particular the ones modified in patches 3 and 4).
I'd prefer to finalise the discussion regarding patch 2 that before
applying 5 and 6 as I see a chance of regression if we are not careful.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (7 preceding siblings ...)
2014-04-30 21:44 ` Simon Horman
@ 2014-04-30 21:47 ` Laurent Pinchart
2014-05-01 6:04 ` Simon Horman
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2014-04-30 21:47 UTC (permalink / raw)
To: linux-sh
Hi Simon,
On Thursday 01 May 2014 07:44:57 Simon Horman wrote:
> On Wed, Apr 30, 2014 at 06:23:40PM +0200, Laurent Pinchart wrote:
> > On Wednesday 30 April 2014 10:34:12 Simon Horman wrote:
> > > On Wed, Apr 30, 2014 at 10:29:23AM +0900, Simon Horman wrote:
> > > > On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > > > > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > > > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > > > > registration hack for SCIF devices from the Lager reference
> > > > > > > board file.
> > > > > > >
> > > > > > > As a side effect of switching to DT-based serial port
> > > > > > > instantiation, ttySC6 and ttySC7 get renamed to ttySC0 and
> > > > > > > ttySC1. As the device tree source if now shared between lager
> > > > > > > and lager-reference, we need to update the serial ports in C
> > > > > > > code as well.
> > > > > >
> > > > > > I believe the second paragraph is no longer correct.
> > > > >
> > > > > Oops, you're right. If no other problem is found with the series,
> > > > > could you please just drop that paragraph ?
> > > >
> > > > Yes. But could you look at my other comment below?
> > >
> > > I mean yes with the following caveat.
> > >
> > > It seems to me that each of patch 4 and 5 could applied independently
> > > of the earlier patches in the series. This seems nice.
> >
> > I suppose you mean patches 5 and 6.
>
> Yes, that is what I meant :)
>
> > > It seems to me that patches 3 and 4 depend on patch 2 which in turn
> > > depends on patch 1. This is less fun. So I was thinking of waiting
> > > for at least patch 2 to be accepted (by Greg) before applying
> > > 3 and 4.
> >
> > That's fine with me.
> >
> > > With regards to patch 1. Perhaps it would be best for Greg to take
> > > that with patch 2?
> >
> > That's fine with me as well.
>
> I wrote the above asuming that patch 2 maintained compatibility with
> for existing DT nodes (in particular the ones modified in patches 3 and 4).
> I'd prefer to finalise the discussion regarding patch 2 that before
> applying 5 and 6 as I see a chance of regression if we are not careful.
Sure. I'll reply to "RFC/PATCH 2/6] serial: sh-sci: Drop the interface clock",
let's discuss that there.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (8 preceding siblings ...)
2014-04-30 21:47 ` Laurent Pinchart
@ 2014-05-01 6:04 ` Simon Horman
2014-05-01 6:05 ` Simon Horman
2014-05-14 5:13 ` Simon Horman
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-05-01 6:04 UTC (permalink / raw)
To: linux-sh
On Wed, Apr 30, 2014 at 11:47:16PM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Thursday 01 May 2014 07:44:57 Simon Horman wrote:
> > On Wed, Apr 30, 2014 at 06:23:40PM +0200, Laurent Pinchart wrote:
> > > On Wednesday 30 April 2014 10:34:12 Simon Horman wrote:
> > > > On Wed, Apr 30, 2014 at 10:29:23AM +0900, Simon Horman wrote:
> > > > > On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > > > > > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > > > > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > > > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > > > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > > > > > registration hack for SCIF devices from the Lager reference
> > > > > > > > board file.
> > > > > > > >
> > > > > > > > As a side effect of switching to DT-based serial port
> > > > > > > > instantiation, ttySC6 and ttySC7 get renamed to ttySC0 and
> > > > > > > > ttySC1. As the device tree source if now shared between lager
> > > > > > > > and lager-reference, we need to update the serial ports in C
> > > > > > > > code as well.
> > > > > > >
> > > > > > > I believe the second paragraph is no longer correct.
> > > > > >
> > > > > > Oops, you're right. If no other problem is found with the series,
> > > > > > could you please just drop that paragraph ?
> > > > >
> > > > > Yes. But could you look at my other comment below?
> > > >
> > > > I mean yes with the following caveat.
> > > >
> > > > It seems to me that each of patch 4 and 5 could applied independently
> > > > of the earlier patches in the series. This seems nice.
> > >
> > > I suppose you mean patches 5 and 6.
> >
> > Yes, that is what I meant :)
> >
> > > > It seems to me that patches 3 and 4 depend on patch 2 which in turn
> > > > depends on patch 1. This is less fun. So I was thinking of waiting
> > > > for at least patch 2 to be accepted (by Greg) before applying
> > > > 3 and 4.
> > >
> > > That's fine with me.
> > >
> > > > With regards to patch 1. Perhaps it would be best for Greg to take
> > > > that with patch 2?
> > >
> > > That's fine with me as well.
> >
> > I wrote the above asuming that patch 2 maintained compatibility with
> > for existing DT nodes (in particular the ones modified in patches 3 and 4).
> > I'd prefer to finalise the discussion regarding patch 2 that before
> > applying 5 and 6 as I see a chance of regression if we are not careful.
>
> Sure. I'll reply to "RFC/PATCH 2/6] serial: sh-sci: Drop the interface clock",
> let's discuss that there.
Yes, lets.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (9 preceding siblings ...)
2014-05-01 6:04 ` Simon Horman
@ 2014-05-01 6:05 ` Simon Horman
2014-05-14 5:13 ` Simon Horman
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-05-01 6:05 UTC (permalink / raw)
To: linux-sh
On Wed, Apr 30, 2014 at 06:21:47PM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Wednesday 30 April 2014 10:29:23 Simon Horman wrote:
> > On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > > registration hack for SCIF devices from the Lager reference board
> > > > > file.
> > > > >
> > > > > As a side effect of switching to DT-based serial port instantiation,
> > > > > ttySC6 and ttySC7 get renamed to ttySC0 and ttySC1. As the device tree
> > > > > source if now shared between lager and lager-reference, we need to
> > > > > update the serial ports in C code as well.
> > > >
> > > > I believe the second paragraph is no longer correct.
> > >
> > > Oops, you're right. If no other problem is found with the series, could
> > > you please just drop that paragraph ?
> >
> > Yes. But could you look at my other comment below?
>
> Oops, I've missed that.
>
> > I'm unsure why the clock workaround is no longer needed.
> >
> > > > > Signed-off-by: Laurent Pinchart
> > > > > <laurent.pinchart+renesas@ideasonboard.com>
> > > > > ---
> > > > >
> > > > > arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++-
> > > > > arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
> > > > > arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
> > > > > 3 files changed, 25 insertions(+), 16 deletions(-)
>
> [snip]
>
> > > > > diff --git a/arch/arm/mach-shmobile/board-lager-reference.c
> > > > > b/arch/arm/mach-shmobile/board-lager-reference.c index
> > > > > 1eb48cf..013c42b
> > > > > 100644
> > > > > --- a/arch/arm/mach-shmobile/board-lager-reference.c
> > > > > +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> > > > > @@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
> > > > > */
> > > > > static const struct clk_name clk_names[] __initconst = {
> > > > > { "cmt0", NULL, "sh_cmt.0" },
> > > > > - { "scifa0", NULL, "sh-sci.0" },
> > > > > - { "scifa1", NULL, "sh-sci.1" },
> > > > > - { "scifb0", NULL, "sh-sci.2" },
> > > > > - { "scifb1", NULL, "sh-sci.3" },
> > > > > - { "scifb2", NULL, "sh-sci.4" },
> > > > > - { "scifa2", NULL, "sh-sci.5" },
> > > > > - { "scif0", NULL, "sh-sci.6" },
> > > > > - { "scif1", NULL, "sh-sci.7" },
> > > > > - { "hscif0", NULL, "sh-sci.8" },
> > > > > - { "hscif1", NULL, "sh-sci.9" },
> > > > > { "du0", "du.0", "rcar-du-r8a7790" },
> > > > > { "du1", "du.1", "rcar-du-r8a7790" },
> > > > > { "du2", "du.2", "rcar-du-r8a7790" },
> > > >
> > > > Is this correct. Magnus seemed to think otherwise for a slightly
> > > > different change I proposed for Marzen.
>
> The clk_names array workaround is only needed to expose DT-defined clocks to
> non-DT devices. Now that the SCIF devices are instantiated from DT, we don't
> need SCIF entries in the array anymore.
>
> The clk_enables array workaround is needed for drivers that don't enable the
> device clock(s) manually and instead rely on runtime PM to do so. As the sh-
> sci driver enables the clock manually there's no need to add SCIF entries to
> the clk_enables array.
Thanks for the clarification.
I will update my marzen patch to follow the pattern above.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
` (10 preceding siblings ...)
2014-05-01 6:05 ` Simon Horman
@ 2014-05-14 5:13 ` Simon Horman
11 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2014-05-14 5:13 UTC (permalink / raw)
To: linux-sh
On Thu, May 01, 2014 at 03:04:32PM +0900, Simon Horman wrote:
> On Wed, Apr 30, 2014 at 11:47:16PM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> >
> > On Thursday 01 May 2014 07:44:57 Simon Horman wrote:
> > > On Wed, Apr 30, 2014 at 06:23:40PM +0200, Laurent Pinchart wrote:
> > > > On Wednesday 30 April 2014 10:34:12 Simon Horman wrote:
> > > > > On Wed, Apr 30, 2014 at 10:29:23AM +0900, Simon Horman wrote:
> > > > > > On Wed, Apr 30, 2014 at 03:02:20AM +0200, Laurent Pinchart wrote:
> > > > > > > On Wednesday 30 April 2014 09:59:56 Simon Horman wrote:
> > > > > > > > On Wed, Apr 30, 2014 at 02:31:45AM +0200, Laurent Pinchart wrote:
> > > > > > > > > SCIF0 and SCIF1 are used as debug serial ports. Enable them and
> > > > > > > > > configure pinmuxing appropriately. We can now remove the clkdev
> > > > > > > > > registration hack for SCIF devices from the Lager reference
> > > > > > > > > board file.
> > > > > > > > >
> > > > > > > > > As a side effect of switching to DT-based serial port
> > > > > > > > > instantiation, ttySC6 and ttySC7 get renamed to ttySC0 and
> > > > > > > > > ttySC1. As the device tree source if now shared between lager
> > > > > > > > > and lager-reference, we need to update the serial ports in C
> > > > > > > > > code as well.
> > > > > > > >
> > > > > > > > I believe the second paragraph is no longer correct.
> > > > > > >
> > > > > > > Oops, you're right. If no other problem is found with the series,
> > > > > > > could you please just drop that paragraph ?
> > > > > >
> > > > > > Yes. But could you look at my other comment below?
> > > > >
> > > > > I mean yes with the following caveat.
> > > > >
> > > > > It seems to me that each of patch 4 and 5 could applied independently
> > > > > of the earlier patches in the series. This seems nice.
> > > >
> > > > I suppose you mean patches 5 and 6.
> > >
> > > Yes, that is what I meant :)
> > >
> > > > > It seems to me that patches 3 and 4 depend on patch 2 which in turn
> > > > > depends on patch 1. This is less fun. So I was thinking of waiting
> > > > > for at least patch 2 to be accepted (by Greg) before applying
> > > > > 3 and 4.
> > > >
> > > > That's fine with me.
> > > >
> > > > > With regards to patch 1. Perhaps it would be best for Greg to take
> > > > > that with patch 2?
> > > >
> > > > That's fine with me as well.
> > >
> > > I wrote the above asuming that patch 2 maintained compatibility with
> > > for existing DT nodes (in particular the ones modified in patches 3 and 4).
> > > I'd prefer to finalise the discussion regarding patch 2 that before
> > > applying 5 and 6 as I see a chance of regression if we are not careful.
> >
> > Sure. I'll reply to "RFC/PATCH 2/6] serial: sh-sci: Drop the interface clock",
> > let's discuss that there.
>
> Yes, lets.
As discussed privately I have queued up the following modified version
of your patch without any of the earlier patches in this series.
I will also apply the last patch of this series, which is similar
but for the koelsch board, with minor modifications.
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[PATCH] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
SCIF0 and SCIF1 are used as debug serial ports. Enable them and
configure pinmuxing appropriately. We can now remove the clkdev
registration hack for SCIF devices from the Lager reference board file.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: updated changelog to remove references to
device renaming]
[horms+renesas@verge.net.au: resolved conflicts]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7790-lager.dts | 21 ++++++++++++++++++++-
arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
3 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 6e99eb2..25e0485 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -17,6 +17,11 @@
model = "Lager";
compatible = "renesas,lager", "renesas,r8a7790";
+ aliases {
+ serial6 = &scif0;
+ serial7 = &scif1;
+ };
+
chosen {
bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
};
@@ -112,7 +117,7 @@
};
&pfc {
- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
+ pinctrl-0 = <&du_pins>;
pinctrl-names = "default";
du_pins: du {
@@ -221,6 +226,20 @@
};
};
+&scif0 {
+ pinctrl-0 = <&scif0_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
+&scif1 {
+ pinctrl-0 = <&scif1_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+
&sdhi0 {
pinctrl-0 = <&sdhi0_pins>;
pinctrl-names = "default";
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 1bca2748..749832e 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
*/
static const struct clk_name clk_names[] __initconst = {
{ "cmt0", "fck", "sh-cmt-48-gen2.0" },
- { "scifa0", NULL, "sh-sci.0" },
- { "scifa1", NULL, "sh-sci.1" },
- { "scifb0", NULL, "sh-sci.2" },
- { "scifb1", NULL, "sh-sci.3" },
- { "scifb2", NULL, "sh-sci.4" },
- { "scifa2", NULL, "sh-sci.5" },
- { "scif0", NULL, "sh-sci.6" },
- { "scif1", NULL, "sh-sci.7" },
- { "hscif0", NULL, "sh-sci.8" },
- { "hscif1", NULL, "sh-sci.9" },
{ "du0", "du.0", "rcar-du-r8a7790" },
{ "du1", "du.1", "rcar-du-r8a7790" },
{ "du2", "du.2", "rcar-du-r8a7790" },
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 87327f3..5fc9b17 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -287,6 +287,11 @@ static struct resource cmt0_resources[] = {
void __init r8a7790_add_dt_devices(void)
{
+ r8a7790_register_cmt(0);
+}
+
+void __init r8a7790_add_standard_devices(void)
+{
r8a7790_register_scif(0);
r8a7790_register_scif(1);
r8a7790_register_scif(2);
@@ -297,11 +302,6 @@ void __init r8a7790_add_dt_devices(void)
r8a7790_register_scif(7);
r8a7790_register_scif(8);
r8a7790_register_scif(9);
- r8a7790_register_cmt(0);
-}
-
-void __init r8a7790_add_standard_devices(void)
-{
r8a7790_add_dt_devices();
r8a7790_register_irqc(0);
r8a7790_register_thermal();
--
1.8.5.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-05-14 5:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 0:31 [RFC/PATCH 5/6] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Laurent Pinchart
2014-04-30 0:59 ` Simon Horman
2014-04-30 1:02 ` Laurent Pinchart
2014-04-30 1:29 ` Simon Horman
2014-04-30 1:34 ` Simon Horman
2014-04-30 16:21 ` Laurent Pinchart
2014-04-30 16:23 ` Laurent Pinchart
2014-04-30 20:09 ` Geert Uytterhoeven
2014-04-30 21:44 ` Simon Horman
2014-04-30 21:47 ` Laurent Pinchart
2014-05-01 6:04 ` Simon Horman
2014-05-01 6:05 ` Simon Horman
2014-05-14 5:13 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox