diff mbox

[U-Boot,v2] Don't grab memory for LCD if FB address is defined

Message ID 4D7F24C3.9060006@samsung.com
State Changes Requested
Headers show

Commit Message

Minkyu Kang March 15, 2011, 8:35 a.m. UTC
f FB address is defined specific address then don't grab memory for LCD

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Albert Aribaud <albert.aribaud@free.fr>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kumar Gala <kumar.gala@freescale.com>
---
v2
 add document

 arch/arm/lib/board.c     |    4 ++++
 arch/m68k/lib/board.c    |    4 ++++
 arch/powerpc/lib/board.c |    4 ++++
 doc/README.fb_addr       |   17 +++++++++++++++++
 4 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.fb_addr

Comments

Albert ARIBAUD March 24, 2011, 2:38 p.m. UTC | #1
Hi Minkyu Kang,

Le 15/03/2011 09:35, Minkyu Kang a écrit :
> f FB address is defined specific address then don't grab memory for LCD
>
> Signed-off-by: Minkyu Kang<mk7.kang@samsung.com>
> Cc: Albert Aribaud<albert.aribaud@free.fr>
> Cc: Wolfgang Denk<wd@denx.de>
> Cc: Stefan Roese<sr@denx.de>
> Cc: Kim Phillips<kim.phillips@freescale.com>
> Cc: Andy Fleming<afleming@gmail.com>
> Cc: Kumar Gala<kumar.gala@freescale.com>
> ---
> v2
>   add document
>
>   arch/arm/lib/board.c     |    4 ++++
>   arch/m68k/lib/board.c    |    4 ++++
>   arch/powerpc/lib/board.c |    4 ++++
>   doc/README.fb_addr       |   17 +++++++++++++++++
>   4 files changed, 29 insertions(+), 0 deletions(-)
>   create mode 100644 doc/README.fb_addr
>
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index c620d2c..5a4d2bd 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -356,9 +356,13 @@ void board_init_f (ulong bootflag)
>   #endif /* CONFIG_VFD */
>
>   #ifdef CONFIG_LCD
> +#ifdef CONFIG_FB_ADDR
> +	gd->fb_base = CONFIG_FB_ADDR;
> +#else
>   	/* reserve memory for LCD display (always full pages) */
>   	addr = lcd_setmem (addr);
>   	gd->fb_base = addr;
> +#endif /* CONFIG_FB_ADDR */
>   #endif /* CONFIG_LCD */
>
>   	/*
> diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
> index 7867ba5..a6cd9b8 100644
> --- a/arch/m68k/lib/board.c
> +++ b/arch/m68k/lib/board.c
> @@ -277,9 +277,13 @@ board_init_f (ulong bootflag)
>   	debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
>
>   #ifdef CONFIG_LCD
> +#ifdef CONFIG_FB_ADDR
> +	gd->fb_base = CONFIG_FB_ADDR;
> +#else
>   	/* reserve memory for LCD display (always full pages) */
>   	addr = lcd_setmem (addr);
>   	gd->fb_base = addr;
> +#endif /* CONFIG_FB_ADDR */
>   #endif /* CONFIG_LCD */
>
>   	/*
> diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
> index b88cf6b..09c20e9 100644
> --- a/arch/powerpc/lib/board.c
> +++ b/arch/powerpc/lib/board.c
> @@ -453,9 +453,13 @@ void board_init_f (ulong bootflag)
>   	debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
>
>   #ifdef CONFIG_LCD
> +#ifdef CONFIG_FB_ADDR
> +	gd->fb_base = CONFIG_FB_ADDR;
> +#else
>   	/* reserve memory for LCD display (always full pages) */
>   	addr = lcd_setmem (addr);
>   	gd->fb_base = addr;
> +#endif /* CONFIG_FB_ADDR */
>   #endif /* CONFIG_LCD */
>
>   #if defined(CONFIG_VIDEO)&&  defined(CONFIG_8xx)
> diff --git a/doc/README.fb_addr b/doc/README.fb_addr
> new file mode 100644
> index 0000000..ea8bca6
> --- /dev/null
> +++ b/doc/README.fb_addr
> @@ -0,0 +1,17 @@
> +Define CONFIG_FB_ADDR if you want to use specific address for frame buffer.
> +Then system will reserve the frame buffer address to defined address instead of
> +lcd_setmem (this function grab the memory for frame buffer by panel's size).
> +
> +Please see below code (in board_init_f function from arch/arm/lib/board.c)
> +
> +#ifdef CONFIG_FB_ADDR
> +	gd->fb_base = CONFIG_FB_ADDR;
> +#else
> + 	/* reserve memory for LCD display (always full pages) */
> + 	addr = lcd_setmem (addr);
> + 	gd->fb_base = addr;
> +#endif /* CONFIG_FB_ADDR */
> +
> +If you want this config option then please define it at your board config file
> +
> +#define CONFIG_FB_ADDR		0x00000000

Patch does not apply cleanly through git am due to whitespace errors 
(space before tabs).

Amicalement,
diff mbox

Patch

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index c620d2c..5a4d2bd 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -356,9 +356,13 @@  void board_init_f (ulong bootflag)
 #endif /* CONFIG_VFD */
 
 #ifdef CONFIG_LCD
+#ifdef CONFIG_FB_ADDR
+	gd->fb_base = CONFIG_FB_ADDR;
+#else
 	/* reserve memory for LCD display (always full pages) */
 	addr = lcd_setmem (addr);
 	gd->fb_base = addr;
+#endif /* CONFIG_FB_ADDR */
 #endif /* CONFIG_LCD */
 
 	/*
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 7867ba5..a6cd9b8 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -277,9 +277,13 @@  board_init_f (ulong bootflag)
 	debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
 
 #ifdef CONFIG_LCD
+#ifdef CONFIG_FB_ADDR
+	gd->fb_base = CONFIG_FB_ADDR;
+#else
 	/* reserve memory for LCD display (always full pages) */
 	addr = lcd_setmem (addr);
 	gd->fb_base = addr;
+#endif /* CONFIG_FB_ADDR */
 #endif /* CONFIG_LCD */
 
 	/*
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index b88cf6b..09c20e9 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -453,9 +453,13 @@  void board_init_f (ulong bootflag)
 	debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
 
 #ifdef CONFIG_LCD
+#ifdef CONFIG_FB_ADDR
+	gd->fb_base = CONFIG_FB_ADDR;
+#else
 	/* reserve memory for LCD display (always full pages) */
 	addr = lcd_setmem (addr);
 	gd->fb_base = addr;
+#endif /* CONFIG_FB_ADDR */
 #endif /* CONFIG_LCD */
 
 #if defined(CONFIG_VIDEO) && defined(CONFIG_8xx)
diff --git a/doc/README.fb_addr b/doc/README.fb_addr
new file mode 100644
index 0000000..ea8bca6
--- /dev/null
+++ b/doc/README.fb_addr
@@ -0,0 +1,17 @@ 
+Define CONFIG_FB_ADDR if you want to use specific address for frame buffer.
+Then system will reserve the frame buffer address to defined address instead of
+lcd_setmem (this function grab the memory for frame buffer by panel's size).
+
+Please see below code (in board_init_f function from arch/arm/lib/board.c)
+
+#ifdef CONFIG_FB_ADDR
+	gd->fb_base = CONFIG_FB_ADDR;
+#else
+ 	/* reserve memory for LCD display (always full pages) */
+ 	addr = lcd_setmem (addr);
+ 	gd->fb_base = addr;
+#endif /* CONFIG_FB_ADDR */
+
+If you want this config option then please define it at your board config file
+
+#define CONFIG_FB_ADDR		0x00000000