From 80f73b92a19129854876ec3f1aef531a09e86d2d Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 21 Sep 2009 11:20:34 -0500 Subject: lwmon, lwmon5: Remove sysmon POST relocation fixups Signed-off-by: Peter Tyser --- post/board/lwmon/sysmon.c | 17 +---------------- post/board/lwmon5/sysmon.c | 17 +---------------- 2 files changed, 2 insertions(+), 32 deletions(-) (limited to 'post') diff --git a/post/board/lwmon/sysmon.c b/post/board/lwmon/sysmon.c index 79a5151..fc828b2 100644 --- a/post/board/lwmon/sysmon.c +++ b/post/board/lwmon/sysmon.c @@ -56,8 +56,6 @@ static int sysmon_temp_invalid = 0; /* #define DEBUG */ -#define RELOC(x) if (x != NULL) x = (void *) ((ulong) (x) + gd->reloc_off) - typedef struct sysmon_s sysmon_t; typedef struct sysmon_table_s sysmon_table_t; @@ -159,20 +157,7 @@ int sysmon_init_f (void) void sysmon_reloc (void) { - sysmon_t ** l; - sysmon_table_t * t; - - for (l = sysmon_list; *l; l++) { - RELOC(*l); - RELOC((*l)->init); - RELOC((*l)->read); - } - - for (t = sysmon_table; t < sysmon_table + sysmon_table_size; t ++) { - RELOC(t->exec_before); - RELOC(t->exec_after); - RELOC(t->sysmon); - } + /* Do nothing for now, sysmon_reloc() is required by the sysmon post */ } static char *sysmon_unit_value (sysmon_table_t *s, uint val) diff --git a/post/board/lwmon5/sysmon.c b/post/board/lwmon5/sysmon.c index aef5bd0..9c49d0e 100644 --- a/post/board/lwmon5/sysmon.c +++ b/post/board/lwmon5/sysmon.c @@ -58,8 +58,6 @@ DECLARE_GLOBAL_DATA_PTR; /* from dspic.c */ extern int dspic_read(ushort reg); -#define RELOC(x) if (x != NULL) x = (void *) ((ulong) (x) + gd->reloc_off) - #define REG_TEMPERATURE 0x12BC #define REG_VOLTAGE_5V 0x12CA #define REG_VOLTAGE_5V_STANDBY 0x12C6 @@ -160,20 +158,7 @@ int sysmon_init_f (void) void sysmon_reloc (void) { - sysmon_t ** l; - sysmon_table_t * t; - - for (l = sysmon_list; *l; l++) { - RELOC(*l); - RELOC((*l)->init); - RELOC((*l)->read); - } - - for (t = sysmon_table; t < sysmon_table + sysmon_table_size; t ++) { - RELOC(t->exec_before); - RELOC(t->exec_after); - RELOC(t->sysmon); - } + /* Do nothing for now, sysmon_reloc() is required by the sysmon post */ } static char *sysmon_unit_value (sysmon_table_t *s, uint val) -- cgit v1.1 From 521af04d853361b49344b61892eb0618f9f713c5 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 21 Sep 2009 11:20:36 -0500 Subject: Conditionally perform common relocation fixups Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser --- post/post.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'post') diff --git a/post/post.c b/post/post.c index bc8114e..b74e762 100644 --- a/post/post.c +++ b/post/post.c @@ -393,6 +393,7 @@ int post_log (char *format, ...) return 0; } +#ifndef CONFIG_RELOC_FIXUP_WORKS void post_reloc (void) { unsigned int i; @@ -437,6 +438,7 @@ void post_reloc (void) } } } +#endif /* -- cgit v1.1