@@ -29,6 +29,8 @@ Optional properties in the sram node:
- no-memory-wc : the flag indicating, that SRAM memory region has not to
be remapped as write combining. WC is used by default.
+- memory-exec : map range to allow code execution
+- memory-exec-nocache : map range to allow code execution and also non-cached
Required properties in the area nodes:
@@ -362,6 +362,14 @@ static int sram_probe(struct platform_device *pdev)
if (of_property_read_bool(pdev->dev.of_node, "no-memory-wc"))
sram->virt_base = devm_ioremap(sram->dev, res->start, size);
+ else if (of_property_read_bool(pdev->dev.of_node, "memory-exec"))
+ sram->virt_base = devm_ioremap_exec(sram->dev, res->start,
+ size);
+ else if (of_property_read_bool(pdev->dev.of_node,
+ "memory-exec-nocache"))
+ sram->virt_base = devm_ioremap_exec_nocache(sram->dev,
+ res->start,
+ size);
else
sram->virt_base = devm_ioremap_wc(sram->dev, res->start, size);
if (IS_ERR(sram->virt_base))