From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 22 Nov 2011 05:46:41 +0100 Subject: [U-Boot] [PATCH 3/9] openrisc: Add cpu files In-Reply-To: <20111122035100.GA7158@chokladfabriken.org> References: <1321680098-31121-1-git-send-email-stefan.kristiansson@saunalahti.fi> <201111212350.17920.marek.vasut@gmail.com> <20111122035100.GA7158@chokladfabriken.org> Message-ID: <201111220546.41715.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > 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