b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * CDDL HEADER START
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * The contents of this file are subject to the terms of the
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Common Development and Distribution License (the "License").
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * You may not use this file except in compliance with the License.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * or http://www.opensolaris.org/os/licensing.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * See the License for the specific language governing permissions
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * and limitations under the License.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * When distributing Covered Code, include this CDDL HEADER in each
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * If applicable, add the following below this CDDL HEADER, with the
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * fields enclosed by brackets "[]" replaced with your own identifying
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * information: Portions Copyright [yyyy] [name of copyright owner]
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * CDDL HEADER END
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Use is subject to license terms.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Copyright (c) 2009, Intel Corporation.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * All rights reserved.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#ifndef _SYS_ACPIDEV_RSC_H
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define _SYS_ACPIDEV_RSC_H
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#include <sys/types.h>
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#include <sys/obpdefs.h>
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#include <sys/sunddi.h>
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#include <sys/acpi/acpi.h>
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#include <sys/acpica.h>
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#ifdef __cplusplus
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern "C" {
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#endif
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/* ACPI bus range structure. */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcorantypedef struct acpidev_bus_range {
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t bus_start;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t bus_end;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran} acpidev_bus_range_t;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * This structure is modeled after the 1275 "reg" property and
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * "assigned-addresses" property for PCI device nodes.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * There's no standard definition available for ACPI devices.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * This structure is used to store resources returned by the ACPI
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * _CRS method.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * The physical address format is:
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Bit#: 33222222 22221111 11111100 00000000
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * 10987654 32109876 54321098 76543210
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * phys_hi cell: xxxxxxxx xxxxxxxx xxxxxxxx TSxxxTTT
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * phys_hi(memory): xxxxxxxx xxxxxxxx wxxxxxcc --xxx000
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * phys_hi(io): xxxxxxxx xxxxxxxx sdxxxxaa --xxx001
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * phys_mid cell: hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * phys_low cell: llllllll llllllll llllllll llllllll
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * TTT is type of resource. Such as MEMORY, IO etc.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * S is 1 if address range is subtractive decoding
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * T is 1 if resource type is different on primary and
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * secondary bus
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * cc is memory coherence type
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * w is 1 if memory is writable
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * aa ranges of decoded ports, ISA only, non-ISA only or full.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * d is 1 if IO port decode 16 bit address, otherwise 10 bits.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * s is 1 if translation is sparse.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * hh...hhh is the 32-bit unsigned number
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * ll...lll is the 32-bit unsigned number
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * The physical size format is:
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * size_hi cell: hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * size_low cell: llllllll llllllll llllllll llllllll
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran *
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * hh...hhh is the 32-bit unsigned number
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * ll...lll is the 32-bit unsigned number
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcorantypedef struct acpidev_phys_spec {
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t phys_hi; /* resource address, hi word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t phys_mid; /* resource address, middle word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t phys_low; /* resource address, low word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t size_hi; /* high word of size field */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t size_low; /* low word of size field */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran} acpidev_phys_spec_t;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcorantypedef struct acpidev_phys_spec acpidev_regspec_t;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_TYPE_M 0x00000007
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_TYPE_MEMORY 0x00000000
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_TYPE_IO 0x00000001
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_SUB_DEC 0x00000040
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_TRANSLATED 0x00000080
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_MEM_COHERENT_M 0x00000300
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_MEM_COHERENT_NC 0x00000000 /* Non-cachable */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_MEM_COHERENT_CA 0x00000100 /* Cachable */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_MEM_COHERENT_WC 0x00000200 /* Write-combining */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_MEM_COHERENT_PF 0x00000300 /* Prefectable */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_MEM_WRITABLE 0x00008000 /* Writable */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_IO_RANGE_M 0x00000300
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_IO_RANGE_NONISA 0x00000100
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_IO_RANGE_ISA 0x00000200
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_IO_RANGE_FULL 0x00000300
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_IO_DECODE16 0x00004000 /* Decode 16bit addr. */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_REG_IO_SPARSE 0x00008000 /* Sparse translation. */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcorantypedef struct acpidev_ranges {
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t child_hi; /* child's address, hi word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t child_mid; /* child's address, middle word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t child_low; /* child's address, low word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t parent_hi; /* parent's address, hi word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t parent_mid; /* parent's address, middle word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t parent_low; /* parent's address, low word */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t size_hi; /* high word of size field */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t size_low; /* low word of size field */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran} acpidev_ranges_t;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#ifdef _KERNEL
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/* Maximum possible number of IRQs. */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_RES_IRQ_MAX 16
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/* Maximum possible number of DMAs. */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#define ACPIDEV_RES_DMA_MAX 8
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/* Forward declaration */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcorantypedef struct acpidev_resource_handle *acpidev_resource_handle_t;
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Resource handler relative interfaces.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Return values of acpidev_resource_get_xxx interfaces:
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * AE_OK: succeed with resources stored in buffer and count updated.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * AE_LIMIT: buffer is too small, count updated to number of resources.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * AE_BAD_PARAMETER: invalid parameter
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern acpidev_resource_handle_t acpidev_resource_handle_alloc(
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran boolean_t consumer);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern void acpidev_resource_handle_free(acpidev_resource_handle_t rhdl);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_insert_reg(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran acpidev_regspec_t *regp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_get_regs(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t mask, uint_t value, acpidev_regspec_t *regp, uint_t *cntp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern uint_t acpidev_resource_get_reg_count(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t mask, uint_t value);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_insert_range(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran acpidev_ranges_t *rangep);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_get_ranges(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t mask, uint_t value, acpidev_ranges_t *rangep, uint_t *cntp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern uint_t acpidev_resource_get_range_count(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t mask, uint_t value);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_insert_bus(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran acpidev_bus_range_t *busp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_get_buses(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran acpidev_bus_range_t *busp, uint_t *cntp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern uint_t acpidev_resource_get_bus_count(acpidev_resource_handle_t rhdl);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_insert_dma(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran int dma);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_get_dmas(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t *dmap, uint_t *cntp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern uint_t acpidev_resource_get_dma_count(acpidev_resource_handle_t rhdl);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_insert_irq(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran int irq);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_get_irqs(acpidev_resource_handle_t rhdl,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran uint_t *irqp, uint_t *cntp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern uint_t acpidev_resource_get_irq_count(acpidev_resource_handle_t rhdl);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Walk resources returned by 'method' and store parsed resources into rhdlp.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Caller needs to release rhdlp after using it.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Return AE_OK on success with resource handle stored in 'rhdlp'.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_walk(ACPI_HANDLE hdl, char *method,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran boolean_t consumer, acpidev_resource_handle_t *rhdlp);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran/*
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Walk resources returned by the ACPI _CRS method and create device properties.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Create 'reg', 'assigned-addresses', 'dma-channels' and 'interrupts'
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * properties for resource consumer.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran * Create 'ranges' and 'bus-range' properties for resource producer.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranextern ACPI_STATUS acpidev_resource_process(acpidev_walk_info_t *infop,
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran boolean_t consumer);
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#endif /* _KERNEL */
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#ifdef __cplusplus
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran}
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#endif
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#endif /* _SYS_ACPIDEV_RSC_H */