diff options
author | Tejun Heo <tj@kernel.org> | 2008-07-31 04:02:40 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-29 00:22:28 -0400 |
commit | 82ef04fb4c82542b3eda81cca461f0594ce9cd0b (patch) | |
tree | e513df5ad8dc9f7400830bfc8786afb6bec90fb6 /drivers/ata/sata_vsc.c | |
parent | 6ef190cc92e33565accff6a320f0e7d90480bfe7 (diff) |
libata: make SCR access ops per-link
Logically, SCR access ops should take @link; however, there was no
compelling reason to convert all SCR access ops when adding @link
abstraction as there's one-to-one mapping between a port and a non-PMP
link. However, that assumption won't hold anymore with the scheduled
addition of slave link.
Make SCR access ops per-link.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_vsc.c')
-rw-r--r-- | drivers/ata/sata_vsc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c index f3d635c0a2e9..c57cdff9e6bd 100644 --- a/drivers/ata/sata_vsc.c +++ b/drivers/ata/sata_vsc.c | |||
@@ -98,20 +98,22 @@ enum { | |||
98 | VSC_SATA_INT_PHY_CHANGE), | 98 | VSC_SATA_INT_PHY_CHANGE), |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static int vsc_sata_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) | 101 | static int vsc_sata_scr_read(struct ata_link *link, |
102 | unsigned int sc_reg, u32 *val) | ||
102 | { | 103 | { |
103 | if (sc_reg > SCR_CONTROL) | 104 | if (sc_reg > SCR_CONTROL) |
104 | return -EINVAL; | 105 | return -EINVAL; |
105 | *val = readl(ap->ioaddr.scr_addr + (sc_reg * 4)); | 106 | *val = readl(link->ap->ioaddr.scr_addr + (sc_reg * 4)); |
106 | return 0; | 107 | return 0; |
107 | } | 108 | } |
108 | 109 | ||
109 | 110 | ||
110 | static int vsc_sata_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val) | 111 | static int vsc_sata_scr_write(struct ata_link *link, |
112 | unsigned int sc_reg, u32 val) | ||
111 | { | 113 | { |
112 | if (sc_reg > SCR_CONTROL) | 114 | if (sc_reg > SCR_CONTROL) |
113 | return -EINVAL; | 115 | return -EINVAL; |
114 | writel(val, ap->ioaddr.scr_addr + (sc_reg * 4)); | 116 | writel(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); |
115 | return 0; | 117 | return 0; |
116 | } | 118 | } |
117 | 119 | ||