From: Wolfram Sang <wsa@the-dreams.de>
To: linux-sh@vger.kernel.org
Subject: Re: [RFC] clk: shmobile: r8a7795: Add SD divider support
Date: Wed, 27 Jan 2016 07:14:17 +0000 [thread overview]
Message-ID: <20160127071417.GA1521@katana> (raw)
In-Reply-To: <1453465586-12807-1-git-send-email-dirk.behme@de.bosch.com>
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
On Fri, Jan 22, 2016 at 01:26:26PM +0100, Dirk Behme wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> This patch adds SD[0..3] clock divider support for R-Car Gen3 SoC.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
So, I tested this patch and it basically works. I say basically because
the SDHI code currently does not change the clock rate, only
en-/disables it. UHS support will need to change the clock later.
One thing I noticed: SD0-2 are 50MHz like the docs say. SD3 is 200MHz
and I couldn't find a reason for that when having a glimpse. Dirk, can
you check?
> + if (i >= clock->div_num) {
> + pr_err("%s: 0x%4x is not support of division ratio.\n",
> + __func__, sd_fc);
> + return -ENODATA;
> + }
...
> + if (i >= clock->div_num) {
> + pr_err("%s: 0x%4x is not support of division ratio.\n",
> + __func__, sd_fc);
> + return 0;
> + }
...
> + if (i >= clock->div_num) {
> + pr_err("%s: Not support divider range : div=%d (%lu/%lu).\n",
> + __func__, div, parent_rate, rate);
> + return -EINVAL;
> + }
For the above code blocks:
a) I'd think that a consistent -EINVAL would be a proper return value.
b) The driver doesn't do much error printouts, so I wonder if those
messages above are favourable. If so, they should probably print which
sd clock is affected?
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-01-27 7:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 12:26 [RFC] clk: shmobile: r8a7795: Add SD divider support Dirk Behme
2016-01-25 8:59 ` Geert Uytterhoeven
2016-01-25 9:11 ` Dirk Behme
2016-01-25 19:23 ` Wolfram Sang
2016-01-27 7:14 ` Wolfram Sang [this message]
2016-01-27 8:43 ` Geert Uytterhoeven
2016-01-27 9:01 ` Dirk Behme
2016-01-27 13:14 ` Dirk Behme
2016-01-29 8:14 ` Wolfram Sang
2016-01-29 8:29 ` Dirk Behme
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=20160127071417.GA1521@katana \
--to=wsa@the-dreams.de \
--cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox