aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gator/gator_events_l2c-310.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gator/gator_events_l2c-310.c b/drivers/gator/gator_events_l2c-310.c
index 52472c7a9e6..e646215f37f 100644
--- a/drivers/gator/gator_events_l2c-310.c
+++ b/drivers/gator/gator_events_l2c-310.c
@@ -11,6 +11,8 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
#include <asm/hardware/cache-l2x0.h>
#include "gator.h"
@@ -151,6 +153,12 @@ static void __iomem *gator_events_l2c310_probe(void)
};
int i;
+#if defined(CONFIG_OF)
+ if (of_have_populated_dt())
+ return of_iomap(of_find_compatible_node(NULL,
+ NULL, "arm,pl310-cache"), 0);
+#endif
+
for (i = 0; i < ARRAY_SIZE(variants); i++) {
void __iomem *base = ioremap(variants[i], SZ_4K);