Skip to content
Snippets Groups Projects
Commit f41e6088 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

sh: Fix build errors for generic board


This includes the following fixes:
- Define needed __init_end symbol - see initr_reloc_global_data()
- Drop SH-specific struct bd_info
- Add an empty relocate_code() function

This prevents build errors with generic board, but the code will still need
work. Perhaps this is a better alternative than deleting the code.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent b0b35953
No related branches found
No related tags found
No related merge requests found
...@@ -83,3 +83,9 @@ int dcache_status(void) ...@@ -83,3 +83,9 @@ int dcache_status(void)
{ {
return 0; return 0;
} }
void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaaddr)
{
/* TODO(sh maintainer): Implement this */
while (1);
}
...@@ -46,8 +46,9 @@ _init: ...@@ -46,8 +46,9 @@ _init:
mov.l ._gd_init, r13 /* global data */ mov.l ._gd_init, r13 /* global data */
mov.l ._stack_init, r15 /* stack */ mov.l ._stack_init, r15 /* stack */
mov.l ._sh_generic_init, r0 #TODO(sh maintainer): Fix this up to call the correct code
jsr @r0 #mov.l ._sh_generic_init, r0
#jsr @r0
nop nop
loop: loop:
...@@ -62,4 +63,4 @@ loop: ...@@ -62,4 +63,4 @@ loop:
._bss_end: .long bss_end ._bss_end: .long bss_end
._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE) ._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE)
._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) ._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
._sh_generic_init: .long sh_generic_init #._sh_generic_init: .long sh_generic_init
...@@ -66,3 +66,9 @@ int dcache_status(void) ...@@ -66,3 +66,9 @@ int dcache_status(void)
{ {
return 0; return 0;
} }
void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaaddr)
{
/* TODO(sh maintainer): Implement this */
while (1);
}
...@@ -45,8 +45,9 @@ _sh_start: ...@@ -45,8 +45,9 @@ _sh_start:
mov.l ._gd_init, r13 /* global data */ mov.l ._gd_init, r13 /* global data */
mov.l ._stack_init, r15 /* stack */ mov.l ._stack_init, r15 /* stack */
mov.l ._sh_generic_init, r0 #TODO(sh maintainer): Fix this up to call the correct code
jsr @r0 #mov.l ._sh_generic_init, r0
#jsr @r0
nop nop
loop: loop:
...@@ -61,4 +62,4 @@ loop: ...@@ -61,4 +62,4 @@ loop:
._bss_end: .long bss_end ._bss_end: .long bss_end
._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE) ._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE)
._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) ._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
._sh_generic_init: .long sh_generic_init #._sh_generic_init: .long sh_generic_init
...@@ -75,3 +75,9 @@ int cpu_eth_init(bd_t *bis) ...@@ -75,3 +75,9 @@ int cpu_eth_init(bd_t *bis)
#endif #endif
return 0; return 0;
} }
void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaaddr)
{
/* TODO(sh maintainer): Implement this */
while (1);
}
...@@ -42,8 +42,9 @@ _sh_start: ...@@ -42,8 +42,9 @@ _sh_start:
mov.l ._gd_init, r13 /* global data */ mov.l ._gd_init, r13 /* global data */
mov.l ._stack_init, r15 /* stack */ mov.l ._stack_init, r15 /* stack */
mov.l ._sh_generic_init, r0 #TODO(sh maintainer): Fix this up to call the correct code
jsr @r0 #mov.l ._sh_generic_init, r0
#jsr @r0
nop nop
loop: loop:
...@@ -58,4 +59,4 @@ loop: ...@@ -58,4 +59,4 @@ loop:
._bss_end: .long bss_end ._bss_end: .long bss_end
._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE) ._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE)
._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) ._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
._sh_generic_init: .long sh_generic_init #._sh_generic_init: .long sh_generic_init
...@@ -67,6 +67,7 @@ SECTIONS ...@@ -67,6 +67,7 @@ SECTIONS
KEEP(*(SORT(.u_boot_list*))); KEEP(*(SORT(.u_boot_list*)));
} }
PROVIDE (__init_end = .);
PROVIDE (reloc_dst_end = .); PROVIDE (reloc_dst_end = .);
/* _reloc_dst_end = .; */ /* _reloc_dst_end = .; */
......
...@@ -12,16 +12,8 @@ ...@@ -12,16 +12,8 @@
#ifndef __ASM_SH_U_BOOT_H_ #ifndef __ASM_SH_U_BOOT_H_
#define __ASM_SH_U_BOOT_H_ #define __ASM_SH_U_BOOT_H_
typedef struct bd_info { /* Use the generic board which requires a unified bd_info */
unsigned long bi_memstart; /* start of DRAM memory */ #include <asm-generic/u-boot.h>
phys_size_t bi_memsize; /* size of DRAM memory in bytes */
unsigned long bi_flashstart; /* start of FLASH memory */
unsigned long bi_flashsize; /* size of FLASH memory */
unsigned long bi_flashoffset; /* reserved area for startup monitor */
unsigned long bi_sramstart; /* start of SRAM memory */
unsigned long bi_sramsize; /* size of SRAM memory */
unsigned long bi_boot_params; /* where this board expects params */
} bd_t;
/* For image.h:image_check_target_arch() */ /* For image.h:image_check_target_arch() */
#define IH_ARCH_DEFAULT IH_ARCH_SH #define IH_ARCH_DEFAULT IH_ARCH_SH
......
...@@ -65,6 +65,7 @@ SECTIONS ...@@ -65,6 +65,7 @@ SECTIONS
KEEP(*(SORT(.u_boot_list*))); KEEP(*(SORT(.u_boot_list*)));
} }
PROVIDE (__init_end = .);
PROVIDE (reloc_dst_end = .); PROVIDE (reloc_dst_end = .);
/* _reloc_dst_end = .; */ /* _reloc_dst_end = .; */
......
...@@ -65,6 +65,7 @@ SECTIONS ...@@ -65,6 +65,7 @@ SECTIONS
KEEP(*(SORT(.u_boot_list*))); KEEP(*(SORT(.u_boot_list*)));
} }
PROVIDE (__init_end = .);
PROVIDE (reloc_dst_end = .); PROVIDE (reloc_dst_end = .);
/* _reloc_dst_end = .; */ /* _reloc_dst_end = .; */
......
...@@ -66,6 +66,7 @@ SECTIONS ...@@ -66,6 +66,7 @@ SECTIONS
KEEP(*(SORT(.u_boot_list*))); KEEP(*(SORT(.u_boot_list*)));
} }
PROVIDE (__init_end = .);
PROVIDE (reloc_dst_end = .); PROVIDE (reloc_dst_end = .);
/* _reloc_dst_end = .; */ /* _reloc_dst_end = .; */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment