Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Pass bus_dma(9) tag to allow for porting sdhc(4) at acpi.



details:   https://anonhg.NetBSD.org/src/rev/ea6c436ff889
branches:  trunk
changeset: 346062:ea6c436ff889
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Tue Jun 21 11:33:32 2016 +0000

description:
Pass bus_dma(9) tag to allow for porting sdhc(4) at acpi.

diffstat:

 sys/arch/amd64/amd64/mainbus.c |   6 ++++--
 sys/arch/i386/i386/mainbus.c   |   6 ++++--
 sys/arch/ia64/ia64/mainbus.c   |   6 ++++--
 sys/arch/xen/xen/hypervisor.c  |  10 ++++++++--
 sys/dev/acpi/acpi.c            |  10 ++++++++--
 sys/dev/acpi/acpivar.h         |   8 +++++++-
 6 files changed, 35 insertions(+), 11 deletions(-)

diffs (193 lines):

diff -r eb988d3d7d64 -r ea6c436ff889 sys/arch/amd64/amd64/mainbus.c
--- a/sys/arch/amd64/amd64/mainbus.c    Tue Jun 21 10:25:27 2016 +0000
+++ b/sys/arch/amd64/amd64/mainbus.c    Tue Jun 21 11:33:32 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.36 2015/08/05 07:01:10 mrg Exp $ */
+/*     $NetBSD: mainbus.c,v 1.37 2016/06/21 11:33:32 nonaka Exp $      */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.36 2015/08/05 07:01:10 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.37 2016/06/21 11:33:32 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -248,6 +248,8 @@
                    PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
                    PCI_FLAGS_MWI_OKAY;
                mba.mba_acpi.aa_ic = &x86_isa_chipset;
+               mba.mba_acpi.aa_dmat = &pci_bus_dma_tag;
+               mba.mba_acpi.aa_dmat64 = &pci_bus_dma64_tag;
                config_found_ia(self, "acpibus", &mba.mba_acpi, 0);
        }
 #endif
diff -r eb988d3d7d64 -r ea6c436ff889 sys/arch/i386/i386/mainbus.c
--- a/sys/arch/i386/i386/mainbus.c      Tue Jun 21 10:25:27 2016 +0000
+++ b/sys/arch/i386/i386/mainbus.c      Tue Jun 21 11:33:32 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.101 2015/08/05 07:01:11 mrg Exp $        */
+/*     $NetBSD: mainbus.c,v 1.102 2016/06/21 11:33:32 nonaka Exp $     */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.101 2015/08/05 07:01:11 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.102 2016/06/21 11:33:32 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -345,6 +345,8 @@
                    PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
                    PCI_FLAGS_MWI_OKAY;
                mba.mba_acpi.aa_ic = &x86_isa_chipset;
+               mba.mba_acpi.aa_dmat = &pci_bus_dma_tag;
+               mba.mba_acpi.aa_dmat64 = NULL;
                sc->sc_acpi =
                    config_found_ia(self, "acpibus", &mba.mba_acpi, 0);
 #if 0 /* XXXJRT not yet */
diff -r eb988d3d7d64 -r ea6c436ff889 sys/arch/ia64/ia64/mainbus.c
--- a/sys/arch/ia64/ia64/mainbus.c      Tue Jun 21 10:25:27 2016 +0000
+++ b/sys/arch/ia64/ia64/mainbus.c      Tue Jun 21 11:33:32 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.9 2011/05/17 17:34:50 dyoung Exp $       */
+/*     $NetBSD: mainbus.c,v 1.10 2016/06/21 11:33:33 nonaka Exp $      */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.9 2011/05/17 17:34:50 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.10 2016/06/21 11:33:33 nonaka Exp $");
 
 #include "acpica.h"
 
@@ -124,6 +124,8 @@
            PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
            PCI_FLAGS_MWI_OKAY;
        aaa.aa_ic = 0;
+       aaa.aa_dmat = NULL;     /* XXX */
+       aaa.aa_dmat64 = NULL;   /* XXX */
        config_found_ia(self, "acpibus", &aaa, 0);
 #endif
 
diff -r eb988d3d7d64 -r ea6c436ff889 sys/arch/xen/xen/hypervisor.c
--- a/sys/arch/xen/xen/hypervisor.c     Tue Jun 21 10:25:27 2016 +0000
+++ b/sys/arch/xen/xen/hypervisor.c     Tue Jun 21 11:33:32 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.67 2016/06/12 09:08:09 jnemeth Exp $ */
+/* $NetBSD: hypervisor.c,v 1.68 2016/06/21 11:33:33 nonaka Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.67 2016/06/12 09:08:09 jnemeth Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.68 2016/06/21 11:33:33 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -307,6 +307,12 @@
                        PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
                        PCI_FLAGS_MWI_OKAY;
                hac.hac_acpi.aa_ic = &x86_isa_chipset;
+               hac.hac_acpi.aa_dmat = &pci_bus_dma_tag;
+#ifdef _LP64
+               hac.hac_acpi.aa_dmat64 = &pci_bus_dma64_tag;
+#else
+               hac.hac_acpi.aa_dmat64 = NULL;
+#endif /* _LP64 */
                config_found_ia(self, "acpibus", &hac.hac_acpi, 0);
        }
 #endif /* NACPICA */
diff -r eb988d3d7d64 -r ea6c436ff889 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Tue Jun 21 10:25:27 2016 +0000
+++ b/sys/dev/acpi/acpi.c       Tue Jun 21 11:33:32 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi.c,v 1.261 2015/10/02 05:22:52 msaitoh Exp $       */
+/*     $NetBSD: acpi.c,v 1.262 2016/06/21 11:33:33 nonaka Exp $        */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.261 2015/10/02 05:22:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.262 2016/06/21 11:33:33 nonaka Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -452,6 +452,8 @@
        sc->sc_pc = aa->aa_pc;
        sc->sc_pciflags = aa->aa_pciflags;
        sc->sc_ic = aa->aa_ic;
+       sc->sc_dmat = aa->aa_dmat;
+       sc->sc_dmat64 = aa->aa_dmat64;
 
        SIMPLEQ_INIT(&sc->ad_head);
 
@@ -863,6 +865,8 @@
                aa.aa_pc = sc->sc_pc;
                aa.aa_pciflags = sc->sc_pciflags;
                aa.aa_ic = sc->sc_ic;
+               aa.aa_dmat = sc->sc_dmat;
+               aa.aa_dmat64 = sc->sc_dmat64;
 
                ad->ad_device = config_found_ia(sc->sc_dev,
                    "acpinodebus", &aa, acpi_print);
@@ -927,6 +931,8 @@
                aa.aa_pc = sc->sc_pc;
                aa.aa_pciflags = sc->sc_pciflags;
                aa.aa_ic = sc->sc_ic;
+               aa.aa_dmat = sc->sc_dmat;
+               aa.aa_dmat64 = sc->sc_dmat64;
 
                ad->ad_device = config_found_ia(sc->sc_dev,
                    "acpinodebus", &aa, acpi_print);
diff -r eb988d3d7d64 -r ea6c436ff889 sys/dev/acpi/acpivar.h
--- a/sys/dev/acpi/acpivar.h    Tue Jun 21 10:25:27 2016 +0000
+++ b/sys/dev/acpi/acpivar.h    Tue Jun 21 11:33:32 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpivar.h,v 1.73 2011/08/01 11:25:59 jmcneill Exp $    */
+/*     $NetBSD: acpivar.h,v 1.74 2016/06/21 11:33:33 nonaka Exp $      */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -62,6 +62,8 @@
        pci_chipset_tag_t        aa_pc;         /* PCI chipset */
        int                      aa_pciflags;   /* PCI bus flags */
        isa_chipset_tag_t        aa_ic;         /* ISA chipset */
+       bus_dma_tag_t            aa_dmat;       /* PCI DMA tag */
+       bus_dma_tag_t            aa_dmat64;     /* PCI 64bit DMA tag */
 };
 
 /*
@@ -160,6 +162,8 @@
        int                      sc_pciflags;   /* PCI bus flags */
        int                      sc_pci_bus;    /* internal PCI fixup */
        isa_chipset_tag_t        sc_ic;         /* ISA chipset tag */
+       bus_dma_tag_t            sc_dmat;       /* PCI DMA tag */
+       bus_dma_tag_t            sc_dmat64;     /* PCI 64bit DMA tag */
 
        void                    *sc_sdhook;     /* shutdown hook */
 
@@ -185,6 +189,8 @@
        pci_chipset_tag_t aa_pc;        /* PCI chipset tag */
        int aa_pciflags;                /* PCI bus flags */
        isa_chipset_tag_t aa_ic;        /* ISA chipset */
+       bus_dma_tag_t aa_dmat;          /* PCI DMA tag */
+       bus_dma_tag_t aa_dmat64;        /* PCI 64bit DMA tag */
 };
 
 /*



Home | Main Index | Thread Index | Old Index