diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-10-18 03:49:17 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-10-18 03:49:17 +0000 |
commit | 7b196a4b181a7da1fb3e06fbd0185a9be6e4c43b (patch) | |
tree | 1865c106f4e338443558f3ad7b1e8f633d641ca5 /sys | |
parent | ce098d042bd11bd6fa88e9e9f27688027d017fa0 (diff) |
Remove some very pointless 'if 0' code, some of which prevented compilation
with gcc3.2, and add a ';' for a case statement as it requests.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/dev/adb_direct.c | 35 | ||||
-rw-r--r-- | sys/arch/macppc/dev/pm_direct.c | 43 |
2 files changed, 3 insertions, 75 deletions
diff --git a/sys/arch/macppc/dev/adb_direct.c b/sys/arch/macppc/dev/adb_direct.c index 12f15323b88..1ea12cba65f 100644 --- a/sys/arch/macppc/dev/adb_direct.c +++ b/sys/arch/macppc/dev/adb_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb_direct.c,v 1.7 2002/09/15 09:01:58 deraadt Exp $ */ +/* $OpenBSD: adb_direct.c,v 1.8 2002/10/18 03:49:16 drahn Exp $ */ /* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */ /* @@ -510,6 +510,7 @@ switch_start: break; default: + ; #ifdef ADB_DEBUG if (adb_debug) printf_intr("intr: unknown ADB state\n"); @@ -773,12 +774,6 @@ adb_soft_intr(void) u_char *comprout = 0; u_char *compdata = 0; -#if 0 - s = splhigh(); - printf_intr("sr: %x\n", (s & 0x0700)); - splx(s); -#endif - /*delay(2*ADB_DELAY);*/ while (adbInCount) { @@ -816,32 +811,6 @@ adb_soft_intr(void) if (comprout) { ((int (*)(u_char *, u_char *, int)) comprout) (buffer, compdata, cmd); -#if 0 -#ifdef __NetBSD__ - asm(" movml #0xffff,sp@- | save all registers - movl %0,a2 | compdata - movl %1,a1 | comprout - movl %2,a0 | buffer - movl %3,d0 | cmd - jbsr a1@ | go call the routine - movml sp@+,#0xffff | restore all registers" - : - : "g"(compdata), "g"(comprout), - "g"(buffer), "g"(cmd) - : "d0", "a0", "a1", "a2"); -#else /* for macos based testing */ - asm - { - movem.l a0/a1/a2/d0, -(a7) - move.l compdata, a2 - move.l comprout, a1 - move.l buffer, a0 - move.w cmd, d0 - jsr(a1) - movem.l(a7)+, d0/a2/a1/a0 - } -#endif -#endif } s = splhigh(); diff --git a/sys/arch/macppc/dev/pm_direct.c b/sys/arch/macppc/dev/pm_direct.c index aa08d05c046..f40b5c7a101 100644 --- a/sys/arch/macppc/dev/pm_direct.c +++ b/sys/arch/macppc/dev/pm_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pm_direct.c,v 1.8 2002/06/18 04:31:40 itojun Exp $ */ +/* $OpenBSD: pm_direct.c,v 1.9 2002/10/18 03:49:16 drahn Exp $ */ /* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */ /* @@ -206,12 +206,6 @@ struct adbCommand { }; extern void adb_pass_up(struct adbCommand *); -#if 0 -/* - * Define the external functions - */ -extern int zshard(int); /* from zs.c */ -#endif #ifdef ADB_DEBUG /* @@ -268,12 +262,8 @@ pm_wait_busy(delay) { while (PM_IS_ON) { #ifdef PM_GRAB_SI -#if 0 - zshard(0); /* grab any serial interrupts */ -#else (void)intr_dispatch(0x70); #endif -#endif if ((--delay) < 0) return 1; /* timeout */ } @@ -290,12 +280,8 @@ pm_wait_free(delay) { while (PM_IS_OFF) { #ifdef PM_GRAB_SI -#if 0 - zshard(0); /* grab any serial interrupts */ -#else (void)intr_dispatch(0x70); #endif -#endif if ((--delay) < 0) return 0; /* timeout */ } @@ -542,29 +528,6 @@ pm_intr_pm2() } -#if 0 -/* - * MRG-based PMgrOp routine - */ -int -pm_pmgrop_mrg(pmdata) - PMData *pmdata; -{ - u_int32_t rval=0; - - asm(" - movl %1, a0 - .word 0xa085 - movl d0, %0" - : "=g" (rval) - : "g" (pmdata) - : "a0", "d0" ); - - return rval; -} -#endif - - /* * My PMgrOp routine */ @@ -686,12 +649,8 @@ pm_adb_op(buffer, compRout, data, command) if (read_via_reg(VIA1, vIFR) != 0) pm_intr(); #ifdef PM_GRAB_SI -#if 0 - zshard(0); /* grab any serial interrupts */ -#else (void)intr_dispatch(0x70); #endif -#endif if ((--ndelay) < 0) { splx(s); return 1; |