Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/mac68k/dev Pull up rev 1.14 from scottr:
details: https://anonhg.NetBSD.org/src/rev/fde83f2d344d
branches: netbsd-1-5
changeset: 489513:fde83f2d344d
user: scottr <scottr%NetBSD.org@localhost>
date: Thu Sep 21 13:06:32 2000 +0000
description:
Pull up rev 1.14 from scottr:
Stabilize ADB support for some non-Apple ADB peripherals.
diffstat:
sys/arch/mac68k/dev/pm_direct.c | 44 +++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diffs (80 lines):
diff -r b52bb2375298 -r fde83f2d344d sys/arch/mac68k/dev/pm_direct.c
--- a/sys/arch/mac68k/dev/pm_direct.c Thu Sep 21 13:05:42 2000 +0000
+++ b/sys/arch/mac68k/dev/pm_direct.c Thu Sep 21 13:06:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pm_direct.c,v 1.13 2000/04/05 07:29:18 scottr Exp $ */
+/* $NetBSD: pm_direct.c,v 1.13.4.1 2000/09/21 13:06:32 scottr Exp $ */
/*
* Copyright (C) 1997 Takashi Hamada
@@ -385,9 +385,9 @@
* Send data to PM for the PB1XX series
*/
int
-pm_send_pm1(data, delay)
+pm_send_pm1(data, timo)
u_char data;
- int delay;
+ int timo;
{
int rval;
@@ -395,18 +395,20 @@
via_reg(VIA2, 0x200) = data;
PM_SET_STATE_ACKOFF();
- if (pm_wait_busy(0x400) != 0) {
+#if 0
+ if (pm_wait_busy(0x400) == 0) {
+#else
+ if (pm_wait_busy(timo) == 0) {
+#endif
PM_SET_STATE_ACKON();
- via_reg(VIA2, vDirA) = 0x00;
-
- return 0xffffcd36;
+ if (pm_wait_free(0x40) != 0)
+ rval = 0x0;
+ else
+ rval = 0xffffcd35;
+ } else {
+ rval = 0xffffcd36;
}
- rval = 0x0;
- PM_SET_STATE_ACKON();
- if (pm_wait_free(0x40) == 0)
- rval = 0xffffcd35;
-
PM_SET_STATE_ACKON();
via_reg(VIA2, vDirA) = 0x00;
@@ -668,21 +670,17 @@
PM_SR() = data;
PM_SET_STATE_ACKOFF();
- rval = 0xffffcd36;
- if (pm_wait_busy((int)ADBDelay*32) != 0) {
+ if (pm_wait_busy((int)ADBDelay*32) == 0) {
PM_SET_STATE_ACKON();
-
- via_reg(VIA1, vACR) |= 0x1c;
-
- return rval;
+ if (pm_wait_free((int)ADBDelay*32) != 0)
+ rval = 0;
+ else
+ rval = 0xffffcd35;
+ } else {
+ rval = 0xffffcd36;
}
PM_SET_STATE_ACKON();
- rval = 0xffffcd35;
- if (pm_wait_free((int)ADBDelay*32) != 0)
- rval = 0;
-
- PM_SET_STATE_ACKON();
via_reg(VIA1, vACR) |= 0x1c;
return rval;
Home |
Main Index |
Thread Index |
Old Index