u-boot/arch/arm/include/asm/armv7m_mpu.h
Tom Rini 83d290c56f SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-07 09:34:12 -04:00

67 lines
1.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2017, STMicroelectronics - All Rights Reserved
* Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
*/
enum region_number {
REGION_0 = 0,
REGION_1,
REGION_2,
REGION_3,
REGION_4,
REGION_5,
REGION_6,
REGION_7,
};
enum ap {
NO_ACCESS = 0,
PRIV_RW_USR_NO,
PRIV_RW_USR_RO,
PRIV_RW_USR_RW,
UNPREDICTABLE,
PRIV_RO_USR_NO,
PRIV_RO_USR_RO,
};
enum mr_attr {
STRONG_ORDER = 0,
SHARED_WRITE_BUFFERED,
O_I_WT_NO_WR_ALLOC,
O_I_WB_NO_WR_ALLOC,
O_I_NON_CACHEABLE,
O_I_WB_RD_WR_ALLOC,
DEVICE_NON_SHARED,
};
enum size {
REGION_8MB = 22,
REGION_16MB,
REGION_32MB,
REGION_64MB,
REGION_128MB,
REGION_256MB,
REGION_512MB,
REGION_1GB,
REGION_2GB,
REGION_4GB,
};
enum xn {
XN_DIS = 0,
XN_EN,
};
struct mpu_region_config {
uint32_t start_addr;
enum region_number region_no;
enum xn xn;
enum ap ap;
enum mr_attr mr_attr;
enum size reg_size;
};
void disable_mpu(void);
void enable_mpu(void);
void mpu_config(struct mpu_region_config *reg_config);