main clock frequency

M. Warner Losh imp at bsdimp.com
Wed Jun 13 03:56:44 UTC 2007


In message: <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel at webmail.alpha-tierchen.de>
            Björn_König <bkoenig at 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 = RD4(pmc_softc, CKGR_MCFR);
: if (mcfr & CKGR_MCFR_MAINRDY)
:   at91_pmc_init_clock(pmc_softc, (mcfr & CKGR_MCFR_MAINF_MASK) * 32768 / 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


More information about the freebsd-arm mailing list