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 <ptyser@xes-inc.com>
diff --git a/common/serial.c b/common/serial.c
index 41a24c2..b4db46b 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -81,12 +81,14 @@
int serial_register (struct serial_device *dev)
{
+#ifndef CONFIG_RELOC_FIXUP_WORKS
dev->init += gd->reloc_off;
dev->setbrg += gd->reloc_off;
dev->getc += gd->reloc_off;
dev->tstc += gd->reloc_off;
dev->putc += gd->reloc_off;
dev->puts += gd->reloc_off;
+#endif
dev->next = serial_devices;
serial_devices = dev;