[U-Boot-Users] fb support for au1x000

Hello,
I'm trying to add support for frame buffer to my au1100 based board but I'm a bit confused where I can allocate the frame buffer memory.
Looking at "lib_mips/board.c" I see:
/* * Now that we have DRAM mapped and working, we can * relocate the code and continue running from DRAM. */ addr = CFG_SDRAM_BASE + gd->ram_size;
/* We can reserve some RAM "on top" here. */
/* round down to next 4 kB limit. */ addr &= ~(4096 - 1); debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
/* Reserve memory for U-Boot code, data & bss * round down to next 16 kB limit */ addr -= len; addr &= ~(16 * 1024 - 1);
debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
Where "len" is:
len = (ulong)&uboot_end - CFG_MONITOR_BASE;
So I think I can redefine "len" as follow:
len = (ulong)&uboot_end - CFG_MONITOR_BASE + LCD_MEMORY_SIZE + PAGE_SIZE;
and then adding the code:
/* configure available FLASH banks */ size = flash_init(); display_flash_config (size);
#ifdef CONFIG_LCD # ifndef PAGE_SIZE # define PAGE_SIZE 4096 # endif /* * reserve memory for LCD display (always full pages) */ /* bss_end is defined in the board-specific linker script */ addr = (uboot_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); size = lcd_setmem (addr); gd->fb_base = addr; #endif /* CONFIG_LCD */
bd = gd->bd; bd->bi_flashstart = CFG_FLASH_BASE; bd->bi_flashsize = size;
to the function board_init_r().
Is that sane?
Ciao,
Rodolfo

In message 20060704103121.GC7631@gundam.enneenne.com you wrote:
I'm trying to add support for frame buffer to my au1100 based board but I'm a bit confused where I can allocate the frame buffer memory.
General rule: it's goot to allocate it at the upper end of memory, as we can then pass it unchanged to Linux. See how this is done in other architectures.
Looking at "lib_mips/board.c" I see:
...
/* We can reserve some RAM "on top" here. */
This is the right place.
/* round down to next 4 kB limit. */
...
Is that sane?
Maybe sane, but IMHO not optimal.
Best regards,
Wolfgang Denk

A little question.. is possible to use the u-boot serial console with the LCD support enabled? =:-o
Thanks,
Rodolfo

In message 20060704130940.GA4425@gundam.enneenne.com you wrote:
A little question.. is possible to use the u-boot serial console with the LCD support enabled? =:-o
Yes, of course. Like any other output device.
Best regards,
Wolfgang Denk

On Tue, Jul 04, 2006 at 03:22:21PM +0200, Wolfgang Denk wrote:
Yes, of course. Like any other output device.
I noticed that some boards use function console_assign() to set stdin, stdout and stderr devices. This function is called into last_stage_init() which is not defined for MIPS arch.
Should I add this function into "lib_mips/board.c" file or the above function may be called from another place?
Ciao,
Rodolfo
participants (2)
-
Rodolfo Giometti
-
Wolfgang Denk