patch-2.1.129 linux/drivers/macintosh/via-cuda.c
Next file: linux/drivers/macintosh/via-pmu.c
Previous file: linux/drivers/macintosh/mediabay.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Sun Nov 15 10:51:47 1998
- Orig file:
v2.1.128/linux/drivers/macintosh/via-cuda.c
- Orig date:
Sun Jun 7 11:16:31 1998
diff -u --recursive --new-file v2.1.128/linux/drivers/macintosh/via-cuda.c linux/drivers/macintosh/via-cuda.c
@@ -80,7 +80,8 @@
static void via_interrupt(int irq, void *arg, struct pt_regs *regs);
static void cuda_input(unsigned char *buf, int nb, struct pt_regs *regs);
static int cuda_adb_send_request(struct adb_request *req, int sync);
-static int cuda_adb_autopoll(int on);
+static int cuda_adb_autopoll(int devs);
+static int cuda_reset_bus(void);
__openfirmware
@@ -141,6 +142,7 @@
/* Set function pointers */
adb_send_request = cuda_adb_send_request;
adb_autopoll = cuda_adb_autopoll;
+ adb_reset_bus = cuda_reset_bus;
}
#define WAIT_FOR(cond, what) \
@@ -216,11 +218,23 @@
/* Enable/disable autopolling */
static int
-cuda_adb_autopoll(int on)
+cuda_adb_autopoll(int devs)
{
struct adb_request req;
- cuda_request(&req, NULL, 3, CUDA_PACKET, CUDA_AUTOPOLL, on);
+ cuda_request(&req, NULL, 3, CUDA_PACKET, CUDA_AUTOPOLL, (devs? 1: 0));
+ while (!req.complete)
+ cuda_poll();
+ return 0;
+}
+
+/* Reset adb bus - how do we do this?? */
+static int
+cuda_reset_bus(void)
+{
+ struct adb_request req;
+
+ cuda_request(&req, NULL, 2, ADB_PACKET, 0); /* maybe? */
while (!req.complete)
cuda_poll();
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov