Re: [PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses

From: Andy Shevchenko
Date: Mon May 22 2017 - 13:00:26 EST


On Mon, May 22, 2017 at 2:12 PM, Jan Kiszka <jan.kiszka@xxxxxxxxxxx> wrote:
> Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr.

> struct stmmac_pci_dmi_data {
> - const char *name;
> - const char *asset_tag;
> - unsigned int func;
> + int func;
> int phy_addr;
> };

Perhaps
struct stmmac_pci_dmi_data {
unsigned int func;
int phy_addr;
};

struct stmmac_pci_info {
struct stmmac_pci_dmi_data *data;
size_t nmaps;
(*setup)(struct plat_stmmacenet_data *plat, struct stmmac_pci_info *info);
};

static const struct stmmac_pci_dmi_data galileo_stmmac_dmi_data[] = {
{
.func = 6,
.phy_addr = 1,
},
};

static struct stmmac_pci_info galileo_pci_info = {
.map = galileo_stmmac_dmi_data,
.nmaps = ARRAY_SIZE(galileo_stmmac_dmi_data),
.setup = quark_default_setup,
}


?

--
With Best Regards,
Andy Shevchenko