diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2017-08-26 17:25:07 -0500 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2017-08-26 17:25:07 -0500 |
commit | 323b3ac003095ce137c134125a20b18180ed4c95 (patch) | |
tree | f61e8702b39c976180622711e2306fa8d705d499 | |
parent | 0223e595f4033e91e93403a7317bcc9e47676b8f (diff) | |
download | ast2050-uboot-323b3ac003095ce137c134125a20b18180ed4c95.zip ast2050-uboot-323b3ac003095ce137c134125a20b18180ed4c95.tar.gz |
Initialize GPIO bank A during U-Boot phase to prevent spurious operation of host
-rw-r--r-- | board/aspeed/ast2050/ast2050.c | 5 |
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 |