mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
refactor(imx8m): replace magic number with enum type
Replace those RDC config related magic numbers with enum type Signed-off-by: Jacky Bai <ping.bai@nxp.com> Change-Id: I6245ccfa74d079179dc0f205980c2daf5c7af786
This commit is contained in:
parent
0c6dfc4784
commit
d76f012ea8
4 changed files with 13 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2019-2022 ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -44,9 +44,11 @@ static const struct aipstz_cfg aipstz[] = {
|
|||
|
||||
static const struct imx_rdc_cfg rdc[] = {
|
||||
/* Master domain assignment */
|
||||
RDC_MDAn(0x1, DID1),
|
||||
RDC_MDAn(RDC_MDA_M4, DID1),
|
||||
|
||||
/* peripherals domain permission */
|
||||
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
||||
|
||||
/* memory region */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2019-2020 NXP
|
||||
* Copyright 2019-2022 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -41,9 +41,11 @@ static const struct aipstz_cfg aipstz[] = {
|
|||
|
||||
static const struct imx_rdc_cfg rdc[] = {
|
||||
/* Master domain assignment */
|
||||
RDC_MDAn(0x1, DID1),
|
||||
RDC_MDAn(RDC_MDA_M7, DID1),
|
||||
|
||||
/* peripherals domain permission */
|
||||
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
|
||||
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
||||
|
||||
/* memory region */
|
||||
RDC_MEM_REGIONn(16, 0x0, 0x0, 0xff),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2020 NXP
|
||||
* Copyright 2020-2022 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -42,9 +42,10 @@ static const struct aipstz_cfg aipstz[] = {
|
|||
|
||||
static const struct imx_rdc_cfg rdc[] = {
|
||||
/* Master domain assignment */
|
||||
RDC_MDAn(0x1, DID1),
|
||||
RDC_MDAn(RDC_MDA_M7, DID1),
|
||||
|
||||
/* peripherals domain permission */
|
||||
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
|
||||
|
||||
/* memory region */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019, NXP. All rights reserved.
|
||||
* Copyright (c) 2019-2022 NXP. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <lib/utils_def.h>
|
||||
|
||||
#include <imx_sec_def.h>
|
||||
#include <platform_def.h>
|
||||
|
||||
#define MDAn(x) (IMX_RDC_BASE + 0x200 + (x) * 4)
|
||||
|
|
Loading…
Add table
Reference in a new issue