forked from Mirrors/opensbi
		
	platform: generic: Pass FDT to early/final_init overrides
Several of these override functions access the FDT blob. Explicitly indicate which callbacks are allowed to modify the FDT blob by passing the parameter as a possibly-const pointer. This also reduces code size by deduplicating the call to fdt_get_address(). Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							3f964652d9
						
					
				
				
					commit
					6e5db7b09c
				
			@@ -24,13 +24,15 @@ static const struct andes_pma_region renesas_rzfive_pma_regions[] = {
 | 
			
		||||
	},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static int renesas_rzfive_final_init(bool cold_boot, const struct fdt_match *match)
 | 
			
		||||
static int renesas_rzfive_final_init(bool cold_boot, void *fdt,
 | 
			
		||||
				     const struct fdt_match *match)
 | 
			
		||||
{
 | 
			
		||||
	return andes_pma_setup_regions(renesas_rzfive_pma_regions,
 | 
			
		||||
	return andes_pma_setup_regions(fdt, renesas_rzfive_pma_regions,
 | 
			
		||||
				       array_size(renesas_rzfive_pma_regions));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int renesas_rzfive_early_init(bool cold_boot, const struct fdt_match *match)
 | 
			
		||||
static int renesas_rzfive_early_init(bool cold_boot, const void *fdt,
 | 
			
		||||
				     const struct fdt_match *match)
 | 
			
		||||
{
 | 
			
		||||
	/*
 | 
			
		||||
	 * Renesas RZ/Five RISC-V SoC has Instruction local memory and
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user