Loading drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +7 −6 Original line number Diff line number Diff line Loading @@ -1042,9 +1042,15 @@ static irqreturn_t ETHQOS_PHY_ISR(int irq, void *dev_data) return IRQ_HANDLED; } static int ethqos_phy_intr_enable(struct qcom_ethqos *ethqos) int ethqos_phy_intr_enable(struct stmmac_priv *priv) { int ret = 0; struct qcom_ethqos *ethqos = priv->plat->bsp_priv; if (ethqos_phy_intr_config(ethqos)) { ret = 1; return ret; } INIT_WORK(ðqos->emac_phy_work, ethqos_defer_phy_isr_work); init_completion(ðqos->clk_enable_done); Loading @@ -1056,7 +1062,6 @@ static int ethqos_phy_intr_enable(struct qcom_ethqos *ethqos) ethqos->phy_intr); return ret; } phy_intr_en = true; return ret; } Loading Loading @@ -1916,10 +1921,6 @@ static int qcom_ethqos_probe(struct platform_device *pdev) if (ret) goto err_clk; if (!ethqos_phy_intr_config(ethqos)) ethqos_phy_intr_enable(ethqos); else ETHQOSERR("Phy interrupt configuration failed"); rgmii_dump(ethqos); if (ethqos->emac_ver == EMAC_HW_v2_3_2) { Loading drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.h +0 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,6 @@ do {\ #define ATH8035_PHY_ID 0x004dd072 #define QCA8337_PHY_ID 0x004dd036 #define ATH8030_PHY_ID 0x004dd076 #define MICREL_PHY_ID PHY_ID_KSZ9031 #define DWC_ETH_QOS_MICREL_PHY_INTCS 0x1b #define DWC_ETH_QOS_MICREL_PHY_CTL 0x1f #define DWC_ETH_QOS_BASIC_STATUS 0x0001 Loading drivers/net/ethernet/stmicro/stmmac/stmmac.h +3 −0 Original line number Diff line number Diff line Loading @@ -173,9 +173,12 @@ extern struct stmmac_emb_smmu_cb_ctx stmmac_emb_smmu_ctx; #define GET_MEM_PDEV_DEV (stmmac_emb_smmu_ctx.valid ? \ &stmmac_emb_smmu_ctx.smmu_pdev->dev : priv->device) #define MICREL_PHY_ID 0x00221620 int ethqos_handle_prv_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int ethqos_init_pps(struct stmmac_priv *priv); int ethqos_phy_intr_enable(struct stmmac_priv *priv); extern bool phy_intr_en; void qcom_ethqos_request_phy_wol(struct plat_stmmacenet_data *plat_dat); Loading drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +9 −0 Original line number Diff line number Diff line Loading @@ -1059,6 +1059,15 @@ static int stmmac_init_phy(struct net_device *dev) if (phydev->is_pseudo_fixed_link) phydev->irq = PHY_POLL; if (((phydev->phy_id & phydev->drv->phy_id_mask) == MICREL_PHY_ID) && !priv->plat->phy_intr_en) { ret = ethqos_phy_intr_enable(priv); if (ret) pr_alert("qcom-ethqos: Unable to enable PHY interrupt\n"); else priv->plat->phy_intr_en = true; } if (phy_intr_en) { if (phydev->drv->config_intr && !phydev->drv->config_intr(phydev)) { Loading include/linux/stmmac.h +1 −0 Original line number Diff line number Diff line Loading @@ -200,5 +200,6 @@ struct plat_stmmacenet_data { (struct sk_buff *skb); bool early_eth; bool crc_strip_en; bool phy_intr_en; }; #endif Loading
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +7 −6 Original line number Diff line number Diff line Loading @@ -1042,9 +1042,15 @@ static irqreturn_t ETHQOS_PHY_ISR(int irq, void *dev_data) return IRQ_HANDLED; } static int ethqos_phy_intr_enable(struct qcom_ethqos *ethqos) int ethqos_phy_intr_enable(struct stmmac_priv *priv) { int ret = 0; struct qcom_ethqos *ethqos = priv->plat->bsp_priv; if (ethqos_phy_intr_config(ethqos)) { ret = 1; return ret; } INIT_WORK(ðqos->emac_phy_work, ethqos_defer_phy_isr_work); init_completion(ðqos->clk_enable_done); Loading @@ -1056,7 +1062,6 @@ static int ethqos_phy_intr_enable(struct qcom_ethqos *ethqos) ethqos->phy_intr); return ret; } phy_intr_en = true; return ret; } Loading Loading @@ -1916,10 +1921,6 @@ static int qcom_ethqos_probe(struct platform_device *pdev) if (ret) goto err_clk; if (!ethqos_phy_intr_config(ethqos)) ethqos_phy_intr_enable(ethqos); else ETHQOSERR("Phy interrupt configuration failed"); rgmii_dump(ethqos); if (ethqos->emac_ver == EMAC_HW_v2_3_2) { Loading
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.h +0 −1 Original line number Diff line number Diff line Loading @@ -222,7 +222,6 @@ do {\ #define ATH8035_PHY_ID 0x004dd072 #define QCA8337_PHY_ID 0x004dd036 #define ATH8030_PHY_ID 0x004dd076 #define MICREL_PHY_ID PHY_ID_KSZ9031 #define DWC_ETH_QOS_MICREL_PHY_INTCS 0x1b #define DWC_ETH_QOS_MICREL_PHY_CTL 0x1f #define DWC_ETH_QOS_BASIC_STATUS 0x0001 Loading
drivers/net/ethernet/stmicro/stmmac/stmmac.h +3 −0 Original line number Diff line number Diff line Loading @@ -173,9 +173,12 @@ extern struct stmmac_emb_smmu_cb_ctx stmmac_emb_smmu_ctx; #define GET_MEM_PDEV_DEV (stmmac_emb_smmu_ctx.valid ? \ &stmmac_emb_smmu_ctx.smmu_pdev->dev : priv->device) #define MICREL_PHY_ID 0x00221620 int ethqos_handle_prv_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int ethqos_init_pps(struct stmmac_priv *priv); int ethqos_phy_intr_enable(struct stmmac_priv *priv); extern bool phy_intr_en; void qcom_ethqos_request_phy_wol(struct plat_stmmacenet_data *plat_dat); Loading
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +9 −0 Original line number Diff line number Diff line Loading @@ -1059,6 +1059,15 @@ static int stmmac_init_phy(struct net_device *dev) if (phydev->is_pseudo_fixed_link) phydev->irq = PHY_POLL; if (((phydev->phy_id & phydev->drv->phy_id_mask) == MICREL_PHY_ID) && !priv->plat->phy_intr_en) { ret = ethqos_phy_intr_enable(priv); if (ret) pr_alert("qcom-ethqos: Unable to enable PHY interrupt\n"); else priv->plat->phy_intr_en = true; } if (phy_intr_en) { if (phydev->drv->config_intr && !phydev->drv->config_intr(phydev)) { Loading
include/linux/stmmac.h +1 −0 Original line number Diff line number Diff line Loading @@ -200,5 +200,6 @@ struct plat_stmmacenet_data { (struct sk_buff *skb); bool early_eth; bool crc_strip_en; bool phy_intr_en; }; #endif