]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/bus/usb/serial/ftdi.c (real_config): Handle 1.5 stop bits.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 8 Jun 2012 18:40:40 +0000 (20:40 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 8 Jun 2012 18:40:40 +0000 (20:40 +0200)
(ftdi_hw_configure): Likewise.
* grub-core/bus/usb/serial/pl2303.c (GRUB_PL2303_STOP_BITS_1_5): New
define.
(real_config): Handle 1.5 stop bits.
(pl2303_hw_configure): Likewise.

ChangeLog
grub-core/bus/usb/serial/ftdi.c
grub-core/bus/usb/serial/pl2303.c

index e61937fb0f8d5250b6a931067981984e119e1466..ba6c2f54265ca6b225014b87f529020b8a25d77a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/bus/usb/serial/ftdi.c (real_config): Handle 1.5 stop bits.
+       (ftdi_hw_configure): Likewise.
+       * grub-core/bus/usb/serial/pl2303.c (GRUB_PL2303_STOP_BITS_1_5): New
+       define.
+       (real_config): Handle 1.5 stop bits.
+       (pl2303_hw_configure): Likewise.
+
 2012-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * Makefile.am: Add ppc linux bootcheck.
index cce26d9ebb0f810a37fce16f958e930f6fcb176f..15ea8fb8959a95ab42fbdab5334031efdf0e2556 100644 (file)
@@ -82,6 +82,7 @@ real_config (struct grub_serial_port *port)
   };
   const grub_uint16_t stop_bits[] = {
     [GRUB_SERIAL_STOP_BITS_1] = 0x0000,
+    [GRUB_SERIAL_STOP_BITS_1_5] = 0x0800,
     [GRUB_SERIAL_STOP_BITS_2] = 0x1000,
   };
 
@@ -148,6 +149,7 @@ ftdi_hw_configure (struct grub_serial_port *port,
                       N_("unsupported serial port parity"));
 
   if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
+      && config->stop_bits != GRUB_SERIAL_STOP_BITS_1_5
       && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT,
                       N_("unsupported serial port stop bits number"));
index f92172c1d08e89458d943424a3ac165261dac7f9..5433763e5fe20eeaf0d579c504f2719267e9bf4a 100644 (file)
@@ -42,6 +42,7 @@ is_speed_supported (unsigned int speed)
 
 #define GRUB_PL2303_REQUEST_SET_CONFIG 0x20
 #define GRUB_PL2303_STOP_BITS_1 0x0
+#define GRUB_PL2303_STOP_BITS_1_5 0x1
 #define GRUB_PL2303_STOP_BITS_2 0x2
 
 #define GRUB_PL2303_PARITY_NONE 0
@@ -97,6 +98,8 @@ real_config (struct grub_serial_port *port)
 
   if (port->config.stop_bits == GRUB_SERIAL_STOP_BITS_2)
     config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_2;
+  else if (port->config.stop_bits == GRUB_SERIAL_STOP_BITS_1_5)
+    config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_1_5;
   else
     config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_1;
 
@@ -161,6 +164,7 @@ pl2303_hw_configure (struct grub_serial_port *port,
                       N_("unsupported serial port parity"));
 
   if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
+      && config->stop_bits != GRUB_SERIAL_STOP_BITS_1_5
       && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
     return grub_error (GRUB_ERR_BAD_ARGUMENT,
                       N_("unsupported serial port stop bits number"));