diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-03-28 12:28:02 +0200 |
---|---|---|
committer | Patrick Rudolph <siro@das-labor.org> | 2018-07-10 07:03:56 +0000 |
commit | d0dcf877e4dc85f951e6c8c53702292fff060bc6 (patch) | |
tree | a489f34400750043051ae67aff61ec81849ec0ad /src/mainboard/cavium/cn8100_sff_evb/mainboard.c | |
parent | 06c7d64be9fa0355ed7cfc092db93963a254295a (diff) | |
download | coreboot-d0dcf877e4dc85f951e6c8c53702292fff060bc6.tar.xz |
soc/cavium: Clean uart code
* Only init UART_FOR_CONSOLE
* Allow UART init with zero baudrate.
* Init UART0..3 on Cavium's cn8100_sff_evb to fix kernel panic.
Tested on CN8100_SFF_EVB.
Change-Id: I1043b30318ec6210e2dd6b7ac313a41171d37f55
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25448
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'src/mainboard/cavium/cn8100_sff_evb/mainboard.c')
-rw-r--r-- | src/mainboard/cavium/cn8100_sff_evb/mainboard.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mainboard/cavium/cn8100_sff_evb/mainboard.c b/src/mainboard/cavium/cn8100_sff_evb/mainboard.c index b6d4ad8a7c..1c2c4365d2 100644 --- a/src/mainboard/cavium/cn8100_sff_evb/mainboard.c +++ b/src/mainboard/cavium/cn8100_sff_evb/mainboard.c @@ -22,12 +22,19 @@ #include <soc/twsi.h> #include <soc/gpio.h> #include <delay.h> +#include <soc/uart.h> extern const struct bdk_devicetree_key_value devtree[]; static void mainboard_init(struct device *dev) { - /* FIXME: stub */ + size_t i; + + /* Init UARTs */ + for (i = 0; i < 4; i++) { + if (!uart_is_enabled(i)) + uart_setup(i, 0); + } } static void mainboard_enable(struct device *dev) |