Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2008 18:48:05 +0100 (CET)
From:      =?iso-8859-1?Q?Bj=F6rn_K=F6nig?= <bkoenig@alpha-tierchen.de>
To:        ticso@cicely.de
Cc:        arm@freebsd.org
Subject:   Re: defining the main clock frequency of AT91 boards
Message-ID:  <51329.192.168.1.2.1205776085.squirrel@webmail.alpha-tierchen.de>
In-Reply-To: <20080317014143.GQ67602@cicely12.cicely.de>
References:  <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierchen.de> <20080316.154215.1387160441.imp@bsdimp.com> <20080317014143.GQ67602@cicely12.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sun, Mar 16, 2008 at 03:42:15PM -0600, M. Warner Losh wrote:
>> In message:
>> <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierchen.de>
>>             Björn_König <bkoenig@alpha-tierchen.de> writes:
>> : I attached a patch that deals with this issue. Users of TSC
>> : boards need to add 'options AT91C_MAIN_CLOCK=16000000' to their
>> : kernel configuration file.
>
> And users of BWCT boards ;-)

The patch added the option to the BWCT kernel configuration. I just
mentioned TSC because there is no default configuration in sys/arm/conf/.

>> I'd go one step further.  I'd require everybody to define this value
>> since there's no 'standard' frequency and the value that's there is
>> just the value of the boards we used for the port.
>
> Me too - that way noone can forget defining it and run with the wrong
> frequency.

I agree. It sounds reasonable to make such an option mandatory. I tried to
be conservative.

I think users will notice very quickly if they run their board with the
wrong frequency, because they won't get output on the serial console -
maybe already too late. ;-)

> But since we are already about RM9200 clocks.
> Is it possible today to setup different clocks?
> I remember that MCK was hardcoded some time ago, but now I saw that
> it can be setup in the kernel conf.

It's just overriding the #define in at91rm9200.h.

> E.g. the MCK can be 80MHz and the only reason it is 60MHz right now is
> because PCK is 180MHz and MCK has to be divided from that.
> I always wondered myself if it is faster to run the CPU at 160MHz and
> have 80MHz MCK.

I think it depends on what you are doing with the board, but in general I
would say that the CPU is the bottle neck. I used my board with an 80 MHz
master clock and didn't notice better performance (Yes, I reconfigured the
memory timings accordingly).

Björn





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51329.192.168.1.2.1205776085.squirrel>