mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-31 12:08:19 +00:00 
			
		
		
		
	This existing code assumes that a reg property is larger than one cell, but this is not always the case. Fix this assumption. Also if a node's parent is missing the #address-cells and #size-cells properties we use 2 as a default for each. But this should not happen in practice. More likely the properties were removed for SPL due to there being no 'u-boot,dm-pre-reloc' property, or similar. Add a warning for this as the failure can be very confusing. Signed-off-by: Simon Glass <sjg@chromium.org>
		
			
				
	
	
		
			31 lines
		
	
	
		
			435 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			435 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0+
 | |
| /*
 | |
|  * Test device tree file for dtoc
 | |
|  *
 | |
|  * Copyright 2017 Google, Inc
 | |
|  */
 | |
| 
 | |
| /dts-v1/;
 | |
| 
 | |
| / {
 | |
| 	#address-cells = <1>;
 | |
| 	#size-cells = <1>;
 | |
| 
 | |
| 	i2c@0 {
 | |
| 		compatible = "sandbox,i2c";
 | |
| 		u-boot,dm-pre-reloc;
 | |
| 		#address-cells = <1>;
 | |
| 		#size-cells = <0>;
 | |
| 		pmic@9 {
 | |
| 			compatible = "sandbox,pmic";
 | |
| 			u-boot,dm-pre-reloc;
 | |
| 			reg = <9>;
 | |
| 			low-power;
 | |
| 
 | |
| 			gpio {
 | |
| 				compatible = "sandbox,gpio";
 | |
| 			};
 | |
| 		};
 | |
| 	};
 | |
| };
 |