riscv: sifive_u: Drop "clock-frequency" property of cpu nodes
Subsystems (2)
PATCH 1/2 riscv: sifive_u: Drop "clock-frequency" property of cpu nodes
The "clock-frequency" property of cpu nodes isn't required. Drop it.
This is to keep in sync with Linux kernel commit below:
https://patchwork.kernel.org/patch/11133031/
---
hw/riscv/sifive_u.c | 2 -- include/hw/riscv/sifive_u.h | 1 - 2 files changed, 3 deletions(-)
hw/riscv/sifive_u.c +0 -2
@@ -151,8 +151,6 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,char *intc =g_strdup_printf ("/cpus/cpu@%d/interrupt-controller" , cpu);char *isa;qemu_fdt_add_subnode (fdt, nodename); -qemu_fdt_setprop_cell (fdt, nodename,"clock-frequency" , -SIFIVE_U_CLOCK_FREQ );/* cpu 0 is the management hart that does not have mmu */ if (cpu !=0 ) {qemu_fdt_setprop_string (fdt, nodename,"mmu-type" ,"riscv,sv48" );
include/hw/riscv/sifive_u.h +0 -1
@@ -75,7 +75,6 @@ enum { };enum { -SIFIVE_U_CLOCK_FREQ =1000000000 ,SIFIVE_U_HFCLK_FREQ =33333333 ,SIFIVE_U_RTCCLK_FREQ =1000000 };
Signature · 1 line
2.7.4
PATCH 2/2 riscv: sifive_u: Add ethernet0 to the aliases node
U-Boot expects this alias to be in place in order to fix up the mac address of the ethernet node.
This is to keep in sync with Linux kernel commit below:
https://patchwork.kernel.org/patch/11133033/
---
hw/riscv/sifive_u.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
hw/riscv/sifive_u.c +4 -1
@@ -270,6 +270,10 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, s->soc.gem.conf.macaddr.a, ETH_ALEN);qemu_fdt_setprop_cell (fdt, nodename,"#address-cells" ,1 );qemu_fdt_setprop_cell (fdt, nodename,"#size-cells" ,0 ); + +qemu_fdt_add_subnode (fdt,"/aliases" ); +qemu_fdt_setprop_string (fdt,"/aliases" ,"ethernet0" , nodename); +g_free (nodename); nodename = g_strdup_printf("/soc/ethernet@%lx/ethernet-phy@0",
@@ -297,7 +301,6 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); } -qemu_fdt_add_subnode (fdt,"/aliases" );qemu_fdt_setprop_string (fdt,"/aliases" ,"serial0" , nodename);g_free (nodename);
Signature · 1 line
2.7.4
Re: [PATCH 2/2] riscv: sifive_u: Add ethernet0 to the aliases node
Quoted 8 lines · Bin Meng
U-Boot expects this alias to be in place in order to fix up the mac address of the ethernet node.
This is to keep in sync with Linux kernel commit below:
https://patchwork.kernel.org/patch/11133033/Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 32 lines
---
hw/riscv/sifive_u.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)hw/riscv/sifive_u.c +4
-2@@ -270,6 +270,10 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, s->soc.gem.conf.macaddr.a, ETH_ALEN);qemu_fdt_setprop_cell (fdt, nodename,"#address-cells" ,1 );qemu_fdt_setprop_cell (fdt, nodename,"#size-cells" ,0 ); + +qemu_fdt_add_subnode (fdt,"/aliases" ); +qemu_fdt_setprop_string (fdt,"/aliases" ,"ethernet0" , nodename); +g_free (nodename); nodename = g_strdup_printf("/soc/ethernet@%lx/ethernet-phy@0",@@ -297,7 +301,6 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); } -qemu_fdt_add_subnode (fdt,"/aliases" );qemu_fdt_setprop_string (fdt,"/aliases" ,"serial0" , nodename);g_free (nodename); --2.7.4
Re: [PATCH 2/2] riscv: sifive_u: Add ethernet0 to the aliases node
In reply to Bin MengQuoted 28 lines · On Fri, 20 Sep 2019 02:19:02 PDT (-0700), [email protected] wrote:
U-Boot expects this alias to be in place in order to fix up the mac address of the ethernet node.
This is to keep in sync with Linux kernel commit below:
https://patchwork.kernel.org/patch/11133033/Signed-off-by Bin Meng <[email protected]>---
hw/riscv/sifive_u.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)hw/riscv/sifive_u.c +4
-0@@ -270,6 +270,10 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, s->soc.gem.conf.macaddr.a, ETH_ALEN);qemu_fdt_setprop_cell (fdt, nodename,"#address-cells" ,1 );qemu_fdt_setprop_cell (fdt, nodename,"#size-cells" ,0 ); + +qemu_fdt_add_subnode (fdt,"/aliases" ); +qemu_fdt_setprop_string (fdt,"/aliases" ,"ethernet0" , nodename); +g_free (nodename); nodename = g_strdup_printf("/soc/ethernet@%lx/ethernet-phy@0",
hw/riscv/sifive_u.c static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, · line 306
Quoted 7 lines
hw/riscv/sifive_u.c +0
-1@@ -297,7 +301,6 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,qemu_fdt_setprop_string (fdt,"/chosen" ,"bootargs" , cmdline); } -qemu_fdt_add_subnode (fdt,"/aliases" );qemu_fdt_setprop_string (fdt,"/aliases" ,"serial0" , nodename);g_free (nodename);
Thanks. These two are in the patch queue.
Quoted 7 lines · Bin Meng
The "clock-frequency" property of cpu nodes isn't required. Drop it.
This is to keep in sync with Linux kernel commit below:
https://patchwork.kernel.org/patch/11133031/Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 35 lines
---
hw/riscv/sifive_u.c | 2 -- include/hw/riscv/sifive_u.h | 1 - 2 files changed, 3 deletions(-)hw/riscv/sifive_u.c +0
-2@@ -151,8 +151,6 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,char *intc =g_strdup_printf ("/cpus/cpu@%d/interrupt-controller" , cpu);char *isa;qemu_fdt_add_subnode (fdt, nodename); -qemu_fdt_setprop_cell (fdt, nodename,"clock-frequency" , -SIFIVE_U_CLOCK_FREQ );/* cpu 0 is the management hart that does not have mmu */ if (cpu !=0 ) {qemu_fdt_setprop_string (fdt, nodename,"mmu-type" ,"riscv,sv48" );include/hw/riscv/sifive_u.h +0
-2@@ -75,7 +75,6 @@ enum { };enum { -SIFIVE_U_CLOCK_FREQ =1000000000 ,SIFIVE_U_HFCLK_FREQ =33333333 ,SIFIVE_U_RTCCLK_FREQ =1000000 }; --2.7.4