[PATCH rtems] bsps/imx: Enable clock of ETH2
Gedare Bloom
gedare at rtems.org
Wed Jun 1 12:42:53 UTC 2022
On Mon, May 23, 2022 at 6:22 AM Christian Mauderer
<christian.mauderer at 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?
> + 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 at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list