]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[exanic] Power up optical PHYs (if present)
authorPeter von Konigsmark <peter@exablaze.com>
Tue, 5 Sep 2017 23:06:42 +0000 (00:06 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 7 Sep 2017 11:36:33 +0000 (12:36 +0100)
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/exanic.c
src/drivers/net/exanic.h

index 62296927a5ac1a8b7995510d08cbfdfb96f2e3dc..64a47b4542bf932f3dcba4539ad5c114732d02c1 100644 (file)
@@ -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;
index fd9f5b8ce5ca3a5791fedc6c96504db29cc6fb3d..041b9e21ab28100b67925814e611620799435fde 100644 (file)
@@ -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) ) )