ipq806x: initialize UART even when console is not enabled

Hardware / Coreboot - Vadim Bendebury [chromium.org] - 18 April 2015 01:54 UTC

The ipq806x UART is based on the same universal serial port which can be also configured as i2c or SPI. Configuring it is not a trivial task, so in case the kernel wants to use earlyprintk() the port needs to be configured by the firmware.

Invoking uart_init() when the console is not enabled causes include file collisions, which would require changes to more than 100 files. Leaving this to another day, rearranging the ipq806x driver to be able to invoke UART initialization function even when serial console is not configured.

Also add a check to avoid initialization if UART has been already set up.

BRANCH=storm BUG=chrome-os-partner:35364 TEST=verified that storm console is still fully operational when enabled, and that the kernel boots fine to the serial console login prompt even if the firmware console is disabled.

Change-Id: Ibbbab875449f2ac2f0d6c504c18faf0da8251ffa

7c25640 ipq806x: initialize UART even when console is not enabled
src/soc/qualcomm/ipq806x/Makefile.inc | 2 +-
src/soc/qualcomm/ipq806x/include/soc/ipq_uart.h | 2 ++
src/soc/qualcomm/ipq806x/soc.c | 7 +++++
src/soc/qualcomm/ipq806x/uart.c | 33 ++++++++++++++++-------
4 files changed, 34 insertions(+), 10 deletions(-)

Upstream: review.coreboot.org


  • Share