Dear Masahiro,

In message <cak7lnaty2wfxerhqtaptj+yreplttd9ogdr3kzff7txbd0b...@mail.gmail.com> 
you wrote:
> 
> Is there any good way to poll a certain register
> in a HUSH parser script?

Yes, there is :-)

> For example, I want to wait
> until the register value of 0x50000000 becomes 1
> in a HUSH script.

OK...

> The pseudo code would be like this:
> 
> while   readl(0x50000000) != 1
> do
>        ;
> done;

And in HUSH:

while itest *50000000 != 1
do
        ...
done

> I wish there were a command that
> stores a value of a given address into an environment,
> but I have no idea about that.

Try "help setexpr".  If you want to store the value as is, just apply
a null operation, like

        => setexp foo *50000000 | 0
        => printenv foo


Hope this helps...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"The X11 source code style is ATROCIOUS and should not be used  as  a
model."                                                   - Doug Gwyn
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to