Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2010 02:05:16 +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: r211478 - head/sys/mips/atheros
Message-ID:  <201008190205.o7J25G8G086465@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Thu Aug 19 02:05:16 2010
New Revision: 211478
URL: http://svn.freebsd.org/changeset/base/211478

Log:
  Make the PCI initialisation path use the new cpuops rather than directly
  programming the reset register.

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

Modified: head/sys/mips/atheros/ar71xx_pci.c
==============================================================================
--- head/sys/mips/atheros/ar71xx_pci.c	Thu Aug 19 02:04:35 2010	(r211477)
+++ head/sys/mips/atheros/ar71xx_pci.c	Thu Aug 19 02:05:16 2010	(r211478)
@@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$");
 #include <mips/atheros/ar71xxreg.h>
 #include <mips/atheros/ar71xx_pci_bus_space.h>
 
+#include <mips/atheros/ar71xx_cpudef.h>
+
 #undef AR71XX_PCI_DEBUG
 #ifdef AR71XX_PCI_DEBUG
 #define dprintf printf
@@ -258,7 +260,6 @@ ar71xx_pci_attach(device_t dev)
 {
 	int busno = 0;
 	int rid = 0;
-	uint32_t reset;
 	struct ar71xx_pci_softc *sc = device_get_softc(dev);
 
 	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
@@ -295,15 +296,10 @@ ar71xx_pci_attach(device_t dev)
 	}
 
 	/* reset PCI core and PCI bus */
-	reset = ATH_READ_REG(AR71XX_RST_RESET);
-	reset |= (RST_RESET_PCI_CORE | RST_RESET_PCI_BUS);
-	ATH_WRITE_REG(AR71XX_RST_RESET, reset);
-	ATH_READ_REG(AR71XX_RST_RESET);
+	ar71xx_device_stop(RST_RESET_PCI_CORE | RST_RESET_PCI_BUS);
 	DELAY(100000);
 
-	reset &= ~(RST_RESET_PCI_CORE | RST_RESET_PCI_BUS);
-	ATH_WRITE_REG(AR71XX_RST_RESET, reset);
-	ATH_READ_REG(AR71XX_RST_RESET);
+	ar71xx_device_start(RST_RESET_PCI_CORE | RST_RESET_PCI_BUS);
 	DELAY(100000);
 
 	/* Init PCI windows */



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