diff options
author | Serge Semin <Sergey.Semin@baikalelectronics.ru> | 2022-09-09 22:36:12 +0300 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-09-17 01:39:50 +0900 |
commit | fad64dc06579ac1cc05d5ab73bdaa62ee6435ed8 (patch) | |
tree | 3217042fd4aec43b9e6385727d1ce443d97fd23b /drivers/ata | |
parent | 88589772e80cec5dc2058d7d84a1a97a31674195 (diff) |
ata: libahci: Don't read AHCI version twice in the save-config method
There is no point in reading the AHCI version all over in the tail of the
ahci_save_initial_config() method. That register is RO and doesn't change
its value even after reset. So just reuse the data, which has already been
read from there earlier in the head of the function.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libahci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 000a7072614f..1ffaa5f5f21a 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -564,7 +564,7 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv) /* record values to use during operation */ hpriv->cap = cap; hpriv->cap2 = cap2; - hpriv->version = readl(mmio + HOST_VERSION); + hpriv->version = vers; hpriv->port_map = port_map; if (!hpriv->start_engine) |