nvadsp: AMC and AMISC changes for multi-instance

- With multiple ADSPs in use, only one of them may configure AMC,
    so use amc_not_avlbl flag to skip reg parsing, if not needed
 - Unify reg enums for ADSP and AON; this means that reg DT prop
    for AON should have a dummy first entry (against AMC)
 - Remove adsp_prid from chip data, as AMISC base in reg DT prop
    will be offset as per the ADSP instance

Bug 3682950
Bug 4165898

Change-Id: Ic6068aeeb7bbb3540cad36371a6715f8b43ee8b6
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3106899
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Viswanath L
2024-04-01 15:02:30 +00:00
committed by mobile promotions
parent e2a1904d46
commit 27e6f14c0e
2 changed files with 6 additions and 10 deletions

View File

@@ -479,7 +479,10 @@ static int __init nvadsp_probe(struct platform_device *pdev)
goto out;
}
for (iter = 0; iter < drv_data->chip_data->num_regs ; iter++) {
for (iter = 0; iter < APE_MAX_REG; iter++) {
if ((iter == AMC) && drv_data->chip_data->amc_not_avlbl)
continue;
res = platform_get_resource(pdev, IORESOURCE_MEM, iter);
if (!res) {
dev_err(dev,
@@ -653,7 +656,6 @@ static struct nvadsp_chipdata tegrat18x_adsp_chipdata = {
.amc_err_war = true,
.num_irqs = NVADSP_VIRQ_MAX,
.num_regs = APE_MAX_REG,
};
static struct nvadsp_chipdata tegra239_adsp_chipdata = {
@@ -686,7 +688,6 @@ static struct nvadsp_chipdata tegra239_adsp_chipdata = {
/* Populate Chip ID Major Revision as well */
.chipid_ext = 0x9,
.num_irqs = NVADSP_VIRQ_MAX,
.num_regs = APE_MAX_REG,
};
static const struct of_device_id nvadsp_of_match[] = {