arch: Merge up_arch.h into up_internal.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-03-12 00:41:15 +08:00 committed by Petro Karashchenko
parent e800f54bfd
commit 54e630e14d
2050 changed files with 1302 additions and 3847 deletions

View file

@ -36,8 +36,6 @@
#include "mmu.h"
#include "fpu.h"
#include "arm_internal.h"
#include "arm_arch.h"
#include "a1x_lowputc.h"
#include "a1x_boot.h"

View file

@ -32,7 +32,6 @@
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "sctlr.h"

View file

@ -30,8 +30,6 @@
#include <arch/board/board.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "a1x_config.h"
#include "hardware/a1x_uart.h"
#include "a1x_pio.h"

View file

@ -34,8 +34,6 @@
#include <arch/board/board.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "chip.h"
#include "a1x_pio.h"
#include "hardware/a1x_pio.h"

View file

@ -44,9 +44,7 @@
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "hardware/a1x_uart.h"
#include "a1x_pio.h"

View file

@ -33,7 +33,7 @@
#include <arch/irq.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/a1x_timer.h"
/****************************************************************************

View file

@ -40,8 +40,6 @@
#include "mmu.h"
#include "fpu.h"
#include "arm_internal.h"
#include "arm_arch.h"
#include "am335x_clockconfig.h"
#include "am335x_wdog.h"
#include "am335x_lowputc.h"

View file

@ -31,7 +31,7 @@
#include <nuttx/arch.h>
#include <nuttx/can/can.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_pinmux.h"
#include "hardware/am335x_prcm.h"
#include "hardware/am335x_dcan.h"

View file

@ -24,7 +24,7 @@
#include <nuttx/config.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_prcm.h"
#include "am335x_config.h"
#include "am335x_clockconfig.h"

View file

@ -31,7 +31,7 @@
#include <nuttx/irq.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "am335x_pinmux.h"
#include "am335x_gpio.h"

View file

@ -31,8 +31,7 @@
#include <nuttx/irq.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "am335x_gpio.h"
#ifdef CONFIG_AM335X_GPIO_IRQ

View file

@ -41,7 +41,7 @@
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_pinmux.h"
#include "hardware/am335x_prcm.h"
#include "hardware/am335x_i2c.h"

View file

@ -28,7 +28,6 @@
#include <nuttx/arch.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "sctlr.h"

View file

@ -56,7 +56,7 @@
#include <nuttx/semaphore.h>
#include <nuttx/video/fb.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_prcm.h"
#include "am335x_pinmux.h"
#include "am335x_config.h"

View file

@ -30,8 +30,6 @@
#include <arch/board/board.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "am335x_config.h"
#include "am335x_gpio.h"
#include "am335x_pinmux.h"

View file

@ -29,7 +29,7 @@
#include <assert.h>
#include <errno.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "am335x_pinmux.h"
/****************************************************************************

View file

@ -43,9 +43,7 @@
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "chip.h"
#include "hardware/am335x_uart.h"
#include "am335x_gpio.h"

View file

@ -27,7 +27,7 @@
#include <stdint.h>
#include <errno.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_scm.h"
#include "am335x_sysclk.h"

View file

@ -33,7 +33,7 @@
#include <arch/irq.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_timer.h"
#include "am335x_sysclk.h"

View file

@ -26,7 +26,7 @@
#include <nuttx/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "hardware/am335x_wdog.h"
/****************************************************************************

View file

@ -32,9 +32,7 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "group/group.h"
/****************************************************************************

View file

@ -31,7 +31,6 @@
#include "arm.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -34,7 +34,6 @@
#include "arm.h"
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -36,7 +36,6 @@
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -31,7 +31,6 @@
#include <nuttx/arch.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -32,7 +32,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -29,8 +29,7 @@
#include <nuttx/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
#ifdef CONFIG_DEBUG_FEATURES

View file

@ -31,7 +31,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -31,8 +31,6 @@
#include <nuttx/arch.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "psr.h"
#include "exc_return.h"

View file

@ -35,7 +35,6 @@
#include "ram_vectors.h"
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
#ifdef CONFIG_ARCH_RAMVECTORS

View file

@ -36,8 +36,6 @@
#include "exc_return.h"
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
#include "irq/irq.h"
/****************************************************************************

View file

@ -36,7 +36,6 @@
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -29,7 +29,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
/****************************************************************************

View file

@ -33,9 +33,7 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "group/group.h"
#include "gic.h"

View file

@ -32,7 +32,6 @@
#include <nuttx/arch.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "gic.h"

View file

@ -27,7 +27,7 @@
#include <stdint.h>
#include <debug.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "gic.h"
#if defined(CONFIG_ARMV7A_HAVE_GICv2) && defined(CONFIG_DEBUG_IRQ_INFO)

View file

@ -31,7 +31,6 @@
#include "arm.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -36,7 +36,7 @@
#include <nuttx/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "l2cc.h"
#include "l2cc_pl310.h"

View file

@ -35,8 +35,6 @@
#include "arm.h"
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
#include "irq/irq.h"
/****************************************************************************

View file

@ -26,7 +26,7 @@
#include <stdint.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "cp15_cacheops.h"
#include "barriers.h"
#include "sctlr.h"

View file

@ -36,7 +36,6 @@
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -41,7 +41,7 @@
#endif
#include "mpcore.h"
#include "arm_arch.h"
#include "arm_internal.h"
#ifdef CONFIG_ARMV7A_HAVE_GICv2

View file

@ -31,7 +31,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -46,7 +46,7 @@
#include <nuttx/config.h>
#include <nuttx/cache.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "barriers.h"
#include "nvic.h"

View file

@ -32,7 +32,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -33,7 +33,6 @@
#include <nuttx/userspace.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -32,8 +32,6 @@
#include <arch/armv7-m/nvicpri.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "psr.h"
#include "exc_return.h"

View file

@ -71,7 +71,7 @@
#include <stdint.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "itm.h"
/****************************************************************************

View file

@ -33,7 +33,7 @@
#include "itm.h"
#include "tpi.h"
#include "dwt.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "itm_syslog.h"
#ifdef CONFIG_ARMV7M_ITMSYSLOG

View file

@ -30,7 +30,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -35,7 +35,6 @@
#include "ram_vectors.h"
#include "chip.h" /* May redefine VECTAB fields */
#include "arm_arch.h"
#include "arm_internal.h"
#ifdef CONFIG_ARCH_RAMVECTORS

View file

@ -37,8 +37,6 @@
#include "exc_return.h"
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
#include "irq/irq.h"
/****************************************************************************

View file

@ -36,7 +36,6 @@
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -48,7 +48,7 @@
#include <stdint.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
/****************************************************************************

View file

@ -29,7 +29,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
/****************************************************************************

View file

@ -31,7 +31,7 @@
#include "nvic.h"
#include "systick.h"
#include "arm_arch.h"
#include "arm_internal.h"
#ifdef CONFIG_ARMV7M_SYSTICK

View file

@ -30,7 +30,7 @@
#include <nuttx/arch.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
#ifdef CONFIG_ARCH_HAVE_IRQTRIGGER

View file

@ -31,7 +31,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -69,7 +69,7 @@
* Included Files
****************************************************************************/
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -33,8 +33,6 @@
# include <stdbool.h>
# include <assert.h>
# include <debug.h>
# include "arm_arch.h"
#endif
/****************************************************************************

View file

@ -32,9 +32,7 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "group/group.h"
/****************************************************************************

View file

@ -33,7 +33,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "gic.h"

View file

@ -31,7 +31,6 @@
#include "arm.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -36,7 +36,7 @@
#include <nuttx/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "l2cc.h"
#include "l2cc_pl310.h"

View file

@ -34,7 +34,6 @@
#include "arm.h"
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -36,7 +36,6 @@
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -33,7 +33,6 @@
# include <stdbool.h>
# include <debug.h>
# include "arm_arch.h"
# include "sctlr.h"
# include "cp15.h"
#endif

View file

@ -31,7 +31,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -46,7 +46,7 @@
#include <nuttx/config.h>
#include <nuttx/cache.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "barriers.h"
#include "nvic.h"

View file

@ -32,7 +32,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -32,7 +32,6 @@
#include <nuttx/userspace.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "sau.h"
#include "arm_internal.h"

View file

@ -32,8 +32,6 @@
#include <arch/armv8-m/nvicpri.h>
#include "arm_internal.h"
#include "arm_arch.h"
#include "psr.h"
#include "exc_return.h"

View file

@ -70,7 +70,7 @@
#include <stdint.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "itm.h"
/****************************************************************************

View file

@ -33,7 +33,7 @@
#include "itm.h"
#include "tpi.h"
#include "dwt.h"
#include "arm_arch.h"
#include "arm_internal.h"
#include "itm_syslog.h"
#ifdef CONFIG_ARMV8M_ITMSYSLOG

View file

@ -30,7 +30,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -34,7 +34,6 @@
#include "ram_vectors.h"
#include "chip.h" /* May redefine VECTAB fields */
#include "arm_arch.h"
#include "arm_internal.h"
#ifdef CONFIG_ARCH_RAMVECTORS

View file

@ -37,8 +37,6 @@
#include "exc_return.h"
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
#include "irq/irq.h"
/****************************************************************************

View file

@ -30,7 +30,7 @@
#include <nuttx/arch.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
#ifdef CONFIG_ARCH_HAVE_TRUSTZONE

View file

@ -31,7 +31,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "sau.h"
#include "arm_internal.h"

View file

@ -36,7 +36,6 @@
#include "sched/sched.h"
#include "arm_internal.h"
#include "arm_arch.h"
/****************************************************************************
* Public Functions

View file

@ -48,7 +48,7 @@
#include <stdint.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
/****************************************************************************

View file

@ -29,7 +29,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
/****************************************************************************

View file

@ -31,7 +31,7 @@
#include "nvic.h"
#include "systick.h"
#include "arm_arch.h"
#include "arm_internal.h"
#ifdef CONFIG_ARMV8M_SYSTICK

View file

@ -30,7 +30,7 @@
#include <nuttx/arch.h>
#include <arch/irq.h>
#include "arm_arch.h"
#include "arm_internal.h"
#include "nvic.h"
#ifdef CONFIG_ARCH_HAVE_IRQTRIGGER

View file

@ -31,7 +31,6 @@
#include <arch/irq.h>
#include "arm_arch.h"
#include "nvic.h"
#include "arm_internal.h"

View file

@ -33,8 +33,6 @@
# include <stdbool.h>
# include <assert.h>
# include <debug.h>
# include "arm_arch.h"
#endif
/****************************************************************************

View file

@ -49,7 +49,6 @@
#endif
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -29,7 +29,6 @@
#include "arm.h"
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -39,7 +39,6 @@
#include <nuttx/serial/serial.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -29,7 +29,6 @@
#include <nuttx/arch.h>
#include "chip.h"
#include "arm_arch.h"
#include "clock/clock.h"
#include "arm_internal.h"

View file

@ -37,7 +37,7 @@
#include <nuttx/timers/watchdog.h>
#include "chip.h"
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -35,7 +35,6 @@
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -1,77 +0,0 @@
/****************************************************************************
* arch/arm/src/common/arm_arch.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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*
****************************************************************************/
#ifndef ___ARCH_ARM_SRC_COMMON_ARM_ARCH_H
#define ___ARCH_ARM_SRC_COMMON_ARM_ARCH_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
/****************************************************************************
* Inline Functions
****************************************************************************/
#ifndef __ASSEMBLY__
# define getreg8(a) (*(volatile uint8_t *)(a))
# define putreg8(v,a) (*(volatile uint8_t *)(a) = (v))
# define getreg16(a) (*(volatile uint16_t *)(a))
# define putreg16(v,a) (*(volatile uint16_t *)(a) = (v))
# define getreg32(a) (*(volatile uint32_t *)(a))
# define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
/* Non-atomic, but more effective modification of registers */
# define modreg8(v,m,a) putreg8((getreg8(a) & ~(m)) | ((v) & (m)), a)
# define modreg16(v,m,a) putreg16((getreg16(a) & ~(m)) | ((v) & (m)), a)
# define modreg32(v,m,a) putreg32((getreg32(a) & ~(m)) | ((v) & (m)), a)
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/* Atomic modification of registers */
void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* ___ARCH_ARM_SRC_COMMON_ARM_ARCH_H */

View file

@ -39,8 +39,6 @@
#include "sched/sched.h"
#include "irq/irq.h"
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -27,7 +27,6 @@
#include <nuttx/arch.h>
#include "sched/sched.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -27,7 +27,6 @@
#include <nuttx/arch.h>
#include "sched/sched.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -37,7 +37,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -26,7 +26,6 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************

View file

@ -182,6 +182,19 @@
#define INTSTACK_COLOR 0xdeadbeef
#define HEAP_COLOR 'h'
#define getreg8(a) (*(volatile uint8_t *)(a))
#define putreg8(v,a) (*(volatile uint8_t *)(a) = (v))
#define getreg16(a) (*(volatile uint16_t *)(a))
#define putreg16(v,a) (*(volatile uint16_t *)(a) = (v))
#define getreg32(a) (*(volatile uint32_t *)(a))
#define putreg32(v,a) (*(volatile uint32_t *)(a) = (v))
/* Non-atomic, but more effective modification of registers */
#define modreg8(v,m,a) putreg8((getreg8(a) & ~(m)) | ((v) & (m)), (a))
#define modreg16(v,m,a) putreg16((getreg16(a) & ~(m)) | ((v) & (m)), (a))
#define modreg32(v,m,a) putreg32((getreg32(a) & ~(m)) | ((v) & (m)), (a))
/****************************************************************************
* Public Types
****************************************************************************/
@ -301,6 +314,11 @@ EXTERN uint32_t _eramfuncs; /* Copy destination end address in RAM */
****************************************************************************/
#ifndef __ASSEMBLY__
/* Atomic modification of registers */
void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
/* Low level initialization provided by board-level logic *******************/

View file

@ -29,7 +29,7 @@
#include <nuttx/spinlock.h>
#include "arm_arch.h"
#include "arm_internal.h"
/****************************************************************************
* Public Functions

Some files were not shown because too many files have changed in this diff Show more