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
Signature · 4 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127
Quoted 3 lines · In message <[email protected]> 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.
Quoted 1 line
Looking at "
lib_mips/board.c" I see:
...
Quoted 2 lines
/* We can reserve some RAM "on top" here.
*/This is the right place.
Quoted 2 lines
/* round down to next 4 kB limit.
*/...
Quoted 1 line
Is that sane?
Maybe sane, but IMHO not optimal.
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de People have one thing in common: they are all different.
A little question.. is possible to use the u-boot serial console with the LCD support enabled? =:-o
Thanks,
Rodolfo
Signature · 11 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20060704/b9f87b90/attachment.pgp
Quoted 3 lines · In message <[email protected]> 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
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Where shall I begin, please your Majesty?" he asked. "Begin at the beginning," the King said, gravely, "and go on till you come to the end: then stop." - Alice's Adventures in Wonderland, Lewis Carroll
Quoted 2 lines · Wolfgang Denk
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
Signature · 11 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20060704/47351ba1/attachment.pgp