Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2008 15:42:15 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        bkoenig@alpha-tierchen.de
Cc:        arm@freebsd.org
Subject:   Re: defining the main clock frequency of AT91 boards
Message-ID:  <20080316.154215.1387160441.imp@bsdimp.com>
In-Reply-To: <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierchen.de>
References:  <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierchen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierch=
en.de>
            Bj=F6rn_K=F6nig <bkoenig@alpha-tierchen.de> writes:
: I would like to have a preprocessor definition called AT91C_MAIN_CLOC=
K
: that allows you to specify the main clock frequency of a board in the=

: kernel configuration file. It avoids an intricate distinction of case=
s in
: at91_pmc.c:395ff and you can use the unpatched source code with board=
s
: that have a different quartz frequency than 10 or 16 MHz.
: =

: I attached a patch that deals with this issue. Users of TSC boards ne=
ed to
: add 'options AT91C_MAIN_CLOCK=3D16000000' to their kernel configurati=
on
: file.

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.

It would be even better if it wasn't a #define, but a variable.
There's registers that can be read to get the approximate frequency
(the chip only supports one of list of something like 16 different
frequencies).  We should consider it and have an override for those
engineers that use a non-standard frequency.

Warner




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