[U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: modify device tree for old revisions of utilite
Igor Grinberg
grinberg at compulab.co.il
Thu Sep 3 10:57:37 CEST 2015
On 09/02/15 19:05, Nikita Kiryanov wrote:
> 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 at denx.de>
> Cc: Igor Grinberg <grinberg at compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita at compulab.co.il>
> ---
> board/compulab/cm_fx6/cm_fx6.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
> index 572111d..c8e980d 100644
> --- a/board/compulab/cm_fx6/cm_fx6.c
> +++ b/board/compulab/cm_fx6/cm_fx6.c
> @@ -582,6 +582,10 @@ int cm_fx6_setup_ecspi(void) { return 0; }
> #ifdef CONFIG_OF_BOARD_SETUP
> int ft_board_setup(void *blob, bd_t *bd)
> {
> + u32 baseboard_rev;
> + int nodeoffset;
> + const char *usdhc3_path = "/soc/aips-bus at 02100000/usdhc at 02198000/";
I would really like to see this path discovered dynamically...
Is it possible?
If not, then may be define?
> + char *baseboard_name;
> uint8_t enetaddr[6];
>
> /* MAC addr */
> @@ -596,6 +600,18 @@ int ft_board_setup(void *blob, bd_t *bd)
> enetaddr, 6, 1);
> }
>
> + baseboard_name = cl_eeprom_get_product_name(0);
Once you will change the patch 2/3, this will also need to be changed.
> + baseboard_rev = cl_eeprom_get_board_rev(0);
> + 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
>
--
Regards,
Igor.
More information about the U-Boot
mailing list