mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
qca: Modified the way serial init to looks for console and gsbi_base
Updated serial init to look for console property in aliases instead of directly looking for serial node. This is to support device tree to contain multiple serial nodes with different unit address to support boards using different gsbi peripherals. Change-Id: Iae741d7e56464a2a43f9132dfe87af62945ce60e Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
This commit is contained in:
parent
13e938b53d
commit
f6b4529449
1 changed files with 11 additions and 4 deletions
|
|
@ -252,17 +252,24 @@ int board_eth_init(bd_t *bis)
|
|||
void qca_serial_init(struct ipq_serial_platdata *plat)
|
||||
{
|
||||
int serial_node, gpio_node;
|
||||
serial_node = fdt_path_offset(gd->fdt_blob, "/serial");
|
||||
unsigned gsbi_base;
|
||||
|
||||
serial_node = fdt_path_offset(gd->fdt_blob, "console");
|
||||
if (serial_node < 0) {
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_node = fdt_subnode_offset(gd->fdt_blob, serial_node, "serial_gpio");
|
||||
gpio_node = fdt_subnode_offset(gd->fdt_blob,
|
||||
serial_node, "serial_gpio");
|
||||
gsbi_base = fdtdec_get_uint(gd->fdt_blob,
|
||||
serial_node, "gsbi_base", 0);
|
||||
if (!gsbi_base)
|
||||
return;
|
||||
|
||||
qca_gpio_init(gpio_node);
|
||||
writel(GSBI_PROTOCOL_CODE_I2C_UART <<
|
||||
GSBI_CTRL_REG_PROTOCOL_CODE_S,
|
||||
GSBI_CTRL_REG(GSBI4_BASE));
|
||||
GSBI_CTRL_REG(gsbi_base));
|
||||
|
||||
if (!(plat->m_value == -1) || ( plat->n_value == -1) || (plat->d_value == -1))
|
||||
uart_clock_config(plat->port_id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue