[U-Boot-Users] DCR register read/write for PPC440EP

Stefan Roese sr at denx.de
Sat Sep 30 04:13:57 CEST 2006

Hi Leonid,

On Thursday 28 September 2006 23:54, Leonid wrote:
> I think it would be better to provide both address and data DCR register
> numbers (DCRNs) in the first parameter, separated by "." or ":", like
> this:
> getidcr e.f 40
> or simple (omitted data DCRN will be 0xE+1=0xF as you have suggested):
> getidcr e 40
> This is more "u-bootish" style I deem (it's used in cp command for
> example). This way offset will always be the second parameter which is
> more convenient.
> Help line will look like this:
> => help getidcr
> getidcr addr_dcrn[.data_dcrn] offset
>  - return a value of register, addressed indirectly via DCR. data_dcrn
> is assumed to be addr_dcrn+1 if not specified.


> > Yes, you should definitely disable the interrupts in this function.
> What is simplest way of doing that for PPC440? I mean, should I insert
> asm into C code, or u-boot already has something better to use?

You could use the enable_interrupts() and disable_interrupts() calls.

Best regards,

More information about the U-Boot mailing list