diff options
-rw-r--r-- | drivers/gator/gator_events_l2c-310.c | 8 |
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 52472c7a9e62..e646215f37f6 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); |