summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/arm')
-rw-r--r--c/src/lib/libbsp/arm/tms570/startup/bspreset.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/c/src/lib/libbsp/arm/tms570/startup/bspreset.c b/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
index a4b6647674..3efb5907a4 100644
--- a/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
+++ b/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
@@ -17,29 +17,30 @@
*/
#include <bsp.h>
+#include <bsp/bootcard.h>
#include <bsp/tms570.h>
#include <bsp/start.h>
static void handle_esm_errors(uint32_t esm_irq_channel)
{
- /* ESMR3 errors don't generate interrupts. */
- if (esm_irq_channel < 0x20u) {
- ESMSR1 = 1 << esm_irq_channel;
- } else if (esm_irq_channel < 0x40u) {
- ESMSR2 = 1 << (esm_irq_channel - 32u);
- } else if (esm_irq_channel < 0x60u) {
- ESMSR4 = 1 << (esm_irq_channel - 64u);
- }
+ /* ESMR3 errors don't generate interrupts. */
+ if (esm_irq_channel < 0x20u) {
+ ESMSR1 = 1 << esm_irq_channel;
+ } else if (esm_irq_channel < 0x40u) {
+ ESMSR2 = 1 << (esm_irq_channel - 32u);
+ } else if (esm_irq_channel < 0x60u) {
+ ESMSR4 = 1 << (esm_irq_channel - 64u);
+ }
}
void bsp_reset(void)
{
- uint32_t esm_irq_channel = ESMIOFFHR - 1;
+ uint32_t esm_irq_channel = ESMIOFFHR - 1;
- if (esm_irq_channel) {
- handle_esm_errors(esm_irq_channel);
- }
+ if (esm_irq_channel) {
+ handle_esm_errors(esm_irq_channel);
+ }
- /* Reset the board */
- SYSECR = SYSECR_RESET;
+ /* Reset the board */
+ SYSECR = SYSECR_RESET;
}