From 54bc92c672203d33af3d37caa76cff4b105802ed Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 11 Jul 2009 16:21:17 +0800 Subject: [PATCH] Get rid of PCI_MAP_FIXUP and opt_pci.h --- sys/bus/pci/amd64/pci_bus.c | 2 -- sys/bus/pci/i386/pci_bus.c | 2 -- sys/conf/options | 1 - sys/config/AMD64_GENERIC | 1 - sys/config/GENERIC | 1 - sys/config/JG64 | 1 - sys/config/LINT | 3 --- sys/dev/agp/agp.c | 1 - sys/dev/pccard/pccbb/Makefile | 5 ----- sys/dev/pccard/pccbb/pccbb_pci.c | 30 ------------------------------ sys/platform/pc32/i386/mp_clock.c | 1 - 11 files changed, 48 deletions(-) diff --git a/sys/bus/pci/amd64/pci_bus.c b/sys/bus/pci/amd64/pci_bus.c index ca94c8a25e..adc53ea7e7 100644 --- a/sys/bus/pci/amd64/pci_bus.c +++ b/sys/bus/pci/amd64/pci_bus.c @@ -26,8 +26,6 @@ * $FreeBSD: src/sys/i386/pci/pci_bus.c,v 1.128.8.1 2009/04/15 03:14:26 kensmith Exp $ */ -#include "opt_pci.h" - #include #include #include diff --git a/sys/bus/pci/i386/pci_bus.c b/sys/bus/pci/i386/pci_bus.c index 892fc0190d..8e87b86c6e 100644 --- a/sys/bus/pci/i386/pci_bus.c +++ b/sys/bus/pci/i386/pci_bus.c @@ -26,8 +26,6 @@ * $FreeBSD: src/sys/i386/pci/pci_bus.c,v 1.128.8.1 2009/04/15 03:14:26 kensmith Exp $ */ -#include "opt_pci.h" - #include #include #include diff --git a/sys/conf/options b/sys/conf/options index 291b30b6d4..d29e9ac2bd 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -497,7 +497,6 @@ KEY MSGBUF_SIZE opt_msgbuf.h # PCI related options -PCI_MAP_FIXUP opt_pci.h COMPAT_OLDPCI # NFS options diff --git a/sys/config/AMD64_GENERIC b/sys/config/AMD64_GENERIC index 17ba811b23..9d12851ba1 100644 --- a/sys/config/AMD64_GENERIC +++ b/sys/config/AMD64_GENERIC @@ -88,7 +88,6 @@ device isa # controllers #device natausb # ATA-over-USB support #options ATA_STATIC_ID # Static device numbering -#options PCI_MAP_FIXUP # Needed for NATA # LEGACY ATA and ATAPI devices #device ata0 at isa? port IO_WD1 irq 14 diff --git a/sys/config/GENERIC b/sys/config/GENERIC index 4fd1292034..ce95eb10f4 100644 --- a/sys/config/GENERIC +++ b/sys/config/GENERIC @@ -103,7 +103,6 @@ device nataraid # support for ATA software RAID # controllers device natausb # ATA-over-USB support options ATA_STATIC_ID # Static device numbering -options PCI_MAP_FIXUP # Needed for NATA # LEGACY ATA and ATAPI devices #device ata0 at isa? port IO_WD1 irq 14 diff --git a/sys/config/JG64 b/sys/config/JG64 index eed8925e01..6ff4813343 100644 --- a/sys/config/JG64 +++ b/sys/config/JG64 @@ -103,7 +103,6 @@ device nataraid # support for ATA software RAID # controllers ##device natausb # ATA-over-USB support options ATA_STATIC_ID # Static device numbering -options PCI_MAP_FIXUP # Needed for NATA # LEGACY ATA and ATAPI devices #device ata0 at isa? port IO_WD1 irq 14 diff --git a/sys/config/LINT b/sys/config/LINT index 58c287d93a..8505e537e5 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -1694,9 +1694,6 @@ device pci #Enable pci resources left off by a "lazy" BIOS. # options COMPAT_OLDPCI #FreeBSD 2.2 and 3.x compatibility shims -options PCI_MAP_FIXUP #fixup lazy PCI mappings for certain devices, - #e.g. ATA controllers in legacy mode. NATA - #requires this, don't use it with old ATA! # AGP GART support # diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 18660c33b4..2c62df7530 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -28,7 +28,6 @@ */ #include "opt_bus.h" -#include "opt_pci.h" #include #include diff --git a/sys/dev/pccard/pccbb/Makefile b/sys/dev/pccard/pccbb/Makefile index cc3ecbef27..7e454ac363 100644 --- a/sys/dev/pccard/pccbb/Makefile +++ b/sys/dev/pccard/pccbb/Makefile @@ -6,9 +6,4 @@ SRCS+= device_if.h bus_if.h isa_if.h pci_if.h pcib_if.h power_if.h card_if.h SRCS+= opt_pci.h NOMAN= -.ifndef BUILDING_WITH_KERNEL -opt_pci.h: - echo "#define PCI_MAP_FIXUP 1" > ${.OBJDIR}/${.TARGET} -.endif - .include diff --git a/sys/dev/pccard/pccbb/pccbb_pci.c b/sys/dev/pccard/pccbb/pccbb_pci.c index dba8ca7dfe..6fa2196022 100644 --- a/sys/dev/pccard/pccbb/pccbb_pci.c +++ b/sys/dev/pccard/pccbb/pccbb_pci.c @@ -73,8 +73,6 @@ * * David Cross: Author of the initial ugly hack for a specific cardbus card */ -#include "opt_pci.h" - #include #include #include @@ -321,36 +319,8 @@ cbb_pci_attach(device_t brdev) sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!sc->base_res) { -#ifndef PCI_MAP_FIXUP - uint32_t sockbase; - - /* - * Generally, the BIOS will assign this memory for us. - * However, newer BIOSes do not because the MS design - * documents have mandated that this is for the OS - * to assign rather than the BIOS. This driver shouldn't - * be doing this, but until the pci bus code (or acpi) - * does this, we allow CardBus bridges to work on more - * machines. - */ - pci_write_config(brdev, rid, 0xffffffff, 4); - sockbase = pci_read_config(brdev, rid, 4); - sockbase = (sockbase & 0xfffffff0) & -(sockbase & 0xfffffff0); - sc->base_res = bus_generic_alloc_resource( - device_get_parent(brdev), brdev, SYS_RES_MEMORY, - &rid, 0x88000000, ~0, sockbase, - RF_ACTIVE | rman_make_alignment_flags(sockbase)); - if (!sc->base_res) { - device_printf(brdev, - "Could not grab register memory\n"); - return (ENOMEM); - } - pci_write_config(brdev, CBBR_SOCKBASE, - rman_get_start(sc->base_res), 4); -#else /* PCI_MAP_FIXUP */ device_printf(brdev, "Could not grab register memory\n"); return (ENOMEM); -#endif /* !PCI_MAP_FIXUP */ } else { DEVPRINTF((brdev, "Found memory at %08lx\n", rman_get_start(sc->base_res))); diff --git a/sys/platform/pc32/i386/mp_clock.c b/sys/platform/pc32/i386/mp_clock.c index c4a95a0d13..b50f390473 100644 --- a/sys/platform/pc32/i386/mp_clock.c +++ b/sys/platform/pc32/i386/mp_clock.c @@ -35,7 +35,6 @@ */ /* #include "opt_bus.h" */ -/* #include "opt_pci.h" */ #include #include -- 2.11.4.GIT