diff options
| author | Marek Vasut <[email protected]> | 2024-11-29 01:13:54 +0100 |
|---|---|---|
| committer | Fabio Estevam <[email protected]> | 2024-11-29 09:19:00 -0300 |
| commit | 1171adfd89904eb4f299da22deaa0731ed5f2957 (patch) | |
| tree | c40319fd1435d6539d26e7859692f02ea33c6687 | |
| parent | 6e18eec9080b0a079fc33a2ac8a7e2dd753944ee (diff) | |
ARM: dts: imx: Pick safe DRAM size on failure on Data Modul i.MX8M Mini/Plus eDM SBC
In case gpio_request_list_by_name_nodev() in board dmo_get_memcfg()
returns error code, pick a safe default DRAM configuration instead
of bailing out with some sort of hang() or panic(). The BIT(2)|BIT(0)
strap option is the lowest known option of 2 GiB , use that.
Signed-off-by: Marek Vasut <[email protected]>
| -rw-r--r-- | board/data_modul/common/common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/board/data_modul/common/common.c b/board/data_modul/common/common.c index b5f83908771..9e35dc5d6cb 100644 --- a/board/data_modul/common/common.c +++ b/board/data_modul/common/common.c @@ -47,6 +47,9 @@ u8 dmo_get_memcfg(void) "dmo,ram-coding-gpios", gpio, ARRAY_SIZE(gpio), GPIOD_IS_IN); + if (ret < 0) + return BIT(2) | BIT(0); + for (i = 0; i < ret; i++) memcfg |= !!dm_gpio_get_value(&(gpio[i])) << i; |
