From 719793af4ba203e09efd6c7816dca1128d53d58d Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Mon, 8 Aug 2016 14:55:41 +0930 Subject: [PATCH] arm/aspeed: Reset AHB on boot The Aspeed u-boot port from the Aspeed SDK performed I2C initialisation. Part of this appears to require a AHB reset in order to successfully access the I2C registers. So we can boot the stable kernels on systems with new u-boot we add this to the stable kernel tree. Signed-off-by: Joel Stanley --- arch/arm/mach-aspeed/aspeed.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-aspeed/aspeed.c b/arch/arm/mach-aspeed/aspeed.c index fadbbb666e1d7..1102b896cab0e 100755 --- a/arch/arm/mach-aspeed/aspeed.c +++ b/arch/arm/mach-aspeed/aspeed.c @@ -200,9 +200,14 @@ static void __init aspeed_init_early(void) { u32 reg; + /* Unlock SCU */ + writel(SCU_PASSWORD, AST_IO(AST_BASE_SCU)); + + /* Reset AHB bridges */ + writel(0x02, AST_IO(AST_BASE_SCU | 0x04)); + // XXX UART stuff to fix to pinmux & co writel(0x02010023, AST_IO(AST_BASE_LPC | 0x9c)); - writel(SCU_PASSWORD, AST_IO(AST_BASE_SCU)); // UNLOCK SCU writel(0xcb000000, AST_IO(AST_BASE_SCU | 0x80)); writel(0x00fff0c0, AST_IO(AST_BASE_SCU | 0x84)); writel(0x10CC5E80, AST_IO(AST_BASE_SCU | 0x0c));