From: kettenis Date: Sun, 23 Jul 2023 11:17:49 +0000 (+0000) Subject: Enable power domain. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7ab4cc9835a16d0789381992ef32a23e35d4fba6;p=openbsd Enable power domain. ok patrick@ --- diff --git a/sys/arch/arm64/dev/aplmbox.c b/sys/arch/arm64/dev/aplmbox.c index 343730039d1..86dccd24758 100644 --- a/sys/arch/arm64/dev/aplmbox.c +++ b/sys/arch/arm64/dev/aplmbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplmbox.c,v 1.5 2022/12/21 22:30:42 kettenis Exp $ */ +/* $OpenBSD: aplmbox.c,v 1.6 2023/07/23 11:17:49 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -111,6 +112,8 @@ aplmbox_attach(struct device *parent, struct device *self, void *aux) printf("\n"); + power_domain_enable(faa->fa_node); + sc->sc_md.md_node = faa->fa_node; sc->sc_md.md_cookie = sc; sc->sc_md.md_channel = aplmbox_channel; diff --git a/sys/arch/arm64/dev/aplpinctrl.c b/sys/arch/arm64/dev/aplpinctrl.c index e6c680cd016..9f65bca8b1c 100644 --- a/sys/arch/arm64/dev/aplpinctrl.c +++ b/sys/arch/arm64/dev/aplpinctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplpinctrl.c,v 1.7 2023/03/23 11:40:42 jsg Exp $ */ +/* $OpenBSD: aplpinctrl.c,v 1.8 2023/07/23 11:17:50 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -28,6 +28,7 @@ #include #include #include +#include #include #define APPLE_PIN(pinmux) ((pinmux) & 0xffff) @@ -136,6 +137,8 @@ aplpinctrl_attach(struct device *parent, struct device *self, void *aux) return; } + power_domain_enable(faa->fa_node); + pinctrl_register(faa->fa_node, aplpinctrl_pinctrl, sc); OF_getpropintarray(faa->fa_node, "gpio-ranges", diff --git a/sys/arch/arm64/dev/aplspi.c b/sys/arch/arm64/dev/aplspi.c index 248bf28edb9..4ac110de28a 100644 --- a/sys/arch/arm64/dev/aplspi.c +++ b/sys/arch/arm64/dev/aplspi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplspi.c,v 1.4 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: aplspi.c,v 1.5 2023/07/23 11:17:50 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -30,6 +30,7 @@ #include #include #include +#include #include #define SPI_CLKCFG 0x00 @@ -147,6 +148,7 @@ aplspi_attach(struct device *parent, struct device *self, void *aux) sc->sc_pfreq = clock_get_frequency(sc->sc_node, NULL); + power_domain_enable(sc->sc_node); pinctrl_byname(sc->sc_node, "default"); /* Configure CS# pin for manual control. */