diff options
author | Nikita Kiryanov <nikita@compulab.co.il> | 2015-09-06 11:48:38 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2015-09-13 10:36:20 +0200 |
commit | 41855186afd35669228e103a43e4eaf42fcc6496 (patch) | |
tree | d7e2b8c426b75c0680e2c000de690a7d0bd7378e /board | |
parent | 53af877fd2b509bed0ba84fc0fb2845e0c149e34 (diff) | |
download | u-boot-imx-41855186afd35669228e103a43e4eaf42fcc6496.zip u-boot-imx-41855186afd35669228e103a43e4eaf42fcc6496.tar.gz u-boot-imx-41855186afd35669228e103a43e4eaf42fcc6496.tar.bz2 |
arm: mx6: cm-fx6: modify device tree for old revisions of utilite
Old revisions of Utilite (a miniature PC based on cm-fx6) do not have
a card detect for mmc, and thus the kernel needs to be told that
there's a persistent storage on usdhc3 to force it to probe the mmc
card.
Check the baseboard revision and modify the device tree accordingly
if needed.
Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Diffstat (limited to 'board')
-rw-r--r-- | board/compulab/cm_fx6/cm_fx6.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index cb741e8..01871e1 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -561,9 +561,14 @@ int cm_fx6_setup_ecspi(void) { return 0; } #endif #ifdef CONFIG_OF_BOARD_SETUP +#define USDHC3_PATH "/soc/aips-bus@02100000/usdhc@02198000/" int ft_board_setup(void *blob, bd_t *bd) { + u32 baseboard_rev; + int nodeoffset; uint8_t enetaddr[6]; + char baseboard_name[16]; + int err; /* MAC addr */ if (eth_getenv_enetaddr("ethaddr", enetaddr)) { @@ -577,6 +582,21 @@ int ft_board_setup(void *blob, bd_t *bd) enetaddr, 6, 1); } + baseboard_rev = cl_eeprom_get_board_rev(0); + err = cl_eeprom_get_product_name((uchar *)baseboard_name, 0); + if (err || baseboard_rev == 0) + return 0; /* Assume not an early revision SB-FX6m baseboard */ + + if (!strncmp("SB-FX6m", baseboard_name, 7) && baseboard_rev <= 120) { + fdt_shrink_to_minimum(blob); /* Make room for new properties */ + nodeoffset = fdt_path_offset(blob, USDHC3_PATH); + fdt_delprop(blob, nodeoffset, "cd-gpios"); + fdt_find_and_setprop(blob, USDHC3_PATH, "non-removable", + NULL, 0, 1); + fdt_find_and_setprop(blob, USDHC3_PATH, "keep-power-in-suspend", + NULL, 0, 1); + } + return 0; } #endif |