From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Sat, 30 Sep 2006 04:13:57 +0200 Subject: [U-Boot-Users] DCR register read/write for PPC440EP In-Reply-To: <406A31B117F2734987636D6CCC93EE3C2D3B66@ehost011-3.exch011.intermedia.net> References: <406A31B117F2734987636D6CCC93EE3C2D3B66@ehost011-3.exch011.intermedia.net> Message-ID: <200609300413.57847.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. OK. > > 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, Stefan