mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
platform: nvadsp: Drop KERNEL_VERSION check
The dma-mask could be applied to an older kernel as well. And this is essential for nvadsp driver to use the newer nvadsp_dma_alloc_and_map_at() function. Though downstream kernel 4.9 still has dma_alloc_at_coherent() support, it would be cleaner to have nvadsp code using a unified way instead of adding older dma_alloc_at_coherent() back with another KERNEL_VERSION check. Bug 200444660 Change-Id: I3968155c7439789a398ca499e70598ce1385737a Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2096705 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy <vdumpa@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
5759b9d6d4
commit
65f4df1dc4
@@ -2142,9 +2142,7 @@ int __init nvadsp_os_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct nvadsp_drv_data *drv_data = platform_get_drvdata(pdev);
|
||||
struct device *dev = &pdev->dev;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
||||
uint64_t dma_mask;
|
||||
#endif
|
||||
uint16_t com_mid = ADSP_COM_MBOX_ID;
|
||||
int ret = 0;
|
||||
|
||||
@@ -2162,7 +2160,6 @@ int __init nvadsp_os_probe(struct platform_device *pdev)
|
||||
drv_data->deassert_adsp = __deassert_adsp;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
||||
ret = of_property_read_u64(dev->of_node, "dma-mask", &dma_mask);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Missing property dma-mask\n");
|
||||
@@ -2170,7 +2167,7 @@ int __init nvadsp_os_probe(struct platform_device *pdev)
|
||||
} else {
|
||||
dma_set_mask_and_coherent(&pdev->dev, dma_mask);
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = nvadsp_os_init(pdev);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to init os\n");
|
||||
|
||||
Reference in New Issue
Block a user