mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
g: fix pinmux command implementation
The output of pinmux command is garbled (it probably was OK until the console UART TX buffer was significantly reduced in size by https://chromium-review.googlesource.com/418948). Let's flush the console every so often. Also, fixed the bug where the second GPIO port base address in PIMUX was off, and added a newline to separate UART section of the output. BRANCH=none BUG=none TEST=ran pinmux command successfully. make -j buildall passes Change-Id: Iae0dcbbd0a55d704ffe2296d6e0e81b2c6aec527 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/436765 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
d536724cf5
commit
b73ca808be
@@ -365,6 +365,7 @@ static void show_pinmux(const char *name, int i, int ofs)
|
||||
ccprintf("%s", edge ? "RISING" : "HIGH");
|
||||
}
|
||||
ccprintf("\n");
|
||||
cflush();
|
||||
}
|
||||
|
||||
static void print_dio_str(uint32_t sel)
|
||||
@@ -379,6 +380,7 @@ static void print_dio_str(uint32_t sel)
|
||||
ccprintf(" DIOM%d\n", 30 - sel);
|
||||
else
|
||||
ccprintf("\n");
|
||||
cflush();
|
||||
}
|
||||
|
||||
static void show_pinmux_gpio(const char *name, int i, int ofs)
|
||||
@@ -428,11 +430,12 @@ static int command_pinmux(int argc, char **argv)
|
||||
for (i = 0; i <= 15; i++)
|
||||
show_pinmux_gpio("GPIO0_GPIO", i, 0xf8);
|
||||
for (i = 0; i <= 15; i++)
|
||||
show_pinmux_gpio("GPIO1_GPIO", i, 0x134);
|
||||
show_pinmux_gpio("GPIO1_GPIO", i, 0x138);
|
||||
|
||||
for (i = 0; i <= 11; i++)
|
||||
show_pinmux_uart(i);
|
||||
|
||||
ccprintf("\n");
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
DECLARE_SAFE_CONSOLE_COMMAND(pinmux, command_pinmux,
|
||||
|
||||
Reference in New Issue
Block a user