mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 10:21:25 +01:00 
			
		
		
		
	arm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS
When setting boot media to load the TIFS binary in legacy boot flow (followed by J721E), get_timer() is called which eventually calls dm_timer_init() to grab the tick-timer, which is mcu_timer0. Since we need to set up the clocks before using the timer, move clk_k3 driver probe before k3_sysfw_loader to ensure we have all necessary clocks set up before. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Nishanth Menon <nm@ti.com> Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
This commit is contained in:
		
							parent
							
								
									dd0169f033
								
							
						
					
					
						commit
						50fa67d091
					
				@ -228,6 +228,18 @@ void board_init_f(ulong dummy)
 | 
				
			|||||||
	if (!ret)
 | 
						if (!ret)
 | 
				
			||||||
		pinctrl_select_state(dev, "default");
 | 
							pinctrl_select_state(dev, "default");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * Force probe of clk_k3 driver here to ensure basic default clock
 | 
				
			||||||
 | 
						 * configuration is always done.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
 | 
				
			||||||
 | 
							ret = uclass_get_device_by_driver(UCLASS_CLK,
 | 
				
			||||||
 | 
											  DM_DRIVER_GET(ti_clk),
 | 
				
			||||||
 | 
											  &dev);
 | 
				
			||||||
 | 
							if (ret)
 | 
				
			||||||
 | 
								panic("Failed to initialize clk-k3!\n");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Load, start up, and configure system controller firmware. Provide
 | 
						 * Load, start up, and configure system controller firmware. Provide
 | 
				
			||||||
	 * the U-Boot console init function to the SYSFW post-PM configuration
 | 
						 * the U-Boot console init function to the SYSFW post-PM configuration
 | 
				
			||||||
@ -241,18 +253,6 @@ void board_init_f(ulong dummy)
 | 
				
			|||||||
	do_dt_magic();
 | 
						do_dt_magic();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * Force probe of clk_k3 driver here to ensure basic default clock
 | 
					 | 
				
			||||||
	 * configuration is always done.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if (IS_ENABLED(CONFIG_SPL_CLK_K3)) {
 | 
					 | 
				
			||||||
		ret = uclass_get_device_by_driver(UCLASS_CLK,
 | 
					 | 
				
			||||||
						  DM_DRIVER_GET(ti_clk),
 | 
					 | 
				
			||||||
						  &dev);
 | 
					 | 
				
			||||||
		if (ret)
 | 
					 | 
				
			||||||
			panic("Failed to initialize clk-k3!\n");
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Prepare console output */
 | 
						/* Prepare console output */
 | 
				
			||||||
	preloader_console_init();
 | 
						preloader_console_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user