From: Baruch Siach <baruch@tkos.co.il>
To: barebox@lists.infradead.org
Cc: Baruch Siach <baruch@tkos.co.il>
Subject: [PATCH 8/8] mx25 3ds: add support for boot from UART
Date: Wed, 9 Jun 2010 10:05:07 +0300 [thread overview]
Message-ID: <f9f84cc251848d133fae379e6d20253df2121ffb.1276065824.git.baruch@tkos.co.il> (raw)
In-Reply-To: <cover.1276065824.git.baruch@tkos.co.il>
For details of the UART protocol see the i.MX25 Reference Manual, section 7.8
"Serial Download protocol".
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
arch/arm/mach-imx/Kconfig | 5 +++++
board/freescale-mx25-3-stack/3stack.c | 4 ++++
board/freescale-mx25-3-stack/lowlevel_init.S | 5 +++++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 419daab..40cebed 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -319,6 +319,11 @@ config FREESCALE_MX25_3STACK_SDRAM_64MB_DDR2
config FREESCALE_MX25_3STACK_SDRAM_128MB_MDDR
bool "128 MB (mDDR)"
endchoice
+
+config FREESCALE_MX25_3STACK_UART_BOOT
+ bool "Boot from UART"
+ depends on ARCH_IMX_INTERNAL_BOOT
+
endif
endmenu
diff --git a/board/freescale-mx25-3-stack/3stack.c b/board/freescale-mx25-3-stack/3stack.c
index a657a47..081487a 100644
--- a/board/freescale-mx25-3-stack/3stack.c
+++ b/board/freescale-mx25-3-stack/3stack.c
@@ -44,7 +44,11 @@ extern unsigned long _stext;
void __naked __flash_header_start go(void)
{
+#if defined CONFIG_FREESCALE_MX25_3STACK_UART_BOOT
+ __asm__ (".word exception_vectors\n");
+#else
__asm__ __volatile__("b exception_vectors\n");
+#endif
}
struct imx_dcd_entry __dcd_entry_0x400 dcd_entry[] = {
diff --git a/board/freescale-mx25-3-stack/lowlevel_init.S b/board/freescale-mx25-3-stack/lowlevel_init.S
index 73bb147..b65a070 100644
--- a/board/freescale-mx25-3-stack/lowlevel_init.S
+++ b/board/freescale-mx25-3-stack/lowlevel_init.S
@@ -73,6 +73,11 @@ board_init_lowlevel:
writel(0x000FDFFF, IMX_CCM_BASE + CCM_CGCR2)
writel(0x0000FEFF, IMX_CCM_BASE + MX25_CCM_MCR)
+#if defined CONFIG_FREESCALE_MX25_3STACK_UART_BOOT
+ /* initialize CCM_CCTL, ARM clk = 400, AHB clk = 133 */
+ writel(0x20034000, IMX_CCM_BASE + 0x8);
+#endif
+
/* Skip SDRAM initialization if we run from RAM */
cmp pc, #0x80000000
bls 1f
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-06-09 7:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 7:04 [PATCH 0/8] i.MX25 3DS fixes and enhancements Baruch Siach
2010-06-09 7:05 ` [PATCH 1/8] mx25 3ds: fix build failure Baruch Siach
2010-06-09 7:05 ` [PATCH 2/8] mx25: fix typo in imx25-regs.h Baruch Siach
2010-06-09 7:05 ` [PATCH 3/8] mx25 3ds: cleanup lowlevel_init code Baruch Siach
2010-06-09 7:05 ` [PATCH 4/8] mx25: add support for i2c Baruch Siach
2010-06-09 7:05 ` [PATCH 5/8] i2c: add driver for the MC34704 PMIC Baruch Siach
2010-06-09 7:05 ` [PATCH 6/8] mx25 3ds: add support for i2c master and PMIC Baruch Siach
2010-06-14 13:01 ` Ivo Clarysse
2010-06-14 13:39 ` Baruch Siach
2010-06-09 7:05 ` [PATCH 7/8] mx25 3ds: fix fec initialization Baruch Siach
2010-06-09 7:05 ` Baruch Siach [this message]
2010-06-10 11:12 ` [PATCH 8/8] mx25 3ds: add support for boot from UART Sascha Hauer
2010-06-10 11:49 ` Baruch Siach
2010-06-10 12:12 ` Sascha Hauer
2010-06-10 12:42 ` Baruch Siach
2010-06-10 12:46 ` Baruch Siach
2010-06-10 13:56 ` Sascha Hauer
2010-06-10 16:09 ` Baruch Siach
2010-06-10 11:10 ` [PATCH 0/8] i.MX25 3DS fixes and enhancements Sascha Hauer
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=f9f84cc251848d133fae379e6d20253df2121ffb.1276065824.git.baruch@tkos.co.il \
--to=baruch@tkos.co.il \
--cc=barebox@lists.infradead.org \
/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