blob: 2524d72e121f8693909a2620493b3abe4cd4b6f9 [file] [log] [blame]
developer65014b82015-04-13 14:47:57 +08001/*
2 * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
developer65014b82015-04-13 14:47:57 +08005 */
6
7#include <arch.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008#include <lib/mmio.h>
9
developer65014b82015-04-13 14:47:57 +080010#include <mcucfg.h>
developer65014b82015-04-13 14:47:57 +080011
12void disable_scu(unsigned long mpidr)
13{
14 if (mpidr & MPIDR_CLUSTER_MASK)
15 mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg,
16 MP1_ACINACTM);
17 else
18 mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp0_axi_config,
19 MP0_ACINACTM);
20}
21
22void enable_scu(unsigned long mpidr)
23{
24 if (mpidr & MPIDR_CLUSTER_MASK)
25 mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg,
26 MP1_ACINACTM);
27 else
28 mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp0_axi_config,
29 MP0_ACINACTM);
30}