From owner-freebsd-arm@FreeBSD.ORG Wed Jun 13 03:36:28 2007 Return-Path: X-Original-To: arm@freebsd.org Delivered-To: freebsd-arm@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 962BE16A469 for ; Wed, 13 Jun 2007 03:36:28 +0000 (UTC) (envelope-from bkoenig@alpha-tierchen.de) Received: from mail.liberty-hosting.de (mail.smartterra.de [195.225.132.203]) by mx1.freebsd.org (Postfix) with ESMTP id 568D613C455 for ; Wed, 13 Jun 2007 03:36:28 +0000 (UTC) (envelope-from bkoenig@alpha-tierchen.de) Received: from mail.liberty-hosting.de ([195.225.132.203]) by localhost (liberty-mail [195.225.132.203]) (amavisd-new, port 10024) with ESMTP id 68509-10 for ; Wed, 13 Jun 2007 05:36:25 +0200 (CEST) Received: from home.alpha-tierchen.de (port-212-202-170-5.dynamic.qsc.de [212.202.170.5]) by mail.liberty-hosting.de (Postfix) with ESMTP id 517B418107C for ; Wed, 13 Jun 2007 05:36:24 +0200 (CEST) Received: from webmail.alpha-tierchen.de (localhost [127.0.0.1]) by home.alpha-tierchen.de (Postfix) with ESMTP id A032E45046 for ; Wed, 13 Jun 2007 05:36:23 +0200 (CEST) Received: from 2001:6f8:101e:0:20e:cff:fe6d:6adb (SquirrelMail authenticated user bkoenig) by webmail.alpha-tierchen.de with HTTP; Wed, 13 Jun 2007 05:36:23 +0200 (CEST) Message-ID: <55286.2001:6f8:101e:0:20e:cff:fe6d:6adb.1181705783.squirrel@webmail.alpha-tierchen.de> Date: Wed, 13 Jun 2007 05:36:23 +0200 (CEST) From: =?iso-8859-1?Q?Bj=F6rn_K=F6nig?= To: arm@freebsd.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: by amavisd-new at mail.smartterra.de Cc: Subject: main clock frequency X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2007 03:36:28 -0000 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