Commit 999435ad authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

kernel: prevent creating an A24 window at 0xf00000 (Tsi148 uses same address…

kernel: prevent creating an A24 window at 0xf00000 (Tsi148 uses same address range for its internal regs)
parent 867c8c2c
......@@ -547,7 +547,7 @@ int svec_validate_configuration(struct device *pdev, struct svec_config *cfg)
break;
case VME_A24_USER_DATA_SCT:
addr_mask = 0x00f80000;
max_size = 0x0800000;
max_size = 0x00080000;
break;
default:
dev_err(pdev, "Unsupported VME address modifier 0x%x\n",
......@@ -555,6 +555,16 @@ int svec_validate_configuration(struct device *pdev, struct svec_config *cfg)
return 0;
}
if (cfg->vme_am == VME_A24_USER_DATA_SCT &&
cfg->vme_base >= 0xf00000)
{
dev_err(pdev,
"VME base address for A24 mode must not be >= 0xf00000 due to "
"addressing conflict with the Tsi148 VME bridge. Please change "
"your card's configuration.\n");
return 0;
}
if (cfg->vme_base & ~addr_mask) {
dev_err(pdev,
"VME base address incorrectly aligned (mask = 0x%x)\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment