* [PATCH v1 01/17] scsi: ufs-qcom: add number of lanes per direction
[not found] ` <1442155977-7686-1-git-send-email-ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2015-09-13 14:52 ` Yaniv Gardi
2015-10-21 15:47 ` Akinobu Mita
0 siblings, 1 reply; 5+ messages in thread
From: Yaniv Gardi @ 2015-09-13 14:52 UTC (permalink / raw)
To: James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk,
pebolle-IWqWACnzNjzz+pZb47iToQ, hch-wEGCiKHe2LqWVfeAwA7xHQ
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-scsi-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
santoshsy-Re5JQEeQqe8AvxtiuMwx3w,
linux-scsi-owner-u79uwXL29TY76Z2rM5mHXA,
subhashj-sgV2jX0FEOL9JmXXK+q4OQ, ygardi-sgV2jX0FEOL9JmXXK+q4OQ,
gbroner-sgV2jX0FEOL9JmXXK+q4OQ, draviv-sgV2jX0FEOL9JmXXK+q4OQ,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Vinayak Holikatti, James E.J. Bottomley, Christoph Hellwig,
Sujit Reddy Thumma, Raviv Shvili, Sahitya Tummala,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Different platform may have different number of lanes
for the UFS link.
Add parameter to device tree specifying how many lanes
should be configured for the UFS link.
Signed-off-by: Gilad Broner <gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Signed-off-by: Yaniv Gardi <ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
.../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 3 ++
drivers/scsi/ufs/ufs-qcom.c | 38 ++++++++++++----------
drivers/scsi/ufs/ufshcd.c | 20 ++++++++++++
drivers/scsi/ufs/ufshcd.h | 2 ++
4 files changed, 46 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
index b39e765..56b105f 100644
--- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
+++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
@@ -31,6 +31,9 @@ Optional properties:
defined or a value in the array is "0" then it is assumed
that the frequency is set by the parent clock or a
fixed rate clock source.
+- lanes-per-direction: number of lanes available per direction - either 1 or 2.
+ Note that it is assume same number of lanes is used both directions at once.
+ If not specified, default is 2 lanes per direction.
Note: If above properties are not defined it can be assumed that the supply
regulators or clocks are always on.
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index c99eac9..3196197 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -132,21 +132,23 @@ static int ufs_qcom_enable_lane_clks(struct ufs_qcom_host *host)
if (err)
goto disable_rx_l0;
- err = ufs_qcom_host_clk_enable(dev, "rx_lane1_sync_clk",
- host->rx_l1_sync_clk);
- if (err)
- goto disable_tx_l0;
-
- err = ufs_qcom_host_clk_enable(dev, "tx_lane1_sync_clk",
- host->tx_l1_sync_clk);
- if (err)
- goto disable_rx_l1;
+ if (host->hba->lanes_per_direction > 1) {
+ err = ufs_qcom_host_clk_enable(dev, "rx_lane1_sync_clk",
+ host->rx_l1_sync_clk);
+ if (err)
+ goto disable_tx_l0;
+ err = ufs_qcom_host_clk_enable(dev, "tx_lane1_sync_clk",
+ host->tx_l1_sync_clk);
+ if (err)
+ goto disable_rx_l1;
+ }
host->is_lane_clks_enabled = true;
goto out;
disable_rx_l1:
- clk_disable_unprepare(host->rx_l1_sync_clk);
+ if (host->hba->lanes_per_direction > 1)
+ clk_disable_unprepare(host->rx_l1_sync_clk);
disable_tx_l0:
clk_disable_unprepare(host->tx_l0_sync_clk);
disable_rx_l0:
@@ -170,14 +172,16 @@ static int ufs_qcom_init_lane_clks(struct ufs_qcom_host *host)
if (err)
goto out;
- err = ufs_qcom_host_clk_get(dev, "rx_lane1_sync_clk",
- &host->rx_l1_sync_clk);
- if (err)
- goto out;
-
- err = ufs_qcom_host_clk_get(dev, "tx_lane1_sync_clk",
- &host->tx_l1_sync_clk);
+ /* In case of single lane per direction, don't read lane1 clocks */
+ if (host->hba->lanes_per_direction > 1) {
+ err = ufs_qcom_host_clk_get(dev, "rx_lane1_sync_clk",
+ &host->rx_l1_sync_clk);
+ if (err)
+ goto out;
+ err = ufs_qcom_host_clk_get(dev, "tx_lane1_sync_clk",
+ &host->tx_l1_sync_clk);
+ }
out:
return err;
}
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 1c37a7d..9638553 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -40,6 +40,7 @@
#include <linux/async.h>
#include <linux/devfreq.h>
+#include <linux/of.h>
#include "ufshcd.h"
#include "unipro.h"
#define UFSHCD_REQ_SENSE_SIZE 18
@@ -87,6 +88,8 @@
/* Interrupt aggregation default timeout, unit: 40us */
#define INT_AGGR_DEF_TO 0x02
+#define UFSHCD_DEFAULT_LANES_PER_DIRECTION 2
+
#define ufshcd_toggle_vreg(_dev, _vreg, _on) \
({ \
int _ret; \
@@ -5765,6 +5768,21 @@ static struct devfreq_dev_profile ufs_devfreq_profile = {
.get_dev_status = ufshcd_devfreq_get_dev_status,
};
+static void ufshcd_init_lanes_per_dir(struct ufs_hba *hba)
+{
+ struct device *dev = hba->dev;
+ int ret;
+
+ ret = of_property_read_u32(dev->of_node, "lanes-per-direction",
+ &hba->lanes_per_direction);
+ if (ret) {
+ dev_dbg(hba->dev,
+ "%s: failed to read lanes-per-direction, ret=%d\n",
+ __func__, ret);
+ hba->lanes_per_direction = UFSHCD_DEFAULT_LANES_PER_DIRECTION;
+ }
+}
+
/**
* ufshcd_init - Driver initialization routine
* @hba: per-adapter instance
@@ -5788,6 +5806,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
hba->mmio_base = mmio_base;
hba->irq = irq;
+ ufshcd_init_lanes_per_dir(hba);
+
err = ufshcd_hba_init(hba);
if (err)
goto out_error;
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index f8ce680..e7bcf65 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -509,6 +509,8 @@ struct ufs_hba {
bool wlun_dev_clr_ua;
+ /* Number of lanes available (1 or 2) for Rx/Tx */
+ u32 lanes_per_direction;
struct ufs_pa_layer_attr pwr_info;
struct ufs_pwr_mode_info max_pwr_info;
--
1.8.5.2
--
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level
[not found] <1442155977-7686-1-git-send-email-ygardi@codeaurora.org>
[not found] ` <1442155977-7686-1-git-send-email-ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2015-09-13 14:52 ` Yaniv Gardi
2015-10-21 15:51 ` Akinobu Mita
1 sibling, 1 reply; 5+ messages in thread
From: Yaniv Gardi @ 2015-09-13 14:52 UTC (permalink / raw)
To: James.Bottomley, pebolle, hch
Cc: linux-kernel, linux-scsi, linux-arm-msm, santoshsy,
linux-scsi-owner, subhashj, ygardi, gbroner, draviv, Rob Herring,
Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Vinayak Holikatti, James E.J. Bottomley, Christoph Hellwig,
Sujit Reddy Thumma, Raviv Shvili, Sahitya Tummala,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
UFS device and link can be put in multiple different low power modes
hence UFS driver supports multiple different low power modes.
By default UFS driver selects the default (optimal) low power mode
(which gives moderate power savings and have relatively less enter
and exit latencies) but we might have to tune this default power
mode for different chipset platforms to meet the low power
requirements/goals. Hence this patch adds option to change default
UFS low power mode (level).
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
---
.../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 8 +++++
drivers/scsi/ufs/ufs-qcom.c | 9 ++---
drivers/scsi/ufs/ufshcd-pltfrm.c | 17 +++++++++-
drivers/scsi/ufs/ufshcd.c | 39 ++++++++++++++++++++++
drivers/scsi/ufs/ufshcd.h | 4 +--
5 files changed, 70 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
index 56b105f..de9ff25 100644
--- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
+++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
@@ -31,6 +31,14 @@ Optional properties:
defined or a value in the array is "0" then it is assumed
that the frequency is set by the parent clock or a
fixed rate clock source.
+- rpm-level : UFS Runtime power management level. Following PM levels are supported:
+ 0 - Both UFS device and Link in active state (Highest power consumption)
+ 1 - UFS device in active state but Link in Hibern8 state
+ 2 - UFS device in Sleep state but Link in active state
+ 3 - UFS device in Sleep state and Link in hibern8 state (default PM level)
+ 4 - UFS device in Power-down state and Link in Hibern8 state
+ 5 - UFS device in Power-down state and Link in OFF state (Lowest power consumption)
+- spm-level : UFS System power management level. Allowed PM levels are same as rpm-level.
- lanes-per-direction: number of lanes available per direction - either 1 or 2.
Note that it is assume same number of lanes is used both directions at once.
If not specified, default is 2 lanes per direction.
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 3196197..1d26e49 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -1195,11 +1195,12 @@ static int ufs_qcom_init(struct ufs_hba *hba)
if (res) {
host->dev_ref_clk_ctrl_mmio =
devm_ioremap_resource(dev, res);
- if (IS_ERR(host->dev_ref_clk_ctrl_mmio)) {
- dev_warn(dev,
- "%s: could not map dev_ref_clk_ctrl_mmio, err %ld\n",
+ if (IS_ERR((__force void const *)
+ host->dev_ref_clk_ctrl_mmio)) {
+ dev_warn(dev, "%s: could not map dev_ref_clk_ctrl_mmio, err %ld\n",
__func__,
- PTR_ERR(host->dev_ref_clk_ctrl_mmio));
+ PTR_ERR((__force void const *)
+ host->dev_ref_clk_ctrl_mmio));
host->dev_ref_clk_ctrl_mmio = NULL;
}
host->dev_ref_clk_en_mask = BIT(5);
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 8eafcfa..9188ea4 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -224,7 +224,20 @@ out:
return err;
}
-#ifdef CONFIG_PM
+static void ufshcd_parse_pm_levels(struct ufs_hba *hba)
+{
+ struct device *dev = hba->dev;
+ struct device_node *np = dev->of_node;
+
+ if (np) {
+ if (of_property_read_u32(np, "rpm-level", &hba->rpm_lvl))
+ hba->rpm_lvl = -1;
+ if (of_property_read_u32(np, "spm-level", &hba->spm_lvl))
+ hba->spm_lvl = -1;
+ }
+}
+
+#ifdef CONFIG_SMP
/**
* ufshcd_pltfrm_suspend - suspend power management function
* @dev: pointer to device handle
@@ -328,6 +341,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
goto out;
}
+ ufshcd_parse_pm_levels(hba);
+
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 9638553..388536e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -188,6 +188,30 @@ ufs_get_pm_lvl_to_link_pwr_state(enum ufs_pm_level lvl)
return ufs_pm_lvl_states[lvl].link_state;
}
+static inline enum ufs_pm_level
+ufs_get_desired_pm_lvl_for_dev_link_state(enum ufs_dev_pwr_mode dev_state,
+ enum uic_link_state link_state)
+{
+ enum ufs_pm_level lvl;
+
+ for (lvl = UFS_PM_LVL_0; lvl < UFS_PM_LVL_MAX; lvl++) {
+ if ((ufs_pm_lvl_states[lvl].dev_state == dev_state) &&
+ (ufs_pm_lvl_states[lvl].link_state == link_state))
+ return lvl;
+ }
+
+ /* if no match found, return the level 0 */
+ return UFS_PM_LVL_0;
+}
+
+static inline bool ufshcd_is_valid_pm_lvl(int lvl)
+{
+ if (lvl >= 0 && lvl < ARRAY_SIZE(ufs_pm_lvl_states))
+ return true;
+ else
+ return false;
+}
+
static void ufshcd_tmc_handler(struct ufs_hba *hba);
static void ufshcd_async_scan(void *data, async_cookie_t cookie);
static int ufshcd_reset_and_restore(struct ufs_hba *hba);
@@ -5907,6 +5931,21 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
hba->clk_scaling.window_start_t = 0;
}
+ /*
+ * If rpm_lvl and and spm_lvl are not already set to valid levels,
+ * set the default power management level for UFS runtime and system
+ * suspend. Default power saving mode selected is keeping UFS link in
+ * Hibern8 state and UFS device in sleep.
+ */
+ if (!ufshcd_is_valid_pm_lvl(hba->rpm_lvl))
+ hba->rpm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
+ UFS_SLEEP_PWR_MODE,
+ UIC_LINK_HIBERN8_STATE);
+ if (!ufshcd_is_valid_pm_lvl(hba->spm_lvl))
+ hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
+ UFS_SLEEP_PWR_MODE,
+ UIC_LINK_HIBERN8_STATE);
+
/* Hold auto suspend until async scan completes */
pm_runtime_get_sync(dev);
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index e7bcf65..889335a 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -408,9 +408,9 @@ struct ufs_hba {
enum ufs_dev_pwr_mode curr_dev_pwr_mode;
enum uic_link_state uic_link_state;
/* Desired UFS power management level during runtime PM */
- enum ufs_pm_level rpm_lvl;
+ int rpm_lvl;
/* Desired UFS power management level during system PM */
- enum ufs_pm_level spm_lvl;
+ int spm_lvl;
int pm_op_in_progress;
struct ufshcd_lrb *lrb;
--
1.8.5.2
--
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 01/17] scsi: ufs-qcom: add number of lanes per direction
2015-09-13 14:52 ` [PATCH v1 01/17] scsi: ufs-qcom: add number of lanes per direction Yaniv Gardi
@ 2015-10-21 15:47 ` Akinobu Mita
0 siblings, 0 replies; 5+ messages in thread
From: Akinobu Mita @ 2015-10-21 15:47 UTC (permalink / raw)
To: Yaniv Gardi
Cc: Jej B, Paul Bolle, Christoph Hellwig, LKML,
linux-scsi@vger.kernel.org, linux-arm-msm, Santosh Y,
linux-scsi-owner, Subhash Jadavani, Gilad Broner, Dolev Raviv,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Vinayak Holikatti, James E.J. Bottomley, Christoph Hellwig,
Sujit Reddy Thumma, Raviv Shvili, Sahitya Tummala, open
2015-09-13 23:52 GMT+09:00 Yaniv Gardi <ygardi@codeaurora.org>:
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 1c37a7d..9638553 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -40,6 +40,7 @@
> #include <linux/async.h>
> #include <linux/devfreq.h>
>
> +#include <linux/of.h>
> #include "ufshcd.h"
> #include "unipro.h"
> #define UFSHCD_REQ_SENSE_SIZE 18
> @@ -87,6 +88,8 @@
> /* Interrupt aggregation default timeout, unit: 40us */
> #define INT_AGGR_DEF_TO 0x02
>
> +#define UFSHCD_DEFAULT_LANES_PER_DIRECTION 2
> +
> #define ufshcd_toggle_vreg(_dev, _vreg, _on) \
> ({ \
> int _ret; \
> @@ -5765,6 +5768,21 @@ static struct devfreq_dev_profile ufs_devfreq_profile = {
> .get_dev_status = ufshcd_devfreq_get_dev_status,
> };
>
> +static void ufshcd_init_lanes_per_dir(struct ufs_hba *hba)
> +{
> + struct device *dev = hba->dev;
> + int ret;
> +
> + ret = of_property_read_u32(dev->of_node, "lanes-per-direction",
> + &hba->lanes_per_direction);
> + if (ret) {
> + dev_dbg(hba->dev,
> + "%s: failed to read lanes-per-direction, ret=%d\n",
> + __func__, ret);
> + hba->lanes_per_direction = UFSHCD_DEFAULT_LANES_PER_DIRECTION;
> + }
> +}
> +
> /**
> * ufshcd_init - Driver initialization routine
> * @hba: per-adapter instance
> @@ -5788,6 +5806,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
> hba->mmio_base = mmio_base;
> hba->irq = irq;
>
> + ufshcd_init_lanes_per_dir(hba);
> +
> err = ufshcd_hba_init(hba);
> if (err)
> goto out_error;
Should this be called in ufshcd_pltfrm_init() and move
ufshcd_init_lanes_per_dir() to
ufshcd-pltfrm.c? Because all 'of_' stuffs are in ufshcd-pltfrm.c.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level
2015-09-13 14:52 ` [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level Yaniv Gardi
@ 2015-10-21 15:51 ` Akinobu Mita
2015-10-26 13:04 ` ygardi
0 siblings, 1 reply; 5+ messages in thread
From: Akinobu Mita @ 2015-10-21 15:51 UTC (permalink / raw)
To: Yaniv Gardi
Cc: Jej B, Paul Bolle, Christoph Hellwig, LKML,
linux-scsi@vger.kernel.org, linux-arm-msm, Santosh Y,
linux-scsi-owner, Subhash Jadavani, Gilad Broner, Dolev Raviv,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Vinayak Holikatti, James E.J. Bottomley, Christoph Hellwig,
Sujit Reddy Thumma, Raviv Shvili, Sahitya Tummala, open
2015-09-13 23:52 GMT+09:00 Yaniv Gardi <ygardi@codeaurora.org>:
> UFS device and link can be put in multiple different low power modes
> hence UFS driver supports multiple different low power modes.
> By default UFS driver selects the default (optimal) low power mode
> (which gives moderate power savings and have relatively less enter
> and exit latencies) but we might have to tune this default power
> mode for different chipset platforms to meet the low power
> requirements/goals. Hence this patch adds option to change default
> UFS low power mode (level).
>
> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
...
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index 3196197..1d26e49 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -1195,11 +1195,12 @@ static int ufs_qcom_init(struct ufs_hba *hba)
> if (res) {
> host->dev_ref_clk_ctrl_mmio =
> devm_ioremap_resource(dev, res);
> - if (IS_ERR(host->dev_ref_clk_ctrl_mmio)) {
> - dev_warn(dev,
> - "%s: could not map dev_ref_clk_ctrl_mmio, err %ld\n",
> + if (IS_ERR((__force void const *)
> + host->dev_ref_clk_ctrl_mmio)) {
> + dev_warn(dev, "%s: could not map dev_ref_clk_ctrl_mmio, err %ld\n",
> __func__,
> - PTR_ERR(host->dev_ref_clk_ctrl_mmio));
> + PTR_ERR((__force void const *)
> + host->dev_ref_clk_ctrl_mmio));
> host->dev_ref_clk_ctrl_mmio = NULL;
> }
> host->dev_ref_clk_en_mask = BIT(5);
This change looks unrelated. Should this be belong to other patch?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level
2015-10-21 15:51 ` Akinobu Mita
@ 2015-10-26 13:04 ` ygardi
0 siblings, 0 replies; 5+ messages in thread
From: ygardi @ 2015-10-26 13:04 UTC (permalink / raw)
To: Akinobu Mita
Cc: Yaniv Gardi, Jej B, Paul Bolle, Christoph Hellwig, LKML,
linux-scsi@vger.kernel.org, linux-arm-msm, Santosh Y,
linux-scsi-owner, Subhash Jadavani, Gilad Broner, Dolev Raviv,
Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Vinayak Holikatti, James E.J. Bottomley, Christoph Hellwig,
Sujit Reddy Thumma, Raviv Shvili <rshv>
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi <ygardi@codeaurora.org>:
>> UFS device and link can be put in multiple different low power modes
>> hence UFS driver supports multiple different low power modes.
>> By default UFS driver selects the default (optimal) low power mode
>> (which gives moderate power savings and have relatively less enter
>> and exit latencies) but we might have to tune this default power
>> mode for different chipset platforms to meet the low power
>> requirements/goals. Hence this patch adds option to change default
>> UFS low power mode (level).
>>
>> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
>> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
>
> ...
>
>> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
>> index 3196197..1d26e49 100644
>> --- a/drivers/scsi/ufs/ufs-qcom.c
>> +++ b/drivers/scsi/ufs/ufs-qcom.c
>> @@ -1195,11 +1195,12 @@ static int ufs_qcom_init(struct ufs_hba *hba)
>> if (res) {
>> host->dev_ref_clk_ctrl_mmio =
>> devm_ioremap_resource(dev, res);
>> - if (IS_ERR(host->dev_ref_clk_ctrl_mmio)) {
>> - dev_warn(dev,
>> - "%s: could not map
>> dev_ref_clk_ctrl_mmio, err %ld\n",
>> + if (IS_ERR((__force void const *)
>> + host->dev_ref_clk_ctrl_mmio)) {
>> + dev_warn(dev, "%s: could not map
>> dev_ref_clk_ctrl_mmio, err %ld\n",
>> __func__,
>> -
>> PTR_ERR(host->dev_ref_clk_ctrl_mmio));
>> + PTR_ERR((__force void const *)
>> +
>> host->dev_ref_clk_ctrl_mmio));
>> host->dev_ref_clk_ctrl_mmio = NULL;
>> }
>> host->dev_ref_clk_en_mask = BIT(5);
>
> This change looks unrelated. Should this be belong to other patch?
>
correct, it's minor change,
but i will separate it to a different patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-26 13:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1442155977-7686-1-git-send-email-ygardi@codeaurora.org>
[not found] ` <1442155977-7686-1-git-send-email-ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-09-13 14:52 ` [PATCH v1 01/17] scsi: ufs-qcom: add number of lanes per direction Yaniv Gardi
2015-10-21 15:47 ` Akinobu Mita
2015-09-13 14:52 ` [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level Yaniv Gardi
2015-10-21 15:51 ` Akinobu Mita
2015-10-26 13:04 ` ygardi
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).