[U-Boot-Users] Patch generalizing IDE Reset function for MPC5200
Reinhard Meyer
r.meyer at emk-elektronik.de
Mon Mar 1 14:24:30 CET 2004
Hello,
if a real genuine generalization is wanted, the ide_set_reset () function
must be moved to the board specific files.
"Generally" it cannot be assumed that a GPIO Port is used in a non-inverting
way to perform a IDE_Reset.
Therefore I will now move
"void ide_set_reset (int idereset)"
to our top5200.c and leave the mpc5xxx/ide.c untouched.
best regards
Reinhard
----- Original Message -----
> > The following patch generalises the use of PSC1.4 for IDE Reset. The
idea
> > behind is that most probably many 5200 designs will be similiar to
IceCube,
>
> Such assumptions are know to fail on the very next board that will be
> added.
>
> > Instead of continuosly adding more and more boards into the #if defined
()
> > chain, one define
> > CONFIG_IDE_RESET_USE_PSC1_4 can be added to the board's configuration
file.
>
> Urggh. What an ugly name.
>
> > If someone else uses another I/O port, that can be easyly added in a
> > similiar way.
>
> Yes, and we end up "adding more and more boards into the "#define
> CONFIG_IDE_RESET_USE_this" and "#define CONFIG_IDE_RESET_USE_that"
> chain.
>
> Sorry, this code is ugly and I reject it.
>
> .....
>
> How about changing this into something like??
>
> include/configs/???.h:
> ...
> #define CONFIG_IDE_RESET_PIN GPIO_PSC1_4
THAT assumption will fail on the first board that does not use a GPIO pin
for reset, or uses one that is inverted.
More information about the U-Boot
mailing list