From owner-freebsd-arm@FreeBSD.ORG Mon Mar 17 17:48:08 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72E071065671 for ; Mon, 17 Mar 2008 17:48:08 +0000 (UTC) (envelope-from bkoenig@alpha-tierchen.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0C57F8FC15 for ; Mon, 17 Mar 2008 17:48:07 +0000 (UTC) (envelope-from bkoenig@alpha-tierchen.de) Received: from webmail.alpha-tierchen.de (port-212-202-42-206.dynamic.qsc.de [212.202.42.206]) by mx02.qsc.de (Postfix) with ESMTP id 9327316C000E; Mon, 17 Mar 2008 18:48:06 +0100 (CET) Received: from 192.168.1.2 (SquirrelMail authenticated user bkoenig) by webmail.alpha-tierchen.de with HTTP; Mon, 17 Mar 2008 18:48:05 +0100 (CET) Message-ID: <51329.192.168.1.2.1205776085.squirrel@webmail.alpha-tierchen.de> In-Reply-To: <20080317014143.GQ67602@cicely12.cicely.de> References: <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierchen.de> <20080316.154215.1387160441.imp@bsdimp.com> <20080317014143.GQ67602@cicely12.cicely.de> Date: Mon, 17 Mar 2008 18:48:05 +0100 (CET) From: =?iso-8859-1?Q?Bj=F6rn_K=F6nig?= To: ticso@cicely.de User-Agent: SquirrelMail/1.4.13 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: arm@freebsd.org Subject: Re: defining the main clock frequency of AT91 boards 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: Mon, 17 Mar 2008 17:48:08 -0000 > On Sun, Mar 16, 2008 at 03:42:15PM -0600, M. Warner Losh wrote: >> In message: >> <50161.192.168.1.2.1205540152.squirrel@webmail.alpha-tierchen.de> >> Björn_König writes: >> : I attached a patch that deals with this issue. Users of TSC >> : boards need to add 'options AT91C_MAIN_CLOCK=16000000' to their >> : kernel configuration file. > > And users of BWCT boards ;-) The patch added the option to the BWCT kernel configuration. I just mentioned TSC because there is no default configuration in sys/arm/conf/. >> I'd go one step further. I'd require everybody to define this value >> since there's no 'standard' frequency and the value that's there is >> just the value of the boards we used for the port. > > Me too - that way noone can forget defining it and run with the wrong > frequency. I agree. It sounds reasonable to make such an option mandatory. I tried to be conservative. I think users will notice very quickly if they run their board with the wrong frequency, because they won't get output on the serial console - maybe already too late. ;-) > But since we are already about RM9200 clocks. > Is it possible today to setup different clocks? > I remember that MCK was hardcoded some time ago, but now I saw that > it can be setup in the kernel conf. It's just overriding the #define in at91rm9200.h. > E.g. the MCK can be 80MHz and the only reason it is 60MHz right now is > because PCK is 180MHz and MCK has to be divided from that. > I always wondered myself if it is faster to run the CPU at 160MHz and > have 80MHz MCK. I think it depends on what you are doing with the board, but in general I would say that the CPU is the bottle neck. I used my board with an 80 MHz master clock and didn't notice better performance (Yes, I reconfigured the memory timings accordingly). Björn