Commit 751bb571 authored by Stefan Roese's avatar Stefan Roese
Browse files

[PATCH] Fix relocation problem with "new" get_dev() function

This patch enables the "new" get_dev() function for block devices
introduced by Grant Likely to be used on systems that still suffer
from the relocation problems (manual relocation neede because of
problems with linker script).

Hopefully we can resolve this relocation issue soon for all platform
so we don't need this additional code anymore.
Signed-off-by: default avatarStefan Roese <>
parent d93e2212
......@@ -64,13 +64,25 @@ static const struct block_drvr block_drvr[] = {
{ },
block_dev_desc_t *get_dev(char* ifname, int dev)
const struct block_drvr *drvr = block_drvr;
while (drvr->name) {
block_dev_desc_t* (*reloc_get_dev)(int dev);
reloc_get_dev = drvr->get_dev + gd->reloc_off;
if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
return reloc_get_dev(dev);
if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
return drvr->get_dev(dev);
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment