Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Apr 2011 12:07:15 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221257 - head/sys/mips/atheros
Message-ID:  <201104301207.p3UC7FEr045045@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Apr 30 12:07:15 2011
New Revision: 221257
URL: http://svn.freebsd.org/changeset/base/221257

Log:
  The AR724x SoC's require the irq status line to be acked/cleared.
  
  This allows console IO to occur correctly once the kernel is in multi-user
  mode.
  
  Submitted by:	Luiz Otavio O Souza

Modified:
  head/sys/mips/atheros/apb.c

Modified: head/sys/mips/atheros/apb.c
==============================================================================
--- head/sys/mips/atheros/apb.c	Sat Apr 30 11:56:04 2011	(r221256)
+++ head/sys/mips/atheros/apb.c	Sat Apr 30 12:07:15 2011	(r221257)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 
 #include <mips/atheros/apbvar.h>
 #include <mips/atheros/ar71xxreg.h>
+#include <mips/atheros/ar71xx_setup.h>
 
 #undef APB_DEBUG
 #ifdef APB_DEBUG
@@ -337,6 +338,20 @@ apb_intr(void *arg)
 	reg = ATH_READ_REG(AR71XX_MISC_INTR_STATUS);
 	for (irq = 0; irq < APB_NIRQS; irq++) {
 		if (reg & (1 << irq)) {
+
+			switch (ar71xx_soc) {
+			case AR71XX_SOC_AR7240:
+			case AR71XX_SOC_AR7241:
+			case AR71XX_SOC_AR7242:
+				/* Ack/clear the irq on status register for AR724x */
+				ATH_WRITE_REG(AR71XX_MISC_INTR_STATUS,
+				    reg & ~(1 << irq));
+				break;
+			default:
+				/* fallthrough */
+				break;
+			}
+
 			event = sc->sc_eventstab[irq];
 			if (!event || TAILQ_EMPTY(&event->ie_handlers)) {
 				/* Ignore timer interrupts */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104301207.p3UC7FEr045045>