]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/scsi/ufs/ufshcd.h
Merge tag 'for-4.2' of git://git.infradead.org/battery-2.6
[mirror_ubuntu-focal-kernel.git] / drivers / scsi / ufs / ufshcd.h
index b845f1535f29216fed7bc3726675163c147c16a2..c40a0e78a6c4298cf437dc312f0a136dd78abfa9 100644 (file)
@@ -246,6 +246,7 @@ struct ufs_pwr_mode_info {
  * @name: variant name
  * @init: called when the driver is initialized
  * @exit: called to cleanup everything done in init
+ * @get_ufs_hci_version: called to get UFS HCI version
  * @clk_scale_notify: notifies that clks are scaled up/down
  * @setup_clocks: called before touching any of the controller registers
  * @setup_regulators: called before accessing the host controller
@@ -263,6 +264,7 @@ struct ufs_hba_variant_ops {
        const char *name;
        int     (*init)(struct ufs_hba *);
        void    (*exit)(struct ufs_hba *);
+       u32     (*get_ufs_hci_version)(struct ufs_hba *);
        void    (*clk_scale_notify)(struct ufs_hba *);
        int     (*setup_clocks)(struct ufs_hba *, bool);
        int     (*setup_regulators)(struct ufs_hba *, bool);
@@ -435,6 +437,28 @@ struct ufs_hba {
         */
        #define UFSHCD_QUIRK_BROKEN_LCC                         UFS_BIT(2)
 
+       /*
+        * The attribute PA_RXHSUNTERMCAP specifies whether or not the
+        * inbound Link supports unterminated line in HS mode. Setting this
+        * attribute to 1 fixes moving to HS gear.
+        */
+       #define UFSHCD_QUIRK_BROKEN_PA_RXHSUNTERMCAP            UFS_BIT(3)
+
+       /*
+        * This quirk needs to be enabled if the host contoller only allows
+        * accessing the peer dme attributes in AUTO mode (FAST AUTO or
+        * SLOW AUTO).
+        */
+       #define UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE          UFS_BIT(4)
+
+       /*
+        * This quirk needs to be enabled if the host contoller doesn't
+        * advertise the correct version in UFS_VER register. If this quirk
+        * is enabled, standard UFS host driver will call the vendor specific
+        * ops (get_ufs_hci_version) to get the correct version.
+        */
+       #define UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION             UFS_BIT(5)
+
        unsigned int quirks;    /* Deviations from standard UFSHCI spec. */
 
        wait_queue_head_t tm_wq;