mbox series

[00/13] ufs: enhancements to support Qualcomm UFS controllers

Message ID 20240910-topic-ufs-enhancements-v1-0-3ee0bffacc64@linaro.org
Headers show
Series ufs: enhancements to support Qualcomm UFS controllers | expand

Message

neil.armstrong@linaro.org Sept. 10, 2024, 9:20 a.m. UTC
This serie regroups all the fixes and base enhancements required to
support the Qualcomm UFS controllers in U-Boot.

This syncs headers & defines from Linux, and includes 2 set of
fixes that were sent separately:
- ufs: core: remove link_startup_again logic
- ufs: properly fix cache operations

Without those 2 sets, UFS cannot initialize on Qualcomm controlers
since v5, and a numerous of Cache issues makes any UFS controller
fail to initialize.

Since UFS core hasn't changed for a while, and since UFS is core
technology for the Qualcomm SoCs, I volunteer maintaininig the
UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Bhupesh Sharma (5):
      ufs/ufs.h: Add definition of 'ufshcd_rmwl()'
      ufs: Clear UECPA once due to LINERESET has happened during LINK_STARTUP
      ufs: Sync possible UFS Quirks with Linux UFS driver
      ufs: Add missing memory barriers
      ufs: Fix debug message in 'ufs_start'

Marek Vasut (2):
      ufs: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
      ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO

Neil Armstrong (6):
      ufs: allocate descriptors with size aligned with DMA_MINALIGN
      ufs: fix dcache flush and invalidate range calculation
      ufs: split flush and invalidate to only invalidate when required
      ufs: use dcache helpers for scsi_cmd data and only invalidate if necessary
      ufs: core: remove link_startup_again logic
      MAINTAINERS: Add myself to the list of UFS maintainers

 MAINTAINERS       |   1 +
 drivers/ufs/ufs.c |  98 ++++++++++++++++++++--------------
 drivers/ufs/ufs.h | 157 +++++++++++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 197 insertions(+), 59 deletions(-)
---
base-commit: ca55cf8104c0dd78aae45fa66dd8400ef1b3d0ac
change-id: 20240910-topic-ufs-enhancements-fe8ef9ce39d8

Best regards,

Comments

neil.armstrong@linaro.org Sept. 18, 2024, 8:06 a.m. UTC | #1
Hi Marek, Manorit, Tom, Michal,

On 10/09/2024 11:20, Neil Armstrong wrote:
> This serie regroups all the fixes and base enhancements required to
> support the Qualcomm UFS controllers in U-Boot.
> 
> This syncs headers & defines from Linux, and includes 2 set of
> fixes that were sent separately:
> - ufs: core: remove link_startup_again logic
> - ufs: properly fix cache operations
> 
> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
> since v5, and a numerous of Cache issues makes any UFS controller
> fail to initialize.
> 
> Since UFS core hasn't changed for a while, and since UFS is core
> technology for the Qualcomm SoCs, I volunteer maintaininig the
> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.

Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible regressions ?

It seems the only user of UFS_PCI is qemu-riscv, is there other users ?

Thanks,
Neil

> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> Bhupesh Sharma (5):
>        ufs/ufs.h: Add definition of 'ufshcd_rmwl()'
>        ufs: Clear UECPA once due to LINERESET has happened during LINK_STARTUP
>        ufs: Sync possible UFS Quirks with Linux UFS driver
>        ufs: Add missing memory barriers
>        ufs: Fix debug message in 'ufs_start'
> 
> Marek Vasut (2):
>        ufs: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
>        ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO
> 
> Neil Armstrong (6):
>        ufs: allocate descriptors with size aligned with DMA_MINALIGN
>        ufs: fix dcache flush and invalidate range calculation
>        ufs: split flush and invalidate to only invalidate when required
>        ufs: use dcache helpers for scsi_cmd data and only invalidate if necessary
>        ufs: core: remove link_startup_again logic
>        MAINTAINERS: Add myself to the list of UFS maintainers
> 
>   MAINTAINERS       |   1 +
>   drivers/ufs/ufs.c |  98 ++++++++++++++++++++--------------
>   drivers/ufs/ufs.h | 157 +++++++++++++++++++++++++++++++++++++++++++++++-------
>   3 files changed, 197 insertions(+), 59 deletions(-)
> ---
> base-commit: ca55cf8104c0dd78aae45fa66dd8400ef1b3d0ac
> change-id: 20240910-topic-ufs-enhancements-fe8ef9ce39d8
> 
> Best regards,
Michal Simek Sept. 18, 2024, 9:03 a.m. UTC | #2
Hi Neil,

On 9/18/24 10:06, Neil Armstrong wrote:
> Hi Marek, Manorit, Tom, Michal,
> 
> On 10/09/2024 11:20, Neil Armstrong wrote:
>> This serie regroups all the fixes and base enhancements required to
>> support the Qualcomm UFS controllers in U-Boot.
>>
>> This syncs headers & defines from Linux, and includes 2 set of
>> fixes that were sent separately:
>> - ufs: core: remove link_startup_again logic
>> - ufs: properly fix cache operations
>>
>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>> since v5, and a numerous of Cache issues makes any UFS controller
>> fail to initialize.
>>
>> Since UFS core hasn't changed for a while, and since UFS is core
>> technology for the Qualcomm SoCs, I volunteer maintaininig the
>> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.
> 
> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
> j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible regressions ?
> 
> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?


Good timing. We are close to send some updates to UFS which we require to get 
DWC version to work inside U-Boot.

How far are that core changes from Linux? I see 9/13 is sync with Linux but when 
this is done you should also say which Linux version was used for sync.

I see that there are definitely some kernel-doc issues

Also s/U-boot/U-Boot/g

Venkatesh: Can you please look at this patch series and validate it on our 
platform? Also make sense to send our changes to make sure that they won't break 
others.

Thanks,
Michal
Abbarapu, Venkatesh Sept. 18, 2024, 9:32 a.m. UTC | #3
Hi Michal,

> -----Original Message-----
> From: Simek, Michal <michal.simek@amd.com>
> Sent: Wednesday, September 18, 2024 2:33 PM
> To: neil.armstrong@linaro.org; Marek Vasut <marek.vasut+renesas@mailbox.org>;
> Neha Malcom Francis <n-francis@ti.com>; Manorit Chawdhry <m-
> chawdhry@ti.com>; Tom Rini <trini@konsulko.com>; bmeng.cn@gmail.com;
> Abbarapu, Venkatesh <venkatesh.abbarapu@amd.com>
> Cc: u-boot@lists.denx.de; u-boot-qcom@groups.io; Bhupesh Sharma
> <bhupesh.linux@gmail.com>
> Subject: Re: [PATCH 00/13] ufs: enhancements to support Qualcomm UFS
> controllers
> 
> Hi Neil,
> 
> On 9/18/24 10:06, Neil Armstrong wrote:
> > Hi Marek, Manorit, Tom, Michal,
> >
> > On 10/09/2024 11:20, Neil Armstrong wrote:
> >> This serie regroups all the fixes and base enhancements required to
> >> support the Qualcomm UFS controllers in U-Boot.
> >>
> >> This syncs headers & defines from Linux, and includes 2 set of fixes
> >> that were sent separately:
> >> - ufs: core: remove link_startup_again logic
> >> - ufs: properly fix cache operations
> >>
> >> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
> >> since v5, and a numerous of Cache issues makes any UFS controller
> >> fail to initialize.
> >>
> >> Since UFS core hasn't changed for a while, and since UFS is core
> >> technology for the Qualcomm SoCs, I volunteer maintaininig the UFS
> >> subsystem if Bhupesh & Neha Malcom Francis are ok with that.
> >
> > Could you run this serie on the r8a779f0_spider, j721s2_evm_a72,
> > j721e_evm_a72, j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for
> possible regressions ?
> >
> > It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
> 
> 
> Good timing. We are close to send some updates to UFS which we require to get
> DWC version to work inside U-Boot.
> 
> How far are that core changes from Linux? I see 9/13 is sync with Linux but when
> this is done you should also say which Linux version was used for sync.
> 
> I see that there are definitely some kernel-doc issues
> 
> Also s/U-boot/U-Boot/g
> 
> Venkatesh: Can you please look at this patch series and validate it on our platform?
> Also make sense to send our changes to make sure that they won't break others.
I will pull these changes and try on our platform.

Thanks
Venkatesh
> 
> Thanks,
> Michal
neil.armstrong@linaro.org Sept. 18, 2024, 10:40 a.m. UTC | #4
Hi,

On 18/09/2024 11:03, Michal Simek wrote:
> Hi Neil,
> 
> On 9/18/24 10:06, Neil Armstrong wrote:
>> Hi Marek, Manorit, Tom, Michal,
>>
>> On 10/09/2024 11:20, Neil Armstrong wrote:
>>> This serie regroups all the fixes and base enhancements required to
>>> support the Qualcomm UFS controllers in U-Boot.
>>>
>>> This syncs headers & defines from Linux, and includes 2 set of
>>> fixes that were sent separately:
>>> - ufs: core: remove link_startup_again logic
>>> - ufs: properly fix cache operations
>>>
>>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>>> since v5, and a numerous of Cache issues makes any UFS controller
>>> fail to initialize.
>>>
>>> Since UFS core hasn't changed for a while, and since UFS is core
>>> technology for the Qualcomm SoCs, I volunteer maintaininig the
>>> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.
>>
>> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
>> j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible regressions ?
>>
>> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
> 
> 
> Good timing. We are close to send some updates to UFS which we require to get DWC version to work inside U-Boot.
> 
> How far are that core changes from Linux? I see 9/13 is sync with Linux but when this is done you should also say which Linux version was used for sync.

I think we are still quite far from Linux, we just took the basic required bits and pieces
to at least make the Qcom UFS controller driver build work, but Linux driver is overly complicated
with power management code we do not really need in U-Boot, so it's quite hard to sync honestly.

But the plan is to align as much as possible once we get the basic Qcom UFS mainline.

> 
> I see that there are definitely some kernel-doc issues
> 
> Also s/U-boot/U-Boot/g

Ack, will check

> 
> Venkatesh: Can you please look at this patch series and validate it on our platform? Also make sense to send our changes to make sure that they won't break others.
> 
> Thanks,
> Michal

Thanks,
Neil
Michal Simek Sept. 18, 2024, 10:47 a.m. UTC | #5
On 9/18/24 12:40, neil.armstrong@linaro.org wrote:
> Hi,
> 
> On 18/09/2024 11:03, Michal Simek wrote:
>> Hi Neil,
>>
>> On 9/18/24 10:06, Neil Armstrong wrote:
>>> Hi Marek, Manorit, Tom, Michal,
>>>
>>> On 10/09/2024 11:20, Neil Armstrong wrote:
>>>> This serie regroups all the fixes and base enhancements required to
>>>> support the Qualcomm UFS controllers in U-Boot.
>>>>
>>>> This syncs headers & defines from Linux, and includes 2 set of
>>>> fixes that were sent separately:
>>>> - ufs: core: remove link_startup_again logic
>>>> - ufs: properly fix cache operations
>>>>
>>>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>>>> since v5, and a numerous of Cache issues makes any UFS controller
>>>> fail to initialize.
>>>>
>>>> Since UFS core hasn't changed for a while, and since UFS is core
>>>> technology for the Qualcomm SoCs, I volunteer maintaininig the
>>>> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.
>>>
>>> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
>>> j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible 
>>> regressions ?
>>>
>>> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
>>
>>
>> Good timing. We are close to send some updates to UFS which we require to get 
>> DWC version to work inside U-Boot.
>>
>> How far are that core changes from Linux? I see 9/13 is sync with Linux but 
>> when this is done you should also say which Linux version was used for sync.
> 
> I think we are still quite far from Linux, we just took the basic required bits 
> and pieces
> to at least make the Qcom UFS controller driver build work, but Linux driver is 
> overly complicated
> with power management code we do not really need in U-Boot, so it's quite hard 
> to sync honestly.
> 
> But the plan is to align as much as possible once we get the basic Qcom UFS 
> mainline.

That's understandable. But even when you say sync with Linux for some headers, 
etc it is good to say that it is sync with 6.11 for example.

Thanks,
Michal
neil.armstrong@linaro.org Sept. 19, 2024, 7:52 a.m. UTC | #6
On 18/09/2024 12:47, Michal Simek wrote:
> 
> 
> On 9/18/24 12:40, neil.armstrong@linaro.org wrote:
>> Hi,
>>
>> On 18/09/2024 11:03, Michal Simek wrote:
>>> Hi Neil,
>>>
>>> On 9/18/24 10:06, Neil Armstrong wrote:
>>>> Hi Marek, Manorit, Tom, Michal,
>>>>
>>>> On 10/09/2024 11:20, Neil Armstrong wrote:
>>>>> This serie regroups all the fixes and base enhancements required to
>>>>> support the Qualcomm UFS controllers in U-Boot.
>>>>>
>>>>> This syncs headers & defines from Linux, and includes 2 set of
>>>>> fixes that were sent separately:
>>>>> - ufs: core: remove link_startup_again logic
>>>>> - ufs: properly fix cache operations
>>>>>
>>>>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>>>>> since v5, and a numerous of Cache issues makes any UFS controller
>>>>> fail to initialize.
>>>>>
>>>>> Since UFS core hasn't changed for a while, and since UFS is core
>>>>> technology for the Qualcomm SoCs, I volunteer maintaininig the
>>>>> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.
>>>>
>>>> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
>>>> j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible regressions ?
>>>>
>>>> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
>>>
>>>
>>> Good timing. We are close to send some updates to UFS which we require to get DWC version to work inside U-Boot.
>>>
>>> How far are that core changes from Linux? I see 9/13 is sync with Linux but when this is done you should also say which Linux version was used for sync.
>>
>> I think we are still quite far from Linux, we just took the basic required bits and pieces
>> to at least make the Qcom UFS controller driver build work, but Linux driver is overly complicated
>> with power management code we do not really need in U-Boot, so it's quite hard to sync honestly.
>>
>> But the plan is to align as much as possible once we get the basic Qcom UFS mainline.
> 
> That's understandable. But even when you say sync with Linux for some headers, etc it is good to say that it is sync with 6.11 for example.

Oh yes exact, I forgot to add this info, I planned to... I'll fix this in a v2.

Thanks,
Neil

> 
> Thanks,
> Michal
>
Neha Malcom Francis Sept. 19, 2024, 8:56 a.m. UTC | #7
Hi Neil

On 18/09/24 13:36, Neil Armstrong wrote:
> Hi Marek, Manorit, Tom, Michal,
> 
> On 10/09/2024 11:20, Neil Armstrong wrote:
>> This serie regroups all the fixes and base enhancements required to
>> support the Qualcomm UFS controllers in U-Boot.
>>
>> This syncs headers & defines from Linux, and includes 2 set of
>> fixes that were sent separately:
>> - ufs: core: remove link_startup_again logic
>> - ufs: properly fix cache operations
>>
>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>> since v5, and a numerous of Cache issues makes any UFS controller
>> fail to initialize.
>>
>> Since UFS core hasn't changed for a while, and since UFS is core
>> technology for the Qualcomm SoCs, I volunteer maintaininig the
>> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.
> 
> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
> j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible regressions ?
> 

For the K3 platforms (j721s2, j721e, j7200, j784s4) I have already done a sanity 
test with this series on j784s4 with no regressions seen, so should be fine.

> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
> 
> Thanks,
> Neil
> 
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> Bhupesh Sharma (5):
>>        ufs/ufs.h: Add definition of 'ufshcd_rmwl()'
>>        ufs: Clear UECPA once due to LINERESET has happened during LINK_STARTUP
>>        ufs: Sync possible UFS Quirks with Linux UFS driver
>>        ufs: Add missing memory barriers
>>        ufs: Fix debug message in 'ufs_start'
>>
>> Marek Vasut (2):
>>        ufs: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
>>        ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO
>>
>> Neil Armstrong (6):
>>        ufs: allocate descriptors with size aligned with DMA_MINALIGN
>>        ufs: fix dcache flush and invalidate range calculation
>>        ufs: split flush and invalidate to only invalidate when required
>>        ufs: use dcache helpers for scsi_cmd data and only invalidate if necessary
>>        ufs: core: remove link_startup_again logic
>>        MAINTAINERS: Add myself to the list of UFS maintainers
>>
>>   MAINTAINERS       |   1 +
>>   drivers/ufs/ufs.c |  98 ++++++++++++++++++++--------------
>>   drivers/ufs/ufs.h | 157 +++++++++++++++++++++++++++++++++++++++++++++++-------
>>   3 files changed, 197 insertions(+), 59 deletions(-)
>> ---
>> base-commit: ca55cf8104c0dd78aae45fa66dd8400ef1b3d0ac
>> change-id: 20240910-topic-ufs-enhancements-fe8ef9ce39d8
>>
>> Best regards,
>
Abbarapu, Venkatesh Sept. 19, 2024, 9:21 a.m. UTC | #8
Hi,

> -----Original Message-----
> From: neil.armstrong@linaro.org <neil.armstrong@linaro.org>
> Sent: Thursday, September 19, 2024 1:22 PM
> To: Simek, Michal <michal.simek@amd.com>; Marek Vasut
> <marek.vasut+renesas@mailbox.org>; Neha Malcom Francis <n-francis@ti.com>;
> Manorit Chawdhry <m-chawdhry@ti.com>; Tom Rini <trini@konsulko.com>;
> bmeng.cn@gmail.com; Abbarapu, Venkatesh <venkatesh.abbarapu@amd.com>
> Cc: u-boot@lists.denx.de; u-boot-qcom@groups.io; Bhupesh Sharma
> <bhupesh.linux@gmail.com>
> Subject: Re: [PATCH 00/13] ufs: enhancements to support Qualcomm UFS
> controllers
> 
> On 18/09/2024 12:47, Michal Simek wrote:
> >
> >
> > On 9/18/24 12:40, neil.armstrong@linaro.org wrote:
> >> Hi,
> >>
> >> On 18/09/2024 11:03, Michal Simek wrote:
> >>> Hi Neil,
> >>>
> >>> On 9/18/24 10:06, Neil Armstrong wrote:
> >>>> Hi Marek, Manorit, Tom, Michal,
> >>>>
> >>>> On 10/09/2024 11:20, Neil Armstrong wrote:
> >>>>> This serie regroups all the fixes and base enhancements required
> >>>>> to support the Qualcomm UFS controllers in U-Boot.
> >>>>>
> >>>>> This syncs headers & defines from Linux, and includes 2 set of
> >>>>> fixes that were sent separately:
> >>>>> - ufs: core: remove link_startup_again logic
> >>>>> - ufs: properly fix cache operations
> >>>>>
> >>>>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
> >>>>> since v5, and a numerous of Cache issues makes any UFS controller
> >>>>> fail to initialize.
> >>>>>
> >>>>> Since UFS core hasn't changed for a while, and since UFS is core
> >>>>> technology for the Qualcomm SoCs, I volunteer maintaininig the UFS
> >>>>> subsystem if Bhupesh & Neha Malcom Francis are ok with that.
> >>>>
> >>>> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72,
> >>>> j721e_evm_a72, j7200_evm_a72, amd_versal2_virt and qemu-riscv and
> check for possible regressions ?
> >>>>
> >>>> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
> >>>
> >>>
> >>> Good timing. We are close to send some updates to UFS which we require to
> get DWC version to work inside U-Boot.
> >>>
> >>> How far are that core changes from Linux? I see 9/13 is sync with Linux but
> when this is done you should also say which Linux version was used for sync.
> >>
> >> I think we are still quite far from Linux, we just took the basic
> >> required bits and pieces to at least make the Qcom UFS controller
> >> driver build work, but Linux driver is overly complicated with power management
> code we do not really need in U-Boot, so it's quite hard to sync honestly.
> >>
> >> But the plan is to align as much as possible once we get the basic Qcom UFS
> mainline.
> >
> > That's understandable. But even when you say sync with Linux for some headers,
> etc it is good to say that it is sync with 6.11 for example.
> 
> Oh yes exact, I forgot to add this info, I planned to... I'll fix this in a v2.
> 
> Thanks,
> Neil
> 
> >
> > Thanks,
> > Michal
> >
These changes are verified on AMD platform (amd_versal2_virt_defconfig) and no issues observed with this series.
Tested-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>

Thanks
Venkatesh
neil.armstrong@linaro.org Sept. 19, 2024, 11:47 a.m. UTC | #9
On 19/09/2024 11:21, Abbarapu, Venkatesh wrote:
> Hi,
> 
>> -----Original Message-----
>> From: neil.armstrong@linaro.org <neil.armstrong@linaro.org>
>> Sent: Thursday, September 19, 2024 1:22 PM
>> To: Simek, Michal <michal.simek@amd.com>; Marek Vasut
>> <marek.vasut+renesas@mailbox.org>; Neha Malcom Francis <n-francis@ti.com>;
>> Manorit Chawdhry <m-chawdhry@ti.com>; Tom Rini <trini@konsulko.com>;
>> bmeng.cn@gmail.com; Abbarapu, Venkatesh <venkatesh.abbarapu@amd.com>
>> Cc: u-boot@lists.denx.de; u-boot-qcom@groups.io; Bhupesh Sharma
>> <bhupesh.linux@gmail.com>
>> Subject: Re: [PATCH 00/13] ufs: enhancements to support Qualcomm UFS
>> controllers
>>
>> On 18/09/2024 12:47, Michal Simek wrote:
>>>
>>>
>>> On 9/18/24 12:40, neil.armstrong@linaro.org wrote:
>>>> Hi,
>>>>
>>>> On 18/09/2024 11:03, Michal Simek wrote:
>>>>> Hi Neil,
>>>>>
>>>>> On 9/18/24 10:06, Neil Armstrong wrote:
>>>>>> Hi Marek, Manorit, Tom, Michal,
>>>>>>
>>>>>> On 10/09/2024 11:20, Neil Armstrong wrote:
>>>>>>> This serie regroups all the fixes and base enhancements required
>>>>>>> to support the Qualcomm UFS controllers in U-Boot.
>>>>>>>
>>>>>>> This syncs headers & defines from Linux, and includes 2 set of
>>>>>>> fixes that were sent separately:
>>>>>>> - ufs: core: remove link_startup_again logic
>>>>>>> - ufs: properly fix cache operations
>>>>>>>
>>>>>>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>>>>>>> since v5, and a numerous of Cache issues makes any UFS controller
>>>>>>> fail to initialize.
>>>>>>>
>>>>>>> Since UFS core hasn't changed for a while, and since UFS is core
>>>>>>> technology for the Qualcomm SoCs, I volunteer maintaininig the UFS
>>>>>>> subsystem if Bhupesh & Neha Malcom Francis are ok with that.
>>>>>>
>>>>>> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72,
>>>>>> j721e_evm_a72, j7200_evm_a72, amd_versal2_virt and qemu-riscv and
>> check for possible regressions ?
>>>>>>
>>>>>> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
>>>>>
>>>>>
>>>>> Good timing. We are close to send some updates to UFS which we require to
>> get DWC version to work inside U-Boot.
>>>>>
>>>>> How far are that core changes from Linux? I see 9/13 is sync with Linux but
>> when this is done you should also say which Linux version was used for sync.
>>>>
>>>> I think we are still quite far from Linux, we just took the basic
>>>> required bits and pieces to at least make the Qcom UFS controller
>>>> driver build work, but Linux driver is overly complicated with power management
>> code we do not really need in U-Boot, so it's quite hard to sync honestly.
>>>>
>>>> But the plan is to align as much as possible once we get the basic Qcom UFS
>> mainline.
>>>
>>> That's understandable. But even when you say sync with Linux for some headers,
>> etc it is good to say that it is sync with 6.11 for example.
>>
>> Oh yes exact, I forgot to add this info, I planned to... I'll fix this in a v2.
>>
>> Thanks,
>> Neil
>>
>>>
>>> Thanks,
>>> Michal
>>>
> These changes are verified on AMD platform (amd_versal2_virt_defconfig) and no issues observed with this series.
> Tested-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>

Great, thx for testing !

Neil

> 
> Thanks
> Venkatesh
>
neil.armstrong@linaro.org Sept. 19, 2024, 11:48 a.m. UTC | #10
On 19/09/2024 10:56, Neha Malcom Francis wrote:
> Hi Neil
> 
> On 18/09/24 13:36, Neil Armstrong wrote:
>> Hi Marek, Manorit, Tom, Michal,
>>
>> On 10/09/2024 11:20, Neil Armstrong wrote:
>>> This serie regroups all the fixes and base enhancements required to
>>> support the Qualcomm UFS controllers in U-Boot.
>>>
>>> This syncs headers & defines from Linux, and includes 2 set of
>>> fixes that were sent separately:
>>> - ufs: core: remove link_startup_again logic
>>> - ufs: properly fix cache operations
>>>
>>> Without those 2 sets, UFS cannot initialize on Qualcomm controlers
>>> since v5, and a numerous of Cache issues makes any UFS controller
>>> fail to initialize.
>>>
>>> Since UFS core hasn't changed for a while, and since UFS is core
>>> technology for the Qualcomm SoCs, I volunteer maintaininig the
>>> UFS subsystem if Bhupesh & Neha Malcom Francis are ok with that.
>>
>> Could you run this serie on the r8a779f0_spider, j721s2_evm_a72, j721e_evm_a72,
>> j7200_evm_a72, amd_versal2_virt and qemu-riscv and check for possible regressions ?
>>
> 
> For the K3 platforms (j721s2, j721e, j7200, j784s4) I have already done a sanity test with this series on j784s4 with no regressions seen, so should be fine.

Ack, thanks for the report!

Neil

> 
>> It seems the only user of UFS_PCI is qemu-riscv, is there other users ?
>>
>> Thanks,
>> Neil
>>
>>>
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>> Bhupesh Sharma (5):
>>>        ufs/ufs.h: Add definition of 'ufshcd_rmwl()'
>>>        ufs: Clear UECPA once due to LINERESET has happened during LINK_STARTUP
>>>        ufs: Sync possible UFS Quirks with Linux UFS driver
>>>        ufs: Add missing memory barriers
>>>        ufs: Fix debug message in 'ufs_start'
>>>
>>> Marek Vasut (2):
>>>        ufs: Add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
>>>        ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO
>>>
>>> Neil Armstrong (6):
>>>        ufs: allocate descriptors with size aligned with DMA_MINALIGN
>>>        ufs: fix dcache flush and invalidate range calculation
>>>        ufs: split flush and invalidate to only invalidate when required
>>>        ufs: use dcache helpers for scsi_cmd data and only invalidate if necessary
>>>        ufs: core: remove link_startup_again logic
>>>        MAINTAINERS: Add myself to the list of UFS maintainers
>>>
>>>   MAINTAINERS       |   1 +
>>>   drivers/ufs/ufs.c |  98 ++++++++++++++++++++--------------
>>>   drivers/ufs/ufs.h | 157 +++++++++++++++++++++++++++++++++++++++++++++++-------
>>>   3 files changed, 197 insertions(+), 59 deletions(-)
>>> ---
>>> base-commit: ca55cf8104c0dd78aae45fa66dd8400ef1b3d0ac
>>> change-id: 20240910-topic-ufs-enhancements-fe8ef9ce39d8
>>>
>>> Best regards,
>>
>