Skip to contentSkip to conversation

drivers: net: macb: add fu740 support

PATCH New Ramon Fried 1 participant 1 message Mar 14, 2021 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 7/7 drivers: net: macb: add fu740 support

Quoted 35 lines · Green Wan

Add fu740 support to macb ethernet driver

---
 drivers/net/macb.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/macb.c +7 -2
index 57ea45e..df65d82 100644
@@ -592,7 +592,11 @@ static int macb_sifive_clk_init(struct udevice *dev, ulong rate)
         *     and output clock on GMII output signal GTX_CLK
         * 1 = MII mode. Use MII input signal TX_CLK in TX logic
         */
-       writel(rate != 125000000, gemgxl_regs);
+       if (device_is_compatible(dev, "sifive,fu540-c000-gem"))
+               writel(rate != 125000000, gemgxl_regs);
+       else if (device_is_compatible(dev, "sifive,fu740-c000-gem"))
+               writel(rate != 125125000, gemgxl_regs);
+
        return 0;
 }
 
@@ -1507,6 +1511,8 @@ static const struct udevice_id macb_eth_ids[] = {
        { .compatible = "cdns,zynq-gem" },
        { .compatible = "sifive,fu540-c000-gem",
          .data = (ulong)&sifive_config },
+       { .compatible = "sifive,fu740-c000-gem",
+         .data = (ulong)&sifive_config },
        { .compatible = "microchip,mpfs-mss-gem",
          .data = (ulong)&microchip_config },
        { }
--
Quoted 2 lines

2.7.4