tegra132: use padconfig for initializing uart pads
Start using the soc_configure_pads() API. This allows for bulk processing of pads. BUG=chrome-os-partner:31105 BUG=chrome-os-partner:31104 BUG=chrome-os-partner:29981 BRANCH=None TEST=Built and can get console messages on rush. Change-Id: Iaa6a6ff4d559aedb98b078e87b0ecddefd3402d6 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210834 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
9329c17bba
commit
bbd7c81bc0
1 changed files with 15 additions and 12 deletions
|
|
@ -23,12 +23,26 @@
|
|||
#include <cbfs.h>
|
||||
#include <console/console.h>
|
||||
#include <soc/clock.h>
|
||||
#include <soc/padconfig.h>
|
||||
#include <soc/nvidia/tegra/apbmisc.h>
|
||||
#include <arch/stages.h>
|
||||
|
||||
#include "pinmux.h"
|
||||
#include "power.h"
|
||||
|
||||
static const struct pad_config uart_console_pads[] = {
|
||||
/* Hard coded pad usage for UARTA. */
|
||||
PAD_CFG_SFIO(KB_ROW9, 0, UA3),
|
||||
PAD_CFG_SFIO(KB_ROW10, PINMUX_INPUT_ENABLE | PINMUX_PULL_UP, UA3),
|
||||
/*
|
||||
* Disable UART2 pads as they are default connected to UARTA controller.
|
||||
*/
|
||||
PAD_CFG_UNUSED(UART2_RXD),
|
||||
PAD_CFG_UNUSED(UART2_TXD),
|
||||
PAD_CFG_UNUSED(UART2_RTS_N),
|
||||
PAD_CFG_UNUSED(UART2_CTS_N),
|
||||
};
|
||||
|
||||
void main(void)
|
||||
{
|
||||
void *entry;
|
||||
|
|
@ -41,18 +55,7 @@ void main(void)
|
|||
|
||||
clock_early_uart();
|
||||
|
||||
// Serial out, tristate off.
|
||||
pinmux_set_config(PINMUX_KB_ROW9_INDEX, PINMUX_KB_ROW9_FUNC_UA3);
|
||||
// Serial in, tristate_on.
|
||||
pinmux_set_config(PINMUX_KB_ROW10_INDEX, PINMUX_KB_ROW10_FUNC_UA3 |
|
||||
PINMUX_PULL_UP |
|
||||
PINMUX_INPUT_ENABLE);
|
||||
// Mux some pins away from uart A.
|
||||
pinmux_set_config(PINMUX_UART2_CTS_N_INDEX,
|
||||
PINMUX_UART2_CTS_N_FUNC_UB3 |
|
||||
PINMUX_INPUT_ENABLE);
|
||||
pinmux_set_config(PINMUX_UART2_RTS_N_INDEX,
|
||||
PINMUX_UART2_RTS_N_FUNC_UB3);
|
||||
soc_configure_pads(uart_console_pads, ARRAY_SIZE(uart_console_pads));
|
||||
|
||||
if (CONFIG_BOOTBLOCK_CONSOLE) {
|
||||
console_init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue