hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/scsi/ufs/ufshcd-pltfrm.h
....@@ -1,14 +1,5 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2
- *
3
- * This program is free software; you can redistribute it and/or modify
4
- * it under the terms of the GNU General Public License version 2 and
5
- * only version 2 as published by the Free Software Foundation.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
11
- *
123 */
134
145 #ifndef UFSHCD_PLTFRM_H_
....@@ -16,8 +7,29 @@
167
178 #include "ufshcd.h"
189
10
+#define UFS_PWM_MODE 1
11
+#define UFS_HS_MODE 2
12
+
13
+struct ufs_dev_params {
14
+ u32 pwm_rx_gear; /* pwm rx gear to work in */
15
+ u32 pwm_tx_gear; /* pwm tx gear to work in */
16
+ u32 hs_rx_gear; /* hs rx gear to work in */
17
+ u32 hs_tx_gear; /* hs tx gear to work in */
18
+ u32 rx_lanes; /* number of rx lanes */
19
+ u32 tx_lanes; /* number of tx lanes */
20
+ u32 rx_pwr_pwm; /* rx pwm working pwr */
21
+ u32 tx_pwr_pwm; /* tx pwm working pwr */
22
+ u32 rx_pwr_hs; /* rx hs working pwr */
23
+ u32 tx_pwr_hs; /* tx hs working pwr */
24
+ u32 hs_rate; /* rate A/B to work in HS */
25
+ u32 desired_working_mode;
26
+};
27
+
28
+int ufshcd_get_pwr_dev_param(struct ufs_dev_params *dev_param,
29
+ struct ufs_pa_layer_attr *dev_max,
30
+ struct ufs_pa_layer_attr *agreed_pwr);
1931 int ufshcd_pltfrm_init(struct platform_device *pdev,
20
- struct ufs_hba_variant_ops *vops);
32
+ const struct ufs_hba_variant_ops *vops);
2133 void ufshcd_pltfrm_shutdown(struct platform_device *pdev);
2234
2335 #ifdef CONFIG_PM