diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-09-28 23:15:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 15:40:57 -0400 |
commit | 4bcef89f0c6ca1eb4f1a789c2a226f4c02656a4b (patch) | |
tree | 9a009da21a1064ceda1b27a6253739be6ca548bf /include/linux/ssb | |
parent | ead2402cb40a023c22d93ff374eee31022e28c58 (diff) | |
download | blackbird-op-linux-4bcef89f0c6ca1eb4f1a789c2a226f4c02656a4b.tar.gz blackbird-op-linux-4bcef89f0c6ca1eb4f1a789c2a226f4c02656a4b.zip |
ssb: provide phy address for Gigabit Ethernet driver
Add a function to provide the phy address which should be used to the
Gigabit Ethernet driver connected to ssb.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ssb')
-rw-r--r-- | include/linux/ssb/ssb_driver_gige.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 86a12b0cb239..0688472500bb 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h @@ -108,6 +108,16 @@ static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) return 0; } +/* Get the device phy address */ +static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev) +{ + struct ssb_gige *dev = pdev_to_ssb_gige(pdev); + if (!dev) + return -ENODEV; + + return dev->dev->bus->sprom.et0phyaddr; +} + extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, struct pci_dev *pdev); extern int ssb_gige_map_irq(struct ssb_device *sdev, @@ -174,6 +184,10 @@ static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) { return -ENODEV; } +static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev) +{ + return -ENODEV; +} #endif /* CONFIG_SSB_DRIVER_GIGE */ #endif /* LINUX_SSB_DRIVER_GIGE_H_ */ |