summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi
Commit message (Collapse)AuthorAgeFilesLines
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Fix StallOp implementaion. I've noticed that StallOp corresponds toiwasaki2000-10-024-6/+5
| | | | | | | OsdSleepUsec(), SleepOp corresponds to OsdSleep() by reading ACPICA source code. - Add OsdSleepUsec() which uses DELAY() simply. - Change unit of acpi_sleep() argument; microseconds to milliseconds.
* Remove ACPI_NO_OSDFUNC_INLINE option from kernel configuration. Nowiwasaki2000-10-013-0/+8
| | | | | | | that it's enabled in acpireg.h only if DIAGNOSTIC option is specified. ACPICA OSD functions will be compiled in machine/acpi_machdep.c again tentatively (if DIAGNOSTIC option is specified). # Should we have acpica_osd.c ?
* - Add acpi_disable_events() and set it with EVENTHANDLER_REGISTER in order toiwasaki2000-09-306-5/+83
| | | | | | | | avoid power on again problem after acpi_soft_off() calling. - Implement SleepOp/StallOp in AML interpreter. Also provide ACPICA compatibility. - Minor changes on __inline function declaration in acpica_osd.h (obtained from NetBSD porting).
* More updates to the ACPI code:msmith2000-09-309-940/+1434
| | | | | | | | | | | | | | | - Move all register I/O into acpi_io.c - Move event handling into acpi_event.c - Reorganise headers into acpivar/acpireg/acpiio - Move find-RSDT and find-ACPI-owned-memory into acpi_machdep - Allocate all resources (except those detailed only by AML) as real resources. Add infrastructure that will make adding resource support to AML code easy. - Remove all ACPI #ifdefs in non-ACPI code - Removed unnecessary includes - Minor style and commenting fixes Reviewed by: iwasaki
* Whitespace, spelling and comments cleanup. Try to bring this a littlemsmith2000-09-273-333/+385
| | | | | closer to a consistent style without going totally overboard. Preserve the 8-space indents even though I loathe them.
* Shut up some debugging messages that appear to have been left on bymsmith2000-09-273-93/+159
| | | | | | | | | | | | | | | default. Fix the identify/probe/attach cycle somewhat. Now in acpi_identify we parse enough of the RSDT/FACP to find the communications port and interrupt so that we can establish these as resources on the acpi device. Pass the softc to acpi_queue_event so that it doesn't dereference NULL when acpi_intr is invoked in the attach routine (because devclass_get_softc isn't going to work yet). Account for our allocated resources properly so that we can free them if required.
* Add code for device wake capability during sleeping state.iwasaki2000-09-263-38/+369
| | | | | | | | | | - Add acpi_gpe_enable_bit() to manipulate GPE enable registers based on _PRW objects. - Add acpi_set_device_wakecap(). This will manipulate related PowerResource objects and execute _PSW method of the device. - Cleanup and some small fixes. This code was implemented based on 7.2.1 _PRW in spec mainly.
* Add struct proc *acpi_thread in acpi_softc.iwasaki2000-09-261-0/+1
|
* Clear intrrupt before kthread gets ready.takawata2000-09-261-0/+1
| | | | Submitted by: iwasaki
* Add event queueing kernel thread and GPE related code.takawata2000-09-262-6/+183
|
* Fix LINT breakage by options ACPI_NO_OSDFUNC_INLINE.iwasaki2000-09-211-0/+3
| | | | | | | Also space/tab-fix in NOTE. Grrr, my bad. Pointed-out by: eivind
* Add new function in AML interpreter; aml_invoke_method().iwasaki2000-09-204-6/+16
| | | | | | | | Also remove unneeded includes in aml_obj.c and aml_parse.c. This new function takes 'struct aml_name *' as a argument rather than 'char *' where aml_invoke_method_by_name() does. It's worth to have these two interfaces in many cases.
* Ignore power button and sleep button events for 5 sec.iwasaki2000-09-202-2/+24
| | | | | | | Wakeup event is generated by power button and/or sleep button on some laptops but this also generates SCI interrupt, and shutdown the system as result. So this kind of mechanism is introduced so that acpi driver ignore given events for certain period.
* Improve region I/O sub-routines by re-writing most of low level partiwasaki2000-09-207-300/+615
| | | | | | | | | | | | | | | | | | | of AML interpreter. - Delete and cleanup a lot of almost duplicated code in kernel/userland. - Add new common functions for kernel/userland code. aml_adjust_readvalue(), aml_adjust_updatevalue(), aml_region_handle_alloc(), aml_region_handle_free() and aml_region_io(). - Add primitive functions for both versions of kernel/userland in order to have shared code as much as possible. aml_region_read_simple(), aml_region_write_simple(), aml_region_prompt_read(), aml_region_prompt_write() and aml_region_prompt_update_value(). - Consider update rule and access type in field flags. Also add a lot of definitions for the flags. - Fix bugs on bit manipulation for read/write operations. - Fix bugs on IndexField I/O part. Also add workaround for temporary object corruption during StoreOp interpretation.
* Add acpi_send_pm_event() to inform all devices that the system isiwasaki2000-09-142-3/+63
| | | | | going to sleep and back from sleep. Also re-enabling some acpi registers on wakeup.
* Add ACPI_BUS_SPACE stuff definitions in acpi_machdep.h.iwasaki2000-09-021-1/+1
| | | | | Change to include this file rather than acpica_osd.h to use only ACPI_BUS_SPACE stuff.
* Change the probing order priority of acpi so that acpi is probed afteriwasaki2000-09-011-1/+1
| | | | | | | pcib instance is initialized because accesses to PCI_Config region can occur during ACPI initialization. Note that this is a short term solution, more consideration will be required in order to integrate ACPI into the newbus probe sequence.
* Cleanup on power off code under ACPI.iwasaki2000-08-311-15/+21
| | | | | | | | - Remove DELAY() kludge before power off. - Move EVENTHANDLER_REGISTER to acpi_attach(). - Pass RB_POWEROFF flag to shutdown_nice(). Reviewed by: msmith
* Refine implementation of PowerResource manipulation sub-routines.iwasaki2000-08-293-120/+266
| | | | | | | | | | | - Add new funcions for device state stuff; acpi_get_current_device_state() and acpi_set_device_state() - Add new funcions for power resource stuff; acpi_powerres_init(), acpi_powerres_debug(), acpi_get_current_powerres_state() and acpi_set_powerres_state() These were implemented based on 7.1, 7.2, 7.2.2, 7.2.3, 7.2.4, 7.3, 7.3.3, 7.4, 7.4.1, 7.4.2, 7.4.3 and 7.5 of ACPI spec 1.0b.
* A lot of changes on acpi driver code.iwasaki2000-08-292-70/+80
| | | | | | | | | | | | | | | | - The "Osd*" stuff went away from acpi driver code, use the bus_space functions directly instead. - Fix minor english bugs. acpi_registers_input -> acpi_register_input acpi_registers_output -> acpi_register_output - Remove all magic numbers for the sleeping states. We now have #defines for these. - NULL is treated the same as the return from aml_get_rootname in aml_find_from_namespace(). Suggested by: msmith Thanks mike!
* Move acpi_softc into acpi.h to be shared from additional files.iwasaki2000-08-253-12/+433
| | | | | Add PowerResource manipulation code; acpi_powerres.c. (more files to be created something like acpi_battery, acpi_thermal.c...)
* Add orthogonal part of ACPI support code.takawata2000-08-2421-0/+7195
This does not come effect until non-orthogonal part is commited. Approved by: jkh Obtained from: ACPI for FreeBSD CVS repository.
OpenPOWER on IntegriCloud