summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-20 15:57:55 -0400
committerTom Rini <trini@konsulko.com>2015-05-20 15:57:55 -0400
commit3238639d40732fe78fd62ae5e080465552e882fc (patch)
treeb9f0f8565adf69504faf56fc7032068573e5fabe /drivers/net/phy/phy.c
parentcb0892b968e52fe0d09b4d51119d8f913685ed3c (diff)
parent76ec988b062ed880ab23d0e0d4e9e6c137b55cc3 (diff)
downloadu-boot-imx-3238639d40732fe78fd62ae5e080465552e882fc.zip
u-boot-imx-3238639d40732fe78fd62ae5e080465552e882fc.tar.gz
u-boot-imx-3238639d40732fe78fd62ae5e080465552e882fc.tar.bz2
Merge git://git.denx.de/u-boot-net
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index f5221a3..c8d08e8 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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;
}