Skip to content

Commit aa44894

Browse files
committed
soc/tegra: cbb: Make error interrupt enable and status per SoC
JIRA: https://issues.redhat.com/browse/RHEL-109772 commit 2f2c32f Author: Sumit Gupta <sumitg@nvidia.com> Date: Thu, 3 Jul 2025 16:08:24 +0530 Make the error interrupt enable and error status fields as per SoC. Both of these fields can change for different SoC's. Moving them to per SoC data helps to set or clear the required bits only for a SoC. Signed-off-by: Sumit Gupta <sumitg@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
1 parent 5f5e9f6 commit aa44894

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

drivers/soc/tegra/cbb/tegra234-cbb.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ struct tegra234_cbb_fabric {
102102
const int max_errors;
103103
const struct tegra234_target_lookup *target_map;
104104
const int max_targets;
105+
const u32 err_intr_enbl;
106+
const u32 err_status_clr;
105107
};
106108

107109
struct tegra234_cbb {
@@ -177,7 +179,7 @@ static void tegra234_cbb_fault_enable(struct tegra_cbb *cbb)
177179
void __iomem *addr;
178180

179181
addr = priv->regs + priv->fabric->notifier_offset;
180-
writel(0x1ff, addr + FABRIC_EN_CFG_INTERRUPT_ENABLE_0_0);
182+
writel(priv->fabric->err_intr_enbl, addr + FABRIC_EN_CFG_INTERRUPT_ENABLE_0_0);
181183
dsb(sy);
182184
}
183185

@@ -187,7 +189,7 @@ static void tegra234_cbb_error_clear(struct tegra_cbb *cbb)
187189

188190
writel(0, priv->mon + FABRIC_MN_INITIATOR_ERR_FORCE_0);
189191

190-
writel(0x3f, priv->mon + FABRIC_MN_INITIATOR_ERR_STATUS_0);
192+
writel(priv->fabric->err_status_clr, priv->mon + FABRIC_MN_INITIATOR_ERR_STATUS_0);
191193
dsb(sy);
192194
}
193195

@@ -709,6 +711,8 @@ static const struct tegra234_cbb_fabric tegra234_aon_fabric = {
709711
.max_targets = ARRAY_SIZE(tegra234_aon_target_map),
710712
.errors = tegra234_cbb_errors,
711713
.max_errors = ARRAY_SIZE(tegra234_cbb_errors),
714+
.err_intr_enbl = 0x7,
715+
.err_status_clr = 0x3f,
712716
.notifier_offset = 0x17000,
713717
.firewall_base = 0x30000,
714718
.firewall_ctl = 0x8d0,
@@ -730,6 +734,8 @@ static const struct tegra234_cbb_fabric tegra234_bpmp_fabric = {
730734
.max_targets = ARRAY_SIZE(tegra234_bpmp_target_map),
731735
.errors = tegra234_cbb_errors,
732736
.max_errors = ARRAY_SIZE(tegra234_cbb_errors),
737+
.err_intr_enbl = 0xf,
738+
.err_status_clr = 0x3f,
733739
.notifier_offset = 0x19000,
734740
.firewall_base = 0x30000,
735741
.firewall_ctl = 0x8f0,
@@ -807,6 +813,8 @@ static const struct tegra234_cbb_fabric tegra234_cbb_fabric = {
807813
.max_targets = ARRAY_SIZE(tegra234_cbb_target_map),
808814
.errors = tegra234_cbb_errors,
809815
.max_errors = ARRAY_SIZE(tegra234_cbb_errors),
816+
.err_intr_enbl = 0x7f,
817+
.err_status_clr = 0x3f,
810818
.notifier_offset = 0x60000,
811819
.off_mask_erd = 0x3a004,
812820
.firewall_base = 0x10000,
@@ -830,6 +838,8 @@ static const struct tegra234_cbb_fabric tegra234_dce_fabric = {
830838
.max_targets = ARRAY_SIZE(tegra234_common_target_map),
831839
.errors = tegra234_cbb_errors,
832840
.max_errors = ARRAY_SIZE(tegra234_cbb_errors),
841+
.err_intr_enbl = 0xf,
842+
.err_status_clr = 0x3f,
833843
.notifier_offset = 0x19000,
834844
.firewall_base = 0x30000,
835845
.firewall_ctl = 0x290,
@@ -843,6 +853,8 @@ static const struct tegra234_cbb_fabric tegra234_rce_fabric = {
843853
.max_targets = ARRAY_SIZE(tegra234_common_target_map),
844854
.errors = tegra234_cbb_errors,
845855
.max_errors = ARRAY_SIZE(tegra234_cbb_errors),
856+
.err_intr_enbl = 0xf,
857+
.err_status_clr = 0x3f,
846858
.notifier_offset = 0x19000,
847859
.firewall_base = 0x30000,
848860
.firewall_ctl = 0x290,
@@ -856,6 +868,8 @@ static const struct tegra234_cbb_fabric tegra234_sce_fabric = {
856868
.max_targets = ARRAY_SIZE(tegra234_common_target_map),
857869
.errors = tegra234_cbb_errors,
858870
.max_errors = ARRAY_SIZE(tegra234_cbb_errors),
871+
.err_intr_enbl = 0xf,
872+
.err_status_clr = 0x3f,
859873
.notifier_offset = 0x19000,
860874
.firewall_base = 0x30000,
861875
.firewall_ctl = 0x290,
@@ -1040,6 +1054,8 @@ static const struct tegra234_cbb_fabric tegra241_cbb_fabric = {
10401054
.max_targets = ARRAY_SIZE(tegra241_cbb_target_map),
10411055
.errors = tegra241_cbb_errors,
10421056
.max_errors = ARRAY_SIZE(tegra241_cbb_errors),
1057+
.err_intr_enbl = 0x7,
1058+
.err_status_clr = 0x1ff007f,
10431059
.notifier_offset = 0x60000,
10441060
.off_mask_erd = 0x40004,
10451061
.firewall_base = 0x20000,
@@ -1065,6 +1081,8 @@ static const struct tegra234_cbb_fabric tegra241_bpmp_fabric = {
10651081
.max_targets = ARRAY_SIZE(tegra241_bpmp_target_map),
10661082
.errors = tegra241_cbb_errors,
10671083
.max_errors = ARRAY_SIZE(tegra241_cbb_errors),
1084+
.err_intr_enbl = 0xf,
1085+
.err_status_clr = 0x1ff007f,
10681086
.notifier_offset = 0x19000,
10691087
.firewall_base = 0x30000,
10701088
.firewall_ctl = 0x8f0,

0 commit comments

Comments
 (0)