Skip to contentSkip to conversation

hw/arm: versal-virt: Correct the tx/rx GEM clocks

PATCH Superseded Edgar E. Iglesias 4 participants 5 messages Sep 9, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover hw/arm: versal-virt: Correct the tx/rx GEM clocks

From: "Edgar E. Iglesias" <[email protected]>

This corrects the Ethernet tx/rx clocks in the generated DTB. Avoids a Linux kernel warning.

Cheers,
Edgar

Edgar E. Iglesias (1):
hw/arm: versal-virt: Correct the tx/rx GEM clocks

 hw/arm/xlnx-versal-virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 hw/arm: versal-virt: Correct the tx/rx GEM clocks

From: "Edgar E. Iglesias" <[email protected]>

Correct the GEMs tx/rx clocks to use the 125Mhz fixed-clock. This matches the setup with the fixed-link 100Mbit PHY. I also avoids the following warnings from the Linux kernel driver:

eth0: unable to generate target frequency: 125000000 Hz

---
 hw/arm/xlnx-versal-virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-versal-virt.c +1 -1
index 4b3152ee77..43d74b850f 100644
@@ -212,7 +212,7 @@ static void fdt_add_gem_nodes(VersalVirt *s)
                               s->phandle.ethernet_phy[i]);
         qemu_fdt_setprop_cells(s->fdt, name, "clocks",
                                s->phandle.clk_25Mhz, s->phandle.clk_25Mhz,
-                               s->phandle.clk_25Mhz, s->phandle.clk_25Mhz);
+                               s->phandle.clk_125Mhz, s->phandle.clk_125Mhz);
         qemu_fdt_setprop(s->fdt, name, "clock-names",
                          clocknames, sizeof(clocknames));
         qemu_fdt_setprop_cells(s->fdt, name, "interrupts",
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#2 lore raw
Quoted 10 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Correct the GEMs tx/rx clocks to use the 125Mhz fixed-clock. This matches the setup with the fixed-link 100Mbit PHY. I also avoids the following warnings from the Linux kernel driver:

eth0: unable to generate target frequency: 125000000 Hz

Quoted 18 lines
---
 hw/arm/xlnx-versal-virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-versal-virt.c +1 -1
index 4b3152ee77..43d74b850f 100644
@@ -212,7 +212,7 @@ static void fdt_add_gem_nodes(VersalVirt *s)
                               s->phandle.ethernet_phy[i]);
         qemu_fdt_setprop_cells(s->fdt, name, "clocks",
                                s->phandle.clk_25Mhz, s->phandle.clk_25Mhz,
-                               s->phandle.clk_25Mhz, s->phandle.clk_25Mhz);
+                               s->phandle.clk_125Mhz, s->phandle.clk_125Mhz);
         qemu_fdt_setprop(s->fdt, name, "clock-names",
                          clocknames, sizeof(clocknames));
         qemu_fdt_setprop_cells(s->fdt, name, "interrupts",
Reviewed-by on v1 1/1
#3 lore raw
In reply to Edgar E. Iglesias
Quoted 10 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Correct the GEMs tx/rx clocks to use the 125Mhz fixed-clock. This matches the setup with the fixed-link 100Mbit PHY. I also avoids the following warnings from the Linux kernel driver:

eth0: unable to generate target frequency: 125000000 Hz

Quoted 18 lines
---
  hw/arm/xlnx-versal-virt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-versal-virt.c +1 -1
index 4b3152ee77..43d74b850f 100644
@@ -212,7 +212,7 @@ static void fdt_add_gem_nodes(VersalVirt *s)
                                s->phandle.ethernet_phy[i]);
          qemu_fdt_setprop_cells(s->fdt, name, "clocks",
                                 s->phandle.clk_25Mhz, s->phandle.clk_25Mhz,
-                               s->phandle.clk_25Mhz, s->phandle.clk_25Mhz);
+                               s->phandle.clk_125Mhz, s->phandle.clk_125Mhz);
          qemu_fdt_setprop(s->fdt, name, "clock-names",
                           clocknames, sizeof(clocknames));
          qemu_fdt_setprop_cells(s->fdt, name, "interrupts",
#4 lore raw
In reply to Edgar E. Iglesias
Quoted 5 lines · Edgar E. Iglesias

From: "Edgar E. Iglesias" <[email protected]>

Correct the GEMs tx/rx clocks to use the 125Mhz fixed-clock. This matches the setup with the fixed-link 100Mbit PHY. I also avoids the following warnings from the Linux kernel

^^^
Argh, this should say It, not I.

I'll send a v2 keeping the RB tags.

Cheers,
Edgar