mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	fdt: Drop remaining preprocessor macros in fdtdec_setup()
We only have two choices for obtaining the devicetree. Simplify the code to make that clear. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									b5199380fc
								
							
						
					
					
						commit
						ba83d8593b
					
				
							
								
								
									
										20
									
								
								lib/fdtdec.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								lib/fdtdec.c
									
									
									
									
									
								
							@ -1624,15 +1624,17 @@ static void setup_multi_dtb_fit(void)
 | 
				
			|||||||
int fdtdec_setup(void)
 | 
					int fdtdec_setup(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
#ifdef CONFIG_OF_EMBED
 | 
					
 | 
				
			||||||
	/* Get a pointer to the FDT */
 | 
						/* The devicetree is typically appended to U-Boot */
 | 
				
			||||||
	gd->fdt_blob = dtb_dt_embedded();
 | 
						if (IS_ENABLED(CONFIG_OF_SEPARATE) || IS_ENABLED(CONFIG_OF_BOARD)) {
 | 
				
			||||||
#elif defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE)
 | 
							/* Allow the board to override the fdt address. */
 | 
				
			||||||
	/* Allow the board to override the fdt address. */
 | 
							gd->fdt_blob = board_fdt_blob_setup(&ret);
 | 
				
			||||||
	gd->fdt_blob = board_fdt_blob_setup(&ret);
 | 
							if (ret)
 | 
				
			||||||
	if (ret)
 | 
								return ret;
 | 
				
			||||||
		return ret;
 | 
						} else { /* embed dtb in ELF file for testing / development */
 | 
				
			||||||
#endif
 | 
							gd->fdt_blob = dtb_dt_embedded();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
 | 
						if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
 | 
				
			||||||
		/* Allow the early environment to override the fdt address */
 | 
							/* Allow the early environment to override the fdt address */
 | 
				
			||||||
		gd->fdt_blob = map_sysmem(env_get_ulong("fdtcontroladdr", 16,
 | 
							gd->fdt_blob = map_sysmem(env_get_ulong("fdtcontroladdr", 16,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user