version 1.41, 2007/06/26 22:36:16 |
version 1.41.6.1, 2007/08/03 22:17:14 |
Line 881 EcWaitEvent(struct acpi_ec_softc *sc, EC |
|
Line 881 EcWaitEvent(struct acpi_ec_softc *sc, EC |
|
* Wait For Event: |
* Wait For Event: |
* --------------- |
* --------------- |
* Poll the EC status register to detect completion of the last |
* Poll the EC status register to detect completion of the last |
* command. Wait up to 100ms (in 100us chunks) for this to occur. |
* command. Wait up to 500ms (in 100us chunks) for this to occur. |
*/ |
*/ |
for (i = 0; i < 1000; i++) { |
for (i = 0; i < 5000; i++) { |
EcStatus = EC_CSR_READ(sc); |
EcStatus = EC_CSR_READ(sc); |
|
|
if ((Event == EC_EVENT_OUTPUT_BUFFER_FULL) && |
if ((Event == EC_EVENT_OUTPUT_BUFFER_FULL) && |
Line 928 EcTransaction(struct acpi_ec_softc *sc, |
|
Line 928 EcTransaction(struct acpi_ec_softc *sc, |
|
|
|
EcLock(sc); |
EcLock(sc); |
|
|
/* |
|
* Perform the transaction, and make sure GPE is enabled before |
|
* doing so. |
|
*/ |
|
rv = AcpiEnableGpe(NULL, sc->sc_gpebit, ACPI_NOT_ISR); |
|
if (ACPI_FAILURE(rv)) |
|
return rv; |
|
switch (EcRequest->Command) { |
switch (EcRequest->Command) { |
case EC_COMMAND_READ: |
case EC_COMMAND_READ: |
rv = EcRead(sc, EcRequest->Address, &(EcRequest->Data)); |
rv = EcRead(sc, EcRequest->Address, &(EcRequest->Data)); |