Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2007 05:36:23 +0200 (CEST)
From:      =?iso-8859-1?Q?Bj=F6rn_K=F6nig?= <bkoenig@alpha-tierchen.de>
To:        arm@freebsd.org
Subject:   main clock frequency
Message-ID:  <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel@webmail.alpha-tierchen.de>

next in thread | raw e-mail | index | archive | help
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 */


Björn




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel>