diff options
author | Dan Handley <dan.handley@arm.com> | 2014-08-04 19:53:05 +0100 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-08-14 11:17:52 +0100 |
commit | 3279f6251ebead329e4b0af2e42a7eae157bba52 (patch) | |
tree | 1b326600f8bd492002aa2603ad51451af8802df0 /include/drivers/arm/tzc400.h | |
parent | 935db693285d6b22b781571e9dec748da274ffe1 (diff) | |
download | platform_external_arm-trusted-firmware-3279f6251ebead329e4b0af2e42a7eae157bba52.tar.gz platform_external_arm-trusted-firmware-3279f6251ebead329e4b0af2e42a7eae157bba52.tar.bz2 platform_external_arm-trusted-firmware-3279f6251ebead329e4b0af2e42a7eae157bba52.zip |
Simplify interface to TZC-400 driver
The TZC-400 driver previously allowed the possibility of multiple
controller instances to be present in the same executable. This
was unnecessary since there will only ever be one instance.
This change simplifies the tzc_init() function to only take the
base address argument needed by implementation, conforming to the
driver initialization model of other drivers. It also hides some
of the implementation details that were previously exposed by the
API.
The FVP port has been updated accordingly.
THIS CHANGE REQUIRES ALL PLATFORM PORTS THAT USE THE TZC-400
DRIVER TO BE UPDATED
Fixes ARM-software/tf-issues#181
Change-Id: I7b721edf947064989958d8f457d6462d92e742c8
Diffstat (limited to 'include/drivers/arm/tzc400.h')
-rw-r--r-- | include/drivers/arm/tzc400.h | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h index 03fce546b..ff8b49ae9 100644 --- a/include/drivers/arm/tzc400.h +++ b/include/drivers/arm/tzc400.h @@ -182,27 +182,17 @@ typedef enum { TZC_REGION_S_RDWR = (TZC_REGION_S_RD | TZC_REGION_S_WR) } tzc_region_attributes_t; -/* - * Implementation defined values used to validate inputs later. - * Filters : max of 4 ; 0 to 3 - * Regions : max of 9 ; 0 to 8 - * Address width : Values between 32 to 64 - */ -typedef struct tzc_instance { - uint64_t base; - uint32_t aid_width; - uint8_t addr_width; - uint8_t num_filters; - uint8_t num_regions; -} tzc_instance_t ; - -void tzc_init(tzc_instance_t *controller); -void tzc_configure_region(const tzc_instance_t *controller, uint32_t filters, - uint8_t region, uint64_t region_base, uint64_t region_top, - tzc_region_attributes_t sec_attr, uint32_t ns_device_access); -void tzc_enable_filters(const tzc_instance_t *controller); -void tzc_disable_filters(const tzc_instance_t *controller); -void tzc_set_action(const tzc_instance_t *controller, tzc_action_t action); + +void tzc_init(uint64_t base); +void tzc_configure_region(uint32_t filters, + uint8_t region, + uint64_t region_base, + uint64_t region_top, + tzc_region_attributes_t sec_attr, + uint32_t ns_device_access); +void tzc_enable_filters(void); +void tzc_disable_filters(void); +void tzc_set_action(tzc_action_t action); #endif /* __TZC400__ */ |