mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
nvadsp: Modularize chip specific structures
For easy of extensibility to future chips, below data and functions applicable to T23x are moved to dev-t18x.c - chip data for supported chips - set_boot_vec: set up EVP - set_boot_freqs: set ADSP freq as per DT property - check_wfi_status: check WFI status from AMISC - dump_core_state: ADSP core and state dump Bug 3682950 Change-Id: Iffba56addc9a68ec33de390a379fe725e727cfad Signed-off-by: Viswanath L <viswanathl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3107450 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
27e6f14c0e
commit
9da3bc6449
@@ -128,7 +128,7 @@ struct nvadsp_cluster_mem {
|
||||
};
|
||||
|
||||
typedef int (*acast_init) (struct platform_device *pdev);
|
||||
typedef int (*reset_init) (struct platform_device *pdev);
|
||||
typedef int (*dev_init) (struct platform_device *pdev);
|
||||
typedef int (*os_init) (struct platform_device *pdev);
|
||||
#ifdef CONFIG_PM
|
||||
typedef int (*pm_init) (struct platform_device *pdev);
|
||||
@@ -143,7 +143,7 @@ struct nvadsp_chipdata {
|
||||
u32 adsp_os_config_hwmbox;
|
||||
u32 adsp_boot_config_hwmbox;
|
||||
acast_init acast_init;
|
||||
reset_init reset_init;
|
||||
dev_init dev_init;
|
||||
os_init os_init;
|
||||
#ifdef CONFIG_PM
|
||||
pm_init pm_init;
|
||||
@@ -216,6 +216,7 @@ struct nvadsp_drv_data {
|
||||
int (*set_boot_freqs)(struct nvadsp_drv_data *drv_data);
|
||||
bool (*check_wfi_status)(struct nvadsp_drv_data *drv_data);
|
||||
int (*map_hwmbox_interrupts)(struct nvadsp_drv_data *drv_data);
|
||||
void (*dump_core_state)(struct nvadsp_drv_data *drv_data);
|
||||
|
||||
struct nvadsp_pm_state state;
|
||||
bool adsp_os_running;
|
||||
@@ -331,12 +332,12 @@ static inline int __init nvadsp_pm_init(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
static inline int __init nvadsp_reset_init(struct platform_device *pdev)
|
||||
static inline int __init nvadsp_dev_init(struct platform_device *pdev)
|
||||
{
|
||||
struct nvadsp_drv_data *drv_data = platform_get_drvdata(pdev);
|
||||
|
||||
if (drv_data->chip_data->reset_init)
|
||||
return drv_data->chip_data->reset_init(pdev);
|
||||
if (drv_data->chip_data->dev_init)
|
||||
return drv_data->chip_data->dev_init(pdev);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user