* [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup
@ 2016-08-23 14:08 christopher.spinrath at rwth-aachen.de
2016-08-24 7:48 ` Stefano Babic
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: christopher.spinrath at rwth-aachen.de @ 2016-08-23 14:08 UTC (permalink / raw)
To: u-boot
From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
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: 62d6bac66038 ("ARM: board: cm_fx6: fixup mtd partitions in the fdt")
Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
---
board/compulab/cm_fx6/cm_fx6.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 566c19b..28e9a8f 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -588,7 +588,7 @@ struct node_info nodes[] = {
/*
* Both entries target the same flash chip. The st,m25p compatible
* 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, },
{ "jedec,spi-nor", MTD_DEV_TYPE_NOR, },
@@ -616,6 +616,8 @@ int ft_board_setup(void *blob, bd_t *bd)
enetaddr, 6, 1);
}
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+
baseboard_rev = cl_eeprom_get_board_rev(0);
err = cl_eeprom_get_product_name((uchar *)baseboard_name, 0);
if (err || baseboard_rev == 0)
@@ -630,8 +632,6 @@ int ft_board_setup(void *blob, bd_t *bd)
NULL, 0, 1);
}
- fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
-
return 0;
}
#endif
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup
2016-08-23 14:08 [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup christopher.spinrath at rwth-aachen.de
@ 2016-08-24 7:48 ` Stefano Babic
2016-08-28 12:03 ` Nikita Kiryanov
2016-09-06 8:18 ` Stefano Babic
2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2016-08-24 7:48 UTC (permalink / raw)
To: u-boot
On 23/08/2016 16:08, christopher.spinrath at rwth-aachen.de wrote:
> From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
>
> 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: 62d6bac66038 ("ARM: board: cm_fx6: fixup mtd partitions in the fdt")
> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
> ---
> board/compulab/cm_fx6/cm_fx6.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
> index 566c19b..28e9a8f 100644
> --- a/board/compulab/cm_fx6/cm_fx6.c
> +++ b/board/compulab/cm_fx6/cm_fx6.c
> @@ -588,7 +588,7 @@ struct node_info nodes[] = {
> /*
> * Both entries target the same flash chip. The st,m25p compatible
> * 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, },
> { "jedec,spi-nor", MTD_DEV_TYPE_NOR, },
> @@ -616,6 +616,8 @@ int ft_board_setup(void *blob, bd_t *bd)
> enetaddr, 6, 1);
> }
>
> + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
> +
> baseboard_rev = cl_eeprom_get_board_rev(0);
> err = cl_eeprom_get_product_name((uchar *)baseboard_name, 0);
> if (err || baseboard_rev == 0)
> @@ -630,8 +632,6 @@ int ft_board_setup(void *blob, bd_t *bd)
> NULL, 0, 1);
> }
>
> - fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
> -
> return 0;
> }
> #endif
>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup
2016-08-23 14:08 [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup christopher.spinrath at rwth-aachen.de
2016-08-24 7:48 ` Stefano Babic
@ 2016-08-28 12:03 ` Nikita Kiryanov
2016-09-06 8:18 ` Stefano Babic
2 siblings, 0 replies; 4+ messages in thread
From: Nikita Kiryanov @ 2016-08-28 12:03 UTC (permalink / raw)
To: u-boot
Hi Christopher,
On Tue, Aug 23, 2016 at 04:08:52PM +0200, christopher.spinrath at rwth-aachen.de wrote:
> From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
>
> 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.
Reviewed-by: Nikita Kiryanov <nikita@compulab.co.il>
>
> Fixes: 62d6bac66038 ("ARM: board: cm_fx6: fixup mtd partitions in the fdt")
> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
> ---
> board/compulab/cm_fx6/cm_fx6.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup
2016-08-23 14:08 [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup christopher.spinrath at rwth-aachen.de
2016-08-24 7:48 ` Stefano Babic
2016-08-28 12:03 ` Nikita Kiryanov
@ 2016-09-06 8:18 ` Stefano Babic
2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2016-09-06 8:18 UTC (permalink / raw)
To: u-boot
On 23/08/2016 16:08, christopher.spinrath at rwth-aachen.de wrote:
> From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
>
> 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: 62d6bac66038 ("ARM: board: cm_fx6: fixup mtd partitions in the fdt")
> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-06 8:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 14:08 [U-Boot] [PATCH] ARM: board: cm_fx6: fix mtd partition fixup christopher.spinrath at rwth-aachen.de
2016-08-24 7:48 ` Stefano Babic
2016-08-28 12:03 ` Nikita Kiryanov
2016-09-06 8:18 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox