Skip to contentSkip to conversation

S3C24XX: Fix console baud rate guessing

PATCH RESEND New Domenico Andreoli 1 participant 1 message Nov 21, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 S3C24XX: Fix console baud rate guessing

From: Domenico Andreoli <[email protected]>

Between v3.2 and v3.3 my S3C2440 board started to print garbage on the console during boot. I nailed the problem down to the default UCON clock selection, which with this commit has been switched from UCLK to PCLK.

commit c3310fbbeb9db6967900ed22eb3d0bd0bb0e892c

Author: Thomas Abraham <[email protected]>
Date:   Mon Oct 24 11:47:57 2011 +0200

serial: samsung: remove all uses of get_clksrc and set_clksrc

With clkdev based clock lookup support, the clock set and get operation using clock names communicated between the samsung uart driver and the SoC specific extension can be removed.

In addition to that, for each platform specific extension, add the default clock selection, number of clock options for uart baud generator, clock selection bit mask and shift values which is required by the clkdev support in samsung uart driver.

The default clock selection value 'def_clk_sel' specifies the default clock to be used as the source clock for baud rate generator in case the platform code does not specify the same.

To restore previous functionality, usable console with no UCON nor baud rate specified, I had to change the default UCON clock back to UCLK.

---
 samsung.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/samsung.c +1 -1
index 7f04717..316b703 100644
@@ -1572,7 +1572,7 @@ static struct s3c24xx_serial_drv_data s3c2440_serial_drv_data = {
 		.tx_fifofull	= S3C2440_UFSTAT_TXFULL,
 		.tx_fifomask	= S3C2440_UFSTAT_TXMASK,
 		.tx_fifoshift	= S3C2440_UFSTAT_TXSHIFT,
-		.def_clk_sel	= S3C2410_UCON_CLKSEL2,
+		.def_clk_sel	= S3C2410_UCON_CLKSEL1,
 		.num_clks	= 4,
 		.clksel_mask	= S3C2412_UCON_CLKMASK,
 		.clksel_shift	= S3C2412_UCON_CLKSHIFT,