Merge pull request #653 from gsomlo/gls-dt-cpufreq

RFC: json2dts: set CPU clock-frequency and SoC bus-frequency
This commit is contained in:
enjoy-digital 2020-11-09 12:40:15 +01:00 committed by GitHub
commit 3673f38d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,7 @@ def generate_dts(d):
#size-cells = <0>; #size-cells = <0>;
timebase-frequency = <{sys_clk_freq}>; timebase-frequency = <{sys_clk_freq}>;
cpu@0 {{ cpu@0 {{
clock-frequency = <0x0>; clock-frequency = <{sys_clk_freq}>;
compatible = "spinalhdl,vexriscv", "sifive,rocket0", "riscv"; compatible = "spinalhdl,vexriscv", "sifive,rocket0", "riscv";
d-cache-block-size = <0x40>; d-cache-block-size = <0x40>;
d-cache-sets = <0x40>; d-cache-sets = <0x40>;
@ -128,9 +128,10 @@ def generate_dts(d):
soc { soc {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
bus-frequency = <{sys_clk_freq}>;
compatible = "simple-bus"; compatible = "simple-bus";
ranges; ranges;
""" """.format(sys_clk_freq=d["constants"]["config_clock_frequency"])
# Interrupt controller ----------------------------------------------------------------------------- # Interrupt controller -----------------------------------------------------------------------------