mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									f6707fd624
								
							
						
					
					
						commit
						00b7d1cf46
					
				
					 3 changed files with 8 additions and 9 deletions
				
			
		|  | @ -24,9 +24,6 @@ | ||||||
| #include <linux/atomic.h> | #include <linux/atomic.h> | ||||||
| #include <linux/irqdomain.h> | #include <linux/irqdomain.h> | ||||||
| 
 | 
 | ||||||
| #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT	2 |  | ||||||
| #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT	1 |  | ||||||
| 
 |  | ||||||
| #define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l)) | #define of_compat_cmp(s1, s2, l)	strncmp((s1), (s2), (l)) | ||||||
| #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2)) | #define of_prop_cmp(s1, s2)		strcasecmp((s1), (s2)) | ||||||
| #define of_node_cmp(s1, s2)		strcmp((s1), (s2)) | #define of_node_cmp(s1, s2)		strcmp((s1), (s2)) | ||||||
|  |  | ||||||
|  | @ -27,6 +27,14 @@ struct alias_prop { | ||||||
| 	char stem[0]; | 	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 mutex of_mutex; | ||||||
| extern struct list_head aliases_lookup; | extern struct list_head aliases_lookup; | ||||||
| extern struct kset *of_kset; | extern struct kset *of_kset; | ||||||
|  |  | ||||||
|  | @ -247,12 +247,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | ||||||
| #include <asm/prom.h> | #include <asm/prom.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /* Default #address and #size cells.  Allow arch asm/prom.h to override */ |  | ||||||
| #if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT) |  | ||||||
| #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 |  | ||||||
| #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||||||
| #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Rob Herring
						Rob Herring