diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-08-13 00:13:08 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-08-13 00:13:08 +0000 |
commit | efb77c3247b8307ad69ce89704a6f4f9ec6384bb (patch) | |
tree | b2c092c1dbdeee0f02f22c80795d65d6d4e59168 /sys/dev/fdt/sximmc.c | |
parent | 777537e80bdc0512bf64a2d67291afc884559606 (diff) |
Add support for Allwinner A64/H5 device trees that use the official Linux
bindings. The current U-Boot device trees are somewhat broken and keep
the SD-card controller from working.
Diffstat (limited to 'sys/dev/fdt/sximmc.c')
-rw-r--r-- | sys/dev/fdt/sximmc.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/dev/fdt/sximmc.c b/sys/dev/fdt/sximmc.c index 008ea70d2b9..7acb8f55d56 100644 --- a/sys/dev/fdt/sximmc.c +++ b/sys/dev/fdt/sximmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sximmc.c,v 1.2 2017/06/22 02:44:37 deraadt Exp $ */ +/* $OpenBSD: sximmc.c,v 1.3 2017/08/13 00:13:07 kettenis Exp $ */ /* $NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $ */ /*- @@ -289,16 +289,11 @@ sximmc_match(struct device *parent, void *match, void *aux) { struct fdt_attach_args *faa = aux; - if (OF_is_compatible(faa->fa_node, "allwinner,sun4i-a10-mmc")) - return 1; - if (OF_is_compatible(faa->fa_node, "allwinner,sun5i-a13-mmc")) - return 1; - if (OF_is_compatible(faa->fa_node, "allwinner,sun7i-a20-mmc")) - return 1; - if (OF_is_compatible(faa->fa_node, "allwinner,sun9i-a80-mmc")) - return 1; - - return 0; + return (OF_is_compatible(faa->fa_node, "allwinner,sun4i-a10-mmc") || + OF_is_compatible(faa->fa_node, "allwinner,sun5i-a13-mmc") || + OF_is_compatible(faa->fa_node, "allwinner,sun7i-a20-mmc") || + OF_is_compatible(faa->fa_node, "allwinner,sun9i-a80-mmc") || + OF_is_compatible(faa->fa_node, "allwinner,sun50i-a64-mmc")); } int |