From nobody@FreeBSD.org  Sun Mar 11 22:11:39 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id BB3071065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Mar 2012 22:11:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A69908FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Mar 2012 22:11:39 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2BMBd06026738
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Mar 2012 22:11:39 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q2BMBdqQ026737;
	Sun, 11 Mar 2012 22:11:39 GMT
	(envelope-from nobody)
Message-Id: <201203112211.q2BMBdqQ026737@red.freebsd.org>
Date: Sun, 11 Mar 2012 22:11:39 GMT
From: Adrian Chadd <adrian@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ath] [ar913x] DDR flush isn't being done for the WMAC
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         165951
>Category:       kern
>Synopsis:       [ar913x] [ath] DDR flush isn't being done for the WMAC
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-mips
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 11 22:20:09 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon Mar 12 00:39:42 UTC 2012
>Originator:     Adrian Chadd
>Release:        -HEAD
>Organization:
>Environment:
MIPS, AR913x AP
>Description:
The AR913x WMAC sits off the Atheros Host Bus (AHB), along with the usb, gmac, etc. The APB (peripheral bus) contains the UART, etc and is a part of the AHB.

Trouble is, the AHB code in -HEAD includes the USB because the USB IRQ sits inside the APB MISC interrupt status word. The other peripherals (GMAC0, GMAC1, WMAC/PCI, etc) are primary MIPS IRQs.

So the AHB devices (besides USB) sit off the nexus, rather than off the AHB. There's no AHB glue, per se, and thus there's no convenient place to put the WMAC DDR flush. For the AR713x/AR71xx there's a PCIe/PCI bus nexus and the IP2 flush is done there.


>How-To-Repeat:

>Fix:
I'm not sure yet. I think the right thing to do is:

* create the AHB bus;
* have the IRQ handling done inside AHB - mapping the MISC interrupts to say IRQ 15 - 31;
* Create APB;
* Have the APB peripherals now use the MISC interrupts that are between AHB IRQs 15->31;
* Have USB also use the relevant MISC interrupt that's between 15 and 31;
* The APB interrupt code would just punt to the AHB.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-mips 
Responsible-Changed-By: adrian 
Responsible-Changed-When: Mon Mar 12 00:39:21 UTC 2012 
Responsible-Changed-Why:  
This is (mostly) an ar71xx MIPS platform issue. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=165951 
>Unformatted:
