diff --git a/arch/arm/include/armv8-m/irq.h b/arch/arm/include/armv8-m/irq.h index 69051ef71d..20eaff315c 100755 --- a/arch/arm/include/armv8-m/irq.h +++ b/arch/arm/include/armv8-m/irq.h @@ -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 */ diff --git a/arch/arm/include/irq.h b/arch/arm/include/irq.h index 97d1556abe..00d7a5beb6 100644 --- a/arch/arm/include/irq.h +++ b/arch/arm/include/irq.h @@ -1,36 +1,20 @@ /**************************************************************************** * arch/arm/include/irq.h * - * Copyright (C) 2007-2009, 2011, 2015, 2019 Gregory Nutt. All rights - * reserved. - * Author: Gregory Nutt + * 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. * ****************************************************************************/ diff --git a/arch/arm/include/syscall.h b/arch/arm/include/syscall.h index 69d7cae0d1..df364e5d7d 100644 --- a/arch/arm/include/syscall.h +++ b/arch/arm/include/syscall.h @@ -1,35 +1,20 @@ /**************************************************************************** * arch/arm/include/syscall.h * - * Copyright (C) 2011, 2019 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * 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. * ****************************************************************************/ diff --git a/arch/arm/include/types.h b/arch/arm/include/types.h index dda8c40fcd..fd804a87ce 100644 --- a/arch/arm/include/types.h +++ b/arch/arm/include/types.h @@ -1,35 +1,20 @@ /**************************************************************************** * arch/arm/include/types.h * - * Copyright (C) 2007-2009, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * 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__ diff --git a/arch/arm/src/armv8-m/dwt.h b/arch/arm/src/armv8-m/dwt.h index 7df90d7440..a083ece54e 100755 --- a/arch/arm/src/armv8-m/dwt.h +++ b/arch/arm/src/armv8-m/dwt.h @@ -1,4 +1,4 @@ -/*************************************************************************************** +/*********************************************************************************************** * arch/arm/src/armv8-m/dwt.h * * Copyright (c) 2009 - 2013 ARM LIMITED diff --git a/arch/arm/src/armv8-m/etm.h b/arch/arm/src/armv8-m/etm.h index af8d4e7215..4882c51270 100755 --- a/arch/arm/src/armv8-m/etm.h +++ b/arch/arm/src/armv8-m/etm.h @@ -68,6 +68,7 @@ /******************************************************************************************************************************* * Pre-processor Definitions *******************************************************************************************************************************/ + /* ETM Register Base Address ***************************************************************************************************/ #define ETM_BASE (0xe0041000ul) diff --git a/arch/arm/src/armv8-m/fpb.h b/arch/arm/src/armv8-m/fpb.h index afe51132d5..6a01bb4f84 100755 --- a/arch/arm/src/armv8-m/fpb.h +++ b/arch/arm/src/armv8-m/fpb.h @@ -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 */ diff --git a/arch/arm/src/armv8-m/itm.h b/arch/arm/src/armv8-m/itm.h index f3a9217a46..e0d6bdb4f6 100755 --- a/arch/arm/src/armv8-m/itm.h +++ b/arch/arm/src/armv8-m/itm.h @@ -74,6 +74,7 @@ ***********************************************************************************************/ /* Instrumentation Trace Macrocell Register (ITM) Definitions **********************************/ + /* ITM Register Base Address *******************************************************************/ #define ITM_BASE (0xe0000000ul) diff --git a/arch/arm/src/armv8-m/itm_syslog.h b/arch/arm/src/armv8-m/itm_syslog.h index 88f70e331e..65f6dc8953 100755 --- a/arch/arm/src/armv8-m/itm_syslog.h +++ b/arch/arm/src/armv8-m/itm_syslog.h @@ -39,7 +39,7 @@ #define __ARCH_ARM_SRC_ARMV8_M_ITM_SYSLOG_H /**************************************************************************** - * Public Functions + * Public Function Prototypes ****************************************************************************/ /**************************************************************************** diff --git a/arch/arm/src/armv8-m/nvic.h b/arch/arm/src/armv8-m/nvic.h index bfcb69de4f..b4b71ce07a 100755 --- a/arch/arm/src/armv8-m/nvic.h +++ b/arch/arm/src/armv8-m/nvic.h @@ -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 */ diff --git a/arch/arm/src/armv8-m/up_itm.c b/arch/arm/src/armv8-m/up_itm.c index 8e5dcbc34b..208c2dda58 100755 --- a/arch/arm/src/armv8-m/up_itm.c +++ b/arch/arm/src/armv8-m/up_itm.c @@ -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. diff --git a/arch/arm/src/armv8-m/up_stackcheck.c b/arch/arm/src/armv8-m/up_stackcheck.c index 462c577767..e879149034 100755 --- a/arch/arm/src/armv8-m/up_stackcheck.c +++ b/arch/arm/src/armv8-m/up_stackcheck.c @@ -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); diff --git a/arch/arm/src/armv8-m/up_systick.c b/arch/arm/src/armv8-m/up_systick.c index 2649c813c9..79285cf2d7 100755 --- a/arch/arm/src/armv8-m/up_systick.c +++ b/arch/arm/src/armv8-m/up_systick.c @@ -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 { diff --git a/arch/arm/src/armv8-m/up_vectors.c b/arch/arm/src/armv8-m/up_vectors.c index e2caef9b00..04d2a6f8d1 100755 --- a/arch/arm/src/armv8-m/up_vectors.c +++ b/arch/arm/src/armv8-m/up_vectors.c @@ -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"))) = diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index b262b0f6d4..745be3422a 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -1,35 +1,20 @@ /**************************************************************************** * common/up_internal.h * - * Copyright (C) 2007-2015, 2018-2019 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * 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