r3410 - trunk/src/host/qemu-neo1973/hw

andrew at sita.openmoko.org andrew at sita.openmoko.org
Wed Nov 14 00:02:50 CET 2007


Author: andrew
Date: 2007-11-14 00:02:49 +0100 (Wed, 14 Nov 2007)
New Revision: 3410

Modified:
   trunk/src/host/qemu-neo1973/hw/ads7846.c
   trunk/src/host/qemu-neo1973/hw/usb-bt.c
   trunk/src/host/qemu-neo1973/hw/usb-ohci.c
Log:
Don't error on ACL and SCO endpoint iso transfers from Bluetooth dongle.
Fix signed/unsigned comparisons in OHCI host.
ADS7846 is partially compatible with TSC2046.


Modified: trunk/src/host/qemu-neo1973/hw/ads7846.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/ads7846.c	2007-11-13 19:42:01 UTC (rev 3409)
+++ trunk/src/host/qemu-neo1973/hw/ads7846.c	2007-11-13 23:02:49 UTC (rev 3410)
@@ -1,5 +1,5 @@
 /*
- * TI ADS7846 chip emulation.
+ * TI ADS7846 / TSC2046 chip emulation.
  *
  * Copyright (c) 2006 Openedhand Ltd.
  * Written by Andrzej Zaborowski <balrog at zabor.org>

Modified: trunk/src/host/qemu-neo1973/hw/usb-bt.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/usb-bt.c	2007-11-13 19:42:01 UTC (rev 3409)
+++ trunk/src/host/qemu-neo1973/hw/usb-bt.c	2007-11-13 23:02:49 UTC (rev 3410)
@@ -442,6 +442,11 @@
             ret = usb_bt_event_dequeue(s, p);
             break;
 
+        case USB_ACL_EP:
+        case USB_SCO_EP:
+            /* FIXME */
+            break;
+
         default:
             goto fail;
         }

Modified: trunk/src/host/qemu-neo1973/hw/usb-ohci.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/usb-ohci.c	2007-11-13 19:42:01 UTC (rev 3409)
+++ trunk/src/host/qemu-neo1973/hw/usb-ohci.c	2007-11-13 23:02:49 UTC (rev 3410)
@@ -739,7 +739,7 @@
                     OHCI_CC_NOERROR);
         OHCI_SET_BM(iso_td.offset[relative_frame_number], TD_PSW_SIZE, 0);
     } else {
-        if (ret > len) {
+        if (ret > (ssize_t) len) {
             printf("usb-ohci: DataOverrun %d > %zu\n", ret, len);
             OHCI_SET_BM(iso_td.offset[relative_frame_number], TD_PSW_CC,
                         OHCI_CC_DATAOVERRUN);
@@ -865,7 +865,7 @@
     dprintf(" TD @ 0x%.8x %u bytes %s r=%d cbp=0x%.8x be=0x%.8x\n",
             addr, len, str, flag_r, td.cbp, td.be);
 
-    if (len >= 0 && dir != OHCI_TD_DIR_IN) {
+    if (len > 0 && dir != OHCI_TD_DIR_IN) {
         dprintf("  data:");
         for (i = 0; i < len; i++)
             printf(" %.2x", ohci->usb_buf[i]);
@@ -1062,7 +1062,8 @@
 {
     if ((ohci->ctl & OHCI_CTL_CLE) && (ohci->status & OHCI_STATUS_CLF)) {
         if (ohci->ctrl_cur && ohci->ctrl_cur != ohci->ctrl_head)
-          dprintf("usb-ohci: head %x, cur %x\n", ohci->ctrl_head, ohci->ctrl_cur);
+          dprintf("usb-ohci: head %x, cur %x\n",
+                          ohci->ctrl_head, ohci->ctrl_cur);
         if (!ohci_service_ed_list(ohci, ohci->ctrl_head, completion)) {
             ohci->ctrl_cur = 0;
             ohci->status &= ~OHCI_STATUS_CLF;





More information about the commitlog mailing list