Skip to content

Commit

Permalink
Merged PR 888: Bug 326: Watchdog and Kernel reset should boot to u-boot
Browse files Browse the repository at this point in the history
Bug 326: Watchdog and Kernel reset should boot to u-boot

Misconfiguration of UART baud-rate hides all u-boot messages.

Root Cause: u-boot expects UART clock to be 24MHz, but kernel sets it to
be 1.846 MHz. Hence the clock divisor derived by u-boot will be incorrect.

Solution: let kernel not change UART clock, and hard-code baud-rate in
DTS.

Change-Id: Ieaf01f9be3ac85244b456546ea16f24f8396cf00
Signed-off-by: Wei-Chung Wen <wei-chung.wen@foxconn.com>

Related work items: torvalds#326
  • Loading branch information
Wei-Chung Wen authored and yupalani committed Sep 8, 2017
2 parents 31c2fe1 + c7fcf03 commit 9364ff7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/aspeed-bmc-opp-g50.dts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

chosen {
stdout-path = &uart5;
bootargs = "console=ttyS4,38400 earlyprintk";
bootargs = "console=ttyS4,115200 earlyprintk";
};

memory {
Expand Down Expand Up @@ -68,6 +68,7 @@

&uart5 {
status = "okay";
current-speed = <115200>;
};

&i2c0{
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-aspeed/aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ static void __init do_sthelens_setup(void)

/* SCU config */
writel(0x10CC5E80, AST_IO(AST_BASE_SCU | 0x0c));
/* We enable the UART clock divisor in the SCU's misc control
* register, as the baud rates in aspeed.dtb all assume that the
* divisor is active
*/
reg = readl(AST_IO(AST_BASE_SCU | 0x2c));
writel(reg | 0x00001000, AST_IO(AST_BASE_SCU | 0x2c));

//Disable host SPI mode bit 12:13 = 00
writel(0xFA1C84D6, AST_IO(AST_BASE_SCU | 0x70));
Expand Down

0 comments on commit 9364ff7

Please sign in to comment.