All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Kipisz <s-kipisz2@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V5 6/7] ARM: OMAP4/5: Add generic board detection hook
Date: Wed, 24 Feb 2016 12:30:57 -0600	[thread overview]
Message-ID: <1456338658-5027-7-git-send-email-s-kipisz2@ti.com> (raw)
In-Reply-To: <1456338658-5027-1-git-send-email-s-kipisz2@ti.com>

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>
---
V5:
	- reviewed by picked up
	- no functional changes
V4: https://patchwork.ozlabs.org/patch/540774/
v3:  https://patchwork.ozlabs.org/patch/540194/

v2:  http://marc.info/?t=144655344600006&r=1&w=2
      (mailing list squashed original submission)

Changes in v2:
 - New patch

 arch/arm/cpu/armv7/omap-common/hwinit-common.c | 11 +++++++++++
 arch/arm/include/asm/arch-omap4/sys_proto.h    |  1 +
 arch/arm/include/asm/arch-omap5/sys_proto.h    |  1 +
 3 files changed, 13 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
index 91f2dead364b..9e9376d0e6e6 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
@@ -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();
 }
 
diff --git a/arch/arm/include/asm/arch-omap4/sys_proto.h b/arch/arm/include/asm/arch-omap4/sys_proto.h
index 26e9a194f036..fbb52093c65a 100644
--- a/arch/arm/include/asm/arch-omap4/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap4/sys_proto.h
@@ -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);
diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h
index 18902628739b..23a33cb233bb 100644
--- a/arch/arm/include/asm/arch-omap5/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
@@ -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);
-- 
2.7.0

  parent reply	other threads:[~2016-02-24 18:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24 18:30 [U-Boot] [PATCH V5 0/7] ARM: omap-common: Add board detection support for TI EVMs Steve Kipisz
2016-02-24 18:30 ` [U-Boot] [PATCH V5 1/7] ARM: OMAP4/5: Centralize early clock initialization Steve Kipisz
2016-02-26 18:17   ` Tom Rini
2016-03-15 11:55   ` [U-Boot] [U-Boot, V5, " Tom Rini
2016-02-24 18:30 ` [U-Boot] [PATCH V5 2/7] ARM: OMAP4/5: Centralize gpi2c_init Steve Kipisz
2016-02-26 18:17   ` Tom Rini
2016-03-15 11:55   ` [U-Boot] [U-Boot,V5,2/7] " Tom Rini
2016-02-24 18:30 ` [U-Boot] [PATCH V5 3/7] ARM: omap-common: Add standard access for board description EEPROM Steve Kipisz
2016-02-26 18:17   ` Tom Rini
2016-03-15 11:55   ` [U-Boot] [U-Boot, V5, " Tom Rini
2016-02-24 18:30 ` [U-Boot] [PATCH V5 4/7] ti: AM335x: Use generic EEPROM detection logic Steve Kipisz
2016-02-26 18:17   ` Tom Rini
2016-03-15 11:56   ` [U-Boot] [U-Boot, V5, " Tom Rini
2016-02-24 18:30 ` [U-Boot] [PATCH V5 5/7] ti: AM437x: " Steve Kipisz
2016-02-26 18:17   ` Tom Rini
2016-03-15 11:56   ` [U-Boot] [U-Boot, V5, " Tom Rini
2016-02-24 18:30 ` Steve Kipisz [this message]
2016-02-26 18:17   ` [U-Boot] [PATCH V5 6/7] ARM: OMAP4/5: Add generic board detection hook Tom Rini
2016-03-15 11:56   ` [U-Boot] [U-Boot, V5, " Tom Rini
2016-02-24 18:30 ` [U-Boot] [PATCH V5 7/7] board: ti: AM57xx: Add detection logic for AM57xx-evm Steve Kipisz
2016-02-25  7:06   ` Lokesh Vutla
2016-02-25 14:52     ` Nishanth Menon
2016-02-26 18:17   ` Tom Rini
2016-03-15 11:56   ` [U-Boot] [U-Boot, V5, " Tom Rini
2016-02-26 18:17 ` [U-Boot] [PATCH V5 0/7] ARM: omap-common: Add board detection support for TI EVMs Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456338658-5027-7-git-send-email-s-kipisz2@ti.com \
    --to=s-kipisz2@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.