aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManorit Chawdhry <m-chawdhry@ti.com>2023-04-20 17:16:24 +0530
committerTom Rini <trini@konsulko.com>2023-05-02 14:24:36 -0400
commitb8ebf24e7f4afb5093a31bdf122e1ed0781e5c3c (patch)
tree07b479ec3a39749bbae8b27e22eb26d303e7f12d
parentfdb051ba3f791cd0cdc035b715509dd9dd17cb8e (diff)
downloadu-boot-b8ebf24e7f4afb5093a31bdf122e1ed0781e5c3c.zip
u-boot-b8ebf24e7f4afb5093a31bdf122e1ed0781e5c3c.tar.gz
u-boot-b8ebf24e7f4afb5093a31bdf122e1ed0781e5c3c.tar.bz2
arm: mach-k3: common: don't reconfigure background firewalls
K3 devices have some firewalls set up by ROM that we usually remove so that the development is easy in HS devices. While removing the firewalls disabling a background region before disabling the foreground regions keeps the firewall in a state where all the transactions will be blacklisted until all the regions are disabled. This causes a race for some other entity trying to access that memory region before all the firewalls are disabled and causes an exception. Since the background regions configured by ROM are in such a manner that they allow all transactions, don't touch the background regions at all. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Kamlesh Gurudasani <kamlesh@ti.com>
-rw-r--r--arch/arm/mach-k3/common.c5
-rw-r--r--arch/arm/mach-k3/common.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index b40e930..3c85cae 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -580,7 +580,10 @@ void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size)
fwl_ops->get_fwl_region(ti_sci, &region);
- if (region.control != 0) {
+ /* Don't disable the background regions */
+ if (region.control != 0 &&
+ ((region.control & K3_BACKGROUND_FIREWALL_BIT) ==
+ 0)) {
pr_debug("Attempting to disable firewall %5d (%25s)\n",
region.fwl_id, fwl_data[i].name);
region.control = 0;
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 130f502..e7e59f5 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -9,6 +9,10 @@
#include <asm/armv7_mpu.h>
#include <asm/hardware.h>
+#define J721E 0xbb64
+#define J7200 0xbb6d
+#define K3_BACKGROUND_FIREWALL_BIT BIT(8)
+
struct fwl_data {
const char *name;
u16 fwl_id;