* [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context
@ 2023-04-25 14:19 Hugo Villeneuve
2023-04-26 1:30 ` Peng Fan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hugo Villeneuve @ 2023-04-25 14:19 UTC (permalink / raw)
To: u-boot, Stefano Babic, Fabio Estevam, NXP i.MX U-Boot Team
Cc: rasmus.villemoes, Hugo Villeneuve
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
It doesn't seem appropriate for arch/SOC to use a board-level
functionality (CONFIG_OF_BOARD_FIXUP), because this prevents boards
that need to do FDT fixup from using that feature.
Also, this code is completely dead and useless (from comments by
Rasmus Villemoes on the mailing list):
- No in-tree imx8m-based board seems to set CONFIG_OF_BOARD_FIXUP
- The nodes which that function wants to disable don't even exist in
the U-Boot copy of imx8mp.dtsi.
This code was introduced in commit 35bb60787b88. It seems to be some
random import of code from downstream NXP U-Boot, with a commit
message that makes no sense in upstream context.
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
---
arch/arm/mach-imx/imx8m/soc.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index df865e997d..2ec5c3dc43 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -1395,40 +1395,6 @@ usb_modify_speed:
}
#endif
-#ifdef CONFIG_OF_BOARD_FIXUP
-#ifndef CONFIG_SPL_BUILD
-int board_fix_fdt(void *fdt)
-{
- if (is_imx8mpul()) {
- int i = 0;
- int nodeoff, ret;
- const char *status = "disabled";
- static const char * const dsi_nodes[] = {
- "/soc@0/bus@32c00000/mipi_dsi@32e60000",
- "/soc@0/bus@32c00000/lcd-controller@32e80000",
- "/dsi-host"
- };
-
- for (i = 0; i < ARRAY_SIZE(dsi_nodes); i++) {
- nodeoff = fdt_path_offset(fdt, dsi_nodes[i]);
- if (nodeoff > 0) {
-set_status:
- ret = fdt_setprop(fdt, nodeoff, "status", status,
- strlen(status) + 1);
- if (ret == -FDT_ERR_NOSPACE) {
- ret = fdt_increase_size(fdt, 512);
- if (!ret)
- goto set_status;
- }
- }
- }
- }
-
- return 0;
-}
-#endif
-#endif
-
#if !CONFIG_IS_ENABLED(SYSRESET)
void reset_cpu(void)
{
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context
2023-04-25 14:19 [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context Hugo Villeneuve
@ 2023-04-26 1:30 ` Peng Fan
2023-04-27 18:37 ` Fabio Estevam
2023-05-02 12:46 ` sbabic
2 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2023-04-26 1:30 UTC (permalink / raw)
To: Hugo Villeneuve, u-boot@lists.denx.de, Stefano Babic,
Fabio Estevam, dl-uboot-imx
Cc: rasmus.villemoes@prevas.dk, Hugo Villeneuve
On 4/25/2023 10:19 PM, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>
> It doesn't seem appropriate for arch/SOC to use a board-level
> functionality (CONFIG_OF_BOARD_FIXUP), because this prevents boards
> that need to do FDT fixup from using that feature.
>
> Also, this code is completely dead and useless (from comments by
> Rasmus Villemoes on the mailing list):
>
> - No in-tree imx8m-based board seems to set CONFIG_OF_BOARD_FIXUP
> - The nodes which that function wants to disable don't even exist in
> the U-Boot copy of imx8mp.dtsi.
>
> This code was introduced in commit 35bb60787b88. It seems to be some
> random import of code from downstream NXP U-Boot, with a commit
> message that makes no sense in upstream context.
>
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
> ---
> arch/arm/mach-imx/imx8m/soc.c | 34 ----------------------------------
> 1 file changed, 34 deletions(-)
>
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index df865e997d..2ec5c3dc43 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -1395,40 +1395,6 @@ usb_modify_speed:
> }
> #endif
>
> -#ifdef CONFIG_OF_BOARD_FIXUP
> -#ifndef CONFIG_SPL_BUILD
> -int board_fix_fdt(void *fdt)
> -{
> - if (is_imx8mpul()) {
> - int i = 0;
> - int nodeoff, ret;
> - const char *status = "disabled";
> - static const char * const dsi_nodes[] = {
> - "/soc@0/bus@32c00000/mipi_dsi@32e60000",
> - "/soc@0/bus@32c00000/lcd-controller@32e80000",
> - "/dsi-host"
> - };
> -
> - for (i = 0; i < ARRAY_SIZE(dsi_nodes); i++) {
> - nodeoff = fdt_path_offset(fdt, dsi_nodes[i]);
> - if (nodeoff > 0) {
> -set_status:
> - ret = fdt_setprop(fdt, nodeoff, "status", status,
> - strlen(status) + 1);
> - if (ret == -FDT_ERR_NOSPACE) {
> - ret = fdt_increase_size(fdt, 512);
> - if (!ret)
> - goto set_status;
> - }
> - }
> - }
> - }
> -
> - return 0;
> -}
> -#endif
> -#endif
> -
> #if !CONFIG_IS_ENABLED(SYSRESET)
> void reset_cpu(void)
> {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context
2023-04-25 14:19 [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context Hugo Villeneuve
2023-04-26 1:30 ` Peng Fan
@ 2023-04-27 18:37 ` Fabio Estevam
2023-05-02 12:46 ` sbabic
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2023-04-27 18:37 UTC (permalink / raw)
To: Hugo Villeneuve
Cc: u-boot, Stefano Babic, NXP i.MX U-Boot Team, rasmus.villemoes,
Hugo Villeneuve
Hi Hugo,
On Tue, Apr 25, 2023 at 11:20 AM Hugo Villeneuve <hugo@hugovil.com> wrote:
>
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>
> It doesn't seem appropriate for arch/SOC to use a board-level
> functionality (CONFIG_OF_BOARD_FIXUP), because this prevents boards
> that need to do FDT fixup from using that feature.
>
> Also, this code is completely dead and useless (from comments by
> Rasmus Villemoes on the mailing list):
>
> - No in-tree imx8m-based board seems to set CONFIG_OF_BOARD_FIXUP
> - The nodes which that function wants to disable don't even exist in
> the U-Boot copy of imx8mp.dtsi.
>
> This code was introduced in commit 35bb60787b88. It seems to be some
> random import of code from downstream NXP U-Boot, with a commit
> message that makes no sense in upstream context.
>
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context
2023-04-25 14:19 [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context Hugo Villeneuve
2023-04-26 1:30 ` Peng Fan
2023-04-27 18:37 ` Fabio Estevam
@ 2023-05-02 12:46 ` sbabic
2 siblings, 0 replies; 4+ messages in thread
From: sbabic @ 2023-05-02 12:46 UTC (permalink / raw)
To: Hugo Villeneuve, u-boot
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> It doesn't seem appropriate for arch/SOC to use a board-level
> functionality (CONFIG_OF_BOARD_FIXUP), because this prevents boards
> that need to do FDT fixup from using that feature.
> Also, this code is completely dead and useless (from comments by
> Rasmus Villemoes on the mailing list):
> - No in-tree imx8m-based board seems to set CONFIG_OF_BOARD_FIXUP
> - The nodes which that function wants to disable don't even exist in
> the U-Boot copy of imx8mp.dtsi.
> This code was introduced in commit 35bb60787b88. It seems to be some
> random import of code from downstream NXP U-Boot, with a commit
> message that makes no sense in upstream context.
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> Acked-by: Peng Fan <peng.fan@nxp.com>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-02 12:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 14:19 [PATCH] arm: imx8m: remove unused and obsolete board_fix_fdt() in SOC context Hugo Villeneuve
2023-04-26 1:30 ` Peng Fan
2023-04-27 18:37 ` Fabio Estevam
2023-05-02 12:46 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox