[U-Boot] [PATCH 1/2] imx: imx6: Add comment to gpr_init function

This function can be used only for some of the nxp SoC. Make it explicit in the comment. This adjust a bit commit 3aa4b703b483f165dd ("imx: imx6: Move gpr_init() function to soc.c")
Signed-off-by: Michael Trimarchi michael@amarulasolutions.com --- arch/arm/mach-imx/mx6/soc.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index e8b6f77..2c87c6e 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -649,6 +649,11 @@ void imx_setup_hdmi(void) } #endif
+ +/* + * gpr_init() function is common for boards using MX6S, MX6DL, MX6D, + * MX6Q and MX6QP processors + */ void gpr_init(void) { struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;

Fix an invalid usage of the gpr_init function for the imx6ul architecture
Signed-off-by: Michael Trimarchi michael@amarulasolutions.com --- board/engicam/common/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c index 470d96a..69d1c11 100644 --- a/board/engicam/common/spl.c +++ b/board/engicam/common/spl.c @@ -410,7 +410,8 @@ void board_init_f(ulong dummy) /* setup AIPS and disable watchdog */ arch_cpu_init();
- gpr_init(); + if (!(is_mx6ul())) + gpr_init();
/* iomux */ SETUP_IOMUX_PADS(uart_pads);

On Sat, Jun 23, 2018 at 7:40 PM, Michael Trimarchi michael@amarulasolutions.com wrote:
Fix an invalid usage of the gpr_init function for the imx6ul architecture
Signed-off-by: Michael Trimarchi michael@amarulasolutions.com
board/engicam/common/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c index 470d96a..69d1c11 100644 --- a/board/engicam/common/spl.c +++ b/board/engicam/common/spl.c @@ -410,7 +410,8 @@ void board_init_f(ulong dummy) /* setup AIPS and disable watchdog */ arch_cpu_init();
gpr_init();
if (!(is_mx6ul()))
gpr_init();
Acked-by: Jagan Teki jagan@amarulasolutions.com

On Sat, Jun 23, 2018 at 7:40 PM, Michael Trimarchi michael@amarulasolutions.com wrote:
This function can be used only for some of the nxp SoC. Make it explicit in the comment. This adjust a bit commit 3aa4b703b483f165dd ("imx: imx6: Move gpr_init() function to soc.c")
Signed-off-by: Michael Trimarchi michael@amarulasolutions.com
arch/arm/mach-imx/mx6/soc.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index e8b6f77..2c87c6e 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -649,6 +649,11 @@ void imx_setup_hdmi(void) } #endif
+/*
- gpr_init() function is common for boards using MX6S, MX6DL, MX6D,
- MX6Q and MX6QP processors
- */
void gpr_init(void) { struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; --
May be adding ifdef !imx6ul on the code also make sense.
Acked-by: Jagan Teki jagan@amarulasolutions.com
participants (2)
-
Jagan Teki
-
Michael Trimarchi