Skip to content
Snippets Groups Projects
Commit abbfcbe5 authored by Michal Simek's avatar Michal Simek Committed by Joe Hershberger
Browse files

net: phy: Add support for all targets which requires MANUAL_RELOC


Targets with CONFIG_NEEDS_MANUAL_RELOC do not use REL/RELA
relocation (mostly only GOT) where functions aray are not
updated. This patch is fixing function pointers passed to phy_register
function.
This patch was tested on Microblaze architecture.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent 793ea947
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@
#include <linux/err.h>
#include <linux/compiler.h>
DECLARE_GLOBAL_DATA_PTR;
/* Generic PHY support and helper functions */
/**
......@@ -494,6 +496,20 @@ int phy_register(struct phy_driver *drv)
INIT_LIST_HEAD(&drv->list);
list_add_tail(&drv->list, &phy_drivers);
#ifdef CONFIG_NEEDS_MANUAL_RELOC
if (drv->probe)
drv->probe += gd->reloc_off;
if (drv->config)
drv->config += gd->reloc_off;
if (drv->startup)
drv->startup += gd->reloc_off;
if (drv->shutdown)
drv->shutdown += gd->reloc_off;
if (drv->readext)
drv->readext += gd->reloc_off;
if (drv->writeext)
drv->writeext += gd->reloc_off;
#endif
return 0;
}
......
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