Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/samsung Fix interrupt enable/disable and clearn...



details:   https://anonhg.NetBSD.org/src/rev/7a70f31c03f7
branches:  trunk
changeset: 328800:7a70f31c03f7
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Apr 18 14:18:33 2014 +0000

description:
Fix interrupt enable/disable and clearning bits

what was i thinking...

diffstat:

 sys/arch/arm/samsung/exynos_sscom.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (54 lines):

diff -r 7682ce5db356 -r 7a70f31c03f7 sys/arch/arm/samsung/exynos_sscom.c
--- a/sys/arch/arm/samsung/exynos_sscom.c       Fri Apr 18 14:17:11 2014 +0000
+++ b/sys/arch/arm/samsung/exynos_sscom.c       Fri Apr 18 14:18:33 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exynos_sscom.c,v 1.3 2014/04/16 21:28:51 reinoud Exp $ */
+/*     $NetBSD: exynos_sscom.c,v 1.4 2014/04/18 14:18:33 reinoud Exp $ */
 
 /*
  * Copyright (c) 2014 Reinoud Zandijk
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos_sscom.c,v 1.3 2014/04/16 21:28:51 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_sscom.c,v 1.4 2014/04/18 14:18:33 reinoud Exp $");
 
 #include "opt_sscom.h"
 #include "opt_ddb.h"
@@ -113,9 +113,9 @@
 {
        int intbits = 0;
        if (flags & SSCOM_HW_RXINT)
-               intbits |= 1 << sc->sc_rx_irqno;
+               intbits |= UINT_RXD;
        if (flags & SSCOM_HW_TXINT)
-               intbits |= 1 << sc->sc_tx_irqno;
+               intbits |= UINT_TXD;
        if (unmask_p) {
                exynos_unmask_interrupts(sc, intbits);
        } else {
@@ -129,9 +129,9 @@
        uint32_t val = 0;
 
        if (flags & SSCOM_HW_RXINT)
-               val |= sc->sc_rx_irqno;
+               val |= UINT_RXD;
        if (flags & SSCOM_HW_TXINT)
-               val |= sc->sc_tx_irqno;
+               val |= UINT_TXD;
        bus_space_write_4(sc->sc_iot, sc->sc_ioh, SSCOM_UINTP, val);
 }
 
@@ -154,8 +154,9 @@
        sc->sc_change_txrx_interrupts = exynos_change_txrx_interrupts;
        sc->sc_clear_interrupts = exynos_clear_interrupts;
 
-       sc->sc_rx_irqno = UINT_RXD;
-       sc->sc_tx_irqno = UINT_TXD;
+       /* not used here, but do initialise */
+       sc->sc_rx_irqno = 0;
+       sc->sc_tx_irqno = 0;
 
        if (!sscom_is_console(sc->sc_iot, unit, &sc->sc_ioh)
            && bus_space_subregion(sc->sc_iot, exyo->exyo_core_bsh,



Home | Main Index | Thread Index | Old Index