Browse Source

[exanic] Power up optical PHYs (if present)

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Peter von Konigsmark 6 years ago
parent
commit
f756fd78f7
2 changed files with 7 additions and 0 deletions
  1. 3
    0
      src/drivers/net/exanic.c
  2. 4
    0
      src/drivers/net/exanic.h

+ 3
- 0
src/drivers/net/exanic.c View File

@@ -812,6 +812,9 @@ static int exanic_probe ( struct pci_device *pci ) {
812 812
 	/* Read capabilities */
813 813
 	exanic->caps = readl ( exanic->regs + EXANIC_CAPS );
814 814
 
815
+	/* Power up PHYs */
816
+	writel ( EXANIC_POWER_ON, ( exanic->regs + EXANIC_POWER ) );
817
+
815 818
 	/* Fetch base MAC address */
816 819
 	if ( ( rc = exanic_fetch_mac ( exanic ) ) != 0 )
817 820
 		goto err_fetch_mac;

+ 4
- 0
src/drivers/net/exanic.h View File

@@ -62,6 +62,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
62 62
 /** I2C GPIO register */
63 63
 #define EXANIC_I2C 0x012c
64 64
 
65
+/** Power control register */
66
+#define EXANIC_POWER 0x0138
67
+#define EXANIC_POWER_ON 0x000000f0UL		/**< Power on PHYs */
68
+
65 69
 /** Port register offset */
66 70
 #define EXANIC_PORT_REGS( index ) ( 0x0200 + ( 0x40 * (index) ) )
67 71
 

Loading…
Cancel
Save