From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] mx6: Rework s_init to be spl_board_init() and gate_ungate_all_mx6_pfds()
Date: Tue, 10 Feb 2015 19:07:23 -0500 [thread overview]
Message-ID: <1423613243-21114-2-git-send-email-trini@ti.com> (raw)
In-Reply-To: <1423613243-21114-1-git-send-email-trini@ti.com>
To facilitate changing lowlevel_init to become s_init, move the current
contents of s_int() to gate_ungate_all_mx6_pfds() (and add extern to
arch/arm/include/asm/arch-mx6/crm_regs.h) and add a default weak
spl_board_init() that calls this function. The cm_fx6 platform already
has a spl_board_init() so make that call the new function as well.
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Tom Rini <trini@ti.com>
---
arch/arm/cpu/armv7/mx6/soc.c | 7 ++++++-
arch/arm/include/asm/arch-mx6/crm_regs.h | 2 ++
board/compulab/cm_fx6/spl.c | 2 ++
include/configs/imx6_spl.h | 1 +
4 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 5f5f497..ecc4272 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -385,7 +385,7 @@ const struct boot_mode soc_boot_modes[] = {
{NULL, 0},
};
-void s_init(void)
+void gate_ungate_all_mx6_pfds(void)
{
struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
@@ -429,6 +429,11 @@ void s_init(void)
writel(mask528, &anatop->pfd_528_clr);
}
+void __weak spl_board_init(void)
+{
+ gate_ungate_all_mx6_pfds();
+}
+
#ifdef CONFIG_IMX_HDMI
void imx_enable_hdmi_phy(void)
{
diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h b/arch/arm/include/asm/arch-mx6/crm_regs.h
index 39f3c07..700175e 100644
--- a/arch/arm/include/asm/arch-mx6/crm_regs.h
+++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
@@ -104,6 +104,8 @@ struct mxc_ccm_reg {
u32 analog_pfd_528_clr;
u32 analog_pfd_528_tog;
};
+
+void gate_ungate_all_mx6_pfds(void);
#endif
/* Define the bits in register CCR */
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 5b4b76f..83be867 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -341,6 +341,8 @@ void spl_board_init(void)
{
u32 boot_device = spl_boot_device();
+ gate_ungate_all_mx6_pfds();
+
if (boot_device == BOOT_DEVICE_SPI)
puts("Booting from SPI flash\n");
else if (boot_device == BOOT_DEVICE_MMC1)
diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
index 1b9c277..d49370d 100644
--- a/include/configs/imx6_spl.h
+++ b/include/configs/imx6_spl.h
@@ -29,6 +29,7 @@
#define CONFIG_SPL_TEXT_BASE 0x00908000
#define CONFIG_SPL_MAX_SIZE 0x10000
#define CONFIG_SPL_STACK 0x0091FFB8
+#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_LIBCOMMON_SUPPORT
#define CONFIG_SPL_LIBGENERIC_SUPPORT
#define CONFIG_SPL_SERIAL_SUPPORT
--
1.7.9.5
next prev parent reply other threads:[~2015-02-11 0:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 0:07 [U-Boot] [PATCH 1/2] spl_atmel.c: Switch s_init to board_init_f Tom Rini
2015-02-11 0:07 ` Tom Rini [this message]
2015-02-11 0:47 ` [U-Boot] [PATCH 2/2] mx6: Rework s_init to be spl_board_init() and gate_ungate_all_mx6_pfds() Marek Vasut
2015-02-11 8:04 ` Igor Grinberg
2015-02-11 11:15 ` Stefano Babic
2015-03-29 21:59 ` [U-Boot] [PATCH 1/2] spl_atmel.c: Switch s_init to board_init_f Andreas Bießmann
2015-03-31 23:05 ` [U-Boot] [PATCH] " Andreas Bießmann
2015-03-31 23:09 ` Andreas Bießmann
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=1423613243-21114-2-git-send-email-trini@ti.com \
--to=trini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox