IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / libata.h
index 1ef3d3901b479450339bc7389fe0ed30f9a029d3..d0a7ad5ed518d3f6d314c4fede714676def3a26b 100644 (file)
 #include <linux/workqueue.h>
 #include <scsi/scsi_host.h>
 
+/*
+ * Define if arch has non-standard setup.  This is a _PCI_ standard
+ * not a legacy or ISA standard.
+ */
+#ifdef CONFIG_ATA_NONSTANDARD
 #include <asm/libata-portmap.h>
+#else
+#include <asm-generic/libata-portmap.h>
+#endif
 
 /*
  * compile-time options: to be removed as soon as all the drivers are
@@ -101,6 +109,10 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits)
 #define ATA_TAG_POISON         0xfafbfcfdU
 
 /* move to PCI layer? */
+#define PCI_VDEVICE(vendor, device)            \
+       PCI_VENDOR_ID_##vendor, (device),       \
+       PCI_ANY_ID, PCI_ANY_ID, 0, 0
+
 static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)
 {
        return &pdev->dev;
@@ -130,8 +142,9 @@ enum {
        ATA_DFLAG_NCQ           = (1 << 3), /* device supports NCQ */
        ATA_DFLAG_CFG_MASK      = (1 << 8) - 1,
 
-       ATA_DFLAG_PIO           = (1 << 8), /* device currently in PIO mode */
-       ATA_DFLAG_SUSPENDED     = (1 << 9), /* device suspended */
+       ATA_DFLAG_PIO           = (1 << 8), /* device limited to PIO mode */
+       ATA_DFLAG_NCQ_OFF       = (1 << 9), /* devied limited to non-NCQ mode */
+       ATA_DFLAG_SUSPENDED     = (1 << 10), /* device suspended */
        ATA_DFLAG_INIT_MASK     = (1 << 16) - 1,
 
        ATA_DFLAG_DETACH        = (1 << 16),
@@ -615,7 +628,7 @@ struct ata_port_operations {
        void (*error_handler) (struct ata_port *ap);
        void (*post_internal_cmd) (struct ata_queued_cmd *qc);
 
-       irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
+       irq_handler_t irq_handler;
        void (*irq_clear) (struct ata_port *);
 
        u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
@@ -756,7 +769,7 @@ extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf)
 extern int ata_port_start (struct ata_port *ap);
 extern void ata_port_stop (struct ata_port *ap);
 extern void ata_host_stop (struct ata_host *host);
-extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
+extern irqreturn_t ata_interrupt (int irq, void *dev_instance);
 extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf,
                               unsigned int buflen, int write_data);
 extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf,