rpi: Cleanup conditional compilation of framebuffer
cover rpi: Cleanup conditional compilation of framebuffer
If CONFIG_FDT_SIMPLEFB is not set fdt_simplefb.c will not be compiled which results in a compilation error if CONFIG_OF_BOARD_SETUP is enabled. This patch will fix this error by not trying to setup a framebuffer node in this case.
Martin Stolpe (1):
rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
board/raspberrypi/rpi/rpi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/1 rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
The functions fdt_simplefb_add_node and fdt_simplefb_enable_and_mem_rsv are only available if CONFIG_FDT_SIMPLEFB is enabled.
---
board/raspberrypi/rpi/rpi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
board/raspberrypi/rpi/rpi.c +7 -5
@@ -569,11 +569,13 @@ int ft_board_setup(void *blob, struct bd_info *bd)update_fdt_from_fw (blob, (void *)fw_dtb_pointer); - node =fdt_node_offset_by_compatible (blob,-1 ,"simple-framebuffer" ); -if (node <0 ) -fdt_simplefb_add_node (blob); -else -fdt_simplefb_enable_and_mem_rsv (blob); +if (CONFIG_IS_ENABLED (FDT_SIMPLEFB )) { + node =fdt_node_offset_by_compatible (blob,-1 ,"simple-framebuffer" ); +if (node <0 ) +fdt_simplefb_add_node (blob); +else +fdt_simplefb_enable_and_mem_rsv (blob); + }#ifdef CONFIG_EFI_LOADER /* Reserve the spin table */
Signature · 1 line
2.43.0
Re: [PATCH v1 1/1] rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
Quoted 4 lines · Martin Stolpe
The functions
fdt_simplefb_add_nodeandfdt_simplefb_enable_and_mem_rsvare only available ifCONFIG_FDT_SIMPLEFBis enabled.Signed-off-by Martin Stolpe <[email protected]>
Quoted 28 lines
---
board/raspberrypi/rpi/rpi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)board/raspberrypi/rpi/rpi.c +7
-5@@ -569,11 +569,13 @@ int ft_board_setup(void *blob, struct bd_info *bd)update_fdt_from_fw (blob, (void *)fw_dtb_pointer); - node =fdt_node_offset_by_compatible (blob,-1 ,"simple-framebuffer" ); -if (node <0 ) -fdt_simplefb_add_node (blob); -else -fdt_simplefb_enable_and_mem_rsv (blob); +if (CONFIG_IS_ENABLED (FDT_SIMPLEFB )) { + node =fdt_node_offset_by_compatible (blob,-1 ,"simple-framebuffer" ); +if (node <0 ) +fdt_simplefb_add_node (blob); +else +fdt_simplefb_enable_and_mem_rsv (blob); + }#ifdef CONFIG_EFI_LOADER /* Reserve the spin table */
Re: [PATCH v1 1/1] rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
In reply to Martin StolpeHi Martin,
Quoted 2 lines
The functions
fdt_simplefb_add_nodeandfdt_simplefb_enable_and_mem_rsvare only available ifCONFIG_FDT_SIMPLEFBis enabled.
Is this a follow up on the patch [1] you sent a month ago? If so it's not really a v1, and you should add a chnagelog as to what's changed as well as cc: the people that provided feedback.
[1] https://lists.denx.de/pipermail/u-boot/2024-September/565514.html
Quoted 32 lines
Signed-off-by Martin Stolpe <[email protected]>---
board/raspberrypi/rpi/rpi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)board/raspberrypi/rpi/rpi.c +7
-6@@ -569,11 +569,13 @@ int ft_board_setup(void *blob, struct bd_info *bd)update_fdt_from_fw (blob, (void *)fw_dtb_pointer); - node =fdt_node_offset_by_compatible (blob,-1 ,"simple-framebuffer" ); -if (node <0 ) -fdt_simplefb_add_node (blob); -else -fdt_simplefb_enable_and_mem_rsv (blob); +if (CONFIG_IS_ENABLED (FDT_SIMPLEFB )) { + node =fdt_node_offset_by_compatible (blob,-1 ,"simple-framebuffer" ); +if (node <0 ) +fdt_simplefb_add_node (blob); +else +fdt_simplefb_enable_and_mem_rsv (blob); + }#ifdef CONFIG_EFI_LOADER /* Reserve the spin table */ --2.43.0
Re: [PATCH v1 1/1] rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
Quoted 7 lines · Peter Robinson
Hi Martin,
Is this a follow up on the patch [1] you sent a month ago? If so it's not really a v1, and you should add a chnagelog as to what's changed as well as cc: the people that provided feedback.
[1] https://lists.denx.de/pipermail/u-boot/2024-September/565514.html
It's related but I would say it's separate. The problem before was, that when CONFIG_VIDEO was disabled and CONFIG_FDT_SIMPLEFB was enabled the compilation would fail with the following error message: undefined reference to `fdt_simplefb_enable_and_mem_rsv'
This was fixed by making CONFIG_VIDEO a dependency of CONFIG_FDT_SIMPLEFB in 392ff1449f7d30cc48fd4d17320d05882cd68f2e.
What this patch does is fix the following compilation error in case CONFIG_OF_BOARD_SETUP is enabled and both CONFIG_FDT_SIMPLEFB and CONFIG_VIDEO are disabled: undefined reference to `fdt_simplefb_add_node'
BR
Martin