Skip to content
Snippets Groups Projects
Commit f8de60bd authored by Christopher Spinrath's avatar Christopher Spinrath Committed by Stefano Babic
Browse files

ARM: board: cm_fx6: fix mtd partition fixup


ft_board_setup may return early in the case that the board revision
cannot be obtained. In that case it is assumed that no revision
specific correction in the fdt is neccessary. But the mtd partitions
will not be fixed up either altough they are not revision specific.

Move the call to fdt_fixup_mtdparts in front of the revision specific
part to ensure that the partitions are fixed up even if the board
revision cannot be obtained.

While on it, fix a spelling mistake in a comment introduced by the
same commit.

Fixes: 62d6bac6 ("ARM: board: cm_fx6: fixup mtd partitions in the fdt")
Signed-off-by: default avatarChristopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: default avatarStefano Babic <sbabic@denx.de>
Reviewed-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
parent eb3813ad
No related branches found
No related tags found
No related merge requests found
...@@ -588,7 +588,7 @@ struct node_info nodes[] = { ...@@ -588,7 +588,7 @@ struct node_info nodes[] = {
/* /*
* Both entries target the same flash chip. The st,m25p compatible * Both entries target the same flash chip. The st,m25p compatible
* is used in the vendor device trees, while upstream uses (the * is used in the vendor device trees, while upstream uses (the
* documented) jedec,spi-nor comptatible. * documented) jedec,spi-nor compatible.
*/ */
{ "st,m25p", MTD_DEV_TYPE_NOR, }, { "st,m25p", MTD_DEV_TYPE_NOR, },
{ "jedec,spi-nor", MTD_DEV_TYPE_NOR, }, { "jedec,spi-nor", MTD_DEV_TYPE_NOR, },
...@@ -616,6 +616,8 @@ int ft_board_setup(void *blob, bd_t *bd) ...@@ -616,6 +616,8 @@ int ft_board_setup(void *blob, bd_t *bd)
enetaddr, 6, 1); enetaddr, 6, 1);
} }
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
baseboard_rev = cl_eeprom_get_board_rev(0); baseboard_rev = cl_eeprom_get_board_rev(0);
err = cl_eeprom_get_product_name((uchar *)baseboard_name, 0); err = cl_eeprom_get_product_name((uchar *)baseboard_name, 0);
if (err || baseboard_rev == 0) if (err || baseboard_rev == 0)
...@@ -630,8 +632,6 @@ int ft_board_setup(void *blob, bd_t *bd) ...@@ -630,8 +632,6 @@ int ft_board_setup(void *blob, bd_t *bd)
NULL, 0, 1); NULL, 0, 1);
} }
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
return 0; return 0;
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment