Skip to contentSkip to conversation

openrisc: remove the redundant of_platform_populate

PATCH In review Rob Herring 2 participants 2 messages Aug 30, 2016 – Sep 12, 2016 Openrisc architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openrisc: remove the redundant of_platform_populate

The of_platform_populate call in the openrisc arch code is now redundant as the DT core provides a default call. Openrisc has a NULL match table which means only top level nodes with compatible strings will have devices creates. The default version will also descend nodes in the match table such as "simple-bus" which should be fine as openrisc doesn't have any of these (though it is preferred that memory-mapped peripherals be grouped under a bus node(s)).

---
 arch/openrisc/kernel/setup.c | 10 ----------
 1 file changed, 10 deletions(-)
arch/openrisc/kernel/setup.c +0 -10
index b4ed8b3..d2f78cf7 100644
@@ -38,7 +38,6 @@
 #include <linux/of.h>
 #include <linux/memblock.h>
 #include <linux/device.h>
-#include <linux/of_platform.h>
 
 #include <asm/sections.h>
 #include <asm/segment.h>
@@ -219,15 +218,6 @@ void __init or32_early_setup(void *fdt)
 	early_init_devtree(fdt);
 }
 
-static int __init openrisc_device_probe(void)
-{
-	of_platform_populate(NULL, NULL, NULL, NULL);
-
-	return 0;
-}
-
-device_initcall(openrisc_device_probe);
-
 static inline unsigned long extract_value_bits(unsigned long reg,
 					       short bit_nr, short width)
 {
Signature · 1 line
2.9.3
maintainer
#1 lore raw
Quoted 7 lines · Rob Herring

The of_platform_populate call in the openrisc arch code is now redundant as the DT core provides a default call. Openrisc has a NULL match table which means only top level nodes with compatible strings will have devices creates. The default version will also descend nodes in the match table such as "simple-bus" which should be fine as openrisc doesn't have any of these (though it is preferred that memory-mapped peripherals be grouped under a bus node(s)).

This looks fine to me. I am not sure if you got a reply from Jonas, but he hasn't been active maintainer for a while.

We are working on getting this sorted out.

-Stafford

Quoted 36 lines

---
arch/openrisc/kernel/setup.c | 10 ----------

1 file changed, 10 deletions(-)
arch/openrisc/kernel/setup.c +0 -10
index b4ed8b3..d2f78cf7 100644
@@ -38,7 +38,6 @@
 #include <linux/of.h>
 #include <linux/memblock.h>
 #include <linux/device.h>
-#include <linux/of_platform.h>
 
 #include <asm/sections.h>
 #include <asm/segment.h>
@@ -219,15 +218,6 @@ void __init or32_early_setup(void *fdt)
 	early_init_devtree(fdt);
 }
 
-static int __init openrisc_device_probe(void)
-{
-	of_platform_populate(NULL, NULL, NULL, NULL);
-
-	return 0;
-}
-
-device_initcall(openrisc_device_probe);
-
 static inline unsigned long extract_value_bits(unsigned long reg,
 					       short bit_nr, short width)
 {
Signature · 1 line
2.9.3