apb.c (256281) | apb.c (280970) |
---|---|
1/*- 2 * Copyright (c) 1994,1995 Stefan Esser, Wolfgang StanglMeier 3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001, 2003 Thomas Moestl <tmm@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * from: FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.3 2000/12/13 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1994,1995 Stefan Esser, Wolfgang StanglMeier 3 * Copyright (c) 2000 Michael Smith <msmith@freebsd.org> 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001, 2003 Thomas Moestl <tmm@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * from: FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.3 2000/12/13 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: stable/10/sys/sparc64/pci/apb.c 227848 2011-11-22 21:55:40Z marius $"); | 35__FBSDID("$FreeBSD: stable/10/sys/sparc64/pci/apb.c 280970 2015-04-01 21:48:54Z jhb $"); |
36 37/* 38 * Support for the Sun APB (Advanced PCI Bridge) PCI-PCI bridge. 39 * This bridge does not fully comply to the PCI bridge specification, and is 40 * therefore not supported by the generic driver. 41 * We can use some of the pcib methods anyway. 42 */ 43 --- 128 unchanged lines hidden (view full) --- 172 */ 173 sc->sc_bsc.ops_pcib_sc.domain = pci_get_domain(dev); 174 sc->sc_bsc.ops_pcib_sc.secstat = 175 pci_read_config(dev, PCIR_SECSTAT_1, 2); 176 sc->sc_bsc.ops_pcib_sc.command = 177 pci_read_config(dev, PCIR_COMMAND, 2); 178 sc->sc_bsc.ops_pcib_sc.pribus = 179 pci_read_config(dev, PCIR_PRIBUS_1, 1); | 36 37/* 38 * Support for the Sun APB (Advanced PCI Bridge) PCI-PCI bridge. 39 * This bridge does not fully comply to the PCI bridge specification, and is 40 * therefore not supported by the generic driver. 41 * We can use some of the pcib methods anyway. 42 */ 43 --- 128 unchanged lines hidden (view full) --- 172 */ 173 sc->sc_bsc.ops_pcib_sc.domain = pci_get_domain(dev); 174 sc->sc_bsc.ops_pcib_sc.secstat = 175 pci_read_config(dev, PCIR_SECSTAT_1, 2); 176 sc->sc_bsc.ops_pcib_sc.command = 177 pci_read_config(dev, PCIR_COMMAND, 2); 178 sc->sc_bsc.ops_pcib_sc.pribus = 179 pci_read_config(dev, PCIR_PRIBUS_1, 1); |
180 sc->sc_bsc.ops_pcib_sc.secbus = | 180 sc->sc_bsc.ops_pcib_sc.bus.sec = |
181 pci_read_config(dev, PCIR_SECBUS_1, 1); | 181 pci_read_config(dev, PCIR_SECBUS_1, 1); |
182 sc->sc_bsc.ops_pcib_sc.subbus = | 182 sc->sc_bsc.ops_pcib_sc.bus.sub = |
183 pci_read_config(dev, PCIR_SUBBUS_1, 1); 184 sc->sc_bsc.ops_pcib_sc.bridgectl = 185 pci_read_config(dev, PCIR_BRIDGECTL_1, 2); 186 sc->sc_bsc.ops_pcib_sc.seclat = 187 pci_read_config(dev, PCIR_SECLAT_1, 1); 188 sc->sc_iomap = pci_read_config(dev, APBR_IOMAP, 1); 189 sc->sc_memmap = pci_read_config(dev, APBR_MEMMAP, 1); 190 --- 4 unchanged lines hidden (view full) --- 195 soid = device_get_sysctl_tree(dev); 196 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "domain", 197 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.domain, 0, 198 "Domain number"); 199 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", 200 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.pribus, 0, 201 "Primary bus number"); 202 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", | 183 pci_read_config(dev, PCIR_SUBBUS_1, 1); 184 sc->sc_bsc.ops_pcib_sc.bridgectl = 185 pci_read_config(dev, PCIR_BRIDGECTL_1, 2); 186 sc->sc_bsc.ops_pcib_sc.seclat = 187 pci_read_config(dev, PCIR_SECLAT_1, 1); 188 sc->sc_iomap = pci_read_config(dev, APBR_IOMAP, 1); 189 sc->sc_memmap = pci_read_config(dev, APBR_MEMMAP, 1); 190 --- 4 unchanged lines hidden (view full) --- 195 soid = device_get_sysctl_tree(dev); 196 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "domain", 197 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.domain, 0, 198 "Domain number"); 199 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", 200 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.pribus, 0, 201 "Primary bus number"); 202 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", |
203 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.secbus, 0, | 203 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.bus.sec, 0, |
204 "Secondary bus number"); 205 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", | 204 "Secondary bus number"); 205 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", |
206 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.subbus, 0, | 206 CTLFLAG_RD, &sc->sc_bsc.ops_pcib_sc.bus.sub, 0, |
207 "Subordinate bus number"); 208 209 ofw_pcib_gen_setup(dev); 210 211 if (bootverbose) { 212 device_printf(dev, " domain %d\n", 213 sc->sc_bsc.ops_pcib_sc.domain); 214 device_printf(dev, " secondary bus %d\n", | 207 "Subordinate bus number"); 208 209 ofw_pcib_gen_setup(dev); 210 211 if (bootverbose) { 212 device_printf(dev, " domain %d\n", 213 sc->sc_bsc.ops_pcib_sc.domain); 214 device_printf(dev, " secondary bus %d\n", |
215 sc->sc_bsc.ops_pcib_sc.secbus); | 215 sc->sc_bsc.ops_pcib_sc.bus.sec); |
216 device_printf(dev, " subordinate bus %d\n", | 216 device_printf(dev, " subordinate bus %d\n", |
217 sc->sc_bsc.ops_pcib_sc.subbus); | 217 sc->sc_bsc.ops_pcib_sc.bus.sub); |
218 device_printf(dev, " I/O decode "); 219 apb_map_print(sc->sc_iomap, APB_IO_SCALE); 220 printf("\n"); 221 device_printf(dev, " memory decode "); 222 apb_map_print(sc->sc_memmap, APB_MEM_SCALE); 223 printf("\n"); 224 } 225 --- 87 unchanged lines hidden --- | 218 device_printf(dev, " I/O decode "); 219 apb_map_print(sc->sc_iomap, APB_IO_SCALE); 220 printf("\n"); 221 device_printf(dev, " memory decode "); 222 apb_map_print(sc->sc_memmap, APB_MEM_SCALE); 223 printf("\n"); 224 } 225 --- 87 unchanged lines hidden --- |