Am 01.06.22 um 14:42 schrieb Gedare Bloom:
On Mon, May 23, 2022 at 6:22 AM Christian Mauderer
<christian.maude...@embedded-brains.de> wrote:
---
bsps/arm/imx/start/bspstart.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bsps/arm/imx/start/bspstart.c b/bsps/arm/imx/start/bspstart.c
index 04d48d1558..e9cca49200 100644
--- a/bsps/arm/imx/start/bspstart.c
+++ b/bsps/arm/imx/start/bspstart.c
@@ -161,6 +161,18 @@ static void imx_find_gic(const void *fdt)
#endif
}
+static void imx_ccm_enable_eth2_clk(void)
+{
+ const void *fdt = bsp_fdt_get();
+
+ if (imx_is_imx6(fdt)) {
+ volatile uint32_t *ccm_pll_enet_set = (void *)0x020c80e4;
Should this magic address be a #define somewhere?
You are right: I was lazy here because it was only a single register and
I thought that it's not that much difference whether I add it as a
single magic address in the code or as a define in a header. But it's a
bit out of style so I'll change it to match the style of other similar
cases.
+ const uint32_t ccm_pll_enet_enet2_125m_en = (1 << 20);
+
+ *ccm_pll_enet_set = ccm_pll_enet_enet2_125m_en;
+ }
+}
+
void bsp_start(void)
{
imx_find_gic(bsp_fdt_get());
@@ -169,4 +181,5 @@ void bsp_start(void)
bsp_section_nocacheheap_begin,
(uintptr_t) bsp_section_nocacheheap_size
);
+ imx_ccm_enable_eth2_clk();
}
--
2.35.3
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel
--
--------------------------------------------
embedded brains GmbH
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
phone: +49-89-18 94 741 - 18
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel