Skip to content
Snippets Groups Projects
Commit 0630535e authored by Peter Tyser's avatar Peter Tyser Committed by Wolfgang Denk
Browse files

arm/microblaze/nios/nios2/sh: Remove relocation fixups


These architectures don't need relocation fixups, so reduce their
codesize a bit by defining CONFIG_RELOC_FIXUP_WORKS.

Also remove the reloc_off field from their global data structures
as it is no longer needed.

Note that the location of the standalone application jump table pointer
in the global data structure is affected by this change, breaking
execution of standalone applications compiled for previous versions of
U-Boot. We will therefore increment XF_VERSION in the next commit,
which also touches this area.

Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent 521af04d
No related branches found
No related tags found
No related merge requests found
...@@ -201,7 +201,7 @@ int stdio_deregister(char *devname) ...@@ -201,7 +201,7 @@ int stdio_deregister(char *devname)
int stdio_init (void) int stdio_init (void)
{ {
#if !defined(CONFIG_ARM) && !defined(CONFIG_RELOC_FIXUP_WORKS) #if !defined(CONFIG_RELOC_FIXUP_WORKS)
/* already relocated for current ARM implementation */ /* already relocated for current ARM implementation */
ulong relocation_offset = gd->reloc_off; ulong relocation_offset = gd->reloc_off;
int i; int i;
...@@ -211,7 +211,7 @@ int stdio_init (void) ...@@ -211,7 +211,7 @@ int stdio_init (void)
stdio_names[i] = (char *) (((ulong) stdio_names[i]) + stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
relocation_offset); relocation_offset);
} }
#endif /* !ARM && !CONFIG_RELOC_FIXUP_WORKS */ #endif /* !CONFIG_RELOC_FIXUP_WORKS */
/* Initialize the list */ /* Initialize the list */
INIT_LIST_HEAD(&(devs.list)); INIT_LIST_HEAD(&(devs.list));
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
#ifndef _ASM_CONFIG_H_ #ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
/* Relocation to SDRAM works on all ARM boards */
#define CONFIG_RELOC_FIXUP_WORKS
#endif #endif
...@@ -38,7 +38,6 @@ typedef struct global_data { ...@@ -38,7 +38,6 @@ typedef struct global_data {
unsigned long flags; unsigned long flags;
unsigned long baudrate; unsigned long baudrate;
unsigned long have_console; /* serial_init() was called */ unsigned long have_console; /* serial_init() was called */
unsigned long reloc_off; /* Relocation Offset */
unsigned long env_addr; /* Address of Environment struct */ unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long env_valid; /* Checksum of Environment valid? */
unsigned long fb_base; /* base address of frame buffer */ unsigned long fb_base; /* base address of frame buffer */
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
#ifndef _ASM_CONFIG_H_ #ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
/* Relocation to SDRAM works on all Microblaze boards */
#define CONFIG_RELOC_FIXUP_WORKS
#endif #endif
...@@ -39,7 +39,6 @@ typedef struct global_data { ...@@ -39,7 +39,6 @@ typedef struct global_data {
unsigned long flags; unsigned long flags;
unsigned long baudrate; unsigned long baudrate;
unsigned long have_console; /* serial_init() was called */ unsigned long have_console; /* serial_init() was called */
unsigned long reloc_off; /* Relocation Offset */
unsigned long env_addr; /* Address of Environment struct */ unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid? */ unsigned long env_valid; /* Checksum of Environment valid? */
unsigned long fb_base; /* base address of frame buffer */ unsigned long fb_base; /* base address of frame buffer */
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
#ifndef _ASM_CONFIG_H_ #ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
/* Relocation to SDRAM works on all NIOS boards */
#define CONFIG_RELOC_FIXUP_WORKS
#endif #endif
...@@ -31,7 +31,6 @@ typedef struct global_data { ...@@ -31,7 +31,6 @@ typedef struct global_data {
unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long cpu_clk; /* CPU clock in Hz! */
unsigned long have_console; /* serial_init() was called */ unsigned long have_console; /* serial_init() was called */
phys_size_t ram_size; /* RAM size */ phys_size_t ram_size; /* RAM size */
unsigned long reloc_off; /* Relocation Offset */
unsigned long env_addr; /* Address of Environment struct */ unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid */ unsigned long env_valid; /* Checksum of Environment valid */
#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER) #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
#ifndef _ASM_CONFIG_H_ #ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
/* Relocation to SDRAM works on all NIOS2 boards */
#define CONFIG_RELOC_FIXUP_WORKS
#endif #endif
...@@ -30,7 +30,6 @@ typedef struct global_data { ...@@ -30,7 +30,6 @@ typedef struct global_data {
unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long cpu_clk; /* CPU clock in Hz! */
unsigned long have_console; /* serial_init() was called */ unsigned long have_console; /* serial_init() was called */
phys_size_t ram_size; /* RAM size */ phys_size_t ram_size; /* RAM size */
unsigned long reloc_off; /* Relocation Offset */
unsigned long env_addr; /* Address of Environment struct */ unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid */ unsigned long env_valid; /* Checksum of Environment valid */
#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER) #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
......
...@@ -21,4 +21,7 @@ ...@@ -21,4 +21,7 @@
#ifndef _ASM_CONFIG_H_ #ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
/* Relocation to SDRAM works on all sh boards */
#define CONFIG_RELOC_FIXUP_WORKS
#endif #endif
...@@ -35,7 +35,6 @@ typedef struct global_data ...@@ -35,7 +35,6 @@ typedef struct global_data
unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long cpu_clk; /* CPU clock in Hz! */
unsigned long have_console; /* serial_init() was called */ unsigned long have_console; /* serial_init() was called */
phys_size_t ram_size; /* RAM size */ phys_size_t ram_size; /* RAM size */
unsigned long reloc_off; /* Relocation Offset */
unsigned long env_addr; /* Address of Environment struct */ unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid */ unsigned long env_valid; /* Checksum of Environment valid */
void **jt; /* Standalone app jump table */ void **jt; /* Standalone app jump table */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment