Synch with minor changes in the ACPI CA 20011120 snapshot.

This commit is contained in:
Mike Smith 2001-11-28 04:36:29 +00:00
parent 1b3eb6b30c
commit 76f2b644fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87036
5 changed files with 13 additions and 13 deletions

View File

@ -83,7 +83,7 @@ AcpiOsReadPort (
ACPI_STATUS
AcpiOsWritePort (
ACPI_IO_ADDRESS OutPort,
NATIVE_UINT Value,
ACPI_INTEGER Value,
UINT32 Width)
{
switch (Width) {
@ -140,7 +140,7 @@ ACPI_STATUS
AcpiOsWritePciConfiguration (
ACPI_PCI_ID *PciId,
UINT32 Register,
NATIVE_UINT Value,
ACPI_INTEGER Value,
UINT32 Width)
{
u_int32_t byte_width = Width / 8;

View File

@ -78,19 +78,19 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine
*/
if (sc->acpi_irq != NULL) {
device_printf(sc->acpi_dev, "attempt to register more than one interrupt handler\n");
return_ACPI_STATUS(AE_EXIST);
return_ACPI_STATUS(AE_ALREADY_EXISTS);
}
sc->acpi_irq_rid = 0;
bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1);
if ((sc->acpi_irq = bus_alloc_resource(sc->acpi_dev, SYS_RES_IRQ, &sc->acpi_irq_rid, 0, ~0, 1,
RF_SHAREABLE | RF_ACTIVE)) == NULL) {
device_printf(sc->acpi_dev, "could not allocate SCI interrupt\n");
return_ACPI_STATUS(AE_EXIST);
return_ACPI_STATUS(AE_ALREADY_EXISTS);
}
if (bus_setup_intr(sc->acpi_dev, sc->acpi_irq, INTR_TYPE_MISC, (driver_intr_t *)InterruptWrapper,
Context, &sc->acpi_irq_handle)) {
device_printf(sc->acpi_dev, "could not set up SCI interrupt\n");
return_ACPI_STATUS(AE_EXIST);
return_ACPI_STATUS(AE_ALREADY_EXISTS);
}
return_ACPI_STATUS(AE_OK);

View File

@ -139,7 +139,7 @@ AcpiOsReadMemory (
ACPI_STATUS
AcpiOsWriteMemory (
ACPI_PHYSICAL_ADDRESS Address,
NATIVE_UINT Value,
ACPI_INTEGER Value,
UINT32 Width)
{
void *LogicalAddress;

View File

@ -278,7 +278,7 @@ typedef struct
static void EcGpeHandler(void *Context);
static ACPI_STATUS EcSpaceSetup(ACPI_HANDLE Region, UINT32 Function,
void *Context, void **return_Context);
static ACPI_STATUS EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, UINT32 *Value,
static ACPI_STATUS EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, ACPI_INTEGER *Value,
void *Context, void *RegionContext);
static ACPI_STATUS EcWaitEvent(struct acpi_ec_softc *sc, EC_EVENT Event);
@ -538,7 +538,7 @@ EcSpaceSetup(ACPI_HANDLE Region, UINT32 Function, void *Context, void **RegionCo
}
static ACPI_STATUS
EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, UINT32 *Value,
EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, ACPI_INTEGER *Value,
void *Context, void *RegionContext)
{
struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context;
@ -552,13 +552,13 @@ EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, UIN
return_ACPI_STATUS(AE_BAD_PARAMETER);
switch (Function) {
case ACPI_READ_ADR_SPACE:
case ACPI_READ:
EcRequest.Command = EC_COMMAND_READ;
EcRequest.Address = Address;
(*Value) = 0;
break;
case ACPI_WRITE_ADR_SPACE:
case ACPI_WRITE:
EcRequest.Command = EC_COMMAND_WRITE;
EcRequest.Address = Address;
break;
@ -572,13 +572,13 @@ EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, UIN
* Perform the transaction.
*/
for (i = 0; i < width; i += 8) {
if (Function == ACPI_READ_ADR_SPACE)
if (Function == ACPI_READ)
EcRequest.Data = 0;
else
EcRequest.Data = (UINT8)((*Value) >> i);
if ((Status = EcTransaction(sc, &EcRequest)) != AE_OK)
break;
(*Value) |= (UINT32)EcRequest.Data << i;
(*Value) |= (ACPI_INTEGER)EcRequest.Data << i;
if (++EcRequest.Address == 0)
return_ACPI_STATUS(AE_BAD_PARAMETER);
}

View File

@ -132,7 +132,7 @@ AcpiSetDsdtTablePtr(
if (AcpiGbl_AcpiTables[ACPI_TABLE_DSDT].LoadedIntoNamespace)
{
return_ACPI_STATUS (AE_EXIST);
return_ACPI_STATUS (AE_ALREADY_EXISTS);
}
AcpiGbl_DSDT = TablePtr;