Skip to content

Commit

Permalink
[exanic] Power up optical PHYs (if present)
Browse files Browse the repository at this point in the history
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
Peter von Konigsmark authored and mcb30 committed Sep 7, 2017
1 parent af02a8d commit f756fd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/drivers/net/exanic.c
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/drivers/net/exanic.h
Expand Up @@ -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) ) )

Expand Down

0 comments on commit f756fd7

Please sign in to comment.