Convert CONFIG_SYS_FSL_SEC_MON et al to Kconfig
[platform/kernel/u-boot.git] / common / xyzModem.c
index 631c44e..ece25ac 100644 (file)
@@ -32,6 +32,7 @@
 /* Values magic to the protocol */
 #define SOH 0x01
 #define STX 0x02
+#define ETX 0x03               /* ^C for interrupt */
 #define EOT 0x04
 #define ACK 0x06
 #define BSP 0x08
@@ -283,6 +284,7 @@ xyzModem_get_hdr (void)
              hdr_found = true;
              break;
            case CAN:
+           case ETX:
              xyz.total_CAN++;
              ZM_DEBUG (zm_dump (__LINE__));
              if (++can_total == xyzModem_CAN_COUNT)
@@ -608,10 +610,10 @@ xyzModem_stream_read (char *buf, int size, int *err)
 void
 xyzModem_stream_close (int *err)
 {
-  diag_printf
+  ZM_DEBUG (zm_dprintf
     ("xyzModem - %s mode, %d(SOH)/%d(STX)/%d(CAN) packets, %d retries\n",
      xyz.crc_mode ? "CRC" : "Cksum", xyz.total_SOH, xyz.total_STX,
-     xyz.total_CAN, xyz.total_retries);
+     xyz.total_CAN, xyz.total_retries));
   ZM_DEBUG (zm_flush ());
 }