On Mon, Oct 26, 2015 at 12:45 PM, Bjorn Andersson
wrote:
> Default the brightness to 2048 and add possibility to override this in
> device tree.
>
> Suggested-by: Rob Clark
> Signed-off-by: Bjorn Andersson
>
Important:
This serie of 15 small patches should be pushed after the series of 8 patches
"Fix error message and present UFS variant probe"
V5:
removed un-necessary wmb()
V4:
fixing a few comments from reviewers
V3:
removed specific calls to wmb() since they are redundant.
V2:
a few minor
When sending a query to the device returns with a timeout error,
we clear the corresponding bit in the DOORBELL register but
we don't clear the outstanding_request field as we should.
This patch fixes this bug.
Signed-off-by: Yaniv Gardi
---
drivers/scsi/ufs/ufshcd.c |
fDeviceInit query response time for some devices is too long that default
query request timeout of 100ms may not be enough. Experiments show that
fDeviceInit response sometimes takes 500ms so to be on safer side this
change sets the timeout to 600ms. Without this change, we might
unnecessarily
Some of the data structures (like response UPIU) and/or its elements
(unused fields) should be cleared before sending out the respective
command to UFS device.
This change clears the UPIU response data structure for query commands
and NOP command before sending out the command. We also initialize
Clear the UFS data structures before sending new request.
The SCSI command is sent to the device within the UFS UPIU request.
As part of the transfer UPIU preparation, the SCSI command is copied
to the UPIU structure according to the SCSI command size.
As different SCSI commands differ in size
A race condition appear to exist between request completion when
scsi_done() is called to end the request and set the tag back to
-1 (at blk_queue_end_tag() scsi_end_request), and scsi layer error
handling which aborts the command and reuses it to request sense
data. Sending the request sense is
>> 2015-10-25 23:40 GMT+09:00 :
2015-09-02 19:13 GMT+09:00 Yaniv Gardi :
> Performing several writes to UFS host controller registers has
> no gurrantee of ordering, so we must make sure register writes
> to setup request list base
Add a write memory barrier to make sure descriptors prepared are actually
written to memory before ringing the doorbell. We have also added the
write memory barrier after ringing the doorbell register so that
controller sees the new request immediately.
Signed-off-by: Gilad Broner
Performing several writes to UFS host controller registers has
no guarantee of ordering, so we must make sure register writes
to setup request list base address etc. are performed before the
run/stop register is enabled.
In addition, when setting up a task request, we must make sure
the updating
Sometimes queries from the device might return a failure so it is
recommended to retry sending the query, before giving up.
This change adds a wrapper to retry sending a query attribute,
in cases where we need to wait longer, before we continue,
or before reporting a failure.
Signed-off-by: Yaniv
DME commands such as Hibern8 enter/exit and gear switch generate 2
completion interrupts, one for confirmation that command is received
by local UniPro and 2nd one is the final confirmation after communication
with remote UniPro. Currently both of these completions are registered
as interrupt
> On 10/26/2015 08:41 AM, Yaniv Gardi wrote:
>> Tnis patch fixes the following compilation warnings:
>> ...ufs-qcom.c:1201:40:
>> warning: incorrect type in argument 1 (different address spaces)
>> ...ufs-qcom.c:1201:40:
>> expected void const *ptr
>> ...ufs-qcom.c:1201:40:
>> got
Hibern8 exit can be called from 3 different context:
- ufshcd_hibern8_exit_work
- ufshcd_ungate_work
- runtime/system resume
If hibern8 exit fails for some reason then we try to bring the link to
active state by link startup but this recovery mechanism results into
deadlock or errors
If hibern8 enter command fails then UFS link state may be unknown which
may result into timeout of all the commands issued after failure.
This change does 2 things (for pre-defined number of retry counts) after
hibern8 enter failure:
1. Recovers the UFS link to active state
2. If link is
According to UFS device specification REQUEST_SENSE command can
only report back up to 18 bytes of data.
Signed-off-by: Gilad Broner
Signed-off-by: Yaniv Gardi
---
drivers/scsi/ufs/ufshcd.c | 12 +++-
1 file changed, 7 insertions(+), 5
If device raises the exception event in the response to the commands
sent during the runtime/system PM callbacks, exception event handler
might run in parallel with PM callbacks and may see unclocked register
accesses. This change fixes this issue by not scheduling the exception
event handler
UFS flag query requests may fail sometimes due to timeouts etc.
Add a wrapper function to retry up to 10 times in case of such
failure, similar to retries being made for attribute queries.
Signed-off-by: Gilad Broner
Signed-off-by: Yaniv Gardi
---
Reviewed-by: Gilad Broner
> When sending a query to the device returns with a timeout error,
> we clear the corresponding bit in the DOORBELL register but
> we don't clear the outstanding_request field as we should.
> This patch fixes this bug.
>
> Signed-off-by: Yaniv
Reviewed-by: Gilad Broner
> In order to simplify the code a set of wrapper functions is created
> to test and call each of the variant operations.
>
> Signed-off-by: Yaniv Gardi
>
> ---
> drivers/scsi/ufs/ufs-qcom.c | 1 -
>
Reviewed-by: Gilad Broner
> fDeviceInit query response time for some devices is too long that default
> query request timeout of 100ms may not be enough. Experiments show that
> fDeviceInit response sometimes takes 500ms so to be on safer side this
> change sets the
Reviewed-by: Gilad Broner
> New revisions of UFS host controller supports the new UniPro
> hardware controller (referred as QUniPro). This patch adds
> the support to enable this new UniPro controller hardware.
>
> This change also adds power optimization for bus scaling
Reviewed-by: Gilad Broner
> This change turns the UFS variant (SCSI_UFS_QCOM) into a UFS
> a platform device.
> In order to do so a few additional changes are required:
> 1. The ufshcd-pltfrm is no longer serves as a platform device.
>Now it only serves as a group of
Reviewed-by: Gilad Broner
> Adds support for configuring and reading the test bus and debug
> registers. This change also adds another vops in order to print the
> debug registers.
>
> Signed-off-by: Yaniv Gardi
>
> ---
>
Looks OK.
Reviewed-by: Gilad Broner
> Clear the UFS data structures before sending new request.
>
> The SCSI command is sent to the device within the UFS UPIU request.
> As part of the transfer UPIU preparation, the SCSI command is copied
> to the UPIU structure according
Reviewed-by: Gilad Broner
> This change is required in order to be able to build the component
> as a module.
>
> Signed-off-by: Yaniv Gardi
>
> ---
> drivers/scsi/ufs/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
Reviewed-by: Gilad Broner
> Export the following functions in order to avoid build errors
> when the component PHY_QCOM_UFS is compiled as a module:
>
> ERROR: "ufs_qcom_phy_disable_ref_clk"
> [drivers/scsi/ufs/ufs-qcom.ko] undefined!
> ERROR:
Reviewed-by: Gilad Broner
> If hibern8 enter command fails then UFS link state may be unknown which
> may result into timeout of all the commands issued after failure.
>
> This change does 2 things (for pre-defined number of retry counts) after
> hibern8 enter failure:
>
Reviewed-by: Gilad Broner
> Sometimes queries from the device might return a failure so it is
> recommended to retry sending the query, before giving up.
> This change adds a wrapper to retry sending a query attribute,
> in cases where we need to wait longer, before we
Reviewed-by: Gilad Broner
> DME commands such as Hibern8 enter/exit and gear switch generate 2
> completion interrupts, one for confirmation that command is received
> by local UniPro and 2nd one is the final confirmation after communication
> with remote UniPro.
Reviewed-by: Gilad Broner
> If device raises the exception event in the response to the commands
> sent during the runtime/system PM callbacks, exception event handler
> might run in parallel with PM callbacks and may see unclocked register
> accesses. This change fixes
Looks OK.
Reviewed-by: Gilad Broner
> Some of the data structures (like response UPIU) and/or its elements
> (unused fields) should be cleared before sending out the respective
> command to UFS device.
>
> This change clears the UPIU response data structure for query
Reviewed-by: Gilad Broner
> Hibern8 exit can be called from 3 different context:
> - ufshcd_hibern8_exit_work
> - ufshcd_ungate_work
> - runtime/system resume
>
> If hibern8 exit fails for some reason then we try to bring the link to
> active state by link
Reviewed-by: Gilad Broner
> This change fixes a compilation warning that happens if SCSI_UFS_QCOM
> is compiled as a module.
> Also this patch fixes an error happens when insmod the module:
> "ufs_qcom: module license 'unspecified' taints kernel."
>
> Signed-off-by: Yaniv
On 10/27/2015 03:10 AM, yga...@codeaurora.org wrote:
>> On 10/26/2015 08:41 AM, Yaniv Gardi wrote:
>>> Tnis patch fixes the following compilation warnings:
>>> ...ufs-qcom.c:1201:40:
>>> warning: incorrect type in argument 1 (different address spaces)
>>> ...ufs-qcom.c:1201:40:
>>>
> On 10/27/2015 03:10 AM, yga...@codeaurora.org wrote:
>>> On 10/26/2015 08:41 AM, Yaniv Gardi wrote:
Tnis patch fixes the following compilation warnings:
...ufs-qcom.c:1201:40:
warning: incorrect type in argument 1 (different address spaces)
...ufs-qcom.c:1201:40:
At present scheduler resets task's wait start timestamp when the task
migrates to another rq. This misleads scheduler itself into reporting
less wait time than actual by omitting time spent for waiting prior to
migration and also more wait count than actual by counting migration as
wait end event
On Sun, Oct 25, 2015 at 5:50 AM, Yaniv Gardi wrote:
> This change turns the UFS variant (SCSI_UFS_QCOM) into a UFS
> a platform device.
> In order to do so a few additional changes are required:
> 1. The ufshcd-pltfrm is no longer serves as a platform device.
>Now it
On 10/27/2015 11:22 AM, yga...@codeaurora.org wrote:
>> On 10/27/2015 03:10 AM, yga...@codeaurora.org wrote:
On 10/26/2015 08:41 AM, Yaniv Gardi wrote:
> Tnis patch fixes the following compilation warnings:
> ...ufs-qcom.c:1201:40:
> warning: incorrect type in argument 1
On 10/26, Stephen Boyd wrote:
> We want to put the XO board clocks into the dt files. Add an API
> to do this generically. This also makes a place for us to handle
> the case where the RPM driver is enabled or disabled.
>
> Cc: Georgi Djakov
> Signed-off-by: Stephen
On 10/27, Stephen Boyd wrote:
> +
> +int qcom_cc_register_board_clk(struct device *dev, const char *path,
> +const char *name, unsigned long rate)
> +{
> + return _qcom_cc_register_board_clk(dev, path, name, rate,
> +
We want to put the XO board clocks into the dt files, but we also
need to be backwards compatible with an older dtb. Add an API to
the common code to do this. This also makes a place for us to
handle the case when the RPM clock driver is enabled and we don't
want to register the fixed factor
On 10/20, Georgi Djakov wrote:
> diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
> new file mode 100644
> index ..aa634bdf0aae
> --- /dev/null
> +++ b/drivers/clk/qcom/clk-smd-rpm.c
> @@ -0,0 +1,260 @@
> +
> +static int clk_smd_rpm_set_rate_active(struct
On 10/20, Georgi Djakov wrote:
> diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> index 8748fcca70f4..355a2acea796 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> @@ -80,6 +80,15 @@
>
On 10/20, Georgi Djakov wrote:
> diff --git a/drivers/clk/qcom/rpmcc.c b/drivers/clk/qcom/rpmcc.c
> new file mode 100644
> index ..88283e2c95f7
> --- /dev/null
> +++ b/drivers/clk/qcom/rpmcc.c
> @@ -0,0 +1,198 @@
> +/*
> + * Copyright (c) 2015, Linaro Limited
> + * Copyright (c) 2014,
(Excessive quoting for Olav)
On Mon, Oct 26, 2015 at 06:44:48PM -0700, Joonwoo Park wrote:
> On 10/25/2015 03:26 AM, Peter Zijlstra wrote:
> > Also note that on both sites we also set TASK_ON_RQ_MIGRATING -- albeit
> > late. Can't you simply set that earlier (and back to QUEUED later) and
> >
Put these clocks into the dt files instead of registering them
from C code. This provides a few benefits. It allows us to
specify the frequency of these clocks at the board level instead
of hard-coding them in the driver. It allows us to insert an RPM
clock in between the consumers of the crystals
On Tue, Oct 27, 2015 at 01:57:28PM +0100, Peter Zijlstra wrote:
>
> (Excessive quoting for Olav)
>
> On Mon, Oct 26, 2015 at 06:44:48PM -0700, Joonwoo Park wrote:
> > On 10/25/2015 03:26 AM, Peter Zijlstra wrote:
>
> > > Also note that on both sites we also set TASK_ON_RQ_MIGRATING -- albeit
>
At present scheduler resets task's wait start timestamp when the task
migrates to another rq. This misleads scheduler itself into reporting
less wait time than actual by omitting time spent for waiting prior to
migration and also more wait count than actual by counting migration as
wait end event
49 matches
Mail list logo