[U-Boot] [PATCH 3/9] openrisc: Add cpu files

Stefan Kristiansson
2011-11-22T03:51:00Z

On Mon, Nov 21, 2011 at 11:50:17PM +0100, Marek Vasut wrote:
> > + return (mfspr(SPR_ICCFGR) & SPR_ICCFGR_CBS) ? 32 : 16;
>
> What's mfspr ... if it's some register, then maybe mfspr_read() ?
>

It's an instruction, "move from special register",
so I don't think the _read would be appropriate in this case.

> > + printf("CPU: OpenRISC-%x00 (rev %d) @ %d MHz\n",
> > + ver, rev, (CONFIG_SYS_CLK_FREQ / 1000000));
>
> The CPU won't tell you it's speed ?
>

Nope.

> > + l.addi r3,r3,4
> > + l.sfltu r4,r5
> > + l.bf .L_reloc
> > + l.addi r4,r4,4 /* delay slot */
>
> The formating here doesn't seem right?
>

The extra space there is to denote that the instruction is
in a delay slot.
I think it brings more readability to the code, but if it
meets too much resistance I'll remove them.

Stefan