From 323b3ac003095ce137c134125a20b18180ed4c95 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Aug 2017 17:25:07 -0500 Subject: Initialize GPIO bank A during U-Boot phase to prevent spurious operation of host --- board/aspeed/ast2050/ast2050.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/board/aspeed/ast2050/ast2050.c b/board/aspeed/ast2050/ast2050.c index efad86c..9d571b3 100644 --- a/board/aspeed/ast2050/ast2050.c +++ b/board/aspeed/ast2050/ast2050.c @@ -61,8 +61,11 @@ int board_init (void) reg &= 0xfeffffff; reg |= 0x02000000; *((volatile ulong*) (AST_GPIO_BASE+0x20)) = reg; - *((volatile ulong*) (AST_GPIO_BASE+0x04)) |= 0x00000010; *((volatile ulong*) (AST_GPIO_BASE+0x24)) |= 0x03000000; + if (!((*((volatile ulong*) (AST_GPIO_BASE+0x04))) & 0x00000010)) { + *((volatile ulong*) (AST_GPIO_BASE+0x00)) |= 0x00000010; + *((volatile ulong*) (AST_GPIO_BASE+0x04)) |= 0x00000010; + } #endif #ifndef CONFIG_AST2050 -- cgit v1.1