
Hi Jayesh
On 29/05/24 18:54, Jayesh Choudhary wrote:
Introduce the basic functions and definitions needed to properly initialize TI J722S family of SoCs.
Co-developed-by: Vaishnav Achath vaishnav.a@ti.com Signed-off-by: Vaishnav Achath vaishnav.a@ti.com Signed-off-by: Jayesh Choudhary j-choudhary@ti.com
arch/arm/mach-k3/Kconfig | 7 +- arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/include/mach/hardware.h | 4 + .../arm/mach-k3/include/mach/j722s_hardware.h | 83 ++++++ arch/arm/mach-k3/include/mach/j722s_spl.h | 49 ++++ arch/arm/mach-k3/include/mach/spl.h | 4 + arch/arm/mach-k3/j722s/Kconfig | 32 ++ arch/arm/mach-k3/j722s/Makefile | 6 + arch/arm/mach-k3/j722s/j722s_init.c | 277 ++++++++++++++++++ 9 files changed, 462 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-k3/include/mach/j722s_hardware.h create mode 100644 arch/arm/mach-k3/include/mach/j722s_spl.h create mode 100644 arch/arm/mach-k3/j722s/Kconfig create mode 100644 arch/arm/mach-k3/j722s/Makefile create mode 100644 arch/arm/mach-k3/j722s/j722s_init.c
[...]
+void board_init_f(ulong dummy) +{
J784S4 went through quite a bit of revisions and I personally would like to use it as an example (for now) for our code layout for all future devices until we cleanup further. See [1] where it was addressed to have board_init_f split up into calling smaller logical functions instead.
[1] https://lore.kernel.org/u-boot/20240103162504.xgbx73pnmthtzthl@vengeful/
- struct udevice *dev;
- int ret;
- if (IS_ENABLED(CONFIG_CPU_V7R))
setup_k3_mpu_regions();
- /*
* Cannot delay this further as there is a chance that
* K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section.
*/
- store_boot_info_from_rom();
- ctrl_mmr_unlock();
- /* Init DM early */
- ret = spl_early_init();
- if (ret)
panic("spl_early_init() failed: %d\n", ret);
- /*
* Process pinctrl for the serial0 a.k.a. WKUP_UART0 module and continue
[...]