* [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL
@ 2014-03-19 1:21 Marek Vasut
2014-03-19 1:21 ` [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL Marek Vasut
2014-04-01 8:34 ` [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL Stefano Babic
0 siblings, 2 replies; 7+ messages in thread
From: Marek Vasut @ 2014-03-19 1:21 UTC (permalink / raw)
To: u-boot
Set the GD pointer in the SPL to a defined symbol so various
functions from U-Boot can be used without adverse side effects.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 68c30af..87b63c1 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -13,9 +13,13 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
+#include <linux/compiler.h>
#include "mxs_init.h"
+DECLARE_GLOBAL_DATA_PTR;
+gd_t gdata __section(".data");
+
/*
* This delay function is intended to be used only in early stage of boot, where
* clock are not set up yet. The timer used here is reset on every boot and
@@ -109,6 +113,7 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
struct mxs_spl_data *data = (struct mxs_spl_data *)
((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data)) & ~0xf);
uint8_t bootmode = mxs_get_bootmode_index();
+ gd = &gdata;
mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
mxs_power_init();
--
1.8.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL
2014-03-19 1:21 [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL Marek Vasut
@ 2014-03-19 1:21 ` Marek Vasut
2014-04-01 8:34 ` Stefano Babic
2014-04-01 8:34 ` [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL Stefano Babic
1 sibling, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2014-03-19 1:21 UTC (permalink / raw)
To: u-boot
Add support for serial console into the i.MX23/i.MX28 SPL. A full,
uncrippled serial console support comes very helpful when debugging
various spectacular hardware bringup issues early in the process.
Because we do not use SPL framework, but have our own minimalistic
SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not
use preloader_console_init(), but instead use a similar function to
start the console. Nonetheless, to avoid blowing up the size of the
SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT
is defined, which is disabled by default.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 87b63c1..58ff8db 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -18,7 +18,8 @@
#include "mxs_init.h"
DECLARE_GLOBAL_DATA_PTR;
-gd_t gdata __section(".data");
+static gd_t gdata __section(".data");
+static bd_t bdata __section(".data");
/*
* This delay function is intended to be used only in early stage of boot, where
@@ -106,6 +107,16 @@ static uint8_t mxs_get_bootmode_index(void)
return i;
}
+static void mxs_spl_console_init(void)
+{
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
+ gd->bd = &bdata;
+ gd->baudrate = CONFIG_BAUDRATE;
+ serial_init();
+ gd->have_console = 1;
+#endif
+}
+
void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
const iomux_cfg_t *iomux_setup,
const unsigned int iomux_size)
@@ -116,6 +127,9 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
gd = &gdata;
mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
+
+ mxs_spl_console_init();
+
mxs_power_init();
mxs_mem_init();
--
1.8.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL
2014-03-19 1:21 ` [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL Marek Vasut
@ 2014-04-01 8:34 ` Stefano Babic
2014-04-01 8:47 ` Marek Vasut
0 siblings, 1 reply; 7+ messages in thread
From: Stefano Babic @ 2014-04-01 8:34 UTC (permalink / raw)
To: u-boot
On 19/03/2014 02:21, Marek Vasut wrote:
> Add support for serial console into the i.MX23/i.MX28 SPL. A full,
> uncrippled serial console support comes very helpful when debugging
> various spectacular hardware bringup issues early in the process.
> Because we do not use SPL framework, but have our own minimalistic
> SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not
> use preloader_console_init(), but instead use a similar function to
> start the console. Nonetheless, to avoid blowing up the size of the
> SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT
> is defined, which is disabled by default.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
Applied after fixing warning:
arch/arm/cpu/arm926ejs/mxs/spl_boot.c:22:13: warning: 'bdata' defined
but not used
to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL
2014-04-01 8:34 ` Stefano Babic
@ 2014-04-01 8:47 ` Marek Vasut
2014-04-02 8:44 ` Stefano Babic
0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2014-04-01 8:47 UTC (permalink / raw)
To: u-boot
On Tuesday, April 01, 2014 at 10:34:38 AM, Stefano Babic wrote:
> On 19/03/2014 02:21, Marek Vasut wrote:
> > Add support for serial console into the i.MX23/i.MX28 SPL. A full,
> > uncrippled serial console support comes very helpful when debugging
> > various spectacular hardware bringup issues early in the process.
> > Because we do not use SPL framework, but have our own minimalistic
> > SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not
> > use preloader_console_init(), but instead use a similar function to
> > start the console. Nonetheless, to avoid blowing up the size of the
> > SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT
> > is defined, which is disabled by default.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Stefano Babic <sbabic@denx.de>
> > ---
>
> Applied after fixing warning:
>
> arch/arm/cpu/arm926ejs/mxs/spl_boot.c:22:13: warning: 'bdata' defined
> but not used
Tsk, stupid me. Thanks!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL
2014-04-01 8:47 ` Marek Vasut
@ 2014-04-02 8:44 ` Stefano Babic
2014-04-02 8:45 ` Marek Vasut
0 siblings, 1 reply; 7+ messages in thread
From: Stefano Babic @ 2014-04-02 8:44 UTC (permalink / raw)
To: u-boot
On 01/04/2014 10:47, Marek Vasut wrote:
> On Tuesday, April 01, 2014 at 10:34:38 AM, Stefano Babic wrote:
>> On 19/03/2014 02:21, Marek Vasut wrote:
>>> Add support for serial console into the i.MX23/i.MX28 SPL. A full,
>>> uncrippled serial console support comes very helpful when debugging
>>> various spectacular hardware bringup issues early in the process.
>>> Because we do not use SPL framework, but have our own minimalistic
>>> SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not
>>> use preloader_console_init(), but instead use a similar function to
>>> start the console. Nonetheless, to avoid blowing up the size of the
>>> SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT
>>> is defined, which is disabled by default.
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> ---
>>
>> Applied after fixing warning:
>>
>> arch/arm/cpu/arm926ejs/mxs/spl_boot.c:22:13: warning: 'bdata' defined
>> but not used
>
> Tsk, stupid me. Thanks!
No, stupid me ! I pushed the tree before fixing your patch. I had to add
the simple fix as separate commit, it was not my intention.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL
2014-04-02 8:44 ` Stefano Babic
@ 2014-04-02 8:45 ` Marek Vasut
0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2014-04-02 8:45 UTC (permalink / raw)
To: u-boot
On Wednesday, April 02, 2014 at 10:44:12 AM, Stefano Babic wrote:
> On 01/04/2014 10:47, Marek Vasut wrote:
> > On Tuesday, April 01, 2014 at 10:34:38 AM, Stefano Babic wrote:
> >> On 19/03/2014 02:21, Marek Vasut wrote:
> >>> Add support for serial console into the i.MX23/i.MX28 SPL. A full,
> >>> uncrippled serial console support comes very helpful when debugging
> >>> various spectacular hardware bringup issues early in the process.
> >>> Because we do not use SPL framework, but have our own minimalistic
> >>> SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not
> >>> use preloader_console_init(), but instead use a similar function to
> >>> start the console. Nonetheless, to avoid blowing up the size of the
> >>> SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT
> >>> is defined, which is disabled by default.
> >>>
> >>> Signed-off-by: Marek Vasut <marex@denx.de>
> >>> Cc: Stefano Babic <sbabic@denx.de>
> >>> ---
> >>
> >> Applied after fixing warning:
> >>
> >> arch/arm/cpu/arm926ejs/mxs/spl_boot.c:22:13: warning: 'bdata' defined
> >> but not used
> >
> > Tsk, stupid me. Thanks!
>
> No, stupid me ! I pushed the tree before fixing your patch. I had to add
> the simple fix as separate commit, it was not my intention.
Everything is crap! (TM) :-)
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL
2014-03-19 1:21 [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL Marek Vasut
2014-03-19 1:21 ` [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL Marek Vasut
@ 2014-04-01 8:34 ` Stefano Babic
1 sibling, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2014-04-01 8:34 UTC (permalink / raw)
To: u-boot
On 19/03/2014 02:21, Marek Vasut wrote:
> Set the GD pointer in the SPL to a defined symbol so various
> functions from U-Boot can be used without adverse side effects.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-02 8:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 1:21 [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL Marek Vasut
2014-03-19 1:21 ` [U-Boot] [PATCH 2/2] arm: mxs: Add serial console support into SPL Marek Vasut
2014-04-01 8:34 ` Stefano Babic
2014-04-01 8:47 ` Marek Vasut
2014-04-02 8:44 ` Stefano Babic
2014-04-02 8:45 ` Marek Vasut
2014-04-01 8:34 ` [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox