diff options
-rw-r--r-- | board/toradex/colibri-imx8x/colibri-imx8x.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index e4e96a207e..e98ddd2679 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -59,21 +59,25 @@ int board_ci_udc_phy_mode(void *__iomem phy_base, int phy_off) } } -void board_mem_get_layout(uint64_t *phys_sdram_1_start, - uint64_t *phys_sdram_1_size, - uint64_t *phys_sdram_2_start, - uint64_t *phys_sdram_2_size) +static int is_imx8dx(void) { - uint32_t is_dualx = 0, val = 0; + uint32_t val = 0; sc_err_t sciErr = sc_misc_otp_fuse_read(-1, 6, &val); if (sciErr == SC_ERR_NONE) { /* DX has two A35 cores disabled */ - is_dualx = (val & 0xf) != 0x0; + return (val & 0xf) != 0x0; } + return false; +} +void board_mem_get_layout(uint64_t *phys_sdram_1_start, + uint64_t *phys_sdram_1_size, + uint64_t *phys_sdram_2_start, + uint64_t *phys_sdram_2_size) +{ *phys_sdram_1_start = PHYS_SDRAM_1; - if (is_dualx) + if (is_imx8dx()) /* Our DX based SKUs only have 1 GB RAM */ *phys_sdram_1_size = SZ_1G; else |