aboutsummaryrefslogtreecommitdiffstats
path: root/include/drivers/arm/tzc400.h
diff options
context:
space:
mode:
authorVikram Kanigiri <vikram.kanigiri@arm.com>2015-10-20 16:55:26 +0100
committerVikram Kanigiri <vikram.kanigiri@arm.com>2015-11-27 13:47:13 +0000
commit609ebce42596174e987c84854ae0cfca402f7a02 (patch)
treee538c512c9d2c65eff5990116b952ad157b4089a /include/drivers/arm/tzc400.h
parent4a1dcde72fa43b2ffdc5d54a1932e727374d11c2 (diff)
downloadplatform_external_arm-trusted-firmware-609ebce42596174e987c84854ae0cfca402f7a02.tar.gz
platform_external_arm-trusted-firmware-609ebce42596174e987c84854ae0cfca402f7a02.tar.bz2
platform_external_arm-trusted-firmware-609ebce42596174e987c84854ae0cfca402f7a02.zip
Fix TZC-400 peripheral detection
The TZC-400 driver implementation incorrectly uses the component ID registers to detect the TZC-400 peripheral. As all ARM peripherals share the same component ID, it doesn't allow to uniquely identify the TZC-400 peripheral. This patch fixes the TZC-400 driver by relying on the `part_number_0` and `part_number_1` fields in the `PID` registers instead. The `tzc_read_component_id` function has been replaced by `tzc_read_peripheral_id`, which reads the 'part_number' values and compares them with the TZC-400 peripheral ID. Also, it adds a debug assertion to detect when the TZC driver initialisation function is called multiple times. Change-Id: I35949f6501a51c0a794144cd1c3a6db62440dce6
Diffstat (limited to 'include/drivers/arm/tzc400.h')
-rw-r--r--include/drivers/arm/tzc400.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h
index a5312c47e..f8e1664ef 100644
--- a/include/drivers/arm/tzc400.h
+++ b/include/drivers/arm/tzc400.h
@@ -147,7 +147,9 @@
#define TZC_REGION_ACCESS_RDWR(id) \
(TZC_REGION_ACCESS_RD(id) | TZC_REGION_ACCESS_WR(id))
-#define TZC400_COMPONENT_ID 0xb105f00d
+/* Consist of part_number_1 and part_number_0 */
+#define TZC400_PERIPHERAL_ID 0x0460
+
#ifndef __ASSEMBLY__