summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2017-08-26 17:25:07 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2017-08-26 17:25:07 -0500
commit323b3ac003095ce137c134125a20b18180ed4c95 (patch)
treef61e8702b39c976180622711e2306fa8d705d499 /board
parent0223e595f4033e91e93403a7317bcc9e47676b8f (diff)
downloadast2050-uboot-323b3ac003095ce137c134125a20b18180ed4c95.zip
ast2050-uboot-323b3ac003095ce137c134125a20b18180ed4c95.tar.gz
Initialize GPIO bank A during U-Boot phase to prevent spurious operation of host
Diffstat (limited to 'board')
-rw-r--r--board/aspeed/ast2050/ast2050.c5
1 files changed, 4 insertions, 1 deletions
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
OpenPOWER on IntegriCloud