-/* $OpenBSD: aplpcie.c,v 1.14 2023/01/01 11:29:09 kettenis Exp $ */
+/* $OpenBSD: aplpcie.c,v 1.15 2023/03/09 19:48:42 kettenis Exp $ */
/*
* Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
*
void
aplpcie_init_port(struct aplpcie_softc *sc, int node)
{
+ char status[32];
uint32_t reg[5];
uint32_t *pwren_gpio;
uint32_t *reset_gpio;
uint32_t stat;
int port, timo;
+ if (OF_getprop(node, "status", status, sizeof(status)) > 0 &&
+ strcmp(status, "disabled") == 0)
+ return;
+
if (OF_getpropintarray(node, "reg", reg, sizeof(reg)) != sizeof(reg))
return;