Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2007 21:54:30 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        bkoenig@alpha-tierchen.de
Cc:        arm@freebsd.org
Subject:   Re: main clock frequency
Message-ID:  <20070612.215430.-365729166.imp@bsdimp.com>
In-Reply-To: <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel@webmail.alpha-tierchen.de>
References:  <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel@webmail.alpha-tierchen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirre=
l@webmail.alpha-tierchen.de>
            Bj=F6rn_K=F6nig <bkoenig@alpha-tierchen.de> writes:
: Hello,
: =

: in at91_pmc_attach you're assume a certain main clock frequency. Isn'=
t it
: reasonable to read this value from the main clock frequency register =
if it
: is available?
: =

: I mean something like
: =

: uint32_t mcfr =3D RD4(pmc_softc, CKGR_MCFR);
: if (mcfr & CKGR_MCFR_MAINRDY)
:   at91_pmc_init_clock(pmc_softc, (mcfr & CKGR_MCFR_MAINF_MASK) * 3276=
8 / 16);
: else
:   /* fallback or error */

Yes.  I think that's reasonable.  I didn't do it because I didn't
think of it at the time I wrote the code.

Warner



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