diff options
author | Tejun Heo <htejun@gmail.com> | 2007-03-18 22:15:33 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 14:16:01 -0400 |
commit | d447df140d0f07a02bd221cb42eb0b61bce16042 (patch) | |
tree | 7ce228513178cdce89db5d93cb7bd4c04be1a771 /drivers/ata/libata-acpi.c | |
parent | ce2d3abc292c1eecd9ddc6f03391a0a46c6561dc (diff) | |
download | op-kernel-dev-d447df140d0f07a02bd221cb42eb0b61bce16042.zip op-kernel-dev-d447df140d0f07a02bd221cb42eb0b61bce16042.tar.gz |
ahci: implement ata_save/restore_initial_config()
There are several registers which describe how the controller is
configured. These registers are sometimes implemented as r/w
registers which are configured by firmware and get cleared on
controller reset or after suspend/resume cycle. ahci saved and
restored those values inside ahci_reset_controller() which is a bit
messy and doesn't work over suspend/resume cycle.
This patch implements ahci_save/restore_initial_config(). The save
function is called during driver initialization and saves cap and
port_map to hpriv. The restore function is called after the
controller is reset to restore the initial values.
Sometimes the initial firmware values are inconsistent and need to be
fixed up. This is handled by ahci_save_initial_config(). For this,
there are two versions of saved registers. One to write back to the
hardware register, the other to use during driver operation. This is
necessary to keep ahci's behavior unchanged (write back fixed up
port_map while keeping cap as-is).
This patch makes ahci save the register values once before the first
controller reset, not after it's been reset. Also, the same stored
values are used written back after each reset, so the register values
are properly recovered after suspend/resume cycle.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-acpi.c')
0 files changed, 0 insertions, 0 deletions