diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-03-04 15:33:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-03-04 15:33:32 +0000 |
commit | 6a1b3e5dab2a0b2eba6cdbf0def4ab6f35e3222c (patch) | |
tree | fe93e04a6252db2f3163a4903b7c8a7a8de85b3b | |
parent | 68ba4bfb19a2adec8ca7ef3f4cc5a654b791f047 (diff) |
Invoke adb_cuda_autopoll() and leave polling mode after all initialization
commands are set; also add a delay between adb_intr_cuda() and adb_soft_intr()
while polling, as this seems to be necessary on some models;
ok gwk@ drahn@
-rw-r--r-- | sys/arch/macppc/dev/adb.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c index b8413c852e4..3ff42930cfc 100644 --- a/sys/arch/macppc/dev/adb.c +++ b/sys/arch/macppc/dev/adb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb.c,v 1.22 2007/02/26 00:11:49 gwk Exp $ */ +/* $OpenBSD: adb.c,v 1.23 2007/03/04 15:33:31 miod Exp $ */ /* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */ /* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */ @@ -646,6 +646,8 @@ send_adb_cuda(u_char * in, u_char * buffer, void *compRout, void *data, int || (adbWaiting == 1)) if (ADB_SR_INTR_IS_ON) { /* wait for "interrupt" */ adb_intr_cuda(); /* process it */ + if (cold) + delay(ADB_DELAY); adb_soft_intr(); } @@ -1725,10 +1727,6 @@ adbattach(struct device *parent, struct device *self, void *aux) (void)config_found(self, &aa_args, NULL); #endif - if (adbHardware == ADB_HW_CUDA) - adb_cuda_autopoll(); - adb_polling = 0; - /* Attach I2C controller. */ for (node = OF_child(ca->ca_node); node; node = OF_peer(node)) { if (OF_getprop(node, "name", name, sizeof name) <= 0) @@ -1744,4 +1742,8 @@ adbattach(struct device *parent, struct device *self, void *aux) adb_cuda_fileserver_mode(); if (adbHardware == ADB_HW_PMU) pmu_fileserver_mode(1); + + if (adbHardware == ADB_HW_CUDA) + adb_cuda_autopoll(); + adb_polling = 0; } |