developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <arch.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | #include <lib/mmio.h> |
| 9 | |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 10 | #include <mcucfg.h> |
developer | 550bf5e | 2016-07-11 16:05:23 +0800 | [diff] [blame] | 11 | |
| 12 | void disable_scu(unsigned long mpidr) |
| 13 | { |
| 14 | if (mpidr & MPIDR_CLUSTER_MASK) |
| 15 | mmio_setbits_32((uintptr_t)&mt6795_mcucfg->mp1_miscdbg, |
| 16 | MP1_ACINACTM); |
| 17 | else |
| 18 | mmio_setbits_32((uintptr_t)&mt6795_mcucfg->mp0_axi_config, |
| 19 | MP0_ACINACTM); |
| 20 | } |
| 21 | |
| 22 | void enable_scu(unsigned long mpidr) |
| 23 | { |
| 24 | if (mpidr & MPIDR_CLUSTER_MASK) |
| 25 | mmio_clrbits_32((uintptr_t)&mt6795_mcucfg->mp1_miscdbg, |
| 26 | MP1_ACINACTM); |
| 27 | else |
| 28 | mmio_clrbits_32((uintptr_t)&mt6795_mcucfg->mp0_axi_config, |
| 29 | MP0_ACINACTM); |
| 30 | } |