History log of /rk3399_ARM-atf/drivers/ufs/ufs.c (Results 26 – 50 of 62)
Revision Date Author Comments
# 660c208d 12-Jul-2022 anans <anans@google.com>

fix(ufs): removes dp and run-stop polling loops

These polling loops are not required according to the spec

Signed-off-by: anans <anans@google.com>
Change-Id: I50d832ba495f30cc7a0553c84e58b747d51e0a

fix(ufs): removes dp and run-stop polling loops

These polling loops are not required according to the spec

Signed-off-by: anans <anans@google.com>
Change-Id: I50d832ba495f30cc7a0553c84e58b747d51e0a4e

show more ...


# 28645ebd 02-Jul-2022 Rohit Ner <rohitner@google.com>

fix(ufs): add retries to ufs_read_capacity

This change replaces the polling loop with fixed number of retries,
returns error values and handles them in ufs_enum.

Signed-off-by: Rohit Ner <rohitner@

fix(ufs): add retries to ufs_read_capacity

This change replaces the polling loop with fixed number of retries,
returns error values and handles them in ufs_enum.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: Ia769ef26703c7525091e55ff46aaae4637db933c

show more ...


# efceb6be 06-May-2022 Manish Pandey <manish.pandey2@arm.com>

Merge changes Iaf21883b,I523c5d57,I57164923 into integration

* changes:
fix(ufs): read and write attribute based on spec
fix(ufs): disables controller if enabled
refactor(ufs): adds a function

Merge changes Iaf21883b,I523c5d57,I57164923 into integration

* changes:
fix(ufs): read and write attribute based on spec
fix(ufs): disables controller if enabled
refactor(ufs): adds a function for fdeviceinit

show more ...


# a4755183 18-Apr-2022 anans <anans@google.com>

fix(ufs): read and write attribute based on spec

according to the spec, the response to read attr comes in the
ts.attr.value field and not in the data segment.

Signed-off-by: anans <anans@google.co

fix(ufs): read and write attribute based on spec

according to the spec, the response to read attr comes in the
ts.attr.value field and not in the data segment.

Signed-off-by: anans <anans@google.com>
Change-Id: Iaf21883bb7e364fd7c7e4bccb33359367a0cf99d

show more ...


# b3f03b20 21-Mar-2022 anans <anans@google.com>

fix(ufs): disables controller if enabled

ufs controller needs to be disabled if already enabled, without
this we noticed a crash at linkstartup during reinit

Signed-off-by: anans <anans@google.com>

fix(ufs): disables controller if enabled

ufs controller needs to be disabled if already enabled, without
this we noticed a crash at linkstartup during reinit

Signed-off-by: anans <anans@google.com>
Change-Id: I523c5d57c1d34f6404a6368ee3f364fbffd2e542

show more ...


# 91665f49 25-Apr-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): fix cache maintenance issues" into integration


# 50593e69 21-Mar-2022 anans <anans@google.com>

refactor(ufs): adds a function for fdeviceinit

time taken for device init varies based on different devices,
instead of waiting for 200ms - we can poll on fdevice init
until it gets cleared, similar

refactor(ufs): adds a function for fdeviceinit

time taken for device init varies based on different devices,
instead of waiting for 200ms - we can poll on fdevice init
until it gets cleared, similar to what linux does

Change-Id: I571649231732fde0cd6d5be89b6f14fe905fcaff
Signed-off-by: anans <anans@google.com>

show more ...


# 38b7828e 19-Apr-2022 Manish Pandey <manish.pandey2@arm.com>

Merge "refactor(ufs): delete unused variables" into integration


# a8904e94 14-Apr-2022 Jorge Troncoso <jatron@google.com>

refactor(ufs): delete unused variables

The result variable is not being used so it's better to delete it.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: Icae614076ce1ba7cdc86267473d59

refactor(ufs): delete unused variables

The result variable is not being used so it's better to delete it.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: Icae614076ce1ba7cdc86267473d59a8bec682f6c

show more ...


# fe1611e1 22-Mar-2022 Manish Pandey <manish.pandey2@arm.com>

Merge changes I1517b69c,Ie01f36ff into integration

* changes:
fix(ufs): move nutrs assignment to ufs_init
refactor(ufs): adds a function for sending command


# 0956319b 15-Mar-2022 anans <anans@google.com>

fix(ufs): move nutrs assignment to ufs_init

nutrs is set in ufs_enum (used by get_empty_slot), this will not
be assigned if UFS_FLAGS_SKIPINIT is set in flags during init and
might end up crashing r

fix(ufs): move nutrs assignment to ufs_init

nutrs is set in ufs_enum (used by get_empty_slot), this will not
be assigned if UFS_FLAGS_SKIPINIT is set in flags during init and
might end up crashing read/write commands

Change-Id: I1517b69c56741fd5bf4ef0ebc1fc8738746233d7
Signed-off-by: anans <anans@google.com>

show more ...


# 38a5ecb7 15-Mar-2022 Channagoud kadabi <kadabi@google.com>

fix(ufs): fix cache maintenance issues

Fix software cache maintenance issues that can happen when
cpu prefetches data before DMA operations are complete.
This change fixes two cases one for ufs_read

fix(ufs): fix cache maintenance issues

Fix software cache maintenance issues that can happen when
cpu prefetches data before DMA operations are complete.
This change fixes two cases one for ufs_read_blocks and
other for ufs_check_resp, in both cases invalidation of
buffer was done before the DMA operation completed.
This caused cpu prefetcher to bring data into cache
before DMA completed and caused UFS read failures.
The changes also removes unwanted cache operations to
local variable utrd which is not consumed by UFS host
controller and zeroing out buffer in ufs_read_capacity.

Change-Id: I9a288eb19d6705f6fa8bdb0b817a6411235fd8b6
Signed-off-by: Channagoud kadabi <kadabi@google.com>

show more ...


# 6e16f7f0 11-Mar-2022 anans <anans@google.com>

refactor(ufs): adds a function for sending command

new function for sending commands and reuses that function in the
driver, this can also be used to have retries for specific
commands in the future

refactor(ufs): adds a function for sending command

new function for sending commands and reuses that function in the
driver, this can also be used to have retries for specific
commands in the future

Signed-off-by: anans <anans@google.com>
Change-Id: Ie01f36ff8e2df072db4d97929d293b80ed24f04b

show more ...


# df4520c6 01-Mar-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): don't zero out buf before ufs read" into integration


# 2ef6b8d3 28-Feb-2022 Channa Kadabi <kadabi@google.com>

fix(ufs): don't zero out buf before ufs read

ufs_read_blocks always zeros out the buffer before passing
to UFS for DMA. We don't need to zero out buf before reading
from UFS storage, this change rem

fix(ufs): don't zero out buf before ufs read

ufs_read_blocks always zeros out the buffer before passing
to UFS for DMA. We don't need to zero out buf before reading
from UFS storage, this change remove the memset in ufs_read_blocks.

Signed-off-by: Channa Kadabi <kadabi@google.com>
Change-Id: I8029a7ea07fbd8cce29b383c80a3cfc782c5b7ec

show more ...


# acd0e9bf 07-Feb-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): don't zero out the write buffer" into integration


# cd3ea90b 03-Feb-2022 Jorge Troncoso <jatron@google.com>

fix(ufs): don't zero out the write buffer

Previously ufs_write_blocks was memsetting the write buffer before
calling ufs_prepare_cmd, causing zeros to be written to UFS. This change
deletes the mems

fix(ufs): don't zero out the write buffer

Previously ufs_write_blocks was memsetting the write buffer before
calling ufs_prepare_cmd, causing zeros to be written to UFS. This change
deletes the memset call so the original buffer contents get written to
UFS.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I3299f11b30e6d7d409408ce11a6759c88607ee18

show more ...


# f8183f4d 05-Jan-2022 Manish Pandey <manish.pandey2@arm.com>

Merge "fix(ufs): delete call to inv_dcache_range for utrd" into integration


# c5ee8588 23-Dec-2021 Wing Li <wingers@google.com>

fix(ufs): delete call to inv_dcache_range for utrd

The utrd struct is allocated on the stack by ufs_check_resp's caller.
Invalidating the utrd struct is unnecessary since it's only read from,
and ca

fix(ufs): delete call to inv_dcache_range for utrd

The utrd struct is allocated on the stack by ufs_check_resp's caller.
Invalidating the utrd struct is unnecessary since it's only read from,
and can cause other values stored on the stack (e.g. link register) to
be inadvertently invalidated.

Change-Id: Icd455b52beb2677fafc083d68d0bfa0645b7194b
Signed-off-by: Wing Li <wingers@google.com>

show more ...


# a06f2f43 18-Oct-2021 Manish Pandey <manish.pandey2@arm.com>

Merge changes from topic "ufs_patches" into integration

* changes:
fix(ufs): add reset before DME_LINKSTARTUP
refactor(ufs): add retry logic to ufshc_reset
refactor(ufs): reuse ufshc_send_uic_

Merge changes from topic "ufs_patches" into integration

* changes:
fix(ufs): add reset before DME_LINKSTARTUP
refactor(ufs): add retry logic to ufshc_reset
refactor(ufs): reuse ufshc_send_uic_cmd

show more ...


# 905635d5 06-Oct-2021 Jorge Troncoso <jatron@google.com>

fix(ufs): add reset before DME_LINKSTARTUP

This change aims to make the UFS code more robust by performing a
controller reset if linkstartup fails. This idea was borrowed from
Linux's ufshcd_link_st

fix(ufs): add reset before DME_LINKSTARTUP

This change aims to make the UFS code more robust by performing a
controller reset if linkstartup fails. This idea was borrowed from
Linux's ufshcd_link_startup function.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I6b52148d1bf155b11198dc82a39b1120057adaaf

show more ...


# 99ff1a35 30-Sep-2021 Jorge Troncoso <jatron@google.com>

refactor(ufs): add retry logic to ufshc_reset

This change aims to make the UFS code more robust by adding retry logic
and timeouts to ufshc_reset. We also define a new function
ufshc_hce_enable for

refactor(ufs): add retry logic to ufshc_reset

This change aims to make the UFS code more robust by adding retry logic
and timeouts to ufshc_reset. We also define a new function
ufshc_hce_enable for Host Controller Enable (HCE). The inner and outer
retry pattern is based on Linux's ufshcd_hba_execute_hce function.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I9403a5a25d3ca50af5f2f9a65b774f6a2d7a9626

show more ...


# d68d163d 24-Sep-2021 Jorge Troncoso <jatron@google.com>

refactor(ufs): reuse ufshc_send_uic_cmd

This change aims to make the UFS code more robust by removing asserts
and adding retry logic. We also reduce repetition by reusing
ufshc_send_uic_cmd for DME_

refactor(ufs): reuse ufshc_send_uic_cmd

This change aims to make the UFS code more robust by removing asserts
and adding retry logic. We also reduce repetition by reusing
ufshc_send_uic_cmd for DME_GET and DME_SET commands.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: Id70aa1687d5ca78dc7d47234372255ac5a04a612

show more ...


# 519a7db2 15-May-2019 Soby Mathew <soby.mathew@arm.com>

Merge "drivers: ufs: Extend the delay after reset to wait for some slower chips" into integration


# cbebadf5 13-May-2019 John Stultz <john.stultz@linaro.org>

drivers: ufs: Extend the delay after reset to wait for some slower chips

We've seen issues with some THG based UFS chips, where
after reset the LUNs don't always enumerate properly.

After some debu

drivers: ufs: Extend the delay after reset to wait for some slower chips

We've seen issues with some THG based UFS chips, where
after reset the LUNs don't always enumerate properly.

After some debugging, we found that extending the mdelay
here seems to resolve the issue by giving the chips enough
time to complete reset.

Change-Id: I848f810b2438ed6ad3d33db614c61d2cef9ac400
Signed-off-by: John Stultz <john.stultz@linaro.org>

show more ...


123