Re: [PATCH net-next v6 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Christophe JAILLET 於 1/4/2025 12:38 AM 寫道:
Le 03/01/2025 à 07:32, Joey Lu a écrit :
Add support for Gigabit Ethernet on Nuvoton MA35 series using dwmac driver.

Signed-off-by: Joey Lu <a0987203069@xxxxxxxxx>

...

+    /* Nuvoton DWMAC configs */
+    plat_dat->has_gmac = 1;
+    plat_dat->tx_fifo_size = 2048;
+    plat_dat->rx_fifo_size = 4096;
+    plat_dat->multicast_filter_bins = 0;
+    plat_dat->unicast_filter_entries = 8;
+    plat_dat->flags &= ~STMMAC_FLAG_USE_PHY_WOL;
+
+    priv_data = nvt_gmac_setup(pdev, plat_dat);
+    if (IS_ERR(priv_data))
+        return PTR_ERR(priv_data);
+
+    ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);

stmmac_pltfr_remove() is called by the .remove function.
Is it correct to call stmmac_dvr_probe() here, and not stmmac_pltfr_probe()?

Thank you for the feedback. You're correct. I will update the code to call stmmac_pltfr_probe().

BR,

Joey


+    if (ret)
+        return ret;
+
+    /* The PMT flag is determined by the RWK property.
+     * However, our hardware is configured to support only MGK.
+     * This is an override on PMT to enable WoL capability.
+     */
+    plat_dat->pmt = 1;
+    device_set_wakeup_capable(&pdev->dev, 1);
+
+    return 0;
+}

...

+static struct platform_driver nvt_dwmac_driver = {
+    .probe  = nvt_gmac_probe,
+    .remove = stmmac_pltfr_remove,
+    .driver = {
+        .name           = "nuvoton-dwmac",
+        .pm        = &stmmac_pltfr_pm_ops,
+        .of_match_table = nvt_dwmac_match,
+    },
+};

...

CJ




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux