From: Marek Vasut <marek.vasut@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-gpio@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: r8a7790: initialize TDSEL register
Date: Wed, 31 Oct 2018 02:19:18 +0100 [thread overview]
Message-ID: <8976b08f-ed27-6e4d-f10d-8ace5c75b8fc@gmail.com> (raw)
In-Reply-To: <20181028212457.1017-2-wsa+renesas@sang-engineering.com>
On 10/28/2018 10:24 PM, Wolfram Sang wrote:
> Documentation says that some bits in TDSEL must be set (ch 5.3.39 in R-Car H2
> v0.91). However, the reset value of the register is 0, so software has to do
> it. Add this to the kernel driver to ensure this is really done independent of
> firmware versions.
>
> This is needed for some SD cards supporting SDR104 transfer mode. For
> me, TDSEL was not initialized by the firmware and I had problems with
> the card when re-inserting it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
> index ab7a35392cd8..c0e679105df9 100644
> --- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
> @@ -11,6 +11,7 @@
> #include <linux/io.h>
> #include <linux/kernel.h>
>
> +#include "core.h"
> #include "sh_pfc.h"
>
> /*
> @@ -5691,7 +5692,16 @@ static int r8a7790_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poc
> return 31 - (pin & 0x1f);
> }
>
> +static int r8a7790_pinmux_soc_init(struct sh_pfc *pfc)
> +{
> + /* Initialize TDSEL according to datasheet */
> + sh_pfc_write(pfc, 0xe6060088, 0x00155554);
> +
> + return 0;
> +}
> +
> static const struct sh_pfc_soc_operations r8a7790_pinmux_ops = {
> + .init = r8a7790_pinmux_soc_init,
> .pin_to_pocctrl = r8a7790_pin_to_pocctrl,
> };
>
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2018-10-31 10:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 21:24 [PATCH 0/2] pinctrl: sh-pfc: gen2: initialize TDSEL register Wolfram Sang
2018-10-28 21:24 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7790: " Wolfram Sang
2018-10-30 13:55 ` Simon Horman
2018-10-31 1:19 ` Marek Vasut [this message]
2018-11-08 19:44 ` Geert Uytterhoeven
2018-10-28 21:24 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7794: " Wolfram Sang
2018-10-30 13:55 ` Simon Horman
2018-10-31 1:19 ` Marek Vasut
2018-11-08 19:46 ` Geert Uytterhoeven
2018-11-08 20:00 ` [PATCH 0/2] pinctrl: sh-pfc: gen2: " Geert Uytterhoeven
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=8976b08f-ed27-6e4d-f10d-8ace5c75b8fc@gmail.com \
--to=marek.vasut@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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