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>

index | next in thread | previous in thread | raw e-mail

In message: <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel@webmail.alpha-tierchen.de>
            Björn_König <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 = 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


help

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