[U-Boot] [PATCH 3/9] openrisc: Add cpu files
Marek Vasut
marek.vasut at gmail.com
Tue Nov 22 05:46:41 CET 2011
> 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.
That's weird, how do you calibrate delay then, using static setup ?
>
> > > + 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.
You already have comment there, but let's see what the others think.
>
> Stefan
More information about the U-Boot
mailing list