
In message D8A54727-5154-11D8-A361-000393DBC2E8@motorola.com you wrote:
I was wondering if it was considered useful to extend the CFG_CMD_SETGETDCR done by Erik Theisen for DCR registers on the 4xx family to all PowerPC products for SPRs (CFG_CMD_SETGETSPR).
That would be useful.
- Is it ok that the command does not do any checking on the SPR
number. This is quick difficult and would have to be done per processor since what SPRs exists is implementation specific. If the user gives the commands an SPR that does not exist the result is going to be some exception (is this ok)
IMHO only valid SPRs should be accepted. Yes, this requires processor specific code.
- What numerical format should the spr number for the command be taken
in? My think is decimal
The format should be string (i. e. register NAME). For SPRs without a name and/or alternatively a decimal number is ok. Without a register name/number the "get" command should print all known SPR's on that processor.
- For setspr what numerical format should the spr value be taken in?
My thinking is hex
Hex like all standard input data in U-Boot.
- For getspr what numerical format should the spr be printed in? My
thinking is hex
The register name should be string plus decimal number; the value should be hex.
If so, I will fixup my working patch and submit it once I get answers to the questions.
Thanks in advance.
Best regards,
Wolfgang Denk