mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
platform: tegra: adsp: remove emc clocks
With common clock framework, the shared emc clks have been replaced by a bandwidth manager. Hence, the shared clocks for t210 on 4.9 are deprecated. bug 200345548 Change-Id: I09638ffef2635cabefbb560f2d686eb306f4fd78 Signed-off-by: Prateek Patel <prpatel@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1568428 GVS: Gerrit_Virtual_Submit Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
1138e7fbc7
commit
12dc199ff3
@@ -62,12 +62,6 @@ static void nvadsp_clocks_disable(struct platform_device *pdev)
|
||||
dev_dbg(dev, "apb2ape clock disabled\n");
|
||||
drv_data->apb2ape_clk = NULL;
|
||||
}
|
||||
|
||||
if (drv_data->ape_emc_clk) {
|
||||
clk_disable_unprepare(drv_data->ape_emc_clk);
|
||||
dev_dbg(dev, "ape.emc clock disabled\n");
|
||||
drv_data->ape_emc_clk = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int nvadsp_clocks_enable(struct platform_device *pdev)
|
||||
@@ -126,20 +120,6 @@ static int nvadsp_clocks_enable(struct platform_device *pdev)
|
||||
}
|
||||
dev_dbg(dev, "adsp cpu clock enabled\n");
|
||||
|
||||
drv_data->ape_emc_clk = devm_clk_get(dev, "adsp.emc");
|
||||
if (IS_ERR_OR_NULL(drv_data->ape_emc_clk)) {
|
||||
dev_err(dev, "unable to find adsp.emc clock\n");
|
||||
ret = PTR_ERR(drv_data->ape_emc_clk);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(drv_data->ape_emc_clk);
|
||||
if (ret) {
|
||||
dev_err(dev, "unable to enable adsp.emc clock\n");
|
||||
goto end;
|
||||
}
|
||||
dev_dbg(dev, "ape.emc is enabled\n");
|
||||
|
||||
drv_data->apb2ape_clk = devm_clk_get(dev, "adsp.apb2ape");
|
||||
if (IS_ERR_OR_NULL(drv_data->apb2ape_clk)) {
|
||||
dev_err(dev, "unable to find adsp.apb2ape clk\n");
|
||||
|
||||
@@ -770,31 +770,6 @@ u32 adsp_to_emc_freq(u32 adspfreq)
|
||||
return 0; /* emc min */
|
||||
}
|
||||
|
||||
static int nvadsp_set_ape_emc_freq(struct nvadsp_drv_data *drv_data)
|
||||
{
|
||||
unsigned long ape_emc_freq = drv_data->ape_emc_freq * 1000; /* in Hz */
|
||||
struct device *dev = &priv.pdev->dev;
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_TEGRA_ADSP_DFS
|
||||
/* pass adsp freq in KHz. adsp_emc_freq in Hz */
|
||||
ape_emc_freq = adsp_to_emc_freq(drv_data->adsp_freq / 1000) * 1000;
|
||||
#endif
|
||||
dev_dbg(dev, "requested adsp cpu freq %luKHz",
|
||||
drv_data->adsp_freq / 1000);
|
||||
dev_dbg(dev, "ape.emc freq %luHz\n", ape_emc_freq / 1000);
|
||||
|
||||
|
||||
if (!ape_emc_freq)
|
||||
return 0;
|
||||
|
||||
ret = clk_set_rate(drv_data->ape_emc_clk, ape_emc_freq);
|
||||
|
||||
dev_dbg(dev, "ape.emc freq %luKHz\n",
|
||||
clk_get_rate(drv_data->ape_emc_clk) / 1000);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int nvadsp_set_ape_freq(struct nvadsp_drv_data *drv_data)
|
||||
{
|
||||
unsigned long ape_freq = drv_data->ape_freq * 1000; /* in Hz*/
|
||||
@@ -1009,12 +984,6 @@ static int nvadsp_set_boot_freqs(struct nvadsp_drv_data *drv_data)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (drv_data->ape_emc_clk) {
|
||||
ret = nvadsp_set_ape_emc_freq(drv_data);
|
||||
if (ret)
|
||||
goto end;
|
||||
}
|
||||
|
||||
end:
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user