mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
nvethernet: Get HV window base from DT
Issue: SID needs to be programmed through HV window to get it reflected in controller register space. Currently its programmed through RM window. Fix: Get HV window base address from DT and program in controller registers in non-hypervisor mode. Store MAC instance ID to program the same ASID values which are used in DT. Bug 200761024 Change-Id: Ie9bcaebcba39f2d07438c9502591c0f51f22378f Signed-off-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2592481 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
c33c0b334c
commit
6c979ebdd5
@@ -5050,6 +5050,7 @@ exit:
|
||||
static int ether_init_plat_resources(struct platform_device *pdev,
|
||||
struct ether_priv_data *pdata)
|
||||
{
|
||||
bool tegra_hypervisor_mode = is_tegra_hypervisor_mode();
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
struct osi_dma_priv_data *osi_dma = pdata->osi_dma;
|
||||
struct resource *res;
|
||||
@@ -5063,6 +5064,26 @@ static int ether_init_plat_resources(struct platform_device *pdev,
|
||||
return PTR_ERR(osi_core->base);
|
||||
}
|
||||
|
||||
if (!tegra_hypervisor_mode) {
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||
"hv-base");
|
||||
if (res) {
|
||||
osi_core->hv_base = devm_ioremap_resource(&pdev->dev,
|
||||
res);
|
||||
if (IS_ERR(osi_core->hv_base)) {
|
||||
dev_err(&pdev->dev,
|
||||
"failed to ioremap HV address\n");
|
||||
return PTR_ERR(osi_core->hv_base);
|
||||
}
|
||||
} else {
|
||||
osi_core->hv_base = NULL;
|
||||
dev_dbg(&pdev->dev, "HV base address is not present\n");
|
||||
}
|
||||
} else {
|
||||
osi_core->hv_base = NULL;
|
||||
dev_dbg(&pdev->dev, "Hypervisor mode enabled\n");
|
||||
}
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
|
||||
"dma_base");
|
||||
if (res) {
|
||||
|
||||
Reference in New Issue
Block a user