/* set up the GDB stub serial port baud rate timers  */
void gdbstub_io_set_baud(unsigned baud)
/* set up the GDB stub serial port baud rate timers  */
void gdbstub_io_set_baud(unsigned baud)
{
	unsigned value;
	u8 lcr;
	value = 18432000 / 16 / baud;
	lcr = GDBPORT_SERIAL_LCR;
	GDBPORT_SERIAL_LCR |= UART_LCR_DLAB;
	GDBPORT_SERIAL_DLL = value & 0xff;
	GDBPORT_SERIAL_DLM = (value >> 8) & 0xff;
	GDBPORT_SERIAL_LCR = lcr;
}