summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt/imxuart.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2018-06-11 09:15:22 +0000
committerkettenis <kettenis@openbsd.org>2018-06-11 09:15:22 +0000
commitc056f4f8b62d7b4695abfec6b3905e722b5843e2 (patch)
treeb2d64ce83b0816b46e5319622f89db3d9b0fbef0 /sys/dev/fdt/imxuart.c
parentFix an off-by-one line count when using include statements. (diff)
downloadwireguard-openbsd-c056f4f8b62d7b4695abfec6b3905e722b5843e2.tar.xz
wireguard-openbsd-c056f4f8b62d7b4695abfec6b3905e722b5843e2.zip
Also match on "fsl,imx6q-uart" such that this attaches on i.MX7.
ok patrick@
Diffstat (limited to 'sys/dev/fdt/imxuart.c')
-rw-r--r--sys/dev/fdt/imxuart.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/fdt/imxuart.c b/sys/dev/fdt/imxuart.c
index 7bb1c1be3d1..6f3722affc9 100644
--- a/sys/dev/fdt/imxuart.c
+++ b/sys/dev/fdt/imxuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuart.c,v 1.2 2018/05/31 09:12:59 kettenis Exp $ */
+/* $OpenBSD: imxuart.c,v 1.3 2018/06/11 09:15:22 kettenis Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -135,8 +135,10 @@ imxuart_init_cons(void)
struct fdt_reg reg;
void *node;
- if ((node = fdt_find_cons("fsl,imx21-uart")) == NULL)
+ if ((node = fdt_find_cons("fsl,imx21-uart")) == NULL &&
+ (node = fdt_find_cons("fsl,imx6q-uart")) == NULL)
return;
+
if (fdt_get_reg(node, 0, &reg))
return;
@@ -148,7 +150,8 @@ imxuart_match(struct device *parent, void *match, void *aux)
{
struct fdt_attach_args *faa = aux;
- return OF_is_compatible(faa->fa_node, "fsl,imx21-uart");
+ return (OF_is_compatible(faa->fa_node, "fsl,imx21-uart") ||
+ OF_is_compatible(faa->fa_node, "fsl,imx6q-uart"));
}
void