1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2025-04-21 12:27:27 +03:00

qi-add-steppingstone-section-for-putc.patch

We need putc even when we are operating entirely from steppingstone.
Arrange that the board-specific putc code is in a section that goes into
steppingstone, and adapt the utils.c putc() so that it no longer needs to
indirect through the board_api struct that is in main memory.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green
2008-11-28 10:16:41 +00:00
committed by Andy Green
parent 2e982c433d
commit 8d0a6cbd9f
8 changed files with 41 additions and 27 deletions

View File

@@ -341,7 +341,7 @@ const struct board_variant const * get_board_variant_gta02(void)
return &board_variants[gta02_get_pcb_revision() & 1];
}
static void putc_gta02(char c)
static __attribute__ (( section (".steppingstone") )) void putc_gta02(char c)
{
serial_putc_s3c24xx(GTA02_DEBUG_UART, c);
}

View File

@@ -37,12 +37,16 @@ SECTIONS
. = ALIGN(4);
.text :
{
src/cpu/s3c2442/start.o (.text .rodata* .data)
src/cpu/s3c2442/lowlevel_init.o (.text .rodata* .data)
src/cpu/s3c2442/start_qi.o (.text .rodata* .data)
src/blink_led.o (.text .rodata* .data)
src/cpu/s3c2442/nand_read.o (.text .rodata* .data)
src/cpu/s3c2442/serial-s3c24xx.o (.text .rodata* .data)
src/cpu/s3c2442/start.o (.text .rodata* .data .bss)
src/cpu/s3c2442/lowlevel_init.o (.text .rodata* .data .bss)
src/cpu/s3c2442/start_qi.o (.text .rodata* .data .bss)
/* src/blink_led.o (.text .rodata* .data .bss) */
src/cpu/s3c2442/nand_read.o (.text .rodata* .data .bss)
src/cpu/s3c2442/serial-s3c24xx.o (.text .rodata* .data .bss)
src/memory-test.o (.text .rodata* .data .bss)
src/utils.o (.text .rodata* .data .bss)
src/ctype.o (.text .rodata* .data .bss)
* (.steppingstone)
}
. = ALIGN(4);

View File

@@ -98,6 +98,7 @@ void start_qi(void)
}
this_board->port_init();
set_putc_func(this_board->putc);
/* stick some hello messages on debug console */

View File

@@ -166,7 +166,7 @@ int is_this_board_gta03(void)
return 1;
}
static void putc_gta03(char c)
static __attribute__ (( section (".steppingstone") )) void putc_gta03(char c)
{
serial_putc_s3c64xx(GTA03_DEBUG_UART, c);
}

View File

@@ -42,13 +42,15 @@ SECTIONS
__steppingstone :
AT (0)
{
src/cpu/s3c6410/start.o (.text .rodata* .data)
src/cpu/s3c6410/start_qi.o (.text .rodata* .data)
src/cpu/s3c6410/serial-s3c64xx.o (.text .rodata* .data)
src/cpu/s3c6410/gta03.o (.text .rodata* .data)
src/cpu/s3c6410/hs_mmc.o (.text .rodata* .data)
src/utils.o (.text .rodata* .data)
src/ctype.o (.text .rodata* .data)
src/cpu/s3c6410/start.o (.text .rodata* .data .bss)
src/cpu/s3c6410/start_qi.o (.text .rodata* .data .bss)
src/cpu/s3c6410/serial-s3c64xx.o (.text .rodata* .data .bss)
src/cpu/s3c6410/gta03.o (.text .rodata* .data .bss)
src/cpu/s3c6410/hs_mmc.o (.text .rodata* .data .bss)
src/utils.o (.text .rodata* .data .bss)
src/memory-test.o (.text .rodata* .data .bss)
src/ctype.o (.text .rodata* .data .bss)
* (.steppingstone)
}
. = ALIGN(4);

View File

@@ -79,6 +79,7 @@ void start_qi(void)
/* okay, do the critical port and serial init for our board */
this_board->port_init();
set_putc_func(this_board->putc);
/* stick some hello messages on debug console */
@@ -97,7 +98,7 @@ void start_qi(void)
if (!is_jtag) {
/*
* We got the first 4KBytes of the bootloader pulled into the
* We got the first 8KBytes of the bootloader pulled into the
* steppingstone SRAM for free. Now we pull the whole bootloader
* image into SDRAM.
*