Store the current baudrate in struct xuartps.
This data is used in some parts of the driver
but was never initialized correctly.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
u32 cd, bdiv;
u32 mreg;
int div8;
+ struct xuartps *xuartps = port->private_data;
calc_baud = xuartps_calc_baud_divs(port->uartclk, baud, &bdiv, &cd,
&div8);
xuartps_writel(mreg, XUARTPS_MR_OFFSET);
xuartps_writel(cd, XUARTPS_BAUDGEN_OFFSET);
xuartps_writel(bdiv, XUARTPS_BAUDDIV_OFFSET);
+ xuartps->baud = baud;
return calc_baud;
}