diff --git a/arch/arm/src/mps/Kconfig b/arch/arm/src/mps/Kconfig index 667b52d3c3..aa83b58584 100644 --- a/arch/arm/src/mps/Kconfig +++ b/arch/arm/src/mps/Kconfig @@ -27,6 +27,12 @@ config ARCH_CHIP_MPS2_AN500 select ARCH_HAVE_FPU select ARMV7M_HAVE_STACKCHECK +config ARCH_CHIP_MPS2_AN521 + bool "MPS2 AN521 Processor Cortexm33" + select ARCH_CORTEXM33 + select ARCH_HAVE_MPU + select ARM_HAVE_MPU_UNIFIED + config ARCH_CHIP_MPS3_AN524 bool "MPS3 AN524 Processor Cortexm33" select ARCH_CORTEXM33 diff --git a/arch/arm/src/mps/hardware/mps_memorymap.h b/arch/arm/src/mps/hardware/mps_memorymap.h index e8e9a81ad6..24d3f5a0f2 100644 --- a/arch/arm/src/mps/hardware/mps_memorymap.h +++ b/arch/arm/src/mps/hardware/mps_memorymap.h @@ -125,6 +125,25 @@ #endif /* CONFIG_MM_REGIONS > 1 */ +#elif defined(CONFIG_ARCH_CHIP_MPS2_AN521) + +/* SSRAM1 (4MB) */ +#define MPS_SRAM1_START 0x10000000 +#define MPS_SRAM1_SIZE 0x00400000 + +/* SSRAM2_3 (4MB) */ +#define MPS_SRAM23_START 0x38000000 +#define MPS_SRAM23_SIZE 0x00400000 + +#define PRIMARY_RAM_START MPS_SRAM23_START +#define PRIMARY_RAM_SIZE MPS_SRAM23_SIZE + +#if CONFIG_MM_REGIONS > 1 +#define REGION1_RAM_START MPS_SRAM23_START +#define REGION1_RAM_SIZE MPS_SRAM23_SIZE + +#endif /* CONFIG_MM_REGIONS > 1 */ + #elif defined(CONFIG_ARCH_CHIP_MPS2_AN500) || \ defined(CONFIG_ARCH_CHIP_MPS2_AN386) diff --git a/boards/Kconfig b/boards/Kconfig index bc5002fef1..4c4a32fb42 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -2135,6 +2135,14 @@ config ARCH_BOARD_MPS2_AN500 This options selects support for NuttX on the MPS2 AN500 board featuring the Cortex-M7. +config ARCH_BOARD_MPS2_AN521 + bool "Arm MPS2 AN521" + depends on ARCH_CHIP_MPS2_AN521 + select ARCH_HAVE_IRQBUTTONS + ---help--- + This options selects support for NuttX on the MPS2 AN521 + board featuring the Cortex-M33. + config ARCH_BOARD_MPS3_AN547 bool "Arm MPS3 AN547" depends on ARCH_CHIP_MPS3_AN547 @@ -3431,6 +3439,7 @@ config ARCH_BOARD default "s32k344evb" if ARCH_BOARD_S32K344EVB default "mr-canhubk3" if ARCH_BOARD_MR_CANHUBK3 default "mps2-an500" if ARCH_BOARD_MPS2_AN500 + default "mps2-an521" if ARCH_BOARD_MPS2_AN521 default "mps3-an547" if ARCH_BOARD_MPS3_AN547 default "rv32m1-vega" if ARCH_BOARD_RV32M1_VEGA default "rv-virt" if ARCH_BOARD_QEMU_RV_VIRT @@ -3651,6 +3660,9 @@ endif if ARCH_BOARD_MPS2_AN500 source "boards/arm/mps/mps2-an500/Kconfig" endif +if ARCH_BOARD_MPS2_AN521 +source "boards/arm/mps/mps2-an521/Kconfig" +endif if ARCH_BOARD_MPS3_AN547 source "boards/arm/mps/mps3-an547/Kconfig" endif diff --git a/boards/arm/mps/mps2-an521/Kconfig b/boards/arm/mps/mps2-an521/Kconfig new file mode 100644 index 0000000000..e4e17fe0cb --- /dev/null +++ b/boards/arm/mps/mps2-an521/Kconfig @@ -0,0 +1,7 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_BOARD_MPS2_AN521 +endif diff --git a/boards/arm/mps/mps2-an521/README.txt b/boards/arm/mps/mps2-an521/README.txt new file mode 100644 index 0000000000..311d837a66 --- /dev/null +++ b/boards/arm/mps/mps2-an521/README.txt @@ -0,0 +1,52 @@ +README.txt +========== + +This board configuration will use QEMU to emulate generic ARM v8-M series +hardware platform and provides support for these devices: + + - ARM Generic Timer + - CMSDK UART controller + +Contents +======== + - Getting Started + - Status + - Platform Features + - Debugging with QEMU + - FPU Support and Performance + - SMP Support + - References + +Getting Started +=============== + +1. Configuring and running + 1.1 Single Core + Configuring NuttX and compile: + $ ./tools/configure.sh -l mps2-an521:nsh + $ make + Running with qemu + $ qemu-system-arm -M mps2-an521 -nographic -chardev stdio,id=con,mux=on \ + -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx + + 2.2 Kernel protected mode + TODO + +Debugging with QEMU +=================== + +The nuttx ELF image can be debugged with QEMU. + +1. To debug the nuttx (ELF) with symbols, make sure the following change have + applied to defconfig. + ++CONFIG_DEBUG_SYMBOLS=y + +2. Run QEMU(at shell terminal 1) + + $ qemu-system-arm -M mps2-an521 -nographic -chardev stdio,id=con,mux=on \ + -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx -S -s + +3. Run gdb with TUI, connect to QEMU, load nuttx and continue (at shell terminal 2) + + $ arm-none-eabi-gdb -tui --eval-command='target remote localhost:1234' nuttx diff --git a/boards/arm/mps/mps2-an521/configs/nsh/defconfig b/boards/arm/mps/mps2-an521/configs/nsh/defconfig new file mode 100644 index 0000000000..405a3625e4 --- /dev/null +++ b/boards/arm/mps/mps2-an521/configs/nsh/defconfig @@ -0,0 +1,74 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_DEBUG_WARN is not set +CONFIG_ARCH="arm" +CONFIG_ARCH_BOARD="mps2-an521" +CONFIG_ARCH_BOARD_MPS2_AN521=y +CONFIG_ARCH_CHIP="mps" +CONFIG_ARCH_CHIP_MPS2_AN521=y +CONFIG_ARCH_CHIP_MPS=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_STACKDUMP=y +CONFIG_ARMV8M_SYSTICK=y +CONFIG_ARM_MPU=y +CONFIG_ARM_MPU_NREGIONS=1 +CONFIG_ARM_MPU_RESET=y +CONFIG_BUILTIN=y +CONFIG_CMSDK_UART0=y +CONFIG_CMSDK_UART0_BASE=0x50200000 +CONFIG_CMSDK_UART0_CLOCK=25000000 +CONFIG_CMSDK_UART0_OV_IRQ=63 +CONFIG_CMSDK_UART0_RX_IRQ=49 +CONFIG_CMSDK_UART0_SERIAL_CONSOLE=y +CONFIG_CMSDK_UART0_TX_IRQ=48 +CONFIG_CMSDK_UART=y +CONFIG_DEBUG_ASSERTIONS=y +CONFIG_DEBUG_FEATURES=y +CONFIG_DEBUG_SCHED=y +CONFIG_DEBUG_SCHED_ERROR=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_DEFAULT_TASK_STACKSIZE=4096 +CONFIG_DEV_ZERO=y +CONFIG_EXAMPLES_HELLO=y +CONFIG_EXPERIMENTAL=y +CONFIG_FS_PROCFS=y +CONFIG_FS_ROMFS=y +CONFIG_FS_TMPFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_IDLETHREAD_STACKSIZE=4096 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INTELHEX_BINARY=y +CONFIG_LIBC_MEMFD_ERROR=y +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_TIMERS=4 +CONFIG_RAMLOG=y +CONFIG_RAM_SIZE=2097152 +CONFIG_RAM_START=0x38000000 +CONFIG_RAW_BINARY=y +CONFIG_READLINE_CMD_HISTORY=y +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SPINLOCK=y +CONFIG_STACK_COLORATION=y +CONFIG_STANDARD_SERIAL=y +CONFIG_START_DAY=25 +CONFIG_START_MONTH=4 +CONFIG_START_YEAR=2023 +CONFIG_SYMTAB_ORDEREDBYNAME=y +CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_SYSTEM=y +CONFIG_TESTING_GETPRIME=y +CONFIG_TESTING_OSTEST=y +CONFIG_TIMER=y +CONFIG_TIMER_ARCH=y +CONFIG_USEC_PER_TICK=1000 diff --git a/boards/arm/mps/mps2-an521/include/board.h b/boards/arm/mps/mps2-an521/include/board.h new file mode 100644 index 0000000000..315a20d12d --- /dev/null +++ b/boards/arm/mps/mps2-an521/include/board.h @@ -0,0 +1,61 @@ +/**************************************************************************** + * boards/arm/mps/mps2-an521/include/board.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 __BOARDS_ARM_MSP_MSP2_AN521_INCLUDE_BOARD_H +#define __BOARDS_ARM_MSP_MSP2_AN521_INCLUDE_BOARD_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define MPS_SYSTICK_CLOCK (32 * 1000 * 1000) + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __BOARDS_ARM_MSP_MSP2_AN521_INCLUDE_BOARD_H */ diff --git a/boards/arm/mps/mps2-an521/scripts/Make.defs b/boards/arm/mps/mps2-an521/scripts/Make.defs new file mode 100644 index 0000000000..450c02f2f5 --- /dev/null +++ b/boards/arm/mps/mps2-an521/scripts/Make.defs @@ -0,0 +1,44 @@ +############################################################################ +# boards/arm/mps/mps2-an521/scripts/Make.defs +# +# 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. +# +############################################################################ + +include $(TOPDIR)/.config +include $(TOPDIR)/tools/Config.mk +include $(TOPDIR)/arch/arm/src/armv8-m/Toolchain.defs + +LDSCRIPT = flash.ld + +ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) + +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) + +CFLAGS += $(EXTRAFLAGS) -pipe +CPPFLAGS += $(EXTRAFLAGS) -pipe + +AFLAGS := $(CFLAGS) -D__ASSEMBLY__ + +# NXFLAT module definitions + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 diff --git a/boards/arm/mps/mps2-an521/scripts/flash.ld b/boards/arm/mps/mps2-an521/scripts/flash.ld new file mode 100644 index 0000000000..0cd3b0690a --- /dev/null +++ b/boards/arm/mps/mps2-an521/scripts/flash.ld @@ -0,0 +1,118 @@ +/**************************************************************************** + * boards/arm/mps/mps2-an521/scripts/flash.ld + * + * 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. + * + ****************************************************************************/ + +MEMORY +{ + flash (rx) : ORIGIN = 0x10000000, LENGTH = 4M + sram1 (rwx) : ORIGIN = 0x38000000, LENGTH = 4M +} + +OUTPUT_ARCH(arm) +EXTERN(_vectors) +ENTRY(__start) + +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + .init_section : ALIGN(4) { + _sinit = ABSOLUTE(.); + KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP(*(.init_array EXCLUDE_FILE(*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o) .ctors)) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : ALIGN(4) { + *(.ARM.extab*) + } > flash + + .ARM.exidx : ALIGN(4) { + __exidx_start = ABSOLUTE(.); + *(.ARM.exidx*) + __exidx_end = ABSOLUTE(.); + } > flash + + .tdata : { + _stdata = ABSOLUTE(.); + *(.tdata .tdata.* .gnu.linkonce.td.*); + _etdata = ABSOLUTE(.); + } > flash + + .tbss : { + _stbss = ABSOLUTE(.); + *(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon); + _etbss = ABSOLUTE(.); + } > flash + + _eronly = ABSOLUTE(.); + + /* The RAM vector table (if present) should lie at the beginning of SRAM */ + + .ram_vectors : { + *(.ram_vectors) + } > sram1 + + .data : ALIGN(4) { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + . = ALIGN(4); + _edata = ABSOLUTE(.); + } > sram1 AT > flash + + .bss : ALIGN(4) { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + . = ALIGN(4); + _ebss = ABSOLUTE(.); + } > sram1 + + /* Stabs debugging sections. */ + + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/boards/arm/mps/mps2-an521/src/Makefile b/boards/arm/mps/mps2-an521/src/Makefile new file mode 100644 index 0000000000..8ab9e68790 --- /dev/null +++ b/boards/arm/mps/mps2-an521/src/Makefile @@ -0,0 +1,25 @@ +############################################################################ +# boards/arm/mps/mps2-an521/src/Makefile +# +# 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. +# +############################################################################ + +include $(TOPDIR)/Make.defs + +CSRCS = mps2_bringup.c mps2_reset.c + +include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/mps/mps2-an521/src/mps2_bringup.c b/boards/arm/mps/mps2-an521/src/mps2_bringup.c new file mode 100644 index 0000000000..c253e236d8 --- /dev/null +++ b/boards/arm/mps/mps2-an521/src/mps2_bringup.c @@ -0,0 +1,129 @@ +/**************************************************************************** + * boards/arm/mps/mps2-an521/src/mps2_bringup.c + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: mps2_bringup + * + * Description: + * Bring up board features + * + ****************************************************************************/ + +static int mps2_bringup(void) +{ + int ret = 0; + +#ifdef CONFIG_FS_PROCFS + + /* Mount the procfs file system */ + + ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret); + } + +#endif + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_late_initialize + * + * Description: + * If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional + * initialization call will be performed in the boot-up sequence to a + * function called board_late_initialize(). board_late_initialize() will be + * called immediately after up_intitialize() is called and just before the + * initial application is started. This additional initialization phase + * may be used, for example, to initialize board-specific device drivers. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + /* Perform board initialization */ + + mps2_bringup(); +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ + +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initialization logic and the + * matching application logic. The value could be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +int board_app_initialize(uintptr_t arg) +{ + UNUSED(arg); +#ifndef CONFIG_BOARD_LATE_INITIALIZE + + /* Perform board initialization */ + + return mps2_bringup(); +#else + return OK; +#endif +} diff --git a/boards/arm/mps/mps2-an521/src/mps2_reset.c b/boards/arm/mps/mps2-an521/src/mps2_reset.c new file mode 100644 index 0000000000..3d094d875e --- /dev/null +++ b/boards/arm/mps/mps2-an521/src/mps2_reset.c @@ -0,0 +1,62 @@ +/**************************************************************************** + * boards/arm/mps/mps2-an521/src/mps2_reset.c + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#ifdef CONFIG_BOARDCTL_RESET + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_reset + * + * Description: + * Reset board. Support for this function is required by board-level + * logic if CONFIG_BOARDCTL_RESET is selected. + * + * Input Parameters: + * status - Status information provided with the reset event. This + * meaning of this status information is board-specific. If not + * used by a board, the value zero may be provided in calls to + * board_reset(). + * + * Returned Value: + * If this function returns, then it was not possible to power-off the + * board due to some constraints. The return value int this case is a + * board-specific reason for the failure to shutdown. + * + ****************************************************************************/ + +int board_reset(int status) +{ + up_systemreset(); + return 0; +} + +#endif /* CONFIG_BOARDCTL_RESET */