Files
linux-nv-oot/drivers/platform/tegra/nvadsp/os-t18x.c
Nitin Kumbhar 915f2bfa4d Platform: nvadsp: Unify ADSP across chips
Unifying ADSP driver across t186, t210.
This removes the use of chip specific configs.

Based on:
platform: nvadsp: Enable ADSP in T210 for 4.4
nvadsp: Add nvadsp_os_init for t18x HV config
tegra: t210: nvadsp: move hwmbox to chip data
platform: nvadsp: Add callbacks to chip data
platform: nvadsp: Use WDT irq from chip data
soc: adsp: use soc/tegra/chip-id.h for soc header
tegra: nvadsp: remove clk periph reset assert/deassert
tegra: nvadsp: use ACLK to manage ADSP clk on t186
tegra: nvadsp: dfs: fix tfreq in error path
platform: tegra: adsp: update rpm error handling
platform: nvadsp: export symbols for audio driver

Bug 200272977
Jira EMA-373
Bug 200257350
Bug 200124772
Bug 200289390

Change-Id: Iab20f54a48c67febd6b4ccfaf2e89e5b264e0f5a
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/1468351
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1537319
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-06-20 15:13:15 +00:00

52 lines
1.4 KiB
C

/*
* Copyright (C) 2015-2017, NVIDIA Corporation. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <linux/platform_device.h>
#include <linux/tegra_nvadsp.h>
#include <linux/tegra-hsp.h>
#include <linux/irqchip/tegra-agic.h>
#include "dev.h"
static void nvadsp_dbell_handler(void *data)
{
struct platform_device *pdev = data;
struct device *dev = &pdev->dev;
dev_info(dev, "APE DBELL handler\n");
}
int nvadsp_os_t18x_init(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct nvadsp_drv_data *drv_data = platform_get_drvdata(pdev);
struct device_node *node = dev->of_node;
int ret;
if (of_device_is_compatible(node, "nvidia,tegra18x-adsp-hv")) {
hwmbox_writel(1, drv_data->chip_data->hwmb.hwmbox5_reg);
return 0;
}
ret = tegra_hsp_db_add_handler(HSP_MASTER_APE,
nvadsp_dbell_handler, pdev);
if (ret) {
dev_err(dev, "failed to add HSP_MASTER_APE DB handler\n");
goto end;
}
end:
return ret;
}