aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgsomlo <gsomlo@gmail.com>2021-04-05 19:56:28 -0400
committerGitHub <noreply@github.com>2021-04-05 16:56:28 -0700
commitef7bebaf9bf24d3e90bcaae96387ce418e136b6d (patch)
tree377f4b274288194959b617b98e77bbd33b8c2fc6
parent66d7fcb56d6a4cd4879922f184bb2274918ac3cd (diff)
downloadpk-ef7bebaf9bf24d3e90bcaae96387ce418e136b6d.zip
pk-ef7bebaf9bf24d3e90bcaae96387ce418e136b6d.tar.gz
pk-ef7bebaf9bf24d3e90bcaae96387ce418e136b6d.tar.bz2
LiteX UART: fix compatible property name (#237)
The upstream LiteX project defaults to "litex,liteuart" as the value for the "compatible" property of the UART DT node, so let's add it to the current list of accepted strings. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
-rw-r--r--machine/uart_litex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/machine/uart_litex.c b/machine/uart_litex.c
index 1fe0359..3f0162e 100644
--- a/machine/uart_litex.c
+++ b/machine/uart_litex.c
@@ -45,7 +45,8 @@ static void uart_litex_prop(const struct fdt_scan_prop *prop, void *extra)
{
struct uart_litex_scan *scan = (struct uart_litex_scan *)extra;
if (!strcmp(prop->name, "compatible") &&
- !strcmp((const char *)prop->value, "litex,uart0")) {
+ (!strcmp((const char *)prop->value, "litex,uart0") ||
+ !strcmp((const char *)prop->value, "litex,liteuart"))) {
scan->compat = 1;
} else if (!strcmp(prop->name, "reg")) {
fdt_get_address(prop->node->parent, prop->value, &scan->reg);