* 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.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-08 20:40:40 +02:00
parent 7183452c00
commit c8ca585593
3 changed files with 15 additions and 0 deletions

View file

@ -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> 2012-06-08 Vladimir Serbinenko <phcoder@gmail.com>
* Makefile.am: Add ppc linux bootcheck. * Makefile.am: Add ppc linux bootcheck.

View file

@ -82,6 +82,7 @@ real_config (struct grub_serial_port *port)
}; };
const grub_uint16_t stop_bits[] = { const grub_uint16_t stop_bits[] = {
[GRUB_SERIAL_STOP_BITS_1] = 0x0000, [GRUB_SERIAL_STOP_BITS_1] = 0x0000,
[GRUB_SERIAL_STOP_BITS_1_5] = 0x0800,
[GRUB_SERIAL_STOP_BITS_2] = 0x1000, [GRUB_SERIAL_STOP_BITS_2] = 0x1000,
}; };
@ -148,6 +149,7 @@ ftdi_hw_configure (struct grub_serial_port *port,
N_("unsupported serial port parity")); N_("unsupported serial port parity"));
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1 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) && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
return grub_error (GRUB_ERR_BAD_ARGUMENT, return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port stop bits number")); N_("unsupported serial port stop bits number"));

View file

@ -42,6 +42,7 @@ is_speed_supported (unsigned int speed)
#define GRUB_PL2303_REQUEST_SET_CONFIG 0x20 #define GRUB_PL2303_REQUEST_SET_CONFIG 0x20
#define GRUB_PL2303_STOP_BITS_1 0x0 #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_STOP_BITS_2 0x2
#define GRUB_PL2303_PARITY_NONE 0 #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) if (port->config.stop_bits == GRUB_SERIAL_STOP_BITS_2)
config_pl2303.stop_bits = GRUB_PL2303_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 else
config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_1; 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")); N_("unsupported serial port parity"));
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1 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) && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
return grub_error (GRUB_ERR_BAD_ARGUMENT, return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port stop bits number")); N_("unsupported serial port stop bits number"));