Browse Source

refactor(plat/st): use TZC400 bindings

This avoids duplicate define of TZC_REGION_NSEC_ALL_ACCESS_RDWR.
And remove the previous TZC400 definitions from stm32mp1_def.h.

Change-Id: I6c72c2a18731f69d855fbce8ce822a21da9364fa
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
pull/1981/head
Yann Gautier 3 years ago
parent
commit
3cc5155c84
  1. 12
      plat/st/stm32mp1/stm32mp1_def.h
  2. 14
      plat/st/stm32mp1/stm32mp1_security.c

12
plat/st/stm32mp1/stm32mp1_def.h

@ -309,18 +309,6 @@ enum ddr_type {
******************************************************************************/
#define STM32MP1_TZC_BASE U(0x5C006000)
#define STM32MP1_TZC_A7_ID U(0)
#define STM32MP1_TZC_M4_ID U(1)
#define STM32MP1_TZC_LCD_ID U(3)
#define STM32MP1_TZC_GPU_ID U(4)
#define STM32MP1_TZC_MDMA_ID U(5)
#define STM32MP1_TZC_DMA_ID U(6)
#define STM32MP1_TZC_USB_HOST_ID U(7)
#define STM32MP1_TZC_USB_OTG_ID U(8)
#define STM32MP1_TZC_SDMMC_ID U(9)
#define STM32MP1_TZC_ETH_ID U(10)
#define STM32MP1_TZC_DAP_ID U(15)
#define STM32MP1_FILTER_BIT_ALL (TZC_400_REGION_ATTR_FILTER_BIT(0) | \
TZC_400_REGION_ATTR_FILTER_BIT(1))

14
plat/st/stm32mp1/stm32mp1_security.c

@ -12,21 +12,9 @@
#include <drivers/arm/tzc400.h>
#include <drivers/st/stm32mp1_clk.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/soc/stm32mp15-tzc400.h>
#include <lib/mmio.h>
#define TZC_REGION_NSEC_ALL_ACCESS_RDWR \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_A7_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_GPU_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_LCD_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_MDMA_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_M4_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_DMA_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_USB_HOST_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_USB_OTG_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_SDMMC_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_ETH_ID) | \
TZC_REGION_ACCESS_RDWR(STM32MP1_TZC_DAP_ID)
static unsigned int region_nb;
static void init_tzc400_begin(unsigned int region0_attr)

Loading…
Cancel
Save