mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01:00 
			
		
		
		
	rockchip: tpl: use IS_ENABLED for timer_init() call condition
Not all Rockchip SoC models use the ARM arch timer. Call the function timer_init() only when CONFIG_SYS_ARCH_TIMER is available. Use the call condition IS_ENABLED to increase build coverage and make the code easier to read. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
		| @@ -15,6 +15,7 @@ | ||||
| #include <asm/io.h> | ||||
| #include <asm/arch-rockchip/bootrom.h> | ||||
| #include <linux/bitops.h> | ||||
| #include <linux/kconfig.h> | ||||
|  | ||||
| #if CONFIG_IS_ENABLED(BANNER_PRINT) | ||||
| #include <timestamp.h> | ||||
| @@ -77,8 +78,10 @@ void board_init_f(ulong dummy) | ||||
|  | ||||
| 	/* Init secure timer */ | ||||
| 	rockchip_stimer_init(); | ||||
| 	/* Init ARM arch timer in arch/arm/cpu/ */ | ||||
| 	timer_init(); | ||||
|  | ||||
| 	/* Init ARM arch timer */ | ||||
| 	if (IS_ENABLED(CONFIG_SYS_ARCH_TIMER)) | ||||
| 		timer_init(); | ||||
|  | ||||
| 	ret = uclass_get_device(UCLASS_RAM, 0, &dev); | ||||
| 	if (ret) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user