mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
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:
committed by
mobile promotions
parent
e2a1904d46
commit
27e6f14c0e
@@ -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[] = {
|
||||
|
||||
@@ -25,15 +25,12 @@
|
||||
enum {
|
||||
AMC,
|
||||
AMISC,
|
||||
AO_MISC = AMISC,
|
||||
AHSP,
|
||||
AON_HSP = AHSP,
|
||||
APE_MAX_REG
|
||||
};
|
||||
|
||||
enum {
|
||||
AO_MISC,
|
||||
AON_HSP,
|
||||
AON_MAX_REG,
|
||||
};
|
||||
/*
|
||||
* Note: These enums should be aligned to the adsp_mem node mentioned in the
|
||||
* device tree
|
||||
@@ -159,10 +156,8 @@ struct nvadsp_chipdata {
|
||||
bool amc_err_war;
|
||||
u32 chipid_ext;
|
||||
|
||||
u32 adsp_prid;
|
||||
char *adsp_elf;
|
||||
size_t num_irqs;
|
||||
size_t num_regs;
|
||||
};
|
||||
|
||||
/* Maximum number of LOAD MAPPINGS supported */
|
||||
|
||||
Reference in New Issue
Block a user