Thread (13 messages) 13 messages, 5 authors, 2017-05-23

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

From: Andy Shevchenko <hidden>
Date: 2017-05-22 17:00:23
Also in: lkml

On Mon, May 22, 2017 at 2:12 PM, Jan Kiszka [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help