mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
it8380dev: To config register 'GCR' in gpio_pre_init()
The double-mapping modules(CIR, BRAM, SSPI, PECI, and UART) won't work if GPD2 pin's status is low and GCR register's setting is at default. We move 'IT83XX_GPIO_GCR = 0x06;' to 'gpio_pre_init()' to prevent this case. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=1. Register 'GCR'=0x6 after init. 2. GPD2 is low and UART works. Change-Id: I71b4436ab6c2a8f9e77e0d6f5116e5327a3167e7 Reviewed-on: https://chromium-review.googlesource.com/318131 Commit-Ready: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -395,6 +395,8 @@ void gpio_pre_init(void)
|
||||
int flags;
|
||||
int i;
|
||||
|
||||
IT83XX_GPIO_GCR = 0x06;
|
||||
|
||||
for (i = 0; i < GPIO_COUNT; i++, g++) {
|
||||
flags = g->flags;
|
||||
|
||||
|
||||
@@ -572,8 +572,6 @@ static void lpc_init(void)
|
||||
*/
|
||||
IT83XX_GCTRL_MCCR2 |= 0x10;
|
||||
|
||||
IT83XX_GPIO_GCR = 0x06;
|
||||
|
||||
/* The register pair to access PNPCFG is 004Eh and 004Fh */
|
||||
IT83XX_GCTRL_BADRSEL = 0x01;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user