forked from Imagelibrary/rtems
tms570/startup/bspreset.c: Add include <bsp/bootcard.h> to fix warning
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user