mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 10:21:25 +01:00 
			
		
		
		
	Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
		
			
				
	
	
		
			42 lines
		
	
	
		
			821 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			821 B
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0+
 | 
						|
/*
 | 
						|
 * Passing basic information from SPL to U-Boot proper
 | 
						|
 *
 | 
						|
 * Copyright 2018 Google, Inc
 | 
						|
 */
 | 
						|
 | 
						|
#include <common.h>
 | 
						|
#include <handoff.h>
 | 
						|
#include <asm/global_data.h>
 | 
						|
 | 
						|
DECLARE_GLOBAL_DATA_PTR;
 | 
						|
 | 
						|
void handoff_save_dram(struct spl_handoff *ho)
 | 
						|
{
 | 
						|
	struct bd_info *bd = gd->bd;
 | 
						|
	int i;
 | 
						|
 | 
						|
	ho->ram_size = gd->ram_size;
 | 
						|
 | 
						|
	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
 | 
						|
		ho->ram_bank[i].start = bd->bi_dram[i].start;
 | 
						|
		ho->ram_bank[i].size = bd->bi_dram[i].size;
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
void handoff_load_dram_size(struct spl_handoff *ho)
 | 
						|
{
 | 
						|
	gd->ram_size = ho->ram_size;
 | 
						|
}
 | 
						|
 | 
						|
void handoff_load_dram_banks(struct spl_handoff *ho)
 | 
						|
{
 | 
						|
	struct bd_info *bd = gd->bd;
 | 
						|
	int i;
 | 
						|
 | 
						|
	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
 | 
						|
		bd->bi_dram[i].start = ho->ram_bank[i].start;
 | 
						|
		bd->bi_dram[i].size = ho->ram_bank[i].size;
 | 
						|
	}
 | 
						|
}
 |