All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] clk: rcar-h2: fix sd0/sd1 divisor table
Date: Wed, 05 Feb 2014 10:56:25 +0000	[thread overview]
Message-ID: <2083213.7oCTVAqWbC@avalon> (raw)
In-Reply-To: <1391537858-28593-2-git-send-email-william.towle@codethink.co.uk>

Hi William,

Thank you for the patch.

On Tuesday 04 February 2014 18:17:36 William Towle wrote:
> The clk_div_table for cpg_sd01_div_table[] concurs with the manual
> but not with values found in the device itself (which are also the
> same as the ones in arch/arm/mach-shmobile/clock-r8a7790.c).
> 
> Update the clk-rcar-gen2.c driver to have the same table as the one
> used by the mach-shmobile driver which work once further issues are
> fixed in the clk-rcar-gen2.c driver.
> 
> Part of the fix for the following error where the driver reports the
> output as 1MHz but is really 97.5MHz:
>     sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1 MHz
> 
> [ben.dooks@codethink.co.uk: updated patch description]
> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/clk/shmobile/clk-rcar-gen2.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c
> b/drivers/clk/shmobile/clk-rcar-gen2.c index a59ec21..df4a1e6 100644
> --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> @@ -170,6 +170,8 @@ static const struct clk_div_table cpg_sdh_div_table[] > { };
> 
>  static const struct clk_div_table cpg_sd01_div_table[] = {
> +	{  0,  2 }, {  1,  3 }, {  2,  4 }, {  3,  6 },
> +	{  4,  8 },
>  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
>  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },

With this applied the only difference between the sdh and sd0/1 dividers 
tables would be the { 12, 10 } entry, available for sd0/1 only. Given that the 
hardware does not match the documentation, could you check whether that entry 
is supported by sdh as well ? If so we could merge the two tables. Otherwise 
this patch looks good, could you please just reformat the table to avoid the 
mostly empty line in the middle ?

>  };

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] clk: rcar-h2: fix sd0/sd1 divisor table
Date: Wed, 05 Feb 2014 11:56:25 +0100	[thread overview]
Message-ID: <2083213.7oCTVAqWbC@avalon> (raw)
In-Reply-To: <1391537858-28593-2-git-send-email-william.towle@codethink.co.uk>

Hi William,

Thank you for the patch.

On Tuesday 04 February 2014 18:17:36 William Towle wrote:
> The clk_div_table for cpg_sd01_div_table[] concurs with the manual
> but not with values found in the device itself (which are also the
> same as the ones in arch/arm/mach-shmobile/clock-r8a7790.c).
> 
> Update the clk-rcar-gen2.c driver to have the same table as the one
> used by the mach-shmobile driver which work once further issues are
> fixed in the clk-rcar-gen2.c driver.
> 
> Part of the fix for the following error where the driver reports the
> output as 1MHz but is really 97.5MHz:
>     sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1 MHz
> 
> [ben.dooks at codethink.co.uk: updated patch description]
> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/clk/shmobile/clk-rcar-gen2.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c
> b/drivers/clk/shmobile/clk-rcar-gen2.c index a59ec21..df4a1e6 100644
> --- a/drivers/clk/shmobile/clk-rcar-gen2.c
> +++ b/drivers/clk/shmobile/clk-rcar-gen2.c
> @@ -170,6 +170,8 @@ static const struct clk_div_table cpg_sdh_div_table[] =
> { };
> 
>  static const struct clk_div_table cpg_sd01_div_table[] = {
> +	{  0,  2 }, {  1,  3 }, {  2,  4 }, {  3,  6 },
> +	{  4,  8 },
>  	{  5, 12 }, {  6, 16 }, {  7, 18 }, {  8, 24 },
>  	{ 10, 36 }, { 11, 48 }, { 12, 10 }, {  0,  0 },

With this applied the only difference between the sdh and sd0/1 dividers 
tables would be the { 12, 10 } entry, available for sd0/1 only. Given that the 
hardware does not match the documentation, could you check whether that entry 
is supported by sdh as well ? If so we could merge the two tables. Otherwise 
this patch looks good, could you please just reformat the table to avoid the 
mostly empty line in the middle ?

>  };

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2014-02-05 10:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 18:17 Clock divisor/parent settings changes William Towle
2014-02-04 18:17 ` William Towle
2014-02-04 18:17 ` [PATCH 1/3] clk: rcar-h2: fix sd0/sd1 divisor table William Towle
2014-02-04 18:17   ` William Towle
2014-02-05 10:56   ` Laurent Pinchart [this message]
2014-02-05 10:56     ` Laurent Pinchart
2014-02-05 11:55     ` Ben Dooks
2014-02-05 11:55       ` Ben Dooks
2014-02-05 12:41       ` Ben Dooks
2014-02-05 12:41         ` Ben Dooks
2014-02-05 13:07         ` Laurent Pinchart
2014-02-05 13:07           ` Laurent Pinchart
2014-02-06  0:43           ` Kuninori Morimoto
2014-02-06  0:43             ` Kuninori Morimoto
2014-02-07  6:43             ` Kuninori Morimoto
2014-02-07  6:43               ` Kuninori Morimoto
2014-02-07  9:55               ` Ben Dooks
2014-02-07  9:55                 ` Ben Dooks
2014-02-04 18:17 ` [PATCH 2/3] ARM: shmobile: r8a7790: specify multiple parents for cpg_clks William Towle
2014-02-04 18:17   ` William Towle
2014-02-05  9:15   ` [Linux-kernel] " Ben Dooks
2014-02-05  9:15     ` Ben Dooks
2014-02-05 10:32     ` Laurent Pinchart
2014-02-05 10:32       ` Laurent Pinchart
2014-02-05 10:36       ` Ben Dooks
2014-02-05 10:36         ` Ben Dooks
2014-02-05 10:57         ` Laurent Pinchart
2014-02-05 10:57           ` Laurent Pinchart
2014-02-04 18:17 ` [PATCH 3/3] clk: shmobile: handle multiple parent clocks for cpg clocks William Towle
2014-02-04 18:17   ` William Towle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2083213.7oCTVAqWbC@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.