[U-Boot] arm: add ide initialization

Submitted by Michael Walle on Oct. 6, 2011, 10:23 p.m.

Details

Message ID 1317939786-19655-1-git-send-email-michael@walle.cc
State Changes Requested
Headers show

Commit Message

Michael Walle Oct. 6, 2011, 10:23 p.m.
Call ide_init() in the board initialization if IDE support is compiled in.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/lib/board.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Mike Frysinger Oct. 7, 2011, 5:27 p.m.
On Thursday 06 October 2011 18:23:06 Michael Walle wrote:
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> 
> +#if defined(CONFIG_CMD_IDE)
> +	puts ("IDE:   ");
> +	ide_init ();
> +#endif

NAK: no space before that open paren
-mike
Michael Walle Oct. 7, 2011, 9:50 p.m.
Am Freitag 07 Oktober 2011, 19:27:11 schrieb Mike Frysinger:
> On Thursday 06 October 2011 18:23:06 Michael Walle wrote:
> > --- a/arch/arm/lib/board.c
> > +++ b/arch/arm/lib/board.c
> > 
> > +#if defined(CONFIG_CMD_IDE)
> > +	puts ("IDE:   ");
> > +	ide_init ();
> > +#endif
> 
> NAK: no space before that open paren
> -mike

as long as the style is the only objection, i'm glad to resend a fixed patch 
:)

Albert, are there any other objections?
Albert ARIBAUD Oct. 18, 2011, 9:42 p.m.
Hi Michael,

Le 07/10/2011 23:50, Michael Walle a écrit :
> Am Freitag 07 Oktober 2011, 19:27:11 schrieb Mike Frysinger:
>> On Thursday 06 October 2011 18:23:06 Michael Walle wrote:
>>> --- a/arch/arm/lib/board.c
>>> +++ b/arch/arm/lib/board.c
>>>
>>> +#if defined(CONFIG_CMD_IDE)
>>> +	puts ("IDE:   ");
>>> +	ide_init ();
>>> +#endif
>>
>> NAK: no space before that open paren
>> -mike
>
> as long as the style is the only objection, i'm glad to resend a fixed patch
> :)
>
> Albert, are there any other objections?

NAK: the fact that some board has an IDE interface does not mean it must 
initialize it in all boot cases; and the rule with devices in U-Boot is 
'turn it on *only* when you're about to use it'.

Boards that always want to initialize IDE on boot can and will do so by 
putting 'ide reset' first in their bootcmd environment variable.

Amicalement,
Mike Frysinger Oct. 18, 2011, 10:19 p.m.
On Tuesday 18 October 2011 17:42:26 Albert ARIBAUD wrote:
> Le 07/10/2011 23:50, Michael Walle a écrit :
> > Am Freitag 07 Oktober 2011, 19:27:11 schrieb Mike Frysinger:
> >> On Thursday 06 October 2011 18:23:06 Michael Walle wrote:
> >>> --- a/arch/arm/lib/board.c
> >>> +++ b/arch/arm/lib/board.c
> >>> 
> >>> +#if defined(CONFIG_CMD_IDE)
> >>> +	puts ("IDE:   ");
> >>> +	ide_init ();
> >>> +#endif
> >> 
> >> NAK: no space before that open paren
> > 
> > as long as the style is the only objection, i'm glad to resend a fixed
> > patch
> > 
> > :)
> > 
> > Albert, are there any other objections?
> 
> NAK: the fact that some board has an IDE interface does not mean it must
> initialize it in all boot cases; and the rule with devices in U-Boot is
> 'turn it on *only* when you're about to use it'.
> 
> Boards that always want to initialize IDE on boot can and will do so by
> putting 'ide reset' first in their bootcmd environment variable.

ACK to this.  would be nice to get existing ports (ppc/m68k/sh/sparc/x86) to 
migrate their users to "ide reset" too ...
-mike

Patch hide | download patch | download mbox

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 705d4d2..9addab8 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -596,6 +596,11 @@  void board_init_r(gd_t *id, ulong dest_addr)
 #endif
 #endif
 
+#if defined(CONFIG_CMD_IDE)
+	puts ("IDE:   ");
+	ide_init ();
+#endif
+
 #ifdef CONFIG_POST
 	post_run(NULL, POST_RAM | post_bootmode_get(0));
 #endif