diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-05-17 20:21:16 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-05-17 20:21:16 +0000 |
commit | 641bee903b7ac7f39242ddf95ec1d453670c1840 (patch) | |
tree | 0cf7bafd9064ca1bf30889eae069b78d52d3c6d2 /sys/dev/acpi/acpi.c | |
parent | 40b9165f194868b48de0f9535ad742474f5274ee (diff) |
Implement GenericSerialBus OpRegion support.
ok mlarkin@
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r-- | sys/dev/acpi/acpi.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index ae863d03625..ffffae80f5e 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.341 2018/03/27 21:11:16 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.342 2018/05/17 20:21:15 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -920,6 +920,23 @@ acpi_register_gpio(struct acpi_softc *sc, struct aml_node *devnode) } void +acpi_register_gsb(struct acpi_softc *sc, struct aml_node *devnode) +{ + struct aml_value arg[2]; + struct aml_node *node; + + /* Register GenericSerialBus address space. */ + memset(&arg, 0, sizeof(arg)); + arg[0].type = AML_OBJTYPE_INTEGER; + arg[0].v_integer = ACPI_OPREG_GSB; + arg[1].type = AML_OBJTYPE_INTEGER; + arg[1].v_integer = 1; + node = aml_searchname(devnode, "_REG"); + if (node && aml_evalnode(sc, node, 2, arg, NULL)) + printf("%s: _REG failed\n", node->name); +} + +void acpi_attach(struct device *parent, struct device *self, void *aux) { struct bios_attach_args *ba = aux; |