diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2009-09-21 11:20:36 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-10-03 10:17:57 +0200 |
commit | 521af04d853361b49344b61892eb0618f9f713c5 (patch) | |
tree | b5168e8f89074a797761a03c6bcf0c95ddfc5f12 /disk | |
parent | 3cbcfa70b116df1bbdc90ba31c61adcaec058a8a (diff) | |
download | u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.zip u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.tar.gz u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.tar.bz2 |
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>
Diffstat (limited to 'disk')
-rw-r--r-- | disk/part.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/disk/part.c b/disk/part.c index b92fb45..9ced452 100644 --- a/disk/part.c +++ b/disk/part.c @@ -80,7 +80,10 @@ block_dev_desc_t *get_dev(char* ifname, int dev) block_dev_desc_t* (*reloc_get_dev)(int dev); while (drvr->name) { - reloc_get_dev = drvr->get_dev + gd->reloc_off; + reloc_get_dev = drvr->get_dev; +#ifndef CONFIG_RELOC_FIXUP_WORKS + reloc_get_dev += gd->reloc_off; +#endif if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0) return reloc_get_dev(dev); drvr++; |