History log of /rk3399_ARM-atf/drivers/ufs/ufs.c (Results 1 – 25 of 62)
Revision Date Author Comments
# c9f097ec 21-Feb-2024 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "chore(ufs): refactor ufs_get_device_info" into integration


# 74ac476c 20-Feb-2024 Rohit Ner <rohitner@google.com>

chore(ufs): refactor ufs_get_device_info

Use dedicated function to read device descriptor

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


# aadb759a 21-Sep-2023 Yann Gautier <yann.gautier@st.com>

Merge "fix(ufs): performs unsigned shift for doorbell" into integration


# e47d8a58 16-Sep-2023 Anand Saminathan <anans@google.com>

fix(ufs): performs unsigned shift for doorbell

slot ranges from 0 to 31, left shifting 1 by slot is undefined when slot
is 31

Change-Id: I0c2e6d278ff593cee07736627cd87692f45e2da9
Signed-off-by: Ana

fix(ufs): performs unsigned shift for doorbell

slot ranges from 0 to 31, left shifting 1 by slot is undefined when slot
is 31

Change-Id: I0c2e6d278ff593cee07736627cd87692f45e2da9
Signed-off-by: Anand Saminathan <anans@google.com>

show more ...


# f3cb6fd9 28-Aug-2023 Manish V Badarkhe <manish.badarkhe@arm.com>

Merge "fix(ufs): set data segment length" into integration


# 9d6786ca 08-Jul-2023 Rohit Ner <rohitner@google.com>

fix(ufs): set data segment length

Remove blanket assumption of empty data segment area to avoid
issues while writing descriptors.

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

fix(ufs): set data segment length

Remove blanket assumption of empty data segment area to avoid
issues while writing descriptors.

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

show more ...


# 69d643c5 26-Apr-2023 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): poll UCRDY for all commands" into integration


# 6e57b2f0 25-Apr-2023 Rohit Ner <rohitner@google.com>

fix(ufs): poll UCRDY for all commands

Host must only set UICCMD if HCS.UCRDY is set to 1.
At present, SW polls for UCRDY only before sending DME_GET.
Generalise this behaviour for DME_SET, DME_LINKS

fix(ufs): poll UCRDY for all commands

Host must only set UICCMD if HCS.UCRDY is set to 1.
At present, SW polls for UCRDY only before sending DME_GET.
Generalise this behaviour for DME_SET, DME_LINKSTARTUP,
DME_HIBERNATE_EXIT by moving polling logic inside ufshc_send_uic_cmd.

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

show more ...


# 2519ee5f 17-Mar-2023 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "feat(ufs): adds timeout and error handling" into integration


# 2c5bce38 10-Mar-2023 Anand Saminathan <anans@google.com>

feat(ufs): adds timeout and error handling

Adds a common function to poll for interrupt status which reports errors
and returns error codes

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

feat(ufs): adds timeout and error handling

Adds a common function to poll for interrupt status which reports errors
and returns error codes

Signed-off-by: Anand Saminathan <anans@google.com>
Change-Id: Ie5df036dc979e984871de4ae7e974b994296ca4c

show more ...


# 55a32830 27-Feb-2023 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge changes I960771e6,I291dc627,I57f31664 into integration

* changes:
fix(ufs): set the PRDT length field properly
fix(ufs): flush the entire PRDT
fix(ufs): only allow using one slot


# 20fdbcf5 22-Feb-2023 Jorge Troncoso <jatron@google.com>

fix(ufs): set the PRDT length field properly

The PRDT length field contains the count of the entries in the PRDT. See
JEDEC Standard No. 223E, section 6.1.1, "UTP Transfer Request
Descriptor," page

fix(ufs): set the PRDT length field properly

The PRDT length field contains the count of the entries in the PRDT. See
JEDEC Standard No. 223E, section 6.1.1, "UTP Transfer Request
Descriptor," page 66. Previously we were setting the PRDT length field
to the number of bytes in the PRDT divided by four (the size in units of
32 bits). This was incorrect according to the spec.

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

show more ...


# 83ef8698 22-Feb-2023 Jorge Troncoso <jatron@google.com>

fix(ufs): flush the entire PRDT

Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
entries of size 256 KB), the UFS driver would not flush the entire
Physical Region Descriptor Table

fix(ufs): flush the entire PRDT

Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
entries of size 256 KB), the UFS driver would not flush the entire
Physical Region Descriptor Table (PRDT). This would cause the UFS host
controller to read empty PRDT entries, which eventually would make the
system crash. This change updates the UFS driver to flush the entire
PRDT, irrespective of the size of the image being read.

This change also throws an error if the memory allocated for UFS
descriptors is not sufficient to hold the entire Physical Region
Descriptor Table (PRDT).

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

show more ...


# 56db7b8b 22-Feb-2023 Jorge Troncoso <jatron@google.com>

fix(ufs): only allow using one slot

Currently the UFS driver places the Command UPIU, Response UPIU, and
PRDT immediately after the UTP Transfer Request Descriptor. This space
would normally be rese

fix(ufs): only allow using one slot

Currently the UFS driver places the Command UPIU, Response UPIU, and
PRDT immediately after the UTP Transfer Request Descriptor. This space
would normally be reserved for other slots in the UTP Transfer Request
List, but because we always use slot zero, the other slots in the UTP
Transfer Request List are never used and this is okay.

Because the Command UPIU, Response UPIU, and PRDT are placed inside the
UTP Transfer Request List, the UFS driver would break if two or more
slots were used at the same time. Therefore, in a sense the
get_empty_slot() function is misleading. It gives developers the
illusion that they can use two or more slots simultaneously but in
reality they cannot.

This change deletes the get_empty_slot() function and replaces it with
is_slot_available() so that only one slot can be used.

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

show more ...


# fa662cde 21-Feb-2023 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): device present (DP) field is set to '1'" into integration


# 83103d12 21-Feb-2023 Jorge Troncoso <jatron@google.com>

fix(ufs): device present (DP) field is set to '1'

The Device Present (DP) field is set to '1' after host controller
receive 'SUCCESS' return code on the response of the DME_LINKSTARTUP UIC
CMD durin

fix(ufs): device present (DP) field is set to '1'

The Device Present (DP) field is set to '1' after host controller
receive 'SUCCESS' return code on the response of the DME_LINKSTARTUP UIC
CMD during host controller initialization.

JEDEC Standard No. 223E
Page 28

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

show more ...


# c45d2feb 12-Oct-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): retry commands on unit attention" into integration


# 3d309556 28-Sep-2022 Anand Saminathan <anans@google.com>

fix(ufs): retry commands on unit attention

Unit Attention Condition (UAC) gets set on a warm reset. Sending any
command (other than INQUIRY and REPORT LUNs) clears UAC, so its good to
add some retri

fix(ufs): retry commands on unit attention

Unit Attention Condition (UAC) gets set on a warm reset. Sending any
command (other than INQUIRY and REPORT LUNs) clears UAC, so its good to
add some retries when UAC is encountered

Signed-off-by: Anand Saminathan <anans@google.com>
Change-Id: Ia03b916d68565d0f3d25086b7f6d8c51d557b64f

show more ...


# 029f9b9c 29-Aug-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge changes I60b3b59e,Ibd5d22b4 into integration

* changes:
fix(ufs): init utrlba/utrlbau with desc_base
fix(ufs): fix slot base address computation


# 9d6d1a94 01-Aug-2022 anans <anans@google.com>

fix(ufs): init utrlba/utrlbau with desc_base

Initialising these registers with header address will not work when
get_empty_slot returns anything other than 0 because these registers
should point to

fix(ufs): init utrlba/utrlbau with desc_base

Initialising these registers with header address will not work when
get_empty_slot returns anything other than 0 because these registers
should point to the starting of transfer request list instead of the
current descriptor

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

show more ...


# 7d9648dd 01-Aug-2022 anans <anans@google.com>

fix(ufs): fix slot base address computation

The entire packet including UPIUs and PRDT is 0x400 but the controller
just looks for the header (32-bytes) from the UTRL

Change-Id: Ibd5d22b4a841c107fdf

fix(ufs): fix slot base address computation

The entire packet including UPIUs and PRDT is 0x400 but the controller
just looks for the header (32-bytes) from the UTRL

Change-Id: Ibd5d22b4a841c107fdf6447d598c5c600998e0f8
Signed-off-by: Anand Saminathan <anans@google.com>

show more ...


# 1d867c14 27-Jul-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): add retries to ufs_read_capacity" into integration


# 7cf105f8 27-Jul-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): point utrlbau to header instead of upiu" into integration


# 9d3f6c4b 26-Jul-2022 anans <anans@google.com>

fix(ufs): point utrlbau to header instead of upiu

utrlbau should point to header and not upiu
this is the case everywhere except for ufs_prepare_cmd

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

fix(ufs): point utrlbau to header instead of upiu

utrlbau should point to header and not upiu
this is the case everywhere except for ufs_prepare_cmd

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

show more ...


# af757e40 12-Jul-2022 Madhukar Pappireddy <madhukar.pappireddy@arm.com>

Merge "fix(ufs): removes dp and run-stop polling loops" into integration


123