arm: refactor clearing of exception faults to common code
A number of SoCs clear out the Mem/Bus/Usage and Hard Fault exceptions during init. Lets refactor that into a common function so we don't have to keep duplicating it over and over. Change-Id: Ida908a9092db37447abcf3c9872f36937982f729 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
2d881d6539
commit
f16cefea9f
8 changed files with 36 additions and 43 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <soc.h>
|
||||
#include <cortex_m/exc.h>
|
||||
|
||||
#ifdef CONFIG_RUNTIME_NMI
|
||||
extern void _NmiInit(void);
|
||||
|
@ -377,12 +378,7 @@ static int nordicsemi_nrf52_init(struct device *arg)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Reset all faults */
|
||||
_ScbMemFaultAllFaultsReset();
|
||||
_ScbBusFaultAllFaultsReset();
|
||||
_ScbUsageFaultAllFaultsReset();
|
||||
|
||||
_ScbHardFaultAllFaultsReset();
|
||||
_ClearFaults();
|
||||
|
||||
/* Setup master clock */
|
||||
clock_init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue