Sun Jul 26 17:54:46 2015 UTC ()
set HDAUDIO_FLAG_NO_STREAM_RESET quirk


(jmcneill)
diff -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_hdaudio.c

cvs diff -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_hdaudio.c (expand / switch to unified diff)

--- src/sys/arch/arm/nvidia/tegra_hdaudio.c 2015/05/10 11:04:59 1.3
+++ src/sys/arch/arm/nvidia/tegra_hdaudio.c 2015/07/26 17:54:46 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tegra_hdaudio.c,v 1.3 2015/05/10 11:04:59 jmcneill Exp $ */ 1/* $NetBSD: tegra_hdaudio.c,v 1.4 2015/07/26 17:54:46 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include "locators.h" 29#include "locators.h"
30 30
31#include <sys/cdefs.h> 31#include <sys/cdefs.h>
32__KERNEL_RCSID(0, "$NetBSD: tegra_hdaudio.c,v 1.3 2015/05/10 11:04:59 jmcneill Exp $"); 32__KERNEL_RCSID(0, "$NetBSD: tegra_hdaudio.c,v 1.4 2015/07/26 17:54:46 jmcneill Exp $");
33 33
34#include <sys/param.h> 34#include <sys/param.h>
35#include <sys/bus.h> 35#include <sys/bus.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/intr.h> 37#include <sys/intr.h>
38#include <sys/systm.h> 38#include <sys/systm.h>
39#include <sys/kernel.h> 39#include <sys/kernel.h>
40 40
41#include <dev/hdaudio/hdaudioreg.h> 41#include <dev/hdaudio/hdaudioreg.h>
42#include <dev/hdaudio/hdaudiovar.h> 42#include <dev/hdaudio/hdaudiovar.h>
43 43
44#include <arm/nvidia/tegra_var.h> 44#include <arm/nvidia/tegra_var.h>
45#include <arm/nvidia/tegra_pmcreg.h> 45#include <arm/nvidia/tegra_pmcreg.h>
@@ -87,26 +87,27 @@ tegra_hdaudio_attach(device_t parent, de @@ -87,26 +87,27 @@ tegra_hdaudio_attach(device_t parent, de
87 struct tegraio_attach_args * const tio = aux; 87 struct tegraio_attach_args * const tio = aux;
88 const struct tegra_locators * const loc = &tio->tio_loc; 88 const struct tegra_locators * const loc = &tio->tio_loc;
89 89
90 sc->sc_bst = tio->tio_bst; 90 sc->sc_bst = tio->tio_bst;
91 bus_space_subregion(tio->tio_bst, tio->tio_bsh, 91 bus_space_subregion(tio->tio_bst, tio->tio_bsh,
92 loc->loc_offset, loc->loc_size, &sc->sc_bsh); 92 loc->loc_offset, loc->loc_size, &sc->sc_bsh);
93 93
94 sc->sc.sc_memt = tio->tio_bst; 94 sc->sc.sc_memt = tio->tio_bst;
95 bus_space_subregion(tio->tio_bst, tio->tio_bsh, 95 bus_space_subregion(tio->tio_bst, tio->tio_bsh,
96 loc->loc_offset + TEGRA_HDAUDIO_OFFSET, 96 loc->loc_offset + TEGRA_HDAUDIO_OFFSET,
97 loc->loc_size - TEGRA_HDAUDIO_OFFSET, &sc->sc.sc_memh); 97 loc->loc_size - TEGRA_HDAUDIO_OFFSET, &sc->sc.sc_memh);
98 sc->sc.sc_memvalid = true; 98 sc->sc.sc_memvalid = true;
99 sc->sc.sc_dmat = tio->tio_dmat; 99 sc->sc.sc_dmat = tio->tio_dmat;
 100 sc->sc.sc_flags = HDAUDIO_FLAG_NO_STREAM_RESET;
100 101
101 aprint_naive("\n"); 102 aprint_naive("\n");
102 aprint_normal(": HDA\n"); 103 aprint_normal(": HDA\n");
103 104
104 sc->sc_ih = intr_establish(loc->loc_intr, IPL_AUDIO, IST_LEVEL, 105 sc->sc_ih = intr_establish(loc->loc_intr, IPL_AUDIO, IST_LEVEL,
105 tegra_hdaudio_intr, sc); 106 tegra_hdaudio_intr, sc);
106 if (sc->sc_ih == NULL) { 107 if (sc->sc_ih == NULL) {
107 aprint_error_dev(self, "couldn't establish interrupt %d\n", 108 aprint_error_dev(self, "couldn't establish interrupt %d\n",
108 loc->loc_intr); 109 loc->loc_intr);
109 return; 110 return;
110 } 111 }
111 aprint_normal_dev(self, "interrupting on irq %d\n", loc->loc_intr); 112 aprint_normal_dev(self, "interrupting on irq %d\n", loc->loc_intr);
112 113