From owner-svn-src-head@FreeBSD.ORG Thu Jan 22 21:54:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31894106566B; Thu, 22 Jan 2009 21:54:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E84F8FC0A; Thu, 22 Jan 2009 21:54:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0MLsRd4023146; Thu, 22 Jan 2009 21:54:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0MLsRbh023144; Thu, 22 Jan 2009 21:54:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901222154.n0MLsRbh023144@svn.freebsd.org> From: Warner Losh Date: Thu, 22 Jan 2009 21:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187599 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 21:54:27 -0000 Author: imp Date: Thu Jan 22 21:54:26 2009 New Revision: 187599 URL: http://svn.freebsd.org/changeset/base/187599 Log: Store at91_master_clock in a global variable as opposed to a compile time constant. This allows us to potentially change it at runtime or autodetect it early in the boot (the latter being much more likely to have a good outcome). Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91var.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Jan 22 21:04:46 2009 (r187598) +++ head/sys/arm/at91/at91.c Thu Jan 22 21:54:26 2009 (r187599) @@ -50,6 +50,8 @@ static struct at91_softc *at91_softc; static void at91_eoi(void *); +uint32_t at91_master_clock = AT91C_MASTER_CLOCK; + static int at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Thu Jan 22 21:04:46 2009 (r187598) +++ head/sys/arm/at91/at91var.h Thu Jan 22 21:54:26 2009 (r187599) @@ -43,4 +43,6 @@ struct at91_ivar { struct resource_list resources; }; +extern uint32_t at91_master_clock; + #endif /* _AT91VAR_H_ */