]> git.baikalelectronics.ru Git - uboot.git/commit
arm: mvebu: Fix function enable_caches
authorPali Rohár <pali@kernel.org>
Thu, 8 Sep 2022 14:06:50 +0000 (16:06 +0200)
committerStefan Roese <sr@denx.de>
Tue, 13 Sep 2022 07:04:22 +0000 (09:04 +0200)
commitf568f87da845a4a321c81c0c5e869c5e61c15355
tree0b601d9d3e8b3570eadf0dd1f26cb6a991f281ea
parentb8ee8b000abf201678bcfb6501f94e9067d938ff
arm: mvebu: Fix function enable_caches

Commit e84860291e71 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID
register too many times") broke support for caches on all Armada SoCs.

Before that commit there was code:

    if (mvebu_soc_family() != MVEBU_SOC_A375) {
        dcache_enable();
    }

And after that commit there is code:

    if (IS_ENABLED(CONFIG_ARMADA_375)) {
        dcache_enable();
    }

Comment above this code says that d-cache should be disabled on Armada 375.
But new code inverted logic and broke Armada 375 and slowed down all other
Armada SoCs (including A38x).

Fix this issue by changing logic to:

    if (!IS_ENABLED(CONFIG_ARMADA_375)) {
        dcache_enable();
    }

Which matches behavior prior that commit.

Fixes: e84860291e71 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/cpu.c