summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2018-11-16 20:11:53 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2018-11-16 20:11:53 +0000
commitac9a7a25f1128b120ea2770c2543eb0926a91d5f (patch)
tree59be4ef6e0e7ff1c5138790d96d4d8075ccb3afc
parent584881d0a5f49cc6edac9c505d335dc5f6d13231 (diff)
Add support for Allwinner A64's eMMC controller. It is essentially
the same as the MMC controller but has the same DMA max length as the A10 SoC. This makes the eMMC work on the Pinebook. ok jsg@
-rw-r--r--sys/dev/fdt/sximmc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/fdt/sximmc.c b/sys/dev/fdt/sximmc.c
index eb5cf7f353e..6ba0874e640 100644
--- a/sys/dev/fdt/sximmc.c
+++ b/sys/dev/fdt/sximmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sximmc.c,v 1.5 2018/08/06 10:52:30 patrick Exp $ */
+/* $OpenBSD: sximmc.c,v 1.6 2018/11/16 20:11:52 patrick Exp $ */
/* $NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $ */
/*-
@@ -298,7 +298,8 @@ sximmc_match(struct device *parent, void *match, void *aux)
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"));
+ OF_is_compatible(faa->fa_node, "allwinner,sun50i-a64-mmc") ||
+ OF_is_compatible(faa->fa_node, "allwinner,sun50i-a64-emmc"));
}
int
@@ -306,7 +307,8 @@ sximmc_idma_setup(struct sximmc_softc *sc)
{
int error;
- if (OF_is_compatible(sc->sc_node, "allwinner,sun4i-a10-mmc")) {
+ if (OF_is_compatible(sc->sc_node, "allwinner,sun4i-a10-mmc") ||
+ OF_is_compatible(sc->sc_node, "allwinner,sun50i-a64-emmc")) {
sc->sc_idma_xferlen = 0x2000;
} else {
sc->sc_idma_xferlen = 0x10000;