diff mbox

[U-Boot,V2,REPOST,2/2] ARM: bcm2835: add simplefb DT node during bootz/m

Message ID 1369715478-3655-2-git-send-email-swarren@wwwdotorg.org
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Stephen Warren May 28, 2013, 4:31 a.m. UTC
Add a DT simple-framebuffer node to DT when booting the Linux kernel.
This will allow the kernel to inherit the framebuffer configuration from
U-Boot, and display a graphical boot console, and even run a full SW-
rendered X server.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
---
 board/raspberrypi/rpi_b/rpi_b.c |   14 +++++++++++++-
 include/configs/rpi_b.h         |    2 ++
 2 files changed, 15 insertions(+), 1 deletion(-)

Comments

Anatolij Gustschin June 5, 2013, 9:36 p.m. UTC | #1
On Mon, 27 May 2013 22:31:18 -0600
Stephen Warren <swarren@wwwdotorg.org> wrote:

> Add a DT simple-framebuffer node to DT when booting the Linux kernel.
> This will allow the kernel to inherit the framebuffer configuration from
> U-Boot, and display a graphical boot console, and even run a full SW-
> rendered X server.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>  board/raspberrypi/rpi_b/rpi_b.c |   14 +++++++++++++-
>  include/configs/rpi_b.h         |    2 ++
>  2 files changed, 15 insertions(+), 1 deletion(-)

Applied to u-boot-video/master. Thanks!

Anatolij
diff mbox

Patch

diff --git a/board/raspberrypi/rpi_b/rpi_b.c b/board/raspberrypi/rpi_b/rpi_b.c
index 6b3e095..16d442a 100644
--- a/board/raspberrypi/rpi_b/rpi_b.c
+++ b/board/raspberrypi/rpi_b/rpi_b.c
@@ -1,5 +1,5 @@ 
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012-2013 Stephen Warren
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -15,6 +15,8 @@ 
  */
 
 #include <common.h>
+#include <config.h>
+#include <lcd.h>
 #include <asm/arch/mbox.h>
 #include <asm/arch/sdhci.h>
 #include <asm/global_data.h>
@@ -77,3 +79,13 @@  int board_mmc_init(void)
 	return bcm2835_sdhci_init(BCM2835_SDHCI_BASE,
 				  msg_clk->get_clock_rate.body.resp.rate_hz);
 }
+
+void ft_board_setup(void *blob, bd_t *bd)
+{
+	/*
+	 * For now, we simply always add the simplefb DT node. Later, we
+	 * should be more intelligent, and e.g. only do this if no enabled DT
+	 * node exists for the "real" graphics driver.
+	 */
+	lcd_dt_simplefb_add_node(blob);
+}
diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
index c18b35b..216c6cb 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -61,6 +61,7 @@ 
 #define CONFIG_BCM2835_GPIO
 /* LCD */
 #define CONFIG_LCD
+#define CONFIG_LCD_DT_SIMPLEFB
 #define LCD_BPP				LCD_COLOR16
 /*
  * Prevent allocation of RAM for FB; the real FB address is queried
@@ -175,6 +176,7 @@ 
 
 /* Device tree support for bootm/bootz */
 #define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
 /* ATAGs support for bootm/bootz */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG