* [U-Boot] [PATCH 0/2] Fix onenand command after ARM relocation changes.
@ 2010-10-19 9:13 Enric Balletbo i Serra
2010-10-19 9:13 ` [U-Boot] [PATCH 1/2] cmd_onenand.c: Fix command usage help Enric Balletbo i Serra
2010-10-19 9:13 ` [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device Enric Balletbo i Serra
0 siblings, 2 replies; 9+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-19 9:13 UTC (permalink / raw)
To: u-boot
Hello,
After ARM relocation support the onenand command seems broken, these patches attempt to solve this issue.
The first patch fixes the usage help for onenand command when no arguments are passed.
The second patch relocate the onenand command table manually, I think this is required after relocation changes but I'm not sure if this is the best solution, so comments are welcome.
Tested on IGEP v2 and OMAP3 IGEP module boards.
Cheers,
Enric
$ git diff --stat origin/master
arch/arm/lib/board.c | 3 +++
common/cmd_onenand.c | 9 +++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] cmd_onenand.c: Fix command usage help.
2010-10-19 9:13 [U-Boot] [PATCH 0/2] Fix onenand command after ARM relocation changes Enric Balletbo i Serra
@ 2010-10-19 9:13 ` Enric Balletbo i Serra
2010-10-27 18:51 ` Wolfgang Denk
2010-10-19 9:13 ` [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device Enric Balletbo i Serra
1 sibling, 1 reply; 9+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-19 9:13 UTC (permalink / raw)
To: u-boot
Running the onenand command without arguments does nothing, with this
patch shows the command usage.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
common/cmd_onenand.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index 83d967b..317968f 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -529,6 +529,9 @@ static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]
{
cmd_tbl_t *c;
+ if (argc < 2)
+ return cmd_usage(cmdtp);
+
mtd = &onenand_mtd;
/* Strip off leading 'onenand' command argument */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device.
2010-10-19 9:13 [U-Boot] [PATCH 0/2] Fix onenand command after ARM relocation changes Enric Balletbo i Serra
2010-10-19 9:13 ` [U-Boot] [PATCH 1/2] cmd_onenand.c: Fix command usage help Enric Balletbo i Serra
@ 2010-10-19 9:13 ` Enric Balletbo i Serra
2010-10-19 9:24 ` Heiko Schocher
2010-10-23 20:56 ` Wolfgang Denk
1 sibling, 2 replies; 9+ messages in thread
From: Enric Balletbo i Serra @ 2010-10-19 9:13 UTC (permalink / raw)
To: u-boot
We also have to relocate the onenand command table manually, otherwise
onenand command don't work.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
arch/arm/lib/board.c | 3 +++
common/cmd_onenand.c | 6 ++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 108e6c4..8a981e9 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -715,6 +715,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
#if defined(CONFIG_CMD_I2C)
i2c_reloc();
#endif
+#if defined(CONFIG_CMD_ONENAND)
+ onenand_reloc();
+#endif
#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
#ifdef CONFIG_LOGBUFFER
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index 317968f..5550b40 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -525,6 +525,12 @@ static cmd_tbl_t cmd_onenand_sub[] = {
U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""),
};
+#ifndef CONFIG_RELOC_FIXUP_WORKS
+void onenand_reloc(void) {
+ fixup_cmdtable(cmd_onenand_sub, ARRAY_SIZE(cmd_onenand_sub));
+}
+#endif
+
static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *c;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device.
2010-10-19 9:13 ` [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device Enric Balletbo i Serra
@ 2010-10-19 9:24 ` Heiko Schocher
2010-10-19 9:42 ` Enric Balletbò i Serra
2010-10-23 20:56 ` Wolfgang Denk
1 sibling, 1 reply; 9+ messages in thread
From: Heiko Schocher @ 2010-10-19 9:24 UTC (permalink / raw)
To: u-boot
Hello Enric,
Enric Balletbo i Serra wrote:
> We also have to relocate the onenand command table manually, otherwise
> onenand command don't work.
>
> Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
> ---
> arch/arm/lib/board.c | 3 +++
> common/cmd_onenand.c | 6 ++++++
> 2 files changed, 9 insertions(+), 0 deletions(-)
Could you try
git://git.denx.de/u-boot-arm.git elf_reloc
branch? With this branch, it is not longer necessary to do
such fixups.
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device.
2010-10-19 9:24 ` Heiko Schocher
@ 2010-10-19 9:42 ` Enric Balletbò i Serra
0 siblings, 0 replies; 9+ messages in thread
From: Enric Balletbò i Serra @ 2010-10-19 9:42 UTC (permalink / raw)
To: u-boot
Hello Heiko,
2010/10/19 Heiko Schocher <hs@denx.de>:
> Hello Enric,
>
> Enric Balletbo i Serra wrote:
>> We also have to relocate the onenand command table manually, otherwise
>> onenand command don't work.
>>
>> Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
>> ---
>> ?arch/arm/lib/board.c | ? ?3 +++
>> ?common/cmd_onenand.c | ? ?6 ++++++
>> ?2 files changed, 9 insertions(+), 0 deletions(-)
>
> Could you try
>
> git://git.denx.de/u-boot-arm.git elf_reloc
>
> branch?
Of course :-)
> With this branch, it is not longer necessary to do such fixups.
Here my tests:
U-Boot # onenand erase
OneNAND erase: whole chip
OK
Yes, seems the patch 2/2 it's not longer necessary, the onenand
command works without this patch.
U-Boot # onenand
(hang)
I think the patch 1/2 it's also necessary, otherwise the onenand
command without arguments hangs.
Cheers,
Enric
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device.
2010-10-19 9:13 ` [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device Enric Balletbo i Serra
2010-10-19 9:24 ` Heiko Schocher
@ 2010-10-23 20:56 ` Wolfgang Denk
2010-10-24 2:17 ` J. William Campbell
1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2010-10-23 20:56 UTC (permalink / raw)
To: u-boot
Dear Enric Balletbo i Serra,
In message <1287479602-21721-3-git-send-email-eballetbo@iseebcn.com> you wrote:
> We also have to relocate the onenand command table manually, otherwise
> onenand command don't work.
>
> Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
> ---
> arch/arm/lib/board.c | 3 +++
> common/cmd_onenand.c | 6 ++++++
> 2 files changed, 9 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every solution breeds new problems.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device.
2010-10-23 20:56 ` Wolfgang Denk
@ 2010-10-24 2:17 ` J. William Campbell
2010-10-24 10:32 ` Enric Balletbò i Serra
0 siblings, 1 reply; 9+ messages in thread
From: J. William Campbell @ 2010-10-24 2:17 UTC (permalink / raw)
To: u-boot
On 10/23/2010 1:56 PM, Wolfgang Denk wrote:
> Dear Enric Balletbo i Serra,
>
> In message<1287479602-21721-3-git-send-email-eballetbo@iseebcn.com> you wrote:
>> We also have to relocate the onenand command table manually, otherwise
>> onenand command don't work.
>>
>> Signed-off-by: Enric Balletbo i Serra<eballetbo@iseebcn.com>
>> ---
>> arch/arm/lib/board.c | 3 +++
>> common/cmd_onenand.c | 6 ++++++
>> 2 files changed, 9 insertions(+), 0 deletions(-)
Is this patch still necessary? I thought the relocation change made it OBE.
Best Regards,
Bill Campbell
> Applied, thanks.
>
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device.
2010-10-24 2:17 ` J. William Campbell
@ 2010-10-24 10:32 ` Enric Balletbò i Serra
0 siblings, 0 replies; 9+ messages in thread
From: Enric Balletbò i Serra @ 2010-10-24 10:32 UTC (permalink / raw)
To: u-boot
Hello,
2010/10/24 J. William Campbell <jwilliamcampbell@comcast.net>:
> On 10/23/2010 1:56 PM, Wolfgang Denk wrote:
>> Dear Enric Balletbo i Serra,
>>
>> In message<1287479602-21721-3-git-send-email-eballetbo@iseebcn.com> ?you wrote:
>>> We also have to relocate the onenand command table manually, otherwise
>>> onenand command don't work.
>>>
>>> Signed-off-by: Enric Balletbo i Serra<eballetbo@iseebcn.com>
>>> ---
>>> ? arch/arm/lib/board.c | ? ?3 +++
>>> ? common/cmd_onenand.c | ? ?6 ++++++
>>> ? 2 files changed, 9 insertions(+), 0 deletions(-)
>
> Is this patch still necessary? I thought the relocation change made it OBE.
As I reply to Heiko this patch [2/2] it's not necessary if elf_reloc
branch is merged. OTOH I think the patch [1/2] of the same series it's
necessary.
[PATCH 1/2] cmd_onenand.c: Fix command usage help.
Cheers,
Enric
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/2] cmd_onenand.c: Fix command usage help.
2010-10-19 9:13 ` [U-Boot] [PATCH 1/2] cmd_onenand.c: Fix command usage help Enric Balletbo i Serra
@ 2010-10-27 18:51 ` Wolfgang Denk
0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2010-10-27 18:51 UTC (permalink / raw)
To: u-boot
Dear Enric Balletbo i Serra,
In message <1287479602-21721-2-git-send-email-eballetbo@iseebcn.com> you wrote:
> Running the onenand command without arguments does nothing, with this
> patch shows the command usage.
>
> Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
> ---
> common/cmd_onenand.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This all sounds complicated, but it mostly does excatly what you ex-
pect. It's just difficult for us to explain what you expect...
- L. Wall & R. L. Schwartz, _Programming Perl_
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-10-27 18:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19 9:13 [U-Boot] [PATCH 0/2] Fix onenand command after ARM relocation changes Enric Balletbo i Serra
2010-10-19 9:13 ` [U-Boot] [PATCH 1/2] cmd_onenand.c: Fix command usage help Enric Balletbo i Serra
2010-10-27 18:51 ` Wolfgang Denk
2010-10-19 9:13 ` [U-Boot] [PATCH 2/2] ARM: fix relocation support for onenand device Enric Balletbo i Serra
2010-10-19 9:24 ` Heiko Schocher
2010-10-19 9:42 ` Enric Balletbò i Serra
2010-10-23 20:56 ` Wolfgang Denk
2010-10-24 2:17 ` J. William Campbell
2010-10-24 10:32 ` Enric Balletbò i Serra
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.