blob: 4daa9e5ff958f4bab870efd152488d1b297626f5 [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>
8#include <mcucfg.h>
9#include <mmio.h>
10
11void disable_scu(unsigned long mpidr)
12{
13 if (mpidr & MPIDR_CLUSTER_MASK)
14 mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg,
15 MP1_ACINACTM);
16 else
17 mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp0_axi_config,
18 MP0_ACINACTM);
19}
20
21void enable_scu(unsigned long mpidr)
22{
23 if (mpidr & MPIDR_CLUSTER_MASK)
24 mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg,
25 MP1_ACINACTM);
26 else
27 mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp0_axi_config,
28 MP0_ACINACTM);
29}