-/* $OpenBSD: ahci_acpi.c,v 1.3 2020/05/08 11:18:01 kettenis Exp $ */
+/* $OpenBSD: ahci_acpi.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
{
struct acpi_attach_args *aaa = aux;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchcls(aaa, PCI_CLASS_MASS_STORAGE,
PCI_SUBCLASS_MASS_STORAGE_SATA, PCI_INTERFACE_SATA_AHCI10);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
printf(" irq %d", aaa->aaa_irq[0]);
-/* $OpenBSD: amdgpio.c,v 1.5 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: amdgpio.c,v 1.6 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
* Copyright (c) 2019 James Hastings
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, amdgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) {
printf(": can't find uid\n");
return;
-/* $OpenBSD: aplgpio.c,v 1.3 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: aplgpio.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
* Copyright (c) 2019 James Hastings
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, aplgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) {
printf(": can't find uid\n");
return;
-/* $OpenBSD: asmc.c,v 1.3 2020/12/12 09:44:27 mglocker Exp $ */
+/* $OpenBSD: asmc.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2015 Joerg Jung <jung@openbsd.org>
*
struct acpi_attach_args *aa = aux;
struct cfdata *cf = match;
+ if (aa->aaa_naddr < 1)
+ return 0;
return acpi_matchhids(aa, asmc_hids, cf->cf_driver->cd_name);
}
if (!(aml_evalname(sc->sc_acpi, sc->sc_devnode, "_CID", 0, NULL, &res)))
printf(" (%s)", res.v_string);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
printf (" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
sc->sc_iot = aaa->aaa_bst[0];
-/* $OpenBSD: bytgpio.c,v 1.15 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: bytgpio.c,v 1.16 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, bytgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) {
printf(": can't find uid\n");
return;
-/* $OpenBSD: ccp_acpi.c,v 1.2 2020/05/08 11:18:01 kettenis Exp $ */
+/* $OpenBSD: ccp_acpi.c,v 1.3 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2019 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1)
+ return 0;
return acpi_matchhids(aaa, ccp_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
sc->sc.sc_iot = aaa->aaa_bst[0];
-/* $OpenBSD: chvgpio.c,v 1.10 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: chvgpio.c,v 1.11 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, chvgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) {
printf(": can't find uid\n");
return;
-/* $OpenBSD: dwgpio.c,v 1.3 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: dwgpio.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, dwgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
sc->sc_memt = aaa->aaa_bst[0];
-/* $OpenBSD: dwiic_acpi.c,v 1.17 2021/12/07 10:16:50 kettenis Exp $ */
+/* $OpenBSD: dwiic_acpi.c,v 1.18 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Synopsys DesignWare I2C controller
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1)
+ return 0;
return acpi_matchhids(aaa, dwiic_hids, cf->cf_driver->cd_name);
}
printf(" %s", sc->sc_devnode->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_CRS", 0, NULL, &res)) {
printf(", no _CRS method\n");
return;
-/* $OpenBSD: glkgpio.c,v 1.3 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: glkgpio.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
* Copyright (c) 2019 James Hastings
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, glkgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) {
printf(": can't find uid\n");
return;
-/* $OpenBSD: if_bse_acpi.c,v 1.3 2020/05/08 11:18:01 kettenis Exp $ */
+/* $OpenBSD: if_bse_acpi.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, bse_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
printf(" irq %d", aaa->aaa_irq[0]);
-/* $OpenBSD: imxiic_acpi.c,v 1.2 2021/07/24 10:52:07 patrick Exp $ */
+/* $OpenBSD: imxiic_acpi.c,v 1.3 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2015, 2016 joshua stein <jcs@openbsd.org>
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1)
+ return 0;
return acpi_matchhids(aaa, imxiic_hids, cf->cf_driver->cd_name);
}
printf(" %s", ac->ac_devnode->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
sc->sc_iot = aaa->aaa_bst[0];
-/* $OpenBSD: pchgpio.c,v 1.9 2021/12/07 18:06:08 kettenis Exp $ */
+/* $OpenBSD: pchgpio.c,v 1.10 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis
* Copyright (c) 2020 James Hastings
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, pchgpio_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr");
for (i = 0; i < aaa->aaa_naddr; i++) {
-/* $OpenBSD: pluart_acpi.c,v 1.4 2020/05/08 11:18:01 kettenis Exp $ */
+/* $OpenBSD: pluart_acpi.c,v 1.5 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, pluart_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
printf(" irq %d", aaa->aaa_irq[0]);
-/* $OpenBSD: sdhc_acpi.c,v 1.18 2021/03/08 13:48:56 kettenis Exp $ */
+/* $OpenBSD: sdhc_acpi.c,v 1.19 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, sdhc_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
if (aml_evalname(sc->sc_acpi, sc->sc_node, "_CRS", 0, NULL, &res)) {
printf(": can't find registers\n");
return;
-/* $OpenBSD: tpm.c,v 1.14 2021/12/07 16:07:56 deraadt Exp $ */
+/* $OpenBSD: tpm.c,v 1.15 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Minimal interface to Trusted Platform Module chips implementing the
struct acpi_attach_args *aa = aux;
struct cfdata *cf = match;
+ if (aa->aaa_naddr < 1)
+ return 0;
return (acpi_matchhids(aa, tpm_hids, cf->cf_driver->cd_name));
}
return;
}
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
sc->sc_bbase = aaa->aaa_addr[0];
-/* $OpenBSD: xhci_acpi.c,v 1.3 2020/05/08 11:18:01 kettenis Exp $ */
+/* $OpenBSD: xhci_acpi.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, xhci_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
printf(" irq %d", aaa->aaa_irq[0]);