|
@@ -498,7 +498,6 @@ struct mac_device_info {
|
|
const struct stmmac_hwtimestamp *ptp;
|
|
const struct stmmac_hwtimestamp *ptp;
|
|
struct mii_regs mii; /* MII register Addresses */
|
|
struct mii_regs mii; /* MII register Addresses */
|
|
struct mac_link link;
|
|
struct mac_link link;
|
|
- unsigned int synopsys_uid;
|
|
|
|
void __iomem *pcsr; /* vpointer to device CSRs */
|
|
void __iomem *pcsr; /* vpointer to device CSRs */
|
|
int multicast_filter_bins;
|
|
int multicast_filter_bins;
|
|
int unicast_filter_entries;
|
|
int unicast_filter_entries;
|
|
@@ -507,8 +506,10 @@ struct mac_device_info {
|
|
};
|
|
};
|
|
|
|
|
|
struct mac_device_info *dwmac1000_setup(void __iomem *ioaddr, int mcbins,
|
|
struct mac_device_info *dwmac1000_setup(void __iomem *ioaddr, int mcbins,
|
|
- int perfect_uc_entries);
|
|
|
|
-struct mac_device_info *dwmac100_setup(void __iomem *ioaddr);
|
|
|
|
|
|
+ int perfect_uc_entries,
|
|
|
|
+ int *synopsys_id);
|
|
|
|
+struct mac_device_info *dwmac100_setup(void __iomem *ioaddr, int *synopsys_id);
|
|
|
|
+
|
|
|
|
|
|
void stmmac_set_mac_addr(void __iomem *ioaddr, u8 addr[6],
|
|
void stmmac_set_mac_addr(void __iomem *ioaddr, u8 addr[6],
|
|
unsigned int high, unsigned int low);
|
|
unsigned int high, unsigned int low);
|
|
@@ -521,4 +522,24 @@ void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
|
|
extern const struct stmmac_mode_ops ring_mode_ops;
|
|
extern const struct stmmac_mode_ops ring_mode_ops;
|
|
extern const struct stmmac_mode_ops chain_mode_ops;
|
|
extern const struct stmmac_mode_ops chain_mode_ops;
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * stmmac_get_synopsys_id - return the SYINID.
|
|
|
|
+ * @priv: driver private structure
|
|
|
|
+ * Description: this simple function is to decode and return the SYINID
|
|
|
|
+ * starting from the HW core register.
|
|
|
|
+ */
|
|
|
|
+static inline u32 stmmac_get_synopsys_id(u32 hwid)
|
|
|
|
+{
|
|
|
|
+ /* Check Synopsys Id (not available on old chips) */
|
|
|
|
+ if (likely(hwid)) {
|
|
|
|
+ u32 uid = ((hwid & 0x0000ff00) >> 8);
|
|
|
|
+ u32 synid = (hwid & 0x000000ff);
|
|
|
|
+
|
|
|
|
+ pr_info("stmmac - user ID: 0x%x, Synopsys ID: 0x%x\n",
|
|
|
|
+ uid, synid);
|
|
|
|
+
|
|
|
|
+ return synid;
|
|
|
|
+ }
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
#endif /* __COMMON_H__ */
|
|
#endif /* __COMMON_H__ */
|