Module Name:    src
Committed By:   reinoud
Date:           Fri Apr 18 14:18:33 UTC 2014

Modified Files:
        src/sys/arch/arm/samsung: exynos_sscom.c

Log Message:
Fix interrupt enable/disable and clearning bits

what was i thinking...


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/samsung/exynos_sscom.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/samsung/exynos_sscom.c
diff -u src/sys/arch/arm/samsung/exynos_sscom.c:1.3 src/sys/arch/arm/samsung/exynos_sscom.c:1.4
--- src/sys/arch/arm/samsung/exynos_sscom.c:1.3	Wed Apr 16 21:28:51 2014
+++ src/sys/arch/arm/samsung/exynos_sscom.c	Fri Apr 18 14:18:33 2014
@@ -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 @@ exynos_change_txrx_interrupts(struct ssc
 {
 	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 @@ exynos_clear_interrupts(struct sscom_sof
 	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 @@ sscom_attach(device_t parent, device_t s
 	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,

Reply via email to