summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
AgeCommit message (Collapse)Author
2021-12-12fix various typos in comments.andvar
2021-12-07fix various typos, mainly in comments.andvar
2021-11-14tpm@acpi: Require only one locality's worth of register space.riastradh
We don't actually use the registers for the other localities, and some older TPMs only have the first locality exposed via ACPI.
2021-11-01fix typos, mainly in words minimum and maximum, but also few others.andvar
2021-10-23Poll only if we don't have an IRQ resource.jmcneill
2021-10-22rename "setup_interrupts" to "alloc_interrupts"yamaguchi
in virtio_mmio and virtio_acpi This should fix build failure on evbarm.
2021-10-21acpi: com: Honour the reg-shift propertyjmcneill
2021-10-15Convert some debug messages to aprint_debugjmcneill
2021-10-07Also print the device name with aprint_naive, like wss@pnpbios does.uwe
2021-10-06Don't use aprint_normal_dev("") to print the device name.uwe
wssattach eventually calls ad1848_attach that prints the chip name with ": %s". Usually that is a continuation of the attachment line, e.g. audiocs0 at ebus0 bar 14 offset 0x200000 line 3: CS4231A but the wss? at acpi?: ... line we print is so long that we terminate it and start a new one exclusively for ad1848_attach. Hence we do NOT want the colon that _dev version supplies, it will be supplied by the callee.
2021-10-06Fix KASSERT triggered when attaching opl at wss.uwe
wss has two attributes, "wss" and "audiobus", and this call didn't specify an iattr for opl to attach to. config_search_internal asserts that when no iattr is specified, the parent should only have one. The same problem probably exists for other wss attachments, as opl is not attached from wssattach, but from each wss_*_attach, so they need a similar change.
2021-09-15Adjust the device_call() calling convention so as to provide type checkingthorpej
of the arguments passed to the call, using auto-generated argument structures and binding macros.
2021-09-03fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/andvar
2021-08-21fix mainly same typos as in my previous commit but outside sys/dev/dm.andvar
2021-08-09fix various typos in compatibility, mainly in comments.andvar
2021-08-09Fix CVS eff-up.thorpej
2021-08-09Port over the changes from thorpej-i2c-spi-conf to thorpej-i2c-spi-conf2,thorpej
which is based on a newer HEAD revision.
2021-08-07acpi: expose acpimcfg_configure_bus_cbjmcneill
2021-08-07acpi: Add acpi_resource_parse_any().jmcneill
Like acpi_resource_parse(), but doesn't exclude "produced" resources.
2021-08-07Merge thorpej-cfargs2.thorpej
2021-07-25acpi_timer: use ACPI-Fast if WAET timer one read flag is setjmcneill
The Windows ACPI Emulated Devices Table (WAET) has a hint to inform the OS that a single read of the PM timer is reliable. Honour this flag.
2021-07-24acpi: /dev/acpi: fix bounds check when reading tablesjmcneill
2021-05-30thinkpad(4): Fix evaluation of MHKA on version 2 devices.riastradh
Need to pass an argument.
2021-05-29Add some more Thinkpad hotkeys.riastradh
2021-05-29thinkpad(4): Add dtrace probe for hotkey events.riastradh
2021-05-29thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too.riastradh
2021-05-12- Define a device call for PCI bus instances to fetch a direct child'sthorpej
device handle given the device's device/function #s (extracted from a pcitag_t). Use it to associate the handle with the child device at config_found() time. - Implement this device call for ACPI and OpenFirmware. - Enable the OpenFirmware variant for evbarm FDT, macppc, ofppc, sparc64. - Obsolete acpi_device_register(); it is no longer needed. - Obsolete setting the OpenFirmware handle in PCI devices in the sparc64 device_register(); it is no longer needed.
2021-05-03genet(4): Add support for rnd(9).rin
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2021-03-25Introduce sc_poll_ticks and obsolete COM_HW_POLL bit in sc_hwflags.rin
Polling is scheduled at every sc_poll_ticks ticks. This is useful to work around H/W bug, by which interrupts are lost *sometimes*; interrupt-based I/O mostly works and no need for polling every counter ticks.
2021-02-05Assign device handles to "at acpi" and "at pci" devices inthorpej
acpi_device_register().
2021-02-05ACPI device handle implementation.thorpej
2021-02-04Use acpi_compatible_match().thorpej
2021-02-04Add acpi_device_register(). Just a placeholder for now.thorpej
2021-01-29Use acpi_compatible_match().thorpej
2021-01-29Use acpi_compatible_match() / acpi_compatible_lookup().thorpej
2021-01-29Use acpi_compatible_match().thorpej
2021-01-29Use acpi_compatible_match().thorpej
2021-01-27Introduce weighted matching for ACPI autoconfiguration, and providethorpej
acpi_compatible_match() based around device_compatible_entry. Matches against _HID score big, matches against _CID are weighted in the standard most-to-least-specific ordering, less than _HID. Also provide a maching value for _CLS, that's always less than _HID and _CID matches, and use that in acpi_match_class(). Also provide acpi_compatible_lookup(), that returing the matching entry based on the same criteria.
2021-01-26Trailing whitespaceskrll
2021-01-26KNFskrll
2021-01-26Don't map ACPI _HID / _CID strings to "compatible" strings from thethorpej
Device Tree bindings. Just pass those strings in the standard most-specific-to-least-specific order to the drivers and let them deal.
2021-01-26build fixjmcneill
2021-01-26Add a device_t parameter to acpi_enter_i2c_devs. If non-NULL, all childjmcneill
acpi_devnodes will be claimed by that device so we don't later try to attach a duplicate device to that node at acpinodebus.
2021-01-25Add "cookietype" to i2c attach args, so the consumer knows if ia_cookiejmcneill
is either an OF phandle or an ACPI_HANDLE. Add NXP0002 compatible mapping while here.
2021-01-25Configure clocks and enable NXP Layerscape quirks in motoi2cjmcneill
2021-01-24Add support for NXP Layerscape I2C controllers.jmcneill
2021-01-24Attach dwiic(4) to AMD FCH I2C controllers. These busses are separatejmcneill
from the SMBus that we attach to piixpm(4) today, and support direct config via ACPI.
2021-01-20Remove the virtio child driver finalisation check KASSERT that, while itreinoud
should never trigger, a possible bug in a child driver shouldn't have to panic the kernel. Instead report the internal error.
2021-01-20Add VirtIO PCI v1.0 attachments and fix the drivers affected.reinoud
The vioif, ld, scsi, viornd and viomb devices were adjusted when needed and tested both in legacy 0.9 and v1.0 attachments trough PCI on amd64, sparc64, aarch64 and aarch64-eb. ACPI/FDT attachments also tested on aarch64/aarch64-eb. Known issues * viomb on aarch64 works only with ACPI/FDT attachment but not with PCI attachment. PCI and ACPI/FDT attachment works on aarch64-eb. * virtio on sparc64 attaches but is it not functioning though not a regression.