nuttx/arch/arm/src/armv7-r/mpcore.h

66 lines
2.8 KiB
C
Raw Normal View History

Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
/****************************************************************************
* arch/arm/src/armv7-r/mpcore.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
*
* http://www.apache.org/licenses/LICENSE-2.0
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
*
****************************************************************************/
/* Reference:
* Cortex-A9 MPCore, Revision: r4p1, Technical Reference Manual, ARM DDI
* 0407I (ID091612).
*/
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
#ifndef __ARCH_ARM_SRC_ARMV7_R_MPCORE_H
#define __ARCH_ARM_SRC_ARMV7_R_MPCORE_H
/****************************************************************************
* Included Files
****************************************************************************/
#include "chip.h" /* For CHIP_MPCORE_VBASE */
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* MPCore registers are memory mapped and accessed through a processor
* specific private address space via the SCU. The Cortex-A9 MCU chip.h
* header file must provide the definition CHIP_MPCORE_VBASE to access this
* the registers in this memory region.
*/
/* Peripheral Base Offsets **************************************************/
#define MPCORE_SCU_OFFSET 0x0000 /* 0x0000-0x00fc SCU registers */
#define MPCORE_ICC_OFFSET 0x2000 /* 0x0000-0x00FC Interrupt controller interface */
#define MPCORE_GTM_OFFSET 0x0200 /* 0x0200-0x02ff Global timer */
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
/* 0x0300-0x05ff Reserved */
#define MPCORE_PTM_OFFSET 0x0600 /* 0x0600-0x06ff Private timers and watchdogs */
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
/* 0x0700-0x07ff Reserved */
#define MPCORE_ICD_OFFSET 0x1000 /* 0x1000-0x1fff Interrupt Distributor */
Merged in ebsong/nuttx (pull request #712) Pull request for cortex-r4 codes * arm/armv7-r: Add general interrupt controller. This is based on armv7-a gic controller code. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: add invalidate dcache in arm_head.S Adding invalidate dcache as a comment in arm_head.S. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong configuration of program status register. PSR_E_BIT bit should be set for big endian system. PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4. So we don't need to set this bit. Signed-off-by: EunBong Song <eunb.song@samsung.com> * arm/armv7-r: Fix some wrong MPU register definition. Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as arm cortex-r4 reference manual. Region Base Address Register 0-4 bits are reserved. MPU Region Access control register type 3-5 bits. Signed-off-by: EunBong Song <eunb.song@samsung.com> * driver/mtd: fix compilation error. This commit fixes below compilation errors. CC: mtd/smart.c mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearBitToLevelMap4[] = ^~~~~~~~~~~~~~~~~~~ mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=] static const uint8_t gWearLevelToBitMap4[] = ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [smart.o] Error 1 Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com> Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 03:50:41 +02:00
/* Peripheral Base Addresses ************************************************/
#define MPCORE_SCU_VBASE (CHIP_MPCORE_VBASE+MPCORE_SCU_OFFSET)
#define MPCORE_ICC_VBASE (CHIP_MPCORE_VBASE+MPCORE_ICC_OFFSET)
#define MPCORE_GTM_VBASE (CHIP_MPCORE_VBASE+MPCORE_GTM_OFFSET)
#define MPCORE_PTM_VBASE (CHIP_MPCORE_VBASE+MPCORE_PTM_OFFSET)
#define MPCORE_ICD_VBASE (CHIP_MPCORE_VBASE+MPCORE_ICD_OFFSET)
#endif /* __ARCH_ARM_SRC_ARMV7_R_MPCORE_H */