drivers/net/r8168: Add support for Realtek RT8125
The Realtek RT8168 and RT8125 have a similar programming interface, therefore add the PCI device ID for the RT8125 into driver for support. BUG=b:193750191 TEST=emerge-brask coreboot chromeos-bootimage. Test on brask whose NIC is RT8125. Check if the default MAC is written into the NIC. Signed-off-by: Alan Huang <alan-huang@quanta.corp-partner.google.com> Change-Id: Iaa4c41f94fd6e5fd6393abbb30bfc22a149f5d71 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59086 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Zhuohao Lee <zhuohao@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
fc69b9d5ef
commit
769994cbf6
|
@ -17,6 +17,7 @@
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <device/pci_def.h>
|
#include <device/pci_def.h>
|
||||||
|
#include <device/pci_ids.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
#include <fmap.h>
|
#include <fmap.h>
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
@ -360,10 +361,16 @@ static struct device_operations r8168_ops = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const unsigned short pci_device_ids[] = {
|
||||||
|
PCI_DEVICE_ID_REALTEK_8168,
|
||||||
|
PCI_DEVICE_ID_REALTEK_8125,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
static const struct pci_driver r8168_driver __pci_driver = {
|
static const struct pci_driver r8168_driver __pci_driver = {
|
||||||
.ops = &r8168_ops,
|
.ops = &r8168_ops,
|
||||||
.vendor = 0x10ec,
|
.vendor = PCI_VENDOR_ID_REALTEK,
|
||||||
.device = 0x8168,
|
.devices = pci_device_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct chip_operations drivers_net_ops = {
|
struct chip_operations drivers_net_ops = {
|
||||||
|
|
|
@ -1281,8 +1281,10 @@
|
||||||
#define PCI_VENDOR_ID_REALTEK 0x10ec
|
#define PCI_VENDOR_ID_REALTEK 0x10ec
|
||||||
#define PCI_DEVICE_ID_REALTEK_5261 0x5261
|
#define PCI_DEVICE_ID_REALTEK_5261 0x5261
|
||||||
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
|
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
|
||||||
|
#define PCI_DEVICE_ID_REALTEK_8125 0x8125
|
||||||
#define PCI_DEVICE_ID_REALTEK_8129 0x8129
|
#define PCI_DEVICE_ID_REALTEK_8129 0x8129
|
||||||
#define PCI_DEVICE_ID_REALTEK_8139 0x8139
|
#define PCI_DEVICE_ID_REALTEK_8139 0x8139
|
||||||
|
#define PCI_DEVICE_ID_REALTEK_8168 0x8168
|
||||||
|
|
||||||
#define PCI_VENDOR_ID_TYAN 0x10f1
|
#define PCI_VENDOR_ID_TYAN 0x10f1
|
||||||
#define PCI_VENDOR_ID_XILINX 0x10ee
|
#define PCI_VENDOR_ID_XILINX 0x10ee
|
||||||
|
|
Loading…
Reference in New Issue