riscv: cpu: correctly handle the setting of CPU_FEAT_MMU bit
authorSagar Shrikant Kadam <sagar.kadam@sifive.com>
Sun, 28 Jun 2020 14:45:02 +0000 (07:45 -0700)
committerAndes <uboot@andestech.com>
Wed, 1 Jul 2020 07:01:27 +0000 (15:01 +0800)
commitb6b233ddb78205abc76dde60179bd129368dc3e8
tree1cf050e7dab7d3f8af5d65f768a58f8f561ba2a2
parent969251a5a4d3515abc233621bc8ca6f1c93d6dd4
riscv: cpu: correctly handle the setting of CPU_FEAT_MMU bit

The conditional check to read "mmu-type" from the device tree
is not rightly handled due to which the cpu feature doesn't include
CPU_FEAT_MMU even if it's corresponding entry is present in the device
tree.

The initialization of cpu features is now taken care in cpu-uclass
driver, so no need to zero out cpu_freq in riscv_cpu driver and can be
removed.

Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
drivers/cpu/riscv_cpu.c