diff mbox series

[U-Boot,03/12] board/BuR/common: make CONFIG_LCD optional

Message ID 1530884489-28089-4-git-send-email-oe5hpm@oevsv.at
State Accepted
Commit e22597048a7bf6814ebf45f46eb891e34dbfd31f
Delegated to: Tom Rini
Headers show
Series Refactor bur board/common code | expand

Commit Message

Hannes Schmelzer July 6, 2018, 1:41 p.m. UTC
Since we're going to drop LCD-support on brppt1 boards, we have to make
this stuff here optional and remove the #error path.

We also move out the ft_board_setup(...) from this #ifdef because
there's no relationship with the LCD-code and on the other hand this is
still needed in future even with LCD-support off.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c | 39 ++++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 21 deletions(-)

Comments

Tom Rini July 20, 2018, 12:37 p.m. UTC | #1
On Fri, Jul 06, 2018 at 03:41:20PM +0200, Hannes Schmelzer wrote:

> Since we're going to drop LCD-support on brppt1 boards, we have to make
> this stuff here optional and remove the #error path.
> 
> We also move out the ft_board_setup(...) from this #ifdef because
> there's no relationship with the LCD-code and on the other hand this is
> still needed in future even with LCD-support off.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 29430e9..e1ac6c4 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -156,24 +156,6 @@  int load_lcdtiming(struct am335x_lcdpanel *panel)
 	return 0;
 }
 
-int ft_board_setup(void *blob, bd_t *bd)
-{
-	int nodeoffset;
-
-	nodeoffset = fdt_path_offset(blob, "/factory-settings");
-	if (nodeoffset < 0) {
-		puts("set bootloader version 'factory-settings' not in dtb!\n");
-		return -1;
-	}
-	if (fdt_setprop(blob, nodeoffset, "bl-version",
-			PLAIN_VERSION, strlen(PLAIN_VERSION)) != 0) {
-		puts("set bootloader version 'bl-version' prop. not in dtb!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
 static void br_summaryscreen_printenv(char *prefix,
 				       char *name, char *altname,
 				       char *suffix)
@@ -262,11 +244,26 @@  void lcd_enable(void)
 	br_summaryscreen();
 	lcdbacklight(1);
 }
-#elif CONFIG_SPL_BUILD
-#else
-#error "LCD-support with a suitable FB-Driver is mandatory !"
 #endif /* CONFIG_LCD */
 
+int ft_board_setup(void *blob, bd_t *bd)
+{
+	int nodeoffset;
+
+	nodeoffset = fdt_path_offset(blob, "/factory-settings");
+	if (nodeoffset < 0) {
+		puts("set bootloader version 'factory-settings' not in dtb!\n");
+		return -1;
+	}
+	if (fdt_setprop(blob, nodeoffset, "bl-version",
+			PLAIN_VERSION, strlen(PLAIN_VERSION)) != 0) {
+		puts("set bootloader version 'bl-version' prop. not in dtb!\n");
+		return -1;
+	}
+
+	return 0;
+}
+
 #ifdef CONFIG_SPL_BUILD
 void pmicsetup(u32 mpupll)
 {