/* $NetBSD: gt.c,v 1.9 2003/07/15 01:29:23 lukem Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.9 2003/07/15 01:29:23 lukem Exp $"); #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pci.h" struct gt_softc { struct device sc_dev; }; static int gt_match(struct device *, struct cfdata *, void *); static void gt_attach(struct device *, struct device *, void *); static int gt_print(void *aux, const char *pnp); CFATTACH_DECL(gt, sizeof(struct gt_softc), gt_match, gt_attach, NULL, NULL); static int gt_match(parent, match, aux) struct device *parent; struct cfdata *match; void *aux; { return 1; } static void gt_attach(parent, self, aux) struct device *parent; struct device *self; void *aux; { struct pcibus_attach_args pba; printf("\n"); /* XXX */ *((volatile u_int32_t *)0xb4000c00) = (*((volatile u_int32_t *)0xb4000c00) & ~0x6) | 0x2; #if NPCI > 0 pba.pba_busname = "pci"; pba.pba_dmat = &pci_bus_dma_tag; pba.pba_dmat64 = NULL; pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED; pba.pba_bus = 0; pba.pba_bridgetag = NULL; pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED | PCI_FLAGS_MRL_OKAY | /*PCI_FLAGS_MRM_OKAY|*/ PCI_FLAGS_MWI_OKAY; config_found(self, &pba, gt_print); #endif return; } static int gt_print(aux, pnp) void *aux; const char *pnp; { /* XXX */ return 0; }