* [PATCH 1/2] ARM: imx6: move MX6UL enet setup out of CPU string setting
@ 2017-07-10 15:38 Lucas Stach
2017-07-10 15:38 ` [PATCH 2/2] ARM: imx6: add static annotation locally used functions Lucas Stach
0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2017-07-10 15:38 UTC (permalink / raw)
To: barebox
This is not a good place to do this ENET setup. Call the function like all
the other setup functions and bail out if the SoC is not a i.MX6UL/ULL.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/mach-imx/imx6.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 5afbf6b30f18..7df61b94ec85 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -126,6 +126,9 @@ void imx6ul_enet_clk_init(void)
void __iomem *gprbase = IOMEM(MX6_IOMUXC_BASE_ADDR) + 0x4000;
uint32_t val;
+ if (!cpu_mx6_is_mx6ul() && !cpu_mx6_is_mx6ull())
+ return;
+
val = readl(gprbase + IOMUXC_GPR1);
val |= (0x3 << 17);
writel(val, gprbase + IOMUXC_GPR1);
@@ -169,7 +172,6 @@ int imx6_init(void)
break;
case IMX6_CPUTYPE_IMX6UL:
cputypestr = "i.MX6 UltraLite";
- imx6ul_enet_clk_init();
break;
case IMX6_CPUTYPE_IMX6ULL:
cputypestr = "i.MX6 ULL";
@@ -182,6 +184,7 @@ int imx6_init(void)
imx_set_silicon_revision(cputypestr, mx6_silicon_revision);
imx6_setup_ipu_qos();
+ imx6ul_enet_clk_init();
return 0;
}
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] ARM: imx6: add static annotation locally used functions
2017-07-10 15:38 [PATCH 1/2] ARM: imx6: move MX6UL enet setup out of CPU string setting Lucas Stach
@ 2017-07-10 15:38 ` Lucas Stach
0 siblings, 0 replies; 2+ messages in thread
From: Lucas Stach @ 2017-07-10 15:38 UTC (permalink / raw)
To: barebox
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/mach-imx/imx6.c | 6 +++---
arch/arm/mach-imx/include/mach/imx6.h | 2 --
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 7df61b94ec85..d511a152e108 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -25,7 +25,7 @@
#include <asm/mmu.h>
#include <asm/cache-l2x0.h>
-void imx6_init_lowlevel(void)
+static void imx6_init_lowlevel(void)
{
void __iomem *aips1 = (void *)MX6_AIPS1_ON_BASE_ADDR;
void __iomem *aips2 = (void *)MX6_AIPS2_ON_BASE_ADDR;
@@ -83,7 +83,7 @@ void imx6_init_lowlevel(void)
}
-void imx6_setup_ipu_qos(void)
+static void imx6_setup_ipu_qos(void)
{
void __iomem *iomux = (void *)MX6_IOMUXC_BASE_ADDR;
void __iomem *fast2 = (void *)MX6_FAST2_BASE_ADDR;
@@ -121,7 +121,7 @@ void imx6_setup_ipu_qos(void)
}
}
-void imx6ul_enet_clk_init(void)
+static void imx6ul_enet_clk_init(void)
{
void __iomem *gprbase = IOMEM(MX6_IOMUXC_BASE_ADDR) + 0x4000;
uint32_t val;
diff --git a/arch/arm/mach-imx/include/mach/imx6.h b/arch/arm/mach-imx/include/mach/imx6.h
index 6ad53433cb77..0dc66c8e0623 100644
--- a/arch/arm/mach-imx/include/mach/imx6.h
+++ b/arch/arm/mach-imx/include/mach/imx6.h
@@ -6,8 +6,6 @@
#include <mach/imx6-regs.h>
#include <mach/revision.h>
-void imx6_init_lowlevel(void);
-
#define IMX6_ANATOP_SI_REV 0x260
#define IMX6SL_ANATOP_SI_REV 0x280
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-10 15:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 15:38 [PATCH 1/2] ARM: imx6: move MX6UL enet setup out of CPU string setting Lucas Stach
2017-07-10 15:38 ` [PATCH 2/2] ARM: imx6: add static annotation locally used functions Lucas Stach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox