Module: xenomai-2.4
Branch: master
Commit: ae19903814202620b2ca9f69b4e9b6f98f44a020
URL:    
http://git.xenomai.org/?p=xenomai-2.4.git;a=commit;h=ae19903814202620b2ca9f69b4e9b6f98f44a020

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Dec 24 11:14:41 2009 +0100

blackfin: fix references to core-specific MMRs (BF561)

---

 ksrc/arch/blackfin/hal.c |    4 ++++
 ksrc/arch/blackfin/nmi.c |   14 ++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ksrc/arch/blackfin/hal.c b/ksrc/arch/blackfin/hal.c
index e010202..b2d8a14 100644
--- a/ksrc/arch/blackfin/hal.c
+++ b/ksrc/arch/blackfin/hal.c
@@ -77,7 +77,11 @@ static void rthal_latency_above_max(struct pt_regs *regs)
        ilat = bfin_read_ILAT();
        ipend = bfin_read_IPEND();
        imask = bfin_read_IMASK();
+#ifdef CONFIG_BF561
+       sic_imask = bfin_read_SIC_IMASK(0);
+#else
        sic_imask = bfin_read_SIC_IMASK();
+#endif
 
        rthal_emergency_console();
        printk("NMI watchdog detected timer latency above %u us\n",
diff --git a/ksrc/arch/blackfin/nmi.c b/ksrc/arch/blackfin/nmi.c
index be92611..74e7f1c 100644
--- a/ksrc/arch/blackfin/nmi.c
+++ b/ksrc/arch/blackfin/nmi.c
@@ -72,18 +72,24 @@ void rthal_nmi_release(void)
        rthal_nmi_emergency = NULL;
 }
 
+#ifdef CONFIG_BF561
+#define write_wdog(reg, val)   bfin_write_WDOGA_##reg(val)
+#else
+#define write_wdog(reg, val)   bfin_write_WDOG_##reg(val)
+#endif
+
 void rthal_nmi_arm(unsigned long delay)
 {
-       bfin_write_WDOG_CTL(0xad0);     /* Disable */
+       write_wdog(CTL, 0xad0); /* Disable */
        CSYNC();
-       bfin_write_WDOG_CNT(delay);
-       bfin_write_WDOG_CTL(0x2);       /* Enable, generate NMIs */
+       write_wdog(CNT, delay);
+       write_wdog(CTL, 0x2);   /* Enable, generate NMIs */
        CSYNC();
 }
 
 void rthal_nmi_disarm(void)
 {
-       bfin_write_WDOG_CTL(0xad0);     /* Disable */
+       write_wdog(CTL, 0xad0); /* Disable */
        CSYNC();
 }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to