summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-08-30 00:21:45 +0200
committerRob Herring <robh@kernel.org>2018-09-07 18:04:41 +0200
commit00b7d1cf46676ad5e6338e80dc6230e1b6e71b86 (patch)
tree867e51d423b01d051a57cde476f2333cfc84900c /drivers/of
parentof: make PowerMac cache node search conditional on CONFIG_PPC_PMAC (diff)
downloadlinux-00b7d1cf46676ad5e6338e80dc6230e1b6e71b86.tar.xz
linux-00b7d1cf46676ad5e6338e80dc6230e1b6e71b86.zip
of: make default address and size cells sizes private
Only some old OpenFirmware implementations rely on default sizes. Any FDT and modern implementation should have explicit properties. Make the OF_ROOT_NODE_*_CELLS_DEFAULT defines private so we don't get any outside users. This also gets us one step closer to removing the asm/prom.h dependency on Sparc. Cc: "David S. Miller" <davem@davemloft.net> Cc: Frank Rowand <frowand.list@gmail.com> Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/of_private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 216175d11d3d..5d1567025358 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -27,6 +27,14 @@ struct alias_prop {
char stem[0];
};
+#if defined(CONFIG_SPARC)
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
+#else
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
+#endif
+
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
+
extern struct mutex of_mutex;
extern struct list_head aliases_lookup;
extern struct kset *of_kset;