aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2010-05-07 14:47:50 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-05-14 17:35:52 -0400
commit41dec29bcb05eb8ec396f70ce791c6e3e4ce4712 (patch)
treee76f63519031769e848dcc6eba63c9207cf4d84e /include/linux/libata.h
parent55787183ade44c4f826f581a068f52a1a80c6a2e (diff)
libata: introduce sff_set_devctl() method
The set of libata's taskfile access methods is clearly incomplete as it lacks a method to write to the device control register -- which forces drivers like 'pata_bf54x' and 'pata_scc' to implement more "high level" (and more weighty) methods like freeze() and postreset(). So, introduce the optional sff_set_devctl() method which the drivers only have to implement if the standard iowrite8() can't be used (just like the existing sff_check_altstatus() method) and make use of it in the freeze() and postreset() method implementations (I could also have used it in softreset() method but it also reads other taskfile registers without using tf_read() making that quite pointless); this makes freeze() method implementations in the 'pata_bf54x' and 'pata_scc' methods virtually identical to ata_sff_freeze(), so we can get rid of them completely. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 242eb2646101..6207ec600722 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -850,6 +850,7 @@ struct ata_port_operations {
850 * SFF / taskfile oriented ops 850 * SFF / taskfile oriented ops
851 */ 851 */
852 void (*sff_dev_select)(struct ata_port *ap, unsigned int device); 852 void (*sff_dev_select)(struct ata_port *ap, unsigned int device);
853 void (*sff_set_devctl)(struct ata_port *ap, u8 ctl);
853 u8 (*sff_check_status)(struct ata_port *ap); 854 u8 (*sff_check_status)(struct ata_port *ap);
854 u8 (*sff_check_altstatus)(struct ata_port *ap); 855 u8 (*sff_check_altstatus)(struct ata_port *ap);
855 void (*sff_tf_load)(struct ata_port *ap, const struct ata_taskfile *tf); 856 void (*sff_tf_load)(struct ata_port *ap, const struct ata_taskfile *tf);