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

Scott Wood scottwood at freescale.com
Tue Nov 22 21:29:09 CET 2011


On 11/22/2011 08:07 AM, Marek Vasut wrote:
>> On Tue, Nov 22, 2011 at 05:46:41AM +0100, Marek Vasut wrote:
>>>> On Mon, Nov 21, 2011 at 11:50:17PM +0100, Marek Vasut wrote:
>>>>>> +	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 ?
>>
>> You mean in Linux? CPU freq is passed in via the device tree.
> 
> I mean in u-boot, it seems weird for the CPU to be unable to tell you how fast 
> it runs.

You need some fixed reference, whether it be the crystal that is used to
generate the CPU clock, or some other clock on the board that you
measure the CPU clock against.  The CPU might be able to tell you what
multiplier it's using, or which of several input pins it's taking the
clock from, but not the base input frequency.

Look in include/config, you'll find lots of hardcoded CONFIG_SYS_CLK_FREQ.

-Scott



More information about the U-Boot mailing list