Commit Graph

8 Commits

Author SHA1 Message Date
Laxman Dewangan
b275ffc1ef ufs: tegra: Create provisioned and normal version of module
Create the two loadable module for ufs tegra, one without
provisioning and other with provisioning.

This will help to avoid need of the CONFIG variable and
usecase to use the module per their requirements.

Change-Id: I2c9d6e9680b9b2007fcccfa91002154ed29a6928
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2869279
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-13 05:01:24 -07:00
Abhilash G
d4d822ee06 scsi: ufs: Add support for UFS provisioning
Add support for UFS provisioning and changing
reference clock frequency using sysfs nodes
for automotive flashing kernel.

Bug 3978622

Change-Id: I236c3d9de3d7ea89c631aec6f11ef20d11656549
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859426
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-08 06:20:31 -08:00
Abhilash G
60153c77c1 scsi: ufs: Make functions static and remove unused functions
Sparse is reporting following warnings:
warning: symbol 'ufs_tegra_disable_mphy_slcg' was not declared.
warning: symbol 'ufs_tegra_mphy_tx_advgran' was not declared.
warning: symbol 'ufs_tegra_mphy_rx_advgran' was not declared.
warning: symbol 'ufs_tegra_ufs_aux_ref_clk_enable' was not declared.
warning: symbol 'ufs_tegra_ufs_aux_ref_clk_disable' was not declared.
warning: symbol 'ufs_tegra_aux_reset_enable' was not declared
warning: symbol 'ufs_tegra_ufs_aux_prog' was not declared.

Resolve these issues by making them static and remove functions
that are not getting called.

Bug 3954363

Change-Id: I59b2feeb45c93d8e51dca4fb0d3c752043c15ecd
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855754
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-16 00:04:24 -08:00
Jon Hunter
c9981b9ac9 scsi: ufs: Fix build for Linux v6.2
Building the Tegra UFS driver with Linux v6.2 fails with the following
error ...

 drivers/scsi/ufs/ufs-tegra.c:1004:10: error: implicit declaration of
 function ‘pinctrl_select_state’ [-Werror=implicit-function-declaration]
    ret = pinctrl_select_state(ufs_tegra->ufs_pinctrl,
          ^~~~~~~~~~~~~~~~~~~~

Fix this by including the "pinctrl/consumer.h" header file that defines
this function.

Bug 3936429

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I91fdbcb39d8d458021661e2103aa2dc236001066
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841035
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-01-11 11:26:56 -08:00
Abhilash G
7fb44152e2 scsi: ufs: Add MPHY war for boot failure
Added two wars for boot failure:

1. Added MPHY reset after link startup and set
2. Override control of mux select of MPHY2UPHY RX interface signals

Bug 3677354
Bug 3621817

Change-Id: Ia412d328561905faad4df8982fa86f754f028943
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2794834
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-12-13 06:16:25 -08:00
Abhilash G
6f8cb66166 scsi: ufs: Add Stream ID support
Add stream-id programming and Configure
stream-id in resume.

Bug 3441520
Bug 3621817

Change-Id: I16b01ef37e4549a5263d8e232d78805c8f84a5f6
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2794804
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-12 15:01:00 -08:00
Jon Hunter
fc8041ed6a scsi: ufs: Fix build for Linux v5.16
When building the UFS driver for Linux v5.16 some header files such as
keyslot-manager.h are not found and the build fails. Update the UFS
driver and reorganise the header files to fix the build for Linux v5.16.

Bug 3820317

Change-Id: I10eea40411369e4c5d6809086bb1c35628c0bbad
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2791963
Reviewed-by: Kartik . <kkartik@nvidia.com>
Reviewed-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-20 02:19:39 -07:00
Kartik
1ba41d5ee2 scsi: ufs: add ufs-tegra driver as oot module
Add ufs-tegra driver.

Bug 3621817

Change-Id: I4bf56d02ad627af84d516262edd93e1b593f4e50
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2734906
Reviewed-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Abhilash G <abhilashg@nvidia.com>
2022-09-07 12:19:47 -07:00