mt_spm_extern.c 590 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) since 2022, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <common/debug.h>
  7. #include <lib/mmio.h>
  8. #include <platform_def.h>
  9. #define INFRA_AO_RES_CTRL_MASK (INFRACFG_AO_BASE + 0xB8)
  10. #define INFRA_AO_RES_CTRL_MASK_EMI_IDLE BIT(18)
  11. #define INFRA_AO_RES_CTRL_MASK_MPU_IDLE BIT(15)
  12. void spm_extern_initialize(void)
  13. {
  14. unsigned int val;
  15. val = mmio_read_32(INFRA_AO_RES_CTRL_MASK);
  16. val |= (INFRA_AO_RES_CTRL_MASK_EMI_IDLE | INFRA_AO_RES_CTRL_MASK_MPU_IDLE);
  17. mmio_write_32(INFRA_AO_RES_CTRL_MASK, val);
  18. }