aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2016-11-17 14:30:43 +0100
committerWolfram Sang <wsa@the-dreams.de>2018-10-28 19:01:20 +0000
commit5e0fb8db96f984fff57f416cce9f83b8c75f8777 (patch)
tree2c409f8154847844d2233813b168ddaa66b301ff
parent6dfdc08404771ce8cd15cd6e636ef259c6ecc6d1 (diff)
downloadlinux-renesas/sdhihackfest.tar.gz
pinctrl: sh-pfc: r8a7794: initialize TDSEL registerrenesas/sdhihackfest
Documentation says that some bits in TDSEL must be set (ch 5.3.35 in R-Car E2 v0.5). 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. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7794.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7794.c b/drivers/pinctrl/sh-pfc/pfc-r8a7794.c
index 6d1e5fdc03f845..8a16053d2beced 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7794.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7794.c
@@ -5560,7 +5560,16 @@ static int r8a7794_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poc
return -EINVAL;
}
+static int r8a7794_pinmux_soc_init(struct sh_pfc *pfc)
+{
+ /* Initialize TDSEL according to datasheet */
+ sh_pfc_write(pfc, 0xe6060068, 0x55555500);
+
+ return 0;
+}
+
static const struct sh_pfc_soc_operations r8a7794_pinmux_ops = {
+ .init = r8a7794_pinmux_soc_init,
.pin_to_pocctrl = r8a7794_pin_to_pocctrl,
};