summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorPeter von Konigsmark2017-09-06 01:06:42 +0200
committerMichael Brown2017-09-07 13:36:33 +0200
commitf756fd78f7bbdb9476f88d8d92fbe47bde123636 (patch)
tree2f68ac451e983f68fc3e9700d067f19352cafb32 /src/drivers/net
parent[dns] Ensure DNS names are NUL-terminated when used as diagnostic strings (diff)
downloadipxe-f756fd78f7bbdb9476f88d8d92fbe47bde123636.tar.gz
ipxe-f756fd78f7bbdb9476f88d8d92fbe47bde123636.tar.xz
ipxe-f756fd78f7bbdb9476f88d8d92fbe47bde123636.zip
[exanic] Power up optical PHYs (if present)
Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/exanic.c3
-rw-r--r--src/drivers/net/exanic.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/net/exanic.c b/src/drivers/net/exanic.c
index 62296927..64a47b45 100644
--- a/src/drivers/net/exanic.c
+++ b/src/drivers/net/exanic.c
@@ -812,6 +812,9 @@ static int exanic_probe ( struct pci_device *pci ) {
/* Read capabilities */
exanic->caps = readl ( exanic->regs + EXANIC_CAPS );
+ /* Power up PHYs */
+ writel ( EXANIC_POWER_ON, ( exanic->regs + EXANIC_POWER ) );
+
/* Fetch base MAC address */
if ( ( rc = exanic_fetch_mac ( exanic ) ) != 0 )
goto err_fetch_mac;
diff --git a/src/drivers/net/exanic.h b/src/drivers/net/exanic.h
index fd9f5b8c..041b9e21 100644
--- a/src/drivers/net/exanic.h
+++ b/src/drivers/net/exanic.h
@@ -62,6 +62,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** I2C GPIO register */
#define EXANIC_I2C 0x012c
+/** Power control register */
+#define EXANIC_POWER 0x0138
+#define EXANIC_POWER_ON 0x000000f0UL /**< Power on PHYs */
+
/** Port register offset */
#define EXANIC_PORT_REGS( index ) ( 0x0200 + ( 0x40 * (index) ) )