summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
diff options
context:
space:
mode:
authorPremysl Houdek <kom541000@gmail.com>2015-07-16 07:14:32 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-07-16 11:15:52 -0700
commit069560a5f9ee9561998a81d98846f52192f14814 (patch)
treee85e933b2d28863cda1d30a63c16e39e1f3a80c6 /c/src/lib/libbsp/arm/tms570/startup/bspreset.c
parentbsp/tms570: fix get time resolution after infrastructure change to timecounter. (diff)
downloadrtems-069560a5f9ee9561998a81d98846f52192f14814.tar.bz2
bsp/tms570: source changes reflecting new headers.
Signed-off-by: Premysl Houdek <kom541000@gmail.com>
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/arm/tms570/startup/bspreset.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/arm/tms570/startup/bspreset.c b/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
index 3efb5907a4..f6bdee27e1 100644
--- a/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
+++ b/c/src/lib/libbsp/arm/tms570/startup/bspreset.c
@@ -25,22 +25,23 @@ 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;
+ TMS570_ESM.SR[0] = 1 << esm_irq_channel;
} else if (esm_irq_channel < 0x40u) {
- ESMSR2 = 1 << (esm_irq_channel - 32u);
+ TMS570_ESM.SR[1] = 1 << (esm_irq_channel - 32u);
} else if (esm_irq_channel < 0x60u) {
- ESMSR4 = 1 << (esm_irq_channel - 64u);
+ TMS570_ESM.SR4 = 1 << (esm_irq_channel - 64u);
}
}
void bsp_reset(void)
{
- uint32_t esm_irq_channel = ESMIOFFHR - 1;
+ uint32_t esm_irq_channel = TMS570_ESM.IOFFHR - 1;
if (esm_irq_channel) {
handle_esm_errors(esm_irq_channel);
}
/* Reset the board */
- SYSECR = SYSECR_RESET;
+ /* write of value other than 1 cause system reset */
+ TMS570_SYS1.SYSECR = TMS570_SYS1_SYSECR_RESET(2);
}