diff mbox

clk: shmobile: add missing 0x0100 for SDCKCR

Message ID 87ppgf1kgv.wl%kuninori.morimoto.gx@gmail.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Kuninori Morimoto Aug. 5, 2014, 7:09 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current cpg_sd01_div_table is missing
"0x0100: x 1/8" division ratio.
This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
>> Simon
Actually,
	linux/arch/arm/mach-shmobile/clock-r8a7790.c : div4_clks
	linux/arch/arm/mach-shmobile/clock-r8a7791.c : div4_clks
have same issue, but I ignored

 drivers/clk/shmobile/clk-rcar-gen2.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Simon Horman Aug. 5, 2014, 7:17 a.m. UTC | #1
On Tue, Aug 05, 2014 at 12:09:26AM -0700, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Current cpg_sd01_div_table is missing
> "0x0100: x 1/8" division ratio.
> This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.
> 
> Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> >> Simon
> Actually,
> 	linux/arch/arm/mach-shmobile/clock-r8a7790.c : div4_clks
> 	linux/arch/arm/mach-shmobile/clock-r8a7791.c : div4_clks
> have same issue, but I ignored
> 
>  drivers/clk/shmobile/clk-rcar-gen2.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c b/drivers/clk/shmobile/clk-rcar-gen2.c
> index dff7f79..e996425 100644
> --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> @@ -202,6 +202,7 @@ static const struct clk_div_table cpg_sdh_div_table[] = {
>  };
>  
>  static const struct clk_div_table cpg_sd01_div_table[] = {
> +	{  4,  8 },
>  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
>  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },
>  };

Thanks. I have a few questions about this.

1. Could you provide information on the patch that added this problem
   and the kernel version it was added in?

2. Is this a bug-fix?
   If so, does it manifest in mainline?
   If so what happens?

3. Should we also fix clock-r8a7790.c and clock-r8a7791.c?
   If so I can make a patch or I am happy for you to do so.

--
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
Geert Uytterhoeven Aug. 5, 2014, 7:25 a.m. UTC | #2
On Tue, Aug 5, 2014 at 9:09 AM, Kuninori Morimoto
<kuninori.morimoto.gx@gmail.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Current cpg_sd01_div_table is missing
> "0x0100: x 1/8" division ratio.
> This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.
>
> Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

BTW, has this been verified by testing, or is it purely based on the datasheet?

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
--
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
Kuninori Morimoto Aug. 5, 2014, 8:51 a.m. UTC | #3
Hi Simon

Thank you for your feedback

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > Current cpg_sd01_div_table is missing
> > "0x0100: x 1/8" division ratio.
> > This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.
> > 
> > Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> >  static const struct clk_div_table cpg_sd01_div_table[] = {
> > +	{  4,  8 },
> >  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
> >  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },
> >  };
> 
> Thanks. I have a few questions about this.
> 
> 1. Could you provide information on the patch that added this problem
>    and the kernel version it was added in?

I see.
It is added on v3.14.
I can send v2 patch (or can you add it on log area ?)

> 2. Is this a bug-fix?
>    If so, does it manifest in mainline?
>    If so what happens?

This fixes hidden bug.
No board/SoC doesn't have issue without this patch.

> 3. Should we also fix clock-r8a7790.c and clock-r8a7791.c?
>    If so I can make a patch or I am happy for you to do so.

I can do it, but is it possible ?
I'm afraid that clock-r8axxx is used for legacy (= non-DT)
But, I'm happy to send it if you say "Yes"

Best regards
---
Kuninori Morimoto
--
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
Kuninori Morimoto Aug. 5, 2014, 8:57 a.m. UTC | #4
Hi Geert

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Current cpg_sd01_div_table is missing
> > "0x0100: x 1/8" division ratio.
> > This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.
> >
> > Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> BTW, has this been verified by testing, or is it purely based on the datasheet?

Thank you for your feedback.
I can understand your distrust :)
I just checked datasheet, but, BSP team had tested it.

Best regards
---
Kuninori Morimoto
--
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
Laurent Pinchart Aug. 5, 2014, 9:06 a.m. UTC | #5
Hi Morimoto-san,

Thank you for the patch.

On Tuesday 05 August 2014 00:09:26 Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Current cpg_sd01_div_table is missing
> "0x0100: x 1/8" division ratio.
> This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.
> 
> Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 
> >> Simon
> 
> Actually,
> 	linux/arch/arm/mach-shmobile/clock-r8a7790.c : div4_clks
> 	linux/arch/arm/mach-shmobile/clock-r8a7791.c : div4_clks
> have same issue, but I ignored
> 
>  drivers/clk/shmobile/clk-rcar-gen2.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c
> b/drivers/clk/shmobile/clk-rcar-gen2.c index dff7f79..e996425 100644
> --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> @@ -202,6 +202,7 @@ static const struct clk_div_table cpg_sdh_div_table[] =
> { };
> 
>  static const struct clk_div_table cpg_sd01_div_table[] = {
> +	{  4,  8 },
>  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
>  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },
>  };
Simon Horman Aug. 6, 2014, 12:32 a.m. UTC | #6
On Tue, Aug 05, 2014 at 01:51:12AM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> Thank you for your feedback
> 
> > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > 
> > > Current cpg_sd01_div_table is missing
> > > "0x0100: x 1/8" division ratio.
> > > This patch is based on R-Car H2 v0.7, R-Car M2 v0.9.
> > > 
> > > Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > ---
> (snip)
> > >  static const struct clk_div_table cpg_sd01_div_table[] = {
> > > +	{  4,  8 },
> > >  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
> > >  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },
> > >  };
> > 
> > Thanks. I have a few questions about this.
> > 
> > 1. Could you provide information on the patch that added this problem
> >    and the kernel version it was added in?
> 
> I see.
> It is added on v3.14.
> I can send v2 patch (or can you add it on log area ?)
> 
> > 2. Is this a bug-fix?
> >    If so, does it manifest in mainline?
> >    If so what happens?
> 
> This fixes hidden bug.
> No board/SoC doesn't have issue without this patch.

Thanks. Please send v2 with the above information.
Also please include the id and subject of the commit that added
the problem. e.g. 0123456789abcdef ("clk: shmobile: blah").

And I think that this patch needs to go via
Mike Turquette <mturquette@linaro.org> (CCed),
so please include him when you post v2.

> > 3. Should we also fix clock-r8a7790.c and clock-r8a7791.c?
> >    If so I can make a patch or I am happy for you to do so.
> 
> I can do it, but is it possible ?
> I'm afraid that clock-r8axxx is used for legacy (= non-DT)
> But, I'm happy to send it if you say "Yes"

Good point.

My not very strong feeling at this point is that if it is a fix then we
should add it.  Even if it is legacy code.
--
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
Kuninori Morimoto Aug. 6, 2014, 12:39 a.m. UTC | #7
Hi Simon

> > It is added on v3.14.
> > I can send v2 patch (or can you add it on log area ?)
(snip)
> > This fixes hidden bug.
> > No board/SoC doesn't have issue without this patch.
> 
> Thanks. Please send v2 with the above information.
> Also please include the id and subject of the commit that added
> the problem. e.g. 0123456789abcdef ("clk: shmobile: blah").
> 
> And I think that this patch needs to go via
> Mike Turquette <mturquette@linaro.org> (CCed),
> so please include him when you post v2.
> 
> > > 3. Should we also fix clock-r8a7790.c and clock-r8a7791.c?
> > >    If so I can make a patch or I am happy for you to do so.
> > 
> > I can do it, but is it possible ?
> > I'm afraid that clock-r8axxx is used for legacy (= non-DT)
> > But, I'm happy to send it if you say "Yes"
> 
> Good point.
> 
> My not very strong feeling at this point is that if it is a fix then we
> should add it.  Even if it is legacy code.

I see, will send v2 which includes legacy side fix patch

Best regards
---
Kuninori Morimoto
--
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
Kuninori Morimoto Aug. 6, 2014, 1:22 a.m. UTC | #8
Hi Simon, Mike

These patches fixup hidden-bug for R-Car Gen2 clock.

Kuninori Morimoto (3):
      clk: shmobile: add missing 0x0100 for SDCKCR
      ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
      ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR

 arch/arm/mach-shmobile/clock-r8a7790.c |    4 ++--
 arch/arm/mach-shmobile/clock-r8a7791.c |    2 +-
 drivers/clk/shmobile/clk-rcar-gen2.c   |    1 +
 3 files changed, 4 insertions(+), 3 deletions(-)


Best regards
---
Kuninori Morimoto
--
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
Simon Horman Aug. 6, 2014, 1:29 a.m. UTC | #9
On Tue, Aug 05, 2014 at 05:39:44PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > It is added on v3.14.
> > > I can send v2 patch (or can you add it on log area ?)
> (snip)
> > > This fixes hidden bug.
> > > No board/SoC doesn't have issue without this patch.
> > 
> > Thanks. Please send v2 with the above information.
> > Also please include the id and subject of the commit that added
> > the problem. e.g. 0123456789abcdef ("clk: shmobile: blah").
> > 
> > And I think that this patch needs to go via
> > Mike Turquette <mturquette@linaro.org> (CCed),
> > so please include him when you post v2.
> > 
> > > > 3. Should we also fix clock-r8a7790.c and clock-r8a7791.c?
> > > >    If so I can make a patch or I am happy for you to do so.
> > > 
> > > I can do it, but is it possible ?
> > > I'm afraid that clock-r8axxx is used for legacy (= non-DT)
> > > But, I'm happy to send it if you say "Yes"
> > 
> > Good point.
> > 
> > My not very strong feeling at this point is that if it is a fix then we
> > should add it.  Even if it is legacy code.
> 
> I see, will send v2 which includes legacy side fix patch

Thanks. Please send separate patches for each file that updated.
I believe they should all be independent of each other.
--
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
Kuninori Morimoto Aug. 6, 2014, 1:32 a.m. UTC | #10
Hi Simon

> > I see, will send v2 which includes legacy side fix patch
> 
> Thanks. Please send separate patches for each file that updated.
> I believe they should all be independent of each other.

Bad timing :<
I already posted v2 patch few minute ago
--
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
Simon Horman Aug. 6, 2014, 1:41 a.m. UTC | #11
On Tue, Aug 05, 2014 at 06:32:20PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > I see, will send v2 which includes legacy side fix patch
> > 
> > Thanks. Please send separate patches for each file that updated.
> > I believe they should all be independent of each other.
> 
> Bad timing :<
> I already posted v2 patch few minute ago

Thanks, it looks good :)
--
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
Kuninori Morimoto Aug. 20, 2014, 7:28 a.m. UTC | #12
Hi Simon, Mike

Could you teach me current status of these patches ?

> These patches fixup hidden-bug for R-Car Gen2 clock.
> 
> Kuninori Morimoto (3):
>       clk: shmobile: add missing 0x0100 for SDCKCR
>       ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
>       ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
> 
>  arch/arm/mach-shmobile/clock-r8a7790.c |    4 ++--
>  arch/arm/mach-shmobile/clock-r8a7791.c |    2 +-
>  drivers/clk/shmobile/clk-rcar-gen2.c   |    1 +
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> 
> Best regards
> ---
> Kuninori Morimoto
--
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
Simon Horman Aug. 22, 2014, 12:58 a.m. UTC | #13
On Wed, Aug 20, 2014 at 12:28:36AM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon, Mike
> 
> Could you teach me current status of these patches ?
> 
> > These patches fixup hidden-bug for R-Car Gen2 clock.
> > 
> > Kuninori Morimoto (3):
> >       clk: shmobile: add missing 0x0100 for SDCKCR
> >       ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
> >       ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR

Mike, could you consider picking up the first patch, which I have Acked.

Morimoto-san, I'll pick up the last two patches, sorry for the delay there.

--
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
Kuninori Morimoto Aug. 22, 2014, 4:40 a.m. UTC | #14
Hi Simon

> > Could you teach me current status of these patches ?
> > 
> > > These patches fixup hidden-bug for R-Car Gen2 clock.
> > > 
> > > Kuninori Morimoto (3):
> > >       clk: shmobile: add missing 0x0100 for SDCKCR
> > >       ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
> > >       ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
> 
> Mike, could you consider picking up the first patch, which I have Acked.
> 
> Morimoto-san, I'll pick up the last two patches, sorry for the delay there.

No problem ! Thank you

--
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
Kuninori Morimoto Aug. 28, 2014, 2:28 a.m. UTC | #15
Hi Mike

ping ?

> > > Could you teach me current status of these patches ?
> > > 
> > > > These patches fixup hidden-bug for R-Car Gen2 clock.
> > > > 
> > > > Kuninori Morimoto (3):
> > > >       clk: shmobile: add missing 0x0100 for SDCKCR
> > > >       ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
> > > >       ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
> > 
> > Mike, could you consider picking up the first patch, which I have Acked.
> > 
> > Morimoto-san, I'll pick up the last two patches, sorry for the delay there.
> 
> No problem ! Thank you
> 
--
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
diff mbox

Patch

diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c b/drivers/clk/shmobile/clk-rcar-gen2.c
index dff7f79..e996425 100644
--- a/drivers/clk/shmobile/clk-rcar-gen2.c
+++ b/drivers/clk/shmobile/clk-rcar-gen2.c
@@ -202,6 +202,7 @@  static const struct clk_div_table cpg_sdh_div_table[] = {
 };
 
 static const struct clk_div_table cpg_sd01_div_table[] = {
+	{  4,  8 },
 	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
 	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },
 };