Skip to content
Snippets Groups Projects
Commit 6c7cac8c authored by Stefan Roese's avatar Stefan Roese
Browse files

[PATCH] get_dev() now unconditionally uses manual relocation


Since the relocation fix is not included yet and we're not sure how
it will be added, this patch removes code that required relocation
to be fixed for now.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 8274ec0b
No related branches found
No related tags found
No related merge requests found
...@@ -64,25 +64,17 @@ static const struct block_drvr block_drvr[] = { ...@@ -64,25 +64,17 @@ static const struct block_drvr block_drvr[] = {
{ }, { },
}; };
#ifndef CFG_FIXUP_RELOCATION
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#endif
block_dev_desc_t *get_dev(char* ifname, int dev) block_dev_desc_t *get_dev(char* ifname, int dev)
{ {
const struct block_drvr *drvr = block_drvr; const struct block_drvr *drvr = block_drvr;
block_dev_desc_t* (*reloc_get_dev)(int dev);
while (drvr->name) { while (drvr->name) {
#ifndef CFG_FIXUP_RELOCATION
block_dev_desc_t* (*reloc_get_dev)(int dev);
reloc_get_dev = drvr->get_dev + gd->reloc_off; reloc_get_dev = drvr->get_dev + gd->reloc_off;
if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0) if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
return reloc_get_dev(dev); return reloc_get_dev(dev);
#else
if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
return drvr->get_dev(dev);
#endif
drvr++; drvr++;
} }
return NULL; return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment