nvadsp: request clk_round_rate() for 600 MHz

On 5.4 kernel clk_round_rate(), for ACLK with ULONG_MAX request, is
returning minimum possible value for ACLK and this is causing a
failure with ADSP OS load. The issue is found in BPMP where there
is a problem with data mis-alignment. Till this gets addressed a TEMP
change is provided here to unblock ADSP audio related work.

This can be reverted once original BPMP fix is merged.

Bug 200593718

Change-Id: I1965986770424f2a8560e011ca892b700cdc0258
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2345133
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Sameer Pujar
2020-05-15 16:29:00 +05:30
committed by Laxman Dewangan
parent 68ea0dc35b
commit 134ade9bf2

View File

@@ -1039,7 +1039,11 @@ static int nvadsp_set_adsp_clks(struct nvadsp_drv_data *drv_data)
adsp_freq = drv_data->adsp_freq_hz; /* in Hz*/
/* round rate shall be used with adsp parent clk i.e. aclk */
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
max_adsp_freq = clk_round_rate(drv_data->aclk_clk, ULONG_MAX);
#else
max_adsp_freq = clk_round_rate(drv_data->aclk_clk, 600000000);
#endif
/* Set max adsp boot freq */
if (!adsp_freq)