mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
		
			
				
	
	
		
			28 lines
		
	
	
		
			487 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			487 B
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0+
 | 
						|
/*
 | 
						|
 * Copyright (C) 2021 SiFive, Inc
 | 
						|
 */
 | 
						|
 | 
						|
#include <cache.h>
 | 
						|
#include <cpu_func.h>
 | 
						|
#include <log.h>
 | 
						|
#include <dm.h>
 | 
						|
 | 
						|
void enable_caches(void)
 | 
						|
{
 | 
						|
	struct udevice *dev;
 | 
						|
	int ret;
 | 
						|
 | 
						|
	/* Enable ways of ccache */
 | 
						|
	ret = uclass_get_device_by_driver(UCLASS_CACHE,
 | 
						|
					  DM_DRIVER_GET(sifive_ccache),
 | 
						|
					  &dev);
 | 
						|
	if (ret) {
 | 
						|
		log_debug("Cannot enable cache ways");
 | 
						|
	} else {
 | 
						|
		ret = cache_enable(dev);
 | 
						|
		if (ret)
 | 
						|
			log_debug("ccache enable failed");
 | 
						|
	}
 | 
						|
}
 |