From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Avri Altman <Avri.Altman@wdc.com>, Can Guo <cang@codeaurora.org>,
Asutosh Das <asutoshd@codeaurora.org>,
Daejun Park <daejun7.park@samsung.com>,
Guenter Roeck <linux@roeck-us.net>, Bean Huo <beanhuo@micron.com>,
Keoseong Park <keosung.park@samsung.com>,
Mike Snitzer <snitzer@redhat.com>,
Eric Biggers <ebiggers@google.com>, Jens Axboe <axboe@kernel.dk>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH 26/29] scsi: ufs: Split the ufshcd.h header file
Date: Thu, 31 Mar 2022 15:34:21 -0700 [thread overview]
Message-ID: <20220331223424.1054715-27-bvanassche@acm.org> (raw)
In-Reply-To: <20220331223424.1054715-1-bvanassche@acm.org>
Split the ufshcd.h header file into a header file that defines the
interface used by UFS drivers and another header file with declarations
and data structures only used by the UFS core.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/ufs/ufs-debugfs.c | 1 +
drivers/scsi/ufs/ufs-hwmon.c | 1 +
drivers/scsi/ufs/ufs-sysfs.c | 3 +-
drivers/scsi/ufs/ufs_bsg.c | 1 +
drivers/scsi/ufs/ufshcd-crypto.h | 2 +
drivers/scsi/ufs/ufshcd-priv.h | 277 +++++++++++++++++++++++++++++++
drivers/scsi/ufs/ufshcd.c | 1 +
drivers/scsi/ufs/ufshcd.h | 212 -----------------------
drivers/scsi/ufs/ufshpb.c | 1 +
9 files changed, 285 insertions(+), 214 deletions(-)
create mode 100644 drivers/scsi/ufs/ufshcd-priv.h
diff --git a/drivers/scsi/ufs/ufs-debugfs.c b/drivers/scsi/ufs/ufs-debugfs.c
index 4a0bbcf1757a..c10a8f09682b 100644
--- a/drivers/scsi/ufs/ufs-debugfs.c
+++ b/drivers/scsi/ufs/ufs-debugfs.c
@@ -5,6 +5,7 @@
#include "ufs-debugfs.h"
#include "ufshcd.h"
+#include "ufshcd-priv.h"
static struct dentry *ufs_debugfs_root;
diff --git a/drivers/scsi/ufs/ufs-hwmon.c b/drivers/scsi/ufs/ufs-hwmon.c
index 74855491dc8f..c38d9d98a86d 100644
--- a/drivers/scsi/ufs/ufs-hwmon.c
+++ b/drivers/scsi/ufs/ufs-hwmon.c
@@ -8,6 +8,7 @@
#include <linux/units.h>
#include "ufshcd.h"
+#include "ufshcd-priv.h"
struct ufs_hwmon_data {
struct ufs_hba *hba;
diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c
index 2bf128e4b613..97ab1a75e3b8 100644
--- a/drivers/scsi/ufs/ufs-sysfs.c
+++ b/drivers/scsi/ufs/ufs-sysfs.c
@@ -6,8 +6,7 @@
#include <linux/err.h>
#include <linux/string.h>
#include "ufs-sysfs.h"
-#include "ufs.h"
-#include "ufshcd.h"
+#include "ufshcd-priv.h"
static const char *ufshcd_uic_link_state_to_string(
enum uic_link_state state)
diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c
index fbcdfb713542..9e9b93867cab 100644
--- a/drivers/scsi/ufs/ufs_bsg.c
+++ b/drivers/scsi/ufs/ufs_bsg.c
@@ -10,6 +10,7 @@
#include <scsi/scsi_host.h>
#include "ufs_bsg.h"
#include "ufshcd.h"
+#include "ufshcd-priv.h"
static int ufs_bsg_get_query_desc_size(struct ufs_hba *hba, int *desc_len,
struct utp_upiu_query *qr)
diff --git a/drivers/scsi/ufs/ufshcd-crypto.h b/drivers/scsi/ufs/ufshcd-crypto.h
index 57dd51256b57..9f98f18f9646 100644
--- a/drivers/scsi/ufs/ufshcd-crypto.h
+++ b/drivers/scsi/ufs/ufshcd-crypto.h
@@ -8,6 +8,8 @@
#include <scsi/scsi_cmnd.h>
#include "ufshcd.h"
+#include "ufshcd-priv.h"
+#include "ufshci.h"
#ifdef CONFIG_SCSI_UFS_CRYPTO
diff --git a/drivers/scsi/ufs/ufshcd-priv.h b/drivers/scsi/ufs/ufshcd-priv.h
new file mode 100644
index 000000000000..4ceb0c63aa15
--- /dev/null
+++ b/drivers/scsi/ufs/ufshcd-priv.h
@@ -0,0 +1,277 @@
+#ifndef _UFSHCD_PRIV_H_
+#define _UFSHCD_PRIV_H_
+
+#include <linux/pm_runtime.h>
+#include "ufshcd.h"
+
+static inline bool ufshcd_is_user_access_allowed(struct ufs_hba *hba)
+{
+ return !hba->shutting_down;
+}
+
+void ufshcd_schedule_eh_work(struct ufs_hba *hba);
+
+static inline bool ufshcd_keep_autobkops_enabled_except_suspend(
+ struct ufs_hba *hba)
+{
+ return hba->caps & UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND;
+}
+
+static inline u8 ufshcd_wb_get_query_index(struct ufs_hba *hba)
+{
+ if (hba->dev_info.wb_buffer_type == WB_BUF_MODE_LU_DEDICATED)
+ return hba->dev_info.wb_dedicated_lu;
+ return 0;
+}
+
+#ifdef CONFIG_SCSI_UFS_HWMON
+void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask);
+void ufs_hwmon_remove(struct ufs_hba *hba);
+void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask);
+#else
+static inline void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask) {}
+static inline void ufs_hwmon_remove(struct ufs_hba *hba) {}
+static inline void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
+#endif
+
+int ufshcd_read_desc_param(struct ufs_hba *hba,
+ enum desc_idn desc_id,
+ int desc_index,
+ u8 param_offset,
+ u8 *param_read_buf,
+ u8 param_size);
+int ufshcd_query_attr_retry(struct ufs_hba *hba, enum query_opcode opcode,
+ enum attr_idn idn, u8 index, u8 selector,
+ u32 *attr_val);
+int ufshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode,
+ enum attr_idn idn, u8 index, u8 selector, u32 *attr_val);
+int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode,
+ enum flag_idn idn, u8 index, bool *flag_res);
+void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit);
+
+#define SD_ASCII_STD true
+#define SD_RAW false
+int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index,
+ u8 **buf, bool ascii);
+
+int ufshcd_hold(struct ufs_hba *hba, bool async);
+void ufshcd_release(struct ufs_hba *hba);
+
+void ufshcd_map_desc_id_to_length(struct ufs_hba *hba, enum desc_idn desc_id,
+ int *desc_length);
+
+int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd);
+
+int ufshcd_exec_raw_upiu_cmd(struct ufs_hba *hba,
+ struct utp_upiu_req *req_upiu,
+ struct utp_upiu_req *rsp_upiu,
+ int msgcode,
+ u8 *desc_buff, int *buff_len,
+ enum query_opcode desc_op);
+
+int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable);
+
+/* Wrapper functions for safely calling variant operations */
+static inline const char *ufshcd_get_var_name(struct ufs_hba *hba)
+{
+ if (hba->vops)
+ return hba->vops->name;
+ return "";
+}
+
+static inline void ufshcd_vops_exit(struct ufs_hba *hba)
+{
+ if (hba->vops && hba->vops->exit)
+ return hba->vops->exit(hba);
+}
+
+static inline u32 ufshcd_vops_get_ufs_hci_version(struct ufs_hba *hba)
+{
+ if (hba->vops && hba->vops->get_ufs_hci_version)
+ return hba->vops->get_ufs_hci_version(hba);
+
+ return ufshcd_readl(hba, REG_UFS_VERSION);
+}
+
+static inline int ufshcd_vops_clk_scale_notify(struct ufs_hba *hba,
+ bool up, enum ufs_notify_change_status status)
+{
+ if (hba->vops && hba->vops->clk_scale_notify)
+ return hba->vops->clk_scale_notify(hba, up, status);
+ return 0;
+}
+
+static inline void ufshcd_vops_event_notify(struct ufs_hba *hba,
+ enum ufs_event_type evt,
+ void *data)
+{
+ if (hba->vops && hba->vops->event_notify)
+ hba->vops->event_notify(hba, evt, data);
+}
+
+static inline int ufshcd_vops_setup_clocks(struct ufs_hba *hba, bool on,
+ enum ufs_notify_change_status status)
+{
+ if (hba->vops && hba->vops->setup_clocks)
+ return hba->vops->setup_clocks(hba, on, status);
+ return 0;
+}
+
+static inline int ufshcd_vops_hce_enable_notify(struct ufs_hba *hba,
+ bool status)
+{
+ if (hba->vops && hba->vops->hce_enable_notify)
+ return hba->vops->hce_enable_notify(hba, status);
+
+ return 0;
+}
+static inline int ufshcd_vops_link_startup_notify(struct ufs_hba *hba,
+ bool status)
+{
+ if (hba->vops && hba->vops->link_startup_notify)
+ return hba->vops->link_startup_notify(hba, status);
+
+ return 0;
+}
+
+static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
+ enum ufs_notify_change_status status,
+ struct ufs_pa_layer_attr *dev_max_params,
+ struct ufs_pa_layer_attr *dev_req_params)
+{
+ if (hba->vops && hba->vops->pwr_change_notify)
+ return hba->vops->pwr_change_notify(hba, status,
+ dev_max_params, dev_req_params);
+
+ return -ENOTSUPP;
+}
+
+static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
+ int tag, u8 tm_function)
+{
+ if (hba->vops && hba->vops->setup_task_mgmt)
+ return hba->vops->setup_task_mgmt(hba, tag, tm_function);
+}
+
+static inline void ufshcd_vops_hibern8_notify(struct ufs_hba *hba,
+ enum uic_cmd_dme cmd,
+ enum ufs_notify_change_status status)
+{
+ if (hba->vops && hba->vops->hibern8_notify)
+ return hba->vops->hibern8_notify(hba, cmd, status);
+}
+
+static inline int ufshcd_vops_apply_dev_quirks(struct ufs_hba *hba)
+{
+ if (hba->vops && hba->vops->apply_dev_quirks)
+ return hba->vops->apply_dev_quirks(hba);
+ return 0;
+}
+
+static inline void ufshcd_vops_fixup_dev_quirks(struct ufs_hba *hba)
+{
+ if (hba->vops && hba->vops->fixup_dev_quirks)
+ hba->vops->fixup_dev_quirks(hba);
+}
+
+static inline int ufshcd_vops_suspend(struct ufs_hba *hba, enum ufs_pm_op op,
+ enum ufs_notify_change_status status)
+{
+ if (hba->vops && hba->vops->suspend)
+ return hba->vops->suspend(hba, op, status);
+
+ return 0;
+}
+
+static inline int ufshcd_vops_resume(struct ufs_hba *hba, enum ufs_pm_op op)
+{
+ if (hba->vops && hba->vops->resume)
+ return hba->vops->resume(hba, op);
+
+ return 0;
+}
+
+static inline void ufshcd_vops_dbg_register_dump(struct ufs_hba *hba)
+{
+ if (hba->vops && hba->vops->dbg_register_dump)
+ hba->vops->dbg_register_dump(hba);
+}
+
+static inline int ufshcd_vops_device_reset(struct ufs_hba *hba)
+{
+ if (hba->vops && hba->vops->device_reset)
+ return hba->vops->device_reset(hba);
+
+ return -EOPNOTSUPP;
+}
+
+static inline void ufshcd_vops_config_scaling_param(struct ufs_hba *hba,
+ struct devfreq_dev_profile *p,
+ struct devfreq_simple_ondemand_data *data)
+{
+ if (hba->vops && hba->vops->config_scaling_param)
+ hba->vops->config_scaling_param(hba, p, data);
+}
+
+extern struct ufs_pm_lvl_states ufs_pm_lvl_states[];
+
+/**
+ * ufshcd_scsi_to_upiu_lun - maps scsi LUN to UPIU LUN
+ * @scsi_lun: scsi LUN id
+ *
+ * Returns UPIU LUN id
+ */
+static inline u8 ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun)
+{
+ if (scsi_is_wlun(scsi_lun))
+ return (scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID)
+ | UFS_UPIU_WLUN_ID;
+ else
+ return scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID;
+}
+
+int __ufshcd_write_ee_control(struct ufs_hba *hba, u32 ee_ctrl_mask);
+int ufshcd_write_ee_control(struct ufs_hba *hba);
+int ufshcd_update_ee_control(struct ufs_hba *hba, u16 *mask, u16 *other_mask,
+ u16 set, u16 clr);
+
+static inline int ufshcd_update_ee_drv_mask(struct ufs_hba *hba,
+ u16 set, u16 clr)
+{
+ return ufshcd_update_ee_control(hba, &hba->ee_drv_mask,
+ &hba->ee_usr_mask, set, clr);
+}
+
+static inline int ufshcd_update_ee_usr_mask(struct ufs_hba *hba,
+ u16 set, u16 clr)
+{
+ return ufshcd_update_ee_control(hba, &hba->ee_usr_mask,
+ &hba->ee_drv_mask, set, clr);
+}
+
+static inline int ufshcd_rpm_get_sync(struct ufs_hba *hba)
+{
+ return pm_runtime_get_sync(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline int ufshcd_rpm_put_sync(struct ufs_hba *hba)
+{
+ return pm_runtime_put_sync(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline void ufshcd_rpm_get_noresume(struct ufs_hba *hba)
+{
+ pm_runtime_get_noresume(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
+{
+ return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline int ufshcd_rpm_put(struct ufs_hba *hba)
+{
+ return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+#endif /* _UFSHCD_PRIV_H_ */
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index de366247628b..bab0f1ee41e6 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -32,6 +32,7 @@
#include "ufs_bsg.h"
#include "ufs_quirks.h"
#include "ufshcd-crypto.h"
+#include "ufshcd-priv.h"
#include "ufshcd.h"
#include "ufshpb.h"
#include "unipro.h"
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index ab0c643296c0..b13469fb1e15 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -1007,11 +1007,6 @@ static inline bool ufshcd_is_wb_allowed(struct ufs_hba *hba)
return hba->caps & UFSHCD_CAP_WB_EN;
}
-static inline bool ufshcd_is_user_access_allowed(struct ufs_hba *hba)
-{
- return !hba->shutting_down;
-}
-
#define ufshcd_writel(hba, val, reg) \
writel((val), (hba)->mmio_base + (reg))
#define ufshcd_readl(hba, reg) \
@@ -1075,18 +1070,6 @@ static inline void *ufshcd_get_variant(struct ufs_hba *hba)
BUG_ON(!hba);
return hba->priv;
}
-static inline bool ufshcd_keep_autobkops_enabled_except_suspend(
- struct ufs_hba *hba)
-{
- return hba->caps & UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND;
-}
-
-static inline u8 ufshcd_wb_get_query_index(struct ufs_hba *hba)
-{
- if (hba->dev_info.wb_buffer_type == WB_BUF_MODE_LU_DEDICATED)
- return hba->dev_info.wb_dedicated_lu;
- return 0;
-}
#ifdef CONFIG_SCSI_UFS_HWMON
void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask);
@@ -1230,13 +1213,6 @@ int __ufshcd_suspend_prepare(struct device *dev, bool rpm_ok_for_spm);
void ufshcd_resume_complete(struct device *dev);
/* Wrapper functions for safely calling variant operations */
-static inline const char *ufshcd_get_var_name(struct ufs_hba *hba)
-{
- if (hba->vops)
- return hba->vops->name;
- return "";
-}
-
static inline int ufshcd_vops_init(struct ufs_hba *hba)
{
if (hba->vops && hba->vops->init)
@@ -1245,61 +1221,6 @@ static inline int ufshcd_vops_init(struct ufs_hba *hba)
return 0;
}
-static inline void ufshcd_vops_exit(struct ufs_hba *hba)
-{
- if (hba->vops && hba->vops->exit)
- return hba->vops->exit(hba);
-}
-
-static inline u32 ufshcd_vops_get_ufs_hci_version(struct ufs_hba *hba)
-{
- if (hba->vops && hba->vops->get_ufs_hci_version)
- return hba->vops->get_ufs_hci_version(hba);
-
- return ufshcd_readl(hba, REG_UFS_VERSION);
-}
-
-static inline int ufshcd_vops_clk_scale_notify(struct ufs_hba *hba,
- bool up, enum ufs_notify_change_status status)
-{
- if (hba->vops && hba->vops->clk_scale_notify)
- return hba->vops->clk_scale_notify(hba, up, status);
- return 0;
-}
-
-static inline void ufshcd_vops_event_notify(struct ufs_hba *hba,
- enum ufs_event_type evt,
- void *data)
-{
- if (hba->vops && hba->vops->event_notify)
- hba->vops->event_notify(hba, evt, data);
-}
-
-static inline int ufshcd_vops_setup_clocks(struct ufs_hba *hba, bool on,
- enum ufs_notify_change_status status)
-{
- if (hba->vops && hba->vops->setup_clocks)
- return hba->vops->setup_clocks(hba, on, status);
- return 0;
-}
-
-static inline int ufshcd_vops_hce_enable_notify(struct ufs_hba *hba,
- bool status)
-{
- if (hba->vops && hba->vops->hce_enable_notify)
- return hba->vops->hce_enable_notify(hba, status);
-
- return 0;
-}
-static inline int ufshcd_vops_link_startup_notify(struct ufs_hba *hba,
- bool status)
-{
- if (hba->vops && hba->vops->link_startup_notify)
- return hba->vops->link_startup_notify(hba, status);
-
- return 0;
-}
-
static inline int ufshcd_vops_phy_initialization(struct ufs_hba *hba)
{
if (hba->vops && hba->vops->phy_initialization)
@@ -1308,102 +1229,8 @@ static inline int ufshcd_vops_phy_initialization(struct ufs_hba *hba)
return 0;
}
-static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
- enum ufs_notify_change_status status,
- struct ufs_pa_layer_attr *dev_max_params,
- struct ufs_pa_layer_attr *dev_req_params)
-{
- if (hba->vops && hba->vops->pwr_change_notify)
- return hba->vops->pwr_change_notify(hba, status,
- dev_max_params, dev_req_params);
-
- return -ENOTSUPP;
-}
-
-static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
- int tag, u8 tm_function)
-{
- if (hba->vops && hba->vops->setup_task_mgmt)
- return hba->vops->setup_task_mgmt(hba, tag, tm_function);
-}
-
-static inline void ufshcd_vops_hibern8_notify(struct ufs_hba *hba,
- enum uic_cmd_dme cmd,
- enum ufs_notify_change_status status)
-{
- if (hba->vops && hba->vops->hibern8_notify)
- return hba->vops->hibern8_notify(hba, cmd, status);
-}
-
-static inline int ufshcd_vops_apply_dev_quirks(struct ufs_hba *hba)
-{
- if (hba->vops && hba->vops->apply_dev_quirks)
- return hba->vops->apply_dev_quirks(hba);
- return 0;
-}
-
-static inline void ufshcd_vops_fixup_dev_quirks(struct ufs_hba *hba)
-{
- if (hba->vops && hba->vops->fixup_dev_quirks)
- hba->vops->fixup_dev_quirks(hba);
-}
-
-static inline int ufshcd_vops_suspend(struct ufs_hba *hba, enum ufs_pm_op op,
- enum ufs_notify_change_status status)
-{
- if (hba->vops && hba->vops->suspend)
- return hba->vops->suspend(hba, op, status);
-
- return 0;
-}
-
-static inline int ufshcd_vops_resume(struct ufs_hba *hba, enum ufs_pm_op op)
-{
- if (hba->vops && hba->vops->resume)
- return hba->vops->resume(hba, op);
-
- return 0;
-}
-
-static inline void ufshcd_vops_dbg_register_dump(struct ufs_hba *hba)
-{
- if (hba->vops && hba->vops->dbg_register_dump)
- hba->vops->dbg_register_dump(hba);
-}
-
-static inline int ufshcd_vops_device_reset(struct ufs_hba *hba)
-{
- if (hba->vops && hba->vops->device_reset)
- return hba->vops->device_reset(hba);
-
- return -EOPNOTSUPP;
-}
-
-static inline void ufshcd_vops_config_scaling_param(struct ufs_hba *hba,
- struct devfreq_dev_profile *p,
- struct devfreq_simple_ondemand_data *data)
-{
- if (hba->vops && hba->vops->config_scaling_param)
- hba->vops->config_scaling_param(hba, p, data);
-}
-
extern struct ufs_pm_lvl_states ufs_pm_lvl_states[];
-/**
- * ufshcd_scsi_to_upiu_lun - maps scsi LUN to UPIU LUN
- * @scsi_lun: scsi LUN id
- *
- * Returns UPIU LUN id
- */
-static inline u8 ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun)
-{
- if (scsi_is_wlun(scsi_lun))
- return (scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID)
- | UFS_UPIU_WLUN_ID;
- else
- return scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID;
-}
-
int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len,
const char *prefix);
@@ -1412,43 +1239,4 @@ int ufshcd_write_ee_control(struct ufs_hba *hba);
int ufshcd_update_ee_control(struct ufs_hba *hba, u16 *mask, u16 *other_mask,
u16 set, u16 clr);
-static inline int ufshcd_update_ee_drv_mask(struct ufs_hba *hba,
- u16 set, u16 clr)
-{
- return ufshcd_update_ee_control(hba, &hba->ee_drv_mask,
- &hba->ee_usr_mask, set, clr);
-}
-
-static inline int ufshcd_update_ee_usr_mask(struct ufs_hba *hba,
- u16 set, u16 clr)
-{
- return ufshcd_update_ee_control(hba, &hba->ee_usr_mask,
- &hba->ee_drv_mask, set, clr);
-}
-
-static inline int ufshcd_rpm_get_sync(struct ufs_hba *hba)
-{
- return pm_runtime_get_sync(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline int ufshcd_rpm_put_sync(struct ufs_hba *hba)
-{
- return pm_runtime_put_sync(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline void ufshcd_rpm_get_noresume(struct ufs_hba *hba)
-{
- pm_runtime_get_noresume(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
-{
- return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline int ufshcd_rpm_put(struct ufs_hba *hba)
-{
- return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
-}
-
#endif /* End of Header */
diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index d456404e5c49..daac81290f50 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -17,6 +17,7 @@
#include "../sd.h"
#include "ufshcd.h"
#include "ufshpb.h"
+#include "ufshcd-priv.h"
#define ACTIVATION_THRESHOLD 8 /* 8 IOs */
#define READ_TO_MS 1000
next prev parent reply other threads:[~2022-03-31 22:40 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 22:33 [PATCH 00/29] UFS patches for kernel v5.19 Bart Van Assche
2022-03-31 22:33 ` [PATCH 01/29] scsi: ufs: Declare ufshcd_wait_for_register() static Bart Van Assche
2022-04-01 18:33 ` Avri Altman
2022-04-03 9:45 ` Bean Huo
2022-03-31 22:33 ` [PATCH 02/29] scsi: ufs: Remove superfluous boolean conversions Bart Van Assche
2022-03-31 23:44 ` Bjorn Andersson
2022-04-03 3:20 ` Bart Van Assche
2022-04-01 18:35 ` Avri Altman
2022-03-31 22:33 ` [PATCH 03/29] scsi: ufs: Simplify statements that return a boolean Bart Van Assche
2022-03-31 23:45 ` Bjorn Andersson
2022-04-01 18:49 ` Avri Altman
2022-04-03 3:30 ` Bart Van Assche
2022-03-31 22:33 ` [PATCH 04/29] scsi: ufs: Remove ufshcd_lrb.sense_bufflen Bart Van Assche
2022-04-01 18:56 ` Avri Altman
2022-03-31 22:34 ` [PATCH 05/29] scsi: ufs: Remove ufshcd_lrb.sense_buffer Bart Van Assche
2022-04-01 19:21 ` Avri Altman
2022-04-03 4:26 ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 06/29] scsi: ufs: Use get_unaligned_be16() instead of be16_to_cpup() Bart Van Assche
2022-04-03 11:20 ` Bean Huo
2022-03-31 22:34 ` [PATCH 07/29] scsi: ufs: Remove the UFS_FIX() and END_FIX() macros Bart Van Assche
2022-04-01 19:43 ` Avri Altman
2022-03-31 22:34 ` [PATCH 08/29] scsi: ufs: Rename struct ufs_dev_fix into ufs_dev_quirk Bart Van Assche
2022-04-01 19:47 ` Avri Altman
2022-04-04 21:15 ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 09/29] scsi: ufs: Declare the quirks array const Bart Van Assche
2022-04-01 19:56 ` Avri Altman
2022-04-04 21:14 ` Bart Van Assche
2022-04-08 14:41 ` Krzysztof Kozlowski
2022-04-05 6:14 ` Avri Altman
2022-03-31 22:34 ` [PATCH 10/29] scsi: ufs: Invert the return value of ufshcd_is_hba_active() Bart Van Assche
2022-04-02 6:32 ` Avri Altman
2022-03-31 22:34 ` [PATCH 11/29] scsi: ufs: Remove unused constants and code Bart Van Assche
2022-04-02 6:59 ` Avri Altman
2022-04-04 2:07 ` Bart Van Assche
2022-04-05 6:55 ` Avri Altman
2022-04-07 2:33 ` Stanley Chu
2022-03-31 22:34 ` [PATCH 12/29] scsi: ufs: Switch to aggregate initialization Bart Van Assche
2022-04-02 7:07 ` Avri Altman
2022-03-31 22:34 ` [PATCH 13/29] scsi: ufs: Remove the LUN quiescing code from ufshcd_wl_shutdown() Bart Van Assche
2022-04-01 6:20 ` Adrian Hunter
2022-04-01 13:52 ` Bart Van Assche
2022-04-01 14:35 ` Adrian Hunter
2022-04-05 19:11 ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 14/29] scsi: ufs: Make the config_scaling_param calls type safe Bart Van Assche
2022-03-31 23:48 ` Bjorn Andersson
2022-04-01 4:08 ` Bart Van Assche
2022-04-03 3:51 ` Bjorn Andersson
2022-03-31 22:34 ` [PATCH 15/29] scsi: ufs: Remove the driver version Bart Van Assche
2022-04-03 7:10 ` Avri Altman
2022-04-03 21:51 ` Bart Van Assche
2022-04-03 15:52 ` Bean Huo
2022-04-04 6:25 ` Avri Altman
2022-03-31 22:34 ` [PATCH 16/29] scsi: ufs: Rename sdev_ufs_device into ufs_device_wlun Bart Van Assche
2022-04-03 7:25 ` Avri Altman
2022-03-31 22:34 ` [PATCH 17/29] scsi: ufs: Use an SPDX license identifier in the Kconfig file Bart Van Assche
2022-03-31 22:34 ` [PATCH 18/29] scsi: ufs: Remove paths from source code comments Bart Van Assche
2022-04-03 7:33 ` Avri Altman
2022-03-31 22:34 ` [PATCH 19/29] scsi: ufs: Remove the TRUE and FALSE definitions Bart Van Assche
2022-04-01 2:19 ` Chanho Park
2022-04-04 2:39 ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 20/29] scsi: ufs: Remove locking from around single register writes Bart Van Assche
2022-04-05 6:19 ` Avri Altman
2022-03-31 22:34 ` [PATCH 21/29] scsi: ufs: Introduce ufshcd_clkgate_delay_set() Bart Van Assche
2022-04-05 6:20 ` Avri Altman
2022-03-31 22:34 ` [PATCH 22/29] scsi: ufs: qcom: Fix ufs_qcom_resume() Bart Van Assche
2022-03-31 23:50 ` Bjorn Andersson
2022-03-31 22:34 ` [PATCH 23/29] scsi: ufs: Remove unnecessary ufshcd-crypto.h include directives Bart Van Assche
2022-03-31 22:34 ` [PATCH 24/29] scsi: ufs: Fix kernel-doc syntax in ufshcd.h Bart Van Assche
2022-04-05 6:27 ` Avri Altman
2022-03-31 22:34 ` [PATCH 25/29] scsi: ufs: Minimize #include directives Bart Van Assche
2022-04-01 6:53 ` Adrian Hunter
2022-04-01 13:52 ` Bart Van Assche
2022-03-31 22:34 ` Bart Van Assche [this message]
2022-04-01 0:21 ` [PATCH 26/29] scsi: ufs: Split the ufshcd.h header file Chanho Park
2022-04-01 4:14 ` Bart Van Assche
2022-04-01 4:30 ` Chanho Park
2022-04-05 6:39 ` Avri Altman
2022-04-05 14:10 ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 27/29] scsi: ufs: Move the struct ufs_ref_clk definition Bart Van Assche
2022-04-05 6:50 ` Avri Altman
2022-03-31 22:34 ` [PATCH 28/29] scsi: ufs: Move the ufs_is_valid_unit_desc_lun() definition Bart Van Assche
2022-04-05 6:53 ` Avri Altman
2022-04-05 14:13 ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 29/29] scsi: ufs: Split the drivers/scsi/ufs directory Bart Van Assche
2022-04-01 5:12 ` Christoph Hellwig
2022-04-01 13:56 ` Bart Van Assche
2022-04-01 6:38 ` Adrian Hunter
2022-04-01 13:58 ` Bart Van Assche
2022-04-01 17:03 ` Alim Akhtar
2022-04-02 3:21 ` Bart Van Assche
[not found] ` <CGME20220331223522epcas2p4f8f20c2ec00dbc6d5a7bf855a1dd7395@epcms2p5>
2022-04-01 6:14 ` [PATCH 04/29] scsi: ufs: Remove ufshcd_lrb.sense_bufflen Keoseong Park
2022-04-01 9:28 ` [PATCH 00/29] UFS patches for kernel v5.19 Bean Huo
2022-04-01 9:32 ` Bean Huo
2022-04-01 14:12 ` Bart Van Assche
2022-04-03 5:59 ` Avri Altman
2022-04-03 21:36 ` Bean Huo
2022-04-03 21:54 ` Bart Van Assche
2022-04-04 8:12 ` Bean Huo
2022-04-04 21:13 ` Bart Van Assche
2022-04-05 9:33 ` Bean Huo
2022-04-05 14:22 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220331223424.1054715-27-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=Avri.Altman@wdc.com \
--cc=adrian.hunter@intel.com \
--cc=asutoshd@codeaurora.org \
--cc=axboe@kernel.dk \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=daejun7.park@samsung.com \
--cc=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=keosung.park@samsung.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=martin.petersen@oracle.com \
--cc=snitzer@redhat.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).