-/* $OpenBSD: acpi.c,v 1.398 2021/05/09 15:51:35 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.399 2021/07/20 00:41:54 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
if (iodir == ACPI_IOREAD) {
switch (access_size) {
case 1:
- *(uint8_t *)(pb + reg) =
+ *(uint8_t *)(pb + reg) =
bus_space_read_1(iot, ioh, reg);
dnprintf(80, "os_in8(%llx) = %x\n",
reg+address, *(uint8_t *)(pb+reg));
if (iodir == ACPI_IOREAD) {
switch (access_size) {
case 1:
- *(uint8_t *)(pb + idx) =
+ *(uint8_t *)(pb + idx) =
acpi_pci_conf_read_1(pc, tag, reg + idx);
break;
case 2:
TAILQ_HEAD(, acpi_pci) acpi_pcidevs =
TAILQ_HEAD_INITIALIZER(acpi_pcidevs);
-TAILQ_HEAD(, acpi_pci) acpi_pcirootdevs =
+TAILQ_HEAD(, acpi_pci) acpi_pcirootdevs =
TAILQ_HEAD_INITIALIZER(acpi_pcirootdevs);
int acpi_getpci(struct aml_node *node, void *arg);
{
int i;
- for (i = 0; hids[i]; i++)
+ for (i = 0; hids[i]; i++)
if (!strcmp(hid, hids[i]))
return (1);
return (0);
pci->node = node;
pci->sub = -1;
- dnprintf(10, "%.2x:%.2x.%x -> %s\n",
+ dnprintf(10, "%.2x:%.2x.%x -> %s\n",
pci->bus, pci->dev, pci->fun,
aml_nodename(node));
reg = pci_conf_read(pc, tag, PPB_REG_BUSINFO);
pci->sub = PPB_BUSINFO_SECONDARY(reg);
- dnprintf(10, "found PCI bridge: %s %d\n",
+ dnprintf(10, "found PCI bridge: %s %d\n",
aml_nodename(node), pci->sub);
/* Continue scanning */
SIMPLEQ_HEAD_INITIALIZER(acpi_taskq);
void
-acpi_addtask(struct acpi_softc *sc, void (*handler)(void *, int),
+acpi_addtask(struct acpi_softc *sc, void (*handler)(void *, int),
void *arg0, int arg1)
{
struct acpi_taskq *wq;
wq->handler = handler;
wq->arg0 = arg0;
wq->arg1 = arg1;
-
+
s = splbio();
SIMPLEQ_INSERT_TAIL(&acpi_taskq, wq, next);
splx(s);
free(wq, M_DEVBUF, sizeof(*wq));
/* We did something */
- return (1);
+ return (1);
}
#ifndef SMALL_KERNEL
/* 1st powerdown AML step: _PTS(tostate) */
aml_node_setval(sc, sc->sc_pts, state);
-
+
acpi_disable_allgpes(sc);
acpi_enable_wakegpes(sc, state);
case SR_IOPORT:
case SR_FIXEDPORT:
aaa->aaa_bst[aaa->aaa_naddr] = aaa->aaa_iot;
- break;
+ break;
case LR_MEM24:
case LR_MEM32:
case LR_MEM32FIXED: