Author: raj Date: Wed Jun 24 15:38:17 2009 New Revision: 194844 URL: http://svn.freebsd.org/changeset/base/194844
Log: Move non-PCI prototypes from ata-pci.h -> ata-all.h. This removes unnecessary PCI #includes dependency for systems with ATA controllers living at non-PCI buses. Submitted by: Piotr Ziecik Obtained from: Semihalf Modified: head/sys/conf/files head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-dma.c head/sys/dev/ata/ata-pci.h head/sys/dev/ata/ata-sata.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jun 24 15:33:33 2009 (r194843) +++ head/sys/conf/files Wed Jun 24 15:38:17 2009 (r194844) @@ -491,12 +491,12 @@ dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-queue.c optional ata | atacore +dev/ata/ata-dma.c optional ata | atadma +dev/ata/ata-sata.c optional ata | atasata dev/ata/ata-card.c optional ata pccard | atapccard dev/ata/ata-cbus.c optional ata pc98 | atapc98 dev/ata/ata-isa.c optional ata isa | ataisa dev/ata/ata-pci.c optional ata pci | atapci -dev/ata/ata-dma.c optional ata pci | atapci -dev/ata/ata-sata.c optional ata pci | atapci dev/ata/chipsets/ata-ahci.c optional ata pci | ataahci | ataacerlabs | \ ataati | ataintel | atajmicron | atavia dev/ata/chipsets/ata-acard.c optional ata pci | ataacard Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Wed Jun 24 15:33:33 2009 (r194843) +++ head/sys/dev/ata/ata-all.h Wed Jun 24 15:38:17 2009 (r194844) @@ -609,6 +609,19 @@ int ata_end_transaction(struct ata_reque void ata_generic_reset(device_t dev); int ata_generic_command(struct ata_request *request); +/* ata-dma.c: */ +void ata_dmainit(device_t); +void ata_dmafini(device_t dev); + +/* ata-sata.c: */ +void ata_sata_phy_check_events(device_t dev); +int ata_sata_scr_read(struct ata_channel *ch, int port, int reg, uint32_t *val); +int ata_sata_scr_write(struct ata_channel *ch, int port, int reg, uint32_t val); +int ata_sata_phy_reset(device_t dev, int port, int quick); +void ata_sata_setmode(device_t dev, int mode); +int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis); +void ata_pm_identify(device_t dev); + /* macros for alloc/free of struct ata_request */ extern uma_zone_t ata_request_zone; #define ata_alloc_request() uma_zalloc(ata_request_zone, M_NOWAIT | M_ZERO) Modified: head/sys/dev/ata/ata-dma.c ============================================================================== --- head/sys/dev/ata/ata-dma.c Wed Jun 24 15:33:33 2009 (r194843) +++ head/sys/dev/ata/ata-dma.c Wed Jun 24 15:38:17 2009 (r194844) @@ -40,9 +40,7 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <machine/bus.h> #include <sys/rman.h> -#include <dev/pci/pcivar.h> #include <dev/ata/ata-all.h> -#include <dev/ata/ata-pci.h> /* prototypes */ static void ata_dmasetupc_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Wed Jun 24 15:33:33 2009 (r194843) +++ head/sys/dev/ata/ata-pci.h Wed Jun 24 15:38:17 2009 (r194844) @@ -451,15 +451,6 @@ void ata_print_cable(device_t dev, u_int int ata_check_80pin(device_t dev, int mode); int ata_mode2idx(int mode); -/* global prototypes ata-sata.c */ -void ata_sata_phy_check_events(device_t dev); -int ata_sata_scr_read(struct ata_channel *ch, int port, int reg, uint32_t *val); -int ata_sata_scr_write(struct ata_channel *ch, int port, int reg, uint32_t val); -int ata_sata_phy_reset(device_t dev, int port, int quick); -void ata_sata_setmode(device_t dev, int mode); -int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis); -void ata_pm_identify(device_t dev); - /* global prototypes from chipsets/ata-*.c */ int ata_ahci_chipinit(device_t); int ata_ahci_ch_attach(device_t dev); @@ -471,10 +462,6 @@ void ata_ahci_reset(device_t dev); int ata_marvell_edma_chipinit(device_t); int ata_sii_chipinit(device_t); -/* global prototypes ata-dma.c */ -void ata_dmainit(device_t); -void ata_dmafini(device_t dev); - /* externs */ extern devclass_t ata_pci_devclass; Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Wed Jun 24 15:33:33 2009 (r194843) +++ head/sys/dev/ata/ata-sata.c Wed Jun 24 15:38:17 2009 (r194844) @@ -44,10 +44,7 @@ __FBSDID("$FreeBSD$"); #include <machine/resource.h> #include <machine/bus.h> #include <sys/rman.h> -#include <dev/pci/pcivar.h> -#include <dev/pci/pcireg.h> #include <dev/ata/ata-all.h> -#include <dev/ata/ata-pci.h> #include <ata_if.h> void _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"