Mea Culpa. Fix nxstyle problems from PR879
In a fit of confusion, I accidentally committed PR 879 before it passed its nxstyle check (it did pass all of its build tests, but not the style check). It was really my intention to merge PR878, but I screwed that up and merged 879 instead. This PR makes amends by passing all of the .c and .h files modified by PR879 through nxstyle and correcting all reported style problems.
This commit is contained in:
parent
d6f7821b15
commit
6766aa0ed5
@ -49,6 +49,7 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* If this is a kernel build, how many nested system calls should we
|
||||
@ -242,7 +243,6 @@ static inline void setbasepri(uint32_t basepri)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
|
||||
# define raisebasepri(b) setbasepri(b);
|
||||
|
||||
/* Disable IRQs */
|
||||
|
@ -1,36 +1,20 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/irq.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011, 2015, 2019 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/syscall.h
|
||||
*
|
||||
* Copyright (C) 2011, 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/types.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -98,9 +83,9 @@ typedef signed int _ssize_t;
|
||||
typedef unsigned int _size_t;
|
||||
#endif
|
||||
|
||||
/* This is the size of the interrupt state save returned by up_irq_save(). For
|
||||
* ARM, a 32 register value is returned, for the thumb2, Cortex-M3, the 16-bit
|
||||
* primask register value is returned,
|
||||
/* This is the size of the interrupt state save returned by up_irq_save().
|
||||
* For ARM, a 32 register value is returned, for the thumb2, Cortex-M3, the
|
||||
* 16-bit primask register value is returned,
|
||||
*/
|
||||
|
||||
#ifdef __thumb2__
|
||||
|
@ -1,4 +1,4 @@
|
||||
/***************************************************************************************
|
||||
/***********************************************************************************************
|
||||
* arch/arm/src/armv8-m/dwt.h
|
||||
*
|
||||
* Copyright (c) 2009 - 2013 ARM LIMITED
|
||||
|
@ -68,6 +68,7 @@
|
||||
/*******************************************************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
*******************************************************************************************************************************/
|
||||
|
||||
/* ETM Register Base Address ***************************************************************************************************/
|
||||
|
||||
#define ETM_BASE (0xe0041000ul)
|
||||
|
@ -21,17 +21,17 @@
|
||||
#ifndef __ARCH_ARM_SRC_ARMV8-M_FPB_H
|
||||
#define __ARCH_ARM_SRC_ARMV8-M_FPB_H
|
||||
|
||||
/******************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
******************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Flash Patch and Breakpoint Unit FPB ***************************************/
|
||||
/* Flash Patch and Breakpoint Unit FPB **************************************/
|
||||
|
||||
/* FPB Register Base Address *************************************************/
|
||||
/* FPB Register Base Address ************************************************/
|
||||
|
||||
#define FPB_BASE 0xe0002000
|
||||
|
||||
/* FPB Register Offsets *******************************************************/
|
||||
/* FPB Register Offsets *****************************************************/
|
||||
|
||||
#define FPB_CTRL_OFFSET 0x0000 /* Control */
|
||||
#define FPB_REMAP_OFFSET 0x0004 /* Remap */
|
||||
@ -44,7 +44,7 @@
|
||||
#define FPB_COMP6_OFFSET 0x0020 /* Comparator 6 */
|
||||
#define FPB_COMP7_OFFSET 0x0024 /* Comparator 7 */
|
||||
|
||||
/* FPB Register Addresses *****************************************************/
|
||||
/* FPB Register Addresses ***************************************************/
|
||||
|
||||
#define FPB_CTRL (FPB_BASE + FPB_CTRL_OFFSET)
|
||||
#define FPB_REMAP (FPB_BASE + FPB_REMAP_OFFSET)
|
||||
@ -57,7 +57,7 @@
|
||||
#define FPB_COMP6 (FPB_BASE + FPB_COMP6_OFFSET)
|
||||
#define FPB_COMP7 (FPB_BASE + FPB_COMP7_OFFSET
|
||||
|
||||
/* FPB Register Bitfield Definitions ******************************************/
|
||||
/* FPB Register Bitfield Definitions ****************************************/
|
||||
|
||||
/* FPB_CTRL */
|
||||
|
||||
|
@ -74,6 +74,7 @@
|
||||
***********************************************************************************************/
|
||||
|
||||
/* Instrumentation Trace Macrocell Register (ITM) Definitions **********************************/
|
||||
|
||||
/* ITM Register Base Address *******************************************************************/
|
||||
|
||||
#define ITM_BASE (0xe0000000ul)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define __ARCH_ARM_SRC_ARMV8_M_ITM_SYSLOG_H
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -34,6 +34,7 @@
|
||||
/* Exception/interrupt vector numbers *******************************************************/
|
||||
|
||||
/* Vector 0: Reset stack pointer value */
|
||||
|
||||
/* Vector 1: Reset */
|
||||
#define NVIC_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */
|
||||
#define NVIC_IRQ_HARDFAULT (3) /* Vector 3: Hard fault */
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
@ -14,18 +15,18 @@
|
||||
* - Neither the name of ARM nor the names of its contributors may be used
|
||||
* to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS
|
||||
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Copyright (C) 2014 Pierre-noel Bouteville . All rights reserved.
|
||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||
|
@ -55,9 +55,12 @@
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
void __cyg_profile_func_enter(void *func, void *caller) __attribute__((naked, no_instrument_function));
|
||||
void __cyg_profile_func_exit(void *func, void *caller) __attribute__((naked, no_instrument_function));
|
||||
void __stack_overflow_trap(void) __attribute__((naked, no_instrument_function));
|
||||
void __cyg_profile_func_enter(void *func, void *caller)
|
||||
__attribute__((naked, no_instrument_function));
|
||||
void __cyg_profile_func_exit(void *func, void *caller)
|
||||
__attribute__((naked, no_instrument_function));
|
||||
void __stack_overflow_trap(void)
|
||||
__attribute__((naked, no_instrument_function));
|
||||
|
||||
/****************************************************************************
|
||||
* Name: __stack_overflow_trap
|
||||
@ -70,6 +73,7 @@ void __stack_overflow_trap(void)
|
||||
uint32_t regval;
|
||||
|
||||
/* force hard fault */
|
||||
|
||||
regval = getreg32(NVIC_INTCTRL);
|
||||
regval |= NVIC_INTCTRL_NMIPENDSET;
|
||||
putreg32(regval, NVIC_INTCTRL);
|
||||
|
@ -265,7 +265,8 @@ static int systick_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
struct timer_lowerhalf_s *systick_initialize(bool coreclk,
|
||||
unsigned int freq, int minor)
|
||||
{
|
||||
struct systick_lowerhalf_s *lower = (struct systick_lowerhalf_s *)&g_systick_lower;
|
||||
struct systick_lowerhalf_s *lower =
|
||||
(struct systick_lowerhalf_s *)&g_systick_lower;
|
||||
|
||||
/* Calculate the working clock frequency if need */
|
||||
|
||||
@ -284,7 +285,8 @@ struct timer_lowerhalf_s *systick_initialize(bool coreclk,
|
||||
|
||||
if (coreclk)
|
||||
{
|
||||
putreg32(NVIC_SYSTICK_CTRL_CLKSOURCE | NVIC_SYSTICK_CTRL_TICKINT, NVIC_SYSTICK_CTRL);
|
||||
putreg32(NVIC_SYSTICK_CTRL_CLKSOURCE | NVIC_SYSTICK_CTRL_TICKINT,
|
||||
NVIC_SYSTICK_CTRL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -41,9 +41,9 @@
|
||||
#include "chip.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#define IDLE_STACK ((unsigned)&_ebss+CONFIG_IDLETHREAD_STACKSIZE-4)
|
||||
|
||||
@ -63,17 +63,17 @@ extern void __start(void);
|
||||
|
||||
extern void exception_common(void);
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* The v7m vector table consists of an array of function pointers, with the first
|
||||
* slot (vector zero) used to hold the initial stack pointer.
|
||||
/* The v7m vector table consists of an array of function pointers, with the
|
||||
* first slot (vector zero) used to hold the initial stack pointer.
|
||||
*
|
||||
* As all exceptions (interrupts) are routed via exception_common, we just need to
|
||||
* fill this array with pointers to it.
|
||||
* As all exceptions (interrupts) are routed via exception_common, we just
|
||||
* need to fill this array with pointers to it.
|
||||
*
|
||||
* Note that the [ ... ] designated initialiser is a GCC extension.
|
||||
* Note that the [ ... ] designated initializer is a GCC extension.
|
||||
*/
|
||||
|
||||
unsigned _vectors[] __attribute__((section(".vectors"))) =
|
||||
|
@ -1,35 +1,20 @@
|
||||
/****************************************************************************
|
||||
* common/up_internal.h
|
||||
*
|
||||
* Copyright (C) 2007-2015, 2018-2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* 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
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -97,7 +82,8 @@
|
||||
* some configurations.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_ARMV7M) || defined(CONFIG_ARCH_ARMV8M)
|
||||
#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_ARMV7M) || \
|
||||
defined(CONFIG_ARCH_ARMV8M)
|
||||
|
||||
/* If the floating point unit is present and enabled, then save the
|
||||
* floating point registers as well as normal ARM registers. This only
|
||||
@ -129,7 +115,8 @@
|
||||
# define up_restorestate(regs) (CURRENT_REGS = regs)
|
||||
|
||||
/* Otherwise, for the ARM7 and ARM9. The state is copied in full from stack
|
||||
* to stack. This is not very efficient and should be fixed to match Cortex-A5.
|
||||
* to stack. This is not very efficient and should be fixed to match
|
||||
* Cortex-A5.
|
||||
*/
|
||||
|
||||
#else
|
||||
@ -234,14 +221,14 @@ EXTERN uint32_t g_intstackalloc; /* Allocated stack base */
|
||||
EXTERN uint32_t g_intstackbase; /* Initial top of interrupt stack */
|
||||
#endif
|
||||
|
||||
/* These 'addresses' of these values are setup by the linker script. They are
|
||||
* not actual uint32_t storage locations! They are only used meaningfully in the
|
||||
* following way:
|
||||
/* These 'addresses' of these values are setup by the linker script. They
|
||||
* are not actual uint32_t storage locations! They are only used
|
||||
* meaningfully in the following way:
|
||||
*
|
||||
* - The linker script defines, for example, the symbol_sdata.
|
||||
* - The declareion extern uint32_t _sdata; makes C happy. C will believe
|
||||
* that the value _sdata is the address of a uint32_t variable _data (it is
|
||||
* not!).
|
||||
* that the value _sdata is the address of a uint32_t variable _data (it
|
||||
* is not!).
|
||||
* - We can recoved the linker value then by simply taking the address of
|
||||
* of _data. like: uint32_t *pdata = &_sdata;
|
||||
*/
|
||||
@ -254,9 +241,9 @@ EXTERN uint32_t _edata; /* End+1 of .data */
|
||||
EXTERN uint32_t _sbss; /* Start of .bss */
|
||||
EXTERN uint32_t _ebss; /* End+1 of .bss */
|
||||
|
||||
/* Sometimes, functions must be executed from RAM. In this case, the following
|
||||
* macro may be used (with GCC!) to specify a function that will execute from
|
||||
* RAM. For example,
|
||||
/* Sometimes, functions must be executed from RAM. In this case, the
|
||||
* following macro may be used (with GCC!) to specify a function that will
|
||||
* execute from RAM. For example,
|
||||
*
|
||||
* int __ramfunc__ foo (void);
|
||||
* int __ramfunc__ foo (void) { return bar; }
|
||||
@ -301,7 +288,7 @@ EXTERN uint32_t _eramfuncs; /* Copy destination end address in RAM */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Low level initialization provided by board-level logic ******************/
|
||||
/* Low level initialization provided by board-level logic *******************/
|
||||
|
||||
void arm_boot(void);
|
||||
|
||||
@ -332,7 +319,8 @@ void up_pminitialize(void);
|
||||
|
||||
/* Exception handling logic unique to the Cortex-M family */
|
||||
|
||||
#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_ARMV7M) || defined(CONFIG_ARCH_ARMV8M)
|
||||
#if defined(CONFIG_ARCH_CORTEXM0) || defined(CONFIG_ARCH_ARMV7M) || \
|
||||
defined(CONFIG_ARCH_ARMV8M)
|
||||
|
||||
/* Interrupt acknowledge and dispatch */
|
||||
|
||||
@ -474,10 +462,10 @@ void up_wdtinit(void);
|
||||
|
||||
/* Networking ***************************************************************/
|
||||
|
||||
/* Defined in board/xyz_network.c for board-specific Ethernet implementations,
|
||||
* or chip/xyx_ethernet.c for chip-specific Ethernet implementations, or
|
||||
* common/up_etherstub.c for a corner case where the network is enabled yet
|
||||
* there is no Ethernet driver to be initialized.
|
||||
/* Defined in board/xyz_network.c for board-specific Ethernet
|
||||
* implementations, or chip/xyx_ethernet.c for chip-specific Ethernet
|
||||
* implementations, or common/up_etherstub.c for a corner case where the
|
||||
* network is enabled yet there is no Ethernet driver to be initialized.
|
||||
*
|
||||
* Use of common/up_etherstub.c is deprecated. The preferred mechanism is to
|
||||
* use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in
|
||||
|
Loading…
Reference in New Issue
Block a user