Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/ixp12x0 add address decode of "PCI Configuratio...
details: https://anonhg.NetBSD.org/src/rev/da373c28ec36
branches: trunk
changeset: 551986:da373c28ec36
user: ichiro <ichiro%NetBSD.org@localhost>
date: Mon Sep 15 05:07:29 2003 +0000
description:
add address decode of "PCI Configuration type 1"
diffstat:
sys/arch/arm/ixp12x0/ixp12x0_pci.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diffs (43 lines):
diff -r 509e58f207eb -r da373c28ec36 sys/arch/arm/ixp12x0/ixp12x0_pci.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_pci.c Mon Sep 15 03:14:54 2003 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_pci.c Mon Sep 15 05:07:29 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp12x0_pci.c,v 1.5 2003/03/25 06:12:47 igy Exp $ */
+/* $NetBSD: ixp12x0_pci.c,v 1.6 2003/09/15 05:07:29 ichiro Exp $ */
/*
* Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixp12x0_pci.c,v 1.5 2003/03/25 06:12:47 igy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp12x0_pci.c,v 1.6 2003/09/15 05:07:29 ichiro Exp $");
/*
* PCI configuration support for IXP12x0 Network Processor chip.
@@ -189,17 +189,15 @@
if (bus == 0) {
/* configuration type 0 */
-#if 1
addr = (vaddr_t) bus_space_vaddr(sc->sc_iot, sc->sc_conf0_ioh) +
- ((1 << (device + 10)) | (offset & 0xff));
-#else
- addr = (vaddr_t) bus_space_vaddr(sc->sc_iot, sc->sc_conf0_ioh) +
- (0xc00000 | (1 << (device)) << 11 | (offset & 0xff));
-#endif
+ ((1 << (device + 10)) | (offset & ~3));
+ } else {
+ /* configuration type 1 */
+ addr = (vaddr_t) bus_space_vaddr(sc->sc_iot, sc->sc_conf1_ioh) +
+ ((bus << 16) | (device << 11) |
+ (function << 8) | (offset & ~3) | 1);
+ }
return addr;
- } else {
- return (vaddr_t) - 1;
- }
}
pcireg_t
Home |
Main Index |
Thread Index |
Old Index