scu.c 660 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <arch.h>
  7. #include <lib/mmio.h>
  8. #include <mcucfg.h>
  9. void disable_scu(unsigned long mpidr)
  10. {
  11. if (mpidr & MPIDR_CLUSTER_MASK)
  12. mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg,
  13. MP1_ACINACTM);
  14. else
  15. mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp0_axi_config,
  16. MP0_ACINACTM);
  17. }
  18. void enable_scu(unsigned long mpidr)
  19. {
  20. if (mpidr & MPIDR_CLUSTER_MASK)
  21. mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg,
  22. MP1_ACINACTM);
  23. else
  24. mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp0_axi_config,
  25. MP0_ACINACTM);
  26. }