From: Alexander Kurz <akurz@blala.de>
To: barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
Alexander Kurz <akurz@blala.de>
Subject: [PATCH] i.MX: iomuxv3: restore NO_PAD_CTRL semantic
Date: Sun, 10 Jun 2018 07:04:08 +0000 [thread overview]
Message-ID: <20180610070408.1088-1-akurz@blala.de> (raw)
A NO_PAD_CTRL flag used to keep a pad configuration untouched.
With commit 094820a63bfd ("i.MX: iomuxv3: Use helper functions in iomux-v3.h")
the NO_PAD_CTRL semantic changed to set a pad configurations to zero, which
breaks non-DT boards, where NO_PAD_CTRL is freqently used to keep a boot-up
default pad configuration, which often is non zero.
Restore the old semantic, dont write PAD_CTRL when NO_PAD_CTRL is set.
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/mach-imx/include/mach/iomux-v3.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/include/mach/iomux-v3.h b/arch/arm/mach-imx/include/mach/iomux-v3.h
index 994c15c04..d1a72a2cf 100644
--- a/arch/arm/mach-imx/include/mach/iomux-v3.h
+++ b/arch/arm/mach-imx/include/mach/iomux-v3.h
@@ -159,14 +159,16 @@ static inline void iomux_v3_setup_pad(void __iomem *iomux, unsigned int flags,
static inline void imx_setup_pad(void __iomem *iomux, iomux_v3_cfg_t pad)
{
- uint32_t pad_ctrl;
+ uint32_t conf_reg, pad_ctrl;
+ /* dont write PAD_CTRL when NO_PAD_CTRL is set */
pad_ctrl = IOMUX_PAD_CTRL(pad);
- pad_ctrl = (pad_ctrl & NO_PAD_CTRL) ? 0 : pad_ctrl,
+ conf_reg = IOMUX_PAD_CTRL_OFS(pad);
+ conf_reg = (pad_ctrl & NO_PAD_CTRL) ? 0 : conf_reg,
iomux_v3_setup_pad(iomux, 0,
IOMUX_CTRL_OFS(pad),
- IOMUX_PAD_CTRL_OFS(pad),
+ conf_reg,
IOMUX_SEL_INPUT_OFS(pad),
IOMUX_MODE(pad),
pad_ctrl,
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2018-06-10 7:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-10 7:04 Alexander Kurz [this message]
2018-06-11 6:48 ` Sascha Hauer
2018-07-11 4:48 ` Alexander Kurz
2018-07-13 6:23 ` Sascha Hauer
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=20180610070408.1088-1-akurz@blala.de \
--to=akurz@blala.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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