[U-Boot] arm,imx6: fix PAD_CTL_SPEED_LOW constant

Message ID 1523895110-19899-1-git-send-email-mark.jonas@de.bosch.com
State New
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot] arm,imx6: fix PAD_CTL_SPEED_LOW constant
Related show

Commit Message

Mark Jonas April 16, 2018, 4:11 p.m.
For most i.MX6 processors the PAD_CTL_SPEED_LOW constant is the same.
Only the i.MX6 SoloLite is an exemption. So far the code did not
consider that. Additionally, for a few i.MX6 processors the code used
the wrong value for the constant.

This patch fixes the PAD_CTL_SPEED_LOW constant for:
 - i.MX6 Solo [1]
 - i.MX6 DualLite [1]
 - i.MX6 Dual [2]
 - i.MX6 Quad [2]
 - i.MX6 DualPlus [3]
 - i.MX6 QuadPlus [3]

Before, it was already correct for:
 - i.MX6 SoloLite [4]
 - i.MX6 SoloX [5]
 - i.MX6 UtraLite [6]
 - i.MX6 ULL [7]

[1] https://www.nxp.com/docs/en/reference-manual/IMX6SDLRM.pdf
[2] https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf
[3] https://www.nxp.com/docs/en/reference-manual/iMX6DQPRM.pdf
[4] https://www.nxp.com/docs/en/reference-manual/IMX6SLRM.pdf
[5] https://www.nxp.com/docs/en/reference-manual/IMX6SXRM.pdf
[6] https://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf
[7] https://www.nxp.com/docs/en/reference-manual/IMX6ULLRM.pdf

Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
 arch/arm/include/asm/mach-imx/iomux-v3.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Heiko Schocher April 17, 2018, 3:58 a.m. | #1
Hello Mark,

Am 16.04.2018 um 18:11 schrieb Mark Jonas:
> For most i.MX6 processors the PAD_CTL_SPEED_LOW constant is the same.
> Only the i.MX6 SoloLite is an exemption. So far the code did not
> consider that. Additionally, for a few i.MX6 processors the code used
> the wrong value for the constant.
> 
> This patch fixes the PAD_CTL_SPEED_LOW constant for:
>   - i.MX6 Solo [1]
>   - i.MX6 DualLite [1]
>   - i.MX6 Dual [2]
>   - i.MX6 Quad [2]
>   - i.MX6 DualPlus [3]
>   - i.MX6 QuadPlus [3]
> 
> Before, it was already correct for:
>   - i.MX6 SoloLite [4]
>   - i.MX6 SoloX [5]
>   - i.MX6 UtraLite [6]
>   - i.MX6 ULL [7]
> 
> [1] https://www.nxp.com/docs/en/reference-manual/IMX6SDLRM.pdf
> [2] https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf
> [3] https://www.nxp.com/docs/en/reference-manual/iMX6DQPRM.pdf
> [4] https://www.nxp.com/docs/en/reference-manual/IMX6SLRM.pdf
> [5] https://www.nxp.com/docs/en/reference-manual/IMX6SXRM.pdf
> [6] https://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf
> [7] https://www.nxp.com/docs/en/reference-manual/IMX6ULLRM.pdf
> 
> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> ---
>   arch/arm/include/asm/mach-imx/iomux-v3.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

Good catch, thanks!

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

Patch

diff --git a/arch/arm/include/asm/mach-imx/iomux-v3.h b/arch/arm/include/asm/mach-imx/iomux-v3.h
index 0c0ccf44..09094c9 100644
--- a/arch/arm/include/asm/mach-imx/iomux-v3.h
+++ b/arch/arm/include/asm/mach-imx/iomux-v3.h
@@ -147,10 +147,10 @@  typedef u64 iomux_v3_cfg_t;
 
 #define PAD_CTL_ODE		(1 << 11)
 
-#if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL)
-#define PAD_CTL_SPEED_LOW	(0 << 6)
-#else
+#if defined(CONFIG_MX6SL)
 #define PAD_CTL_SPEED_LOW	(1 << 6)
+#else
+#define PAD_CTL_SPEED_LOW	(0 << 6)
 #endif
 #define PAD_CTL_SPEED_MED	(2 << 6)
 #define PAD_CTL_SPEED_HIGH	(3 << 6)