
On Thursday, October 12, 2006 11:58 AM Stefan Roese wrote:
sorry for being so insistent but there are still some issues that need to be cleaned up in your patch. Please see below...
No worries, quite opposite, I appreciate your comments.
Please use tabs for indentation. Indentation size is 8 by the way. This is a problem in the complete patch.
Well, I kind of did, but looks like xemacs, I'm using has different tab configuration. I've inserted tabs using vi, now they are 8 spaces each.
Space before and after the "=".
Done.
Why are here 2 spaces before the "="? It's not aligned to another line of code. Please use just one space.
Done.
*ptr = 0;
- ptr++; /* will point to dat_dcr */
And why not:
*ptr++ = 0;
Done.
Space after if again.
Done.
************************************************************************ *** DESCRIPTION:
Existing getdcr and setdcr monitor functions don't allow indirect access to PPC440 registers in one step. It's still possible theoretically use setdcr to write offset into correct address DCRN and then read/write from data DCRN, but that doesn't work if address got updated in the middle. For instance, I never could read value of SDR0_PINSTP (address/data DCRNs 0xE/0xF, offset 0x40) - immediately after me somebody changed address DCRN to 0x20.
The solution is to implement new special functions getidcr/setidcr for indirect access with following format:
getidcr adr_dcrn[.dat_dcrn] offset setidcr adr_dcrn[.dat_dcrn] offset value
dat_dcrn will be set adr_dcrn+1 if omitted.
Examples (Yosemite PPC440EP board has been used):
1. Read SDR0_PINSTP:
=> getidcr e 40 000e.000f-0040 Read e0000000
2. Read SDR0_CUST0, update it and read back:
=> getidcr e 4000 000e.000f-4000 Read 40082350
=> setidcr e.f 4000 50082350 000e.000f-4000 Write 50082350
=> getidcr e 4000 000e.000f-4000 Read 50082350
CHANGELOG entry:
* Add monitor functions for indirect access to PPC440 registers via Data Control Register (DCR).
PATCH: (diff file ppc440dcr_diff.txt attached).
Signed-off-by: Leonid Baryudin leonid@a-k-a.net