From 08923ac8ba572914ff081eeda14c1cce6b87d51c Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Mon, 21 Feb 2005 20:00:59 +0000 Subject: [PATCH] ACPI Bus Manager interface header. Currently highly incomplete. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11442 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/drivers/ACPI.h | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 headers/os/drivers/ACPI.h diff --git a/headers/os/drivers/ACPI.h b/headers/os/drivers/ACPI.h new file mode 100644 index 0000000000..b37fb719f3 --- /dev/null +++ b/headers/os/drivers/ACPI.h @@ -0,0 +1,52 @@ +/* ACPI Bus Manger Interface + * Copyright 2005, Haiku Inc. All Rights Reserved. + * Distributed under the terms of the MIT License + */ + +#ifndef _ACPI_H +#define _ACPI_H + +#include + +typedef struct acpi_module_info acpi_module_info; + +struct acpi_module_info { + bus_manager_info binfo; + + uint32 (*read_acpi_reg) (uint32 register_id); + void (*write_acpi_reg) (uint32 register_id, uint32 value); +}; + +#define B_ACPI_MODULE_NAME "bus_managers/acpi/v1" + +#ifndef __ACTYPES_H__ + +/* ACPI register_id arguments */ + +#define ACPI_BITREG_TIMER_STATUS 0x00 +#define ACPI_BITREG_BUS_MASTER_STATUS 0x01 +#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02 +#define ACPI_BITREG_POWER_BUTTON_STATUS 0x03 +#define ACPI_BITREG_SLEEP_BUTTON_STATUS 0x04 +#define ACPI_BITREG_RT_CLOCK_STATUS 0x05 +#define ACPI_BITREG_WAKE_STATUS 0x06 + +#define ACPI_BITREG_TIMER_ENABLE 0x07 +#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x08 +#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x09 +#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0A +#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0B +#define ACPI_BITREG_WAKE_ENABLE 0x0C + +#define ACPI_BITREG_SCI_ENABLE 0x0D +#define ACPI_BITREG_BUS_MASTER_RLD 0x0E +#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x0F +#define ACPI_BITREG_SLEEP_TYPE_A 0x10 +#define ACPI_BITREG_SLEEP_TYPE_B 0x11 +#define ACPI_BITREG_SLEEP_ENABLE 0x12 + +#define ACPI_BITREG_ARB_DISABLE 0x13 + +#endif + +#endif /* _ACPI_H */