Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / drivers / ata / ahci.h
index 5513296e5e2e15ebd43b8ecfc1f28df5bcdcf00c..40f0e34f17af38e84167f79c162bf3b5922004ed 100644 (file)
@@ -53,7 +53,7 @@
 
 enum {
        AHCI_MAX_PORTS          = 32,
-       AHCI_MAX_CLKS           = 3,
+       AHCI_MAX_CLKS           = 5,
        AHCI_MAX_SG             = 168, /* hardware max is 64K */
        AHCI_DMA_BOUNDARY       = 0xffffffff,
        AHCI_MAX_CMDS           = 32,
@@ -304,7 +304,7 @@ struct ahci_port_priv {
        unsigned int            ncq_saw_d2h:1;
        unsigned int            ncq_saw_dmas:1;
        unsigned int            ncq_saw_sdb:1;
-       u32                     intr_status;    /* interrupts to handle */
+       atomic_t                intr_status;    /* interrupts to handle */
        spinlock_t              lock;           /* protects parent ata_port */
        u32                     intr_mask;      /* interrupts to enable */
        bool                    fbs_supported;  /* set iff FBS is supported */
@@ -316,8 +316,12 @@ struct ahci_port_priv {
 };
 
 struct ahci_host_priv {
-       void __iomem *          mmio;           /* bus-independent mem map */
+       /* Input fields */
        unsigned int            flags;          /* AHCI_HFLAG_* */
+       u32                     force_port_map; /* force port map */
+       u32                     mask_port_map;  /* mask out particular bits */
+
+       void __iomem *          mmio;           /* bus-independent mem map */
        u32                     cap;            /* cap to use */
        u32                     cap2;           /* cap2 to use */
        u32                     port_map;       /* port map to use */
@@ -330,7 +334,12 @@ struct ahci_host_priv {
        bool                    got_runtime_pm; /* Did we do pm_runtime_get? */
        struct clk              *clks[AHCI_MAX_CLKS]; /* Optional */
        struct regulator        *target_pwr;    /* Optional */
-       struct phy              *phy;           /* If platform uses phy */
+       /*
+        * If platform uses PHYs. There is a 1:1 relation between the port number and
+        * the PHY position in this array.
+        */
+       struct phy              **phys;
+       unsigned                nports;         /* Number of ports */
        void                    *plat_data;     /* Other platform data */
        /*
         * Optional ahci_start_engine override, if not set this gets set to the
@@ -361,9 +370,7 @@ unsigned int ahci_dev_classify(struct ata_port *ap);
 void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag,
                        u32 opts);
 void ahci_save_initial_config(struct device *dev,
-                             struct ahci_host_priv *hpriv,
-                             unsigned int force_port_map,
-                             unsigned int mask_port_map);
+                             struct ahci_host_priv *hpriv);
 void ahci_init_controller(struct ata_host *host);
 int ahci_reset_controller(struct ata_host *host);
 
@@ -381,11 +388,9 @@ int ahci_port_resume(struct ata_port *ap);
 void ahci_set_em_messages(struct ahci_host_priv *hpriv,
                          struct ata_port_info *pi);
 int ahci_reset_em(struct ata_host *host);
-irqreturn_t ahci_interrupt(int irq, void *dev_instance);
-irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance);
-irqreturn_t ahci_thread_fn(int irq, void *dev_instance);
 void ahci_print_info(struct ata_host *host, const char *scc_s);
-int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis);
+int ahci_host_activate(struct ata_host *host, int irq,
+                      struct scsi_host_template *sht);
 void ahci_error_handler(struct ata_port *ap);
 
 static inline void __iomem *__ahci_port_base(struct ata_host *host,