diff options
author | adrian <adrian@FreeBSD.org> | 2010-08-19 02:05:16 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2010-08-19 02:05:16 +0000 |
commit | c5b5c26e9284fa2880652d7fb7888b95f54e5512 (patch) | |
tree | a8efcfd7b4acf2c866fbc15d1fd2cd81b303d7d6 /sys/mips | |
parent | 0a99afe1b0319cb52ae2ae5efa9c3e20921c1782 (diff) | |
download | FreeBSD-src-c5b5c26e9284fa2880652d7fb7888b95f54e5512.zip FreeBSD-src-c5b5c26e9284fa2880652d7fb7888b95f54e5512.tar.gz |
Make the PCI initialisation path use the new cpuops rather than directly
programming the reset register.
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/atheros/ar71xx_pci.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/mips/atheros/ar71xx_pci.c b/sys/mips/atheros/ar71xx_pci.c index 2e6a5fa..632270c 100644 --- a/sys/mips/atheros/ar71xx_pci.c +++ b/sys/mips/atheros/ar71xx_pci.c @@ -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 */ |