Commit 324d96b4 authored by Yanteng Si's avatar Yanteng Si Committed by Paolo Abeni

net: stmmac: dwmac-loongson: Use PCI_DEVICE_DATA() macro for device identification

For the readability sake convert the hard-coded Loongson GMAC PCI ID to
the respective macro and use the PCI_DEVICE_DATA() macro-function to
create the pci_device_id array entry. The later change will be
specifically useful in order to assign the device-specific data for the
currently supported device and for about to be added Loongson GNET
controller.
Signed-off-by: default avatarFeiyang Chen <chenfeiyang@loongson.cn>
Signed-off-by: default avatarYinggang Gu <guyinggang@loongson.cn>
Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Acked-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
Signed-off-by: default avatarYanteng Si <siyanteng@loongson.cn>
Tested-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 0c979e6b
......@@ -9,6 +9,8 @@
#include <linux/of_irq.h>
#include "stmmac.h"
#define PCI_DEVICE_ID_LOONGSON_GMAC 0x7a03
static int loongson_default_data(struct plat_stmmacenet_data *plat)
{
plat->clk_csr = 2; /* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */
......@@ -208,7 +210,7 @@ static SIMPLE_DEV_PM_OPS(loongson_dwmac_pm_ops, loongson_dwmac_suspend,
loongson_dwmac_resume);
static const struct pci_device_id loongson_dwmac_id_table[] = {
{ PCI_VDEVICE(LOONGSON, 0x7a03) },
{ PCI_DEVICE_DATA(LOONGSON, GMAC, NULL) },
{}
};
MODULE_DEVICE_TABLE(pci, loongson_dwmac_id_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment