]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
ARM: OMAP4/5: Add generic board detection hook
authorKipisz, Steven <s-kipisz2@ti.com>
Wed, 24 Feb 2016 18:30:57 +0000 (12:30 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 14 Mar 2016 23:18:34 +0000 (19:18 -0400)
Many TI EVMs have capability to store relevant board information
such as DDR description in EEPROM. Further many pad configuration
variations can occur as part of revision changes in the platform.
In-order to support these at runtime, we for a board detection hook
which is available for override from board files that may desire to do
so.

NOTE: All TI EVMs are capable of detecting board information based on
early clocks that are configured. However, in case of additional needs
this can be achieved within the override logic from within the board
file.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv7/omap-common/hwinit-common.c
arch/arm/include/asm/arch-omap4/sys_proto.h
arch/arm/include/asm/arch-omap5/sys_proto.h

index 91f2dead364b06361b259d91dcef2875a5491218..9e9376d0e6e6d2d86e1ff03e18429396d4ab9311 100644 (file)
@@ -97,6 +97,16 @@ int arch_cpu_init(void)
 }
 #endif /* CONFIG_ARCH_CPU_INIT */
 
+/**
+ * do_board_detect() - Detect board description
+ *
+ * Function to detect board description. This is expected to be
+ * overridden in the SoC family board file where desired.
+ */
+void __weak do_board_detect(void)
+{
+}
+
 /*
  * Routine: s_init
  * Description: Does early system init of watchdog, muxing,  andclocks
@@ -128,6 +138,7 @@ void s_init(void)
        do_io_settings();
 #endif
        setup_early_clocks();
+       do_board_detect();
        prcm_init();
 }
 
index 26e9a194f036da2945d639282d88a6a8a9f0c24e..fbb52093c65aa655c68b27ae6c880bcc60623f31 100644 (file)
@@ -39,6 +39,7 @@ u32 wait_on_value(u32, u32, void *, u32);
 void sdelay(unsigned long);
 void setup_early_clocks(void);
 void prcm_init(void);
+void do_board_detect(void);
 void bypass_dpll(u32 const base);
 void freq_update_core(void);
 u32 get_sys_clk_freq(void);
index 18902628739bd0d5ca4a905dde87465cae3a6bcd..23a33cb233bb15cf7fee6eed71a089eeb1addb80 100644 (file)
@@ -50,6 +50,7 @@ u32 wait_on_value(u32, u32, void *, u32);
 void sdelay(unsigned long);
 void setup_early_clocks(void);
 void prcm_init(void);
+void do_board_detect(void);
 void bypass_dpll(u32 const base);
 void freq_update_core(void);
 u32 get_sys_clk_freq(void);