summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-05-06 16:25:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-05-06 16:25:49 +0000
commit03b29f50b2d8c145173ad9c91d8dd3d3a534e6cb (patch)
treea85d2e3407f722ade98372ef8e7766a1d764dff6 /sys/dev
parent8e320969cca4028a3c780a1bbfb35a272d807c50 (diff)
Configure pins and deassert resets, just in case some other board needs it.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/fdt/sdhc_fdt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/fdt/sdhc_fdt.c b/sys/dev/fdt/sdhc_fdt.c
index ca018475056..897c34c45f7 100644
--- a/sys/dev/fdt/sdhc_fdt.c
+++ b/sys/dev/fdt/sdhc_fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc_fdt.c,v 1.1 2017/05/05 15:23:46 kettenis Exp $ */
+/* $OpenBSD: sdhc_fdt.c,v 1.2 2017/05/06 16:25:48 kettenis Exp $ */
/*
* Copyright (c) 2017 Mark Kettenis
*
@@ -25,6 +25,7 @@
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_clock.h>
+#include <dev/ofw/ofw_pinctrl.h>
#include <dev/ofw/fdt.h>
#include <dev/sdmmc/sdhcreg.h>
@@ -78,7 +79,10 @@ sdhc_fdt_attach(struct device *parent, struct device *self, void *aux)
return;
}
+ pinctrl_byname(faa->fa_node, "default");
+
clock_enable_all(faa->fa_node);
+ reset_deassert_all(faa->fa_node);
sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_BIO,
sdhc_intr, sc, sc->sc.sc_dev.dv_xname);