Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc Make the audioamd assembler code compile again.
details: https://anonhg.NetBSD.org/src/rev/c8a1013da42e
branches: trunk
changeset: 485874:c8a1013da42e
user: mycroft <mycroft%NetBSD.org@localhost>
date: Mon May 08 03:09:54 2000 +0000
description:
Make the audioamd assembler code compile again.
diffstat:
sys/arch/sparc/dev/audioamd.c | 17 +------------
sys/arch/sparc/dev/audioamdvar.h | 45 ++++++++++++++++++++++++++++++++++++++
sys/arch/sparc/sparc/amd7930intr.s | 14 ++++++-----
sys/arch/sparc/sparc/genassym.cf | 9 +-----
4 files changed, 57 insertions(+), 28 deletions(-)
diffs (166 lines):
diff -r 3eed00d0afd8 -r c8a1013da42e sys/arch/sparc/dev/audioamd.c
--- a/sys/arch/sparc/dev/audioamd.c Mon May 08 02:44:31 2000 +0000
+++ b/sys/arch/sparc/dev/audioamd.c Mon May 08 03:09:54 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audioamd.c,v 1.2 2000/05/08 02:44:32 mycroft Exp $ */
+/* $NetBSD: audioamd.c,v 1.3 2000/05/08 03:09:56 mycroft Exp $ */
/* NetBSD: am7930_sparc.c,v 1.44 1999/03/14 22:29:00 jonathan Exp */
/*
@@ -48,6 +48,7 @@
#include <dev/ic/am7930reg.h>
#include <dev/ic/am7930var.h>
+#include <sparc/dev/audioamdvar.h>
#define AUDIO_ROM_NAME "audio"
@@ -79,20 +80,6 @@
int am7930swintr __P((void *));
/*
- * pdma state
- */
-struct auio {
- bus_space_tag_t au_bt; /* bus tag */
- bus_space_handle_t au_bh; /* handle to chip registers */
-
- u_int8_t *au_rdata; /* record data */
- u_int8_t *au_rend; /* end of record data */
- u_int8_t *au_pdata; /* play data */
- u_int8_t *au_pend; /* end of play data */
- struct evcnt au_intrcnt; /* statistics */
-};
-
-/*
* interrupt-handler status
*/
struct am7930_intrhand {
diff -r 3eed00d0afd8 -r c8a1013da42e sys/arch/sparc/dev/audioamdvar.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sparc/dev/audioamdvar.h Mon May 08 03:09:54 2000 +0000
@@ -0,0 +1,45 @@
+$NetBSD: audioamdvar.h,v 1.1 2000/05/08 03:09:56 mycroft Exp $
+
+/*
+ * Copyright (c) 1995 Rolf Grossmann
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Rolf Grossmann.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
+ */
+
+/*
+ * pdma state
+ */
+struct auio {
+ bus_space_tag_t au_bt; /* bus tag */
+ bus_space_handle_t au_bh; /* handle to chip registers */
+
+ u_int8_t *au_rdata; /* record data */
+ u_int8_t *au_rend; /* end of record data */
+ u_int8_t *au_pdata; /* play data */
+ u_int8_t *au_pend; /* end of play data */
+ struct evcnt au_intrcnt; /* statistics */
+};
diff -r 3eed00d0afd8 -r c8a1013da42e sys/arch/sparc/sparc/amd7930intr.s
--- a/sys/arch/sparc/sparc/amd7930intr.s Mon May 08 02:44:31 2000 +0000
+++ b/sys/arch/sparc/sparc/amd7930intr.s Mon May 08 03:09:54 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amd7930intr.s,v 1.16 1999/03/24 05:51:10 mrg Exp $ */
+/* $NetBSD: amd7930intr.s,v 1.17 2000/05/08 03:09:54 mycroft Exp $ */
/*
* Copyright (c) 1995 Rolf Grossmann.
* Copyright (c) 1992, 1993
@@ -50,6 +50,7 @@
#include <machine/asm.h>
#include <sparc/sparc/intreg.h>
#include <machine/psl.h>
+#include <dev/ic/am7930reg.h>
#define AUDIO_SET_SWINTR_4C \
sethi %hi(INTRREG_VA), %l5; \
@@ -111,7 +112,7 @@
st %l6, [%l7 + AU_EVCNT]
ld [%l7 + AU_BH], R_amd
- ldub [R_amd + AMD_IR], %g0 ! clear interrupt
+ ldub [R_amd + AM7930_DREG_IR], %g0 ! clear interrupt
! receive incoming data
ld [%l7 + AU_RDATA], R_data
@@ -123,8 +124,9 @@
bgu 1f
nop
- ldub [R_amd + AMD_BBRB], %l6 ! *d = amd->bbrb
- stb %l6, [ R_data ]
+ ldub [R_amd + AM7930_DREG_BBRB], %l6 ! *d = amd->bbrb
+ stb %l6, [R_data]
+
cmp R_data, R_end
inc R_data ! au->au_rdata++
bne 1f ! if (d == e)
@@ -143,8 +145,8 @@
bgu 2f
nop
- ldub [ R_data ], %l6 ! amd->bbtb = *d
- stb %l6, [ R_amd + AMD_BBTB ]
+ ldub [R_data], %l6 ! amd->bbtb = *d
+ stb %l6, [R_amd + AM7930_DREG_BBTB]
cmp R_data, R_end
inc R_data ! au->au_pdata++
diff -r 3eed00d0afd8 -r c8a1013da42e sys/arch/sparc/sparc/genassym.cf
--- a/sys/arch/sparc/sparc/genassym.cf Mon May 08 02:44:31 2000 +0000
+++ b/sys/arch/sparc/sparc/genassym.cf Mon May 08 03:09:54 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.25 2000/04/30 21:29:16 pk Exp $
+# $NetBSD: genassym.cf,v 1.26 2000/05/08 03:09:55 mycroft Exp $
#
# Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -108,8 +108,7 @@
endif
include <machine/bus.h>
-include <dev/ic/am7930reg.h>
-include <dev/ic/am7930var.h>
+include <sparc/dev/audioamdvar.h>
include <sparc/dev/fdreg.h>
include <sparc/dev/fdvar.h>
@@ -215,10 +214,6 @@
define AU_PEND offsetof(struct auio, au_pend)
define AU_EVCNT offsetof(struct auio, au_intrcnt.ev_count)
-define AMD_IR offsetof(struct am7930, ir)
-define AMD_BBRB offsetof(struct am7930, bbrb)
-define AMD_BBTB offsetof(struct am7930, bbtb)
-
define PROM_BASE PROM_BASE
define PV_MAGIC offsetof(struct promvec, pv_magic)
Home |
Main Index |
Thread Index |
Old Index