From owner-svn-src-all@FreeBSD.ORG Sat Aug 11 05:12:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0AC3106566B; Sat, 11 Aug 2012 05:12:46 +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 BCAC88FC12; Sat, 11 Aug 2012 05:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7B5Ck1Z018160; Sat, 11 Aug 2012 05:12:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7B5Ck3r018158; Sat, 11 Aug 2012 05:12:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201208110512.q7B5Ck3r018158@svn.freebsd.org> From: Warner Losh Date: Sat, 11 Aug 2012 05:12:46 +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: r239189 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2012 05:12:46 -0000 Author: imp Date: Sat Aug 11 05:12:46 2012 New Revision: 239189 URL: http://svn.freebsd.org/changeset/base/239189 Log: Update comments about setting PLLA and refernce the tables in the datasheet that express the limits. Modified: head/sys/arm/at91/at91sam9260.c Modified: head/sys/arm/at91/at91sam9260.c ============================================================================== --- head/sys/arm/at91/at91sam9260.c Sat Aug 11 05:03:30 2012 (r239188) +++ head/sys/arm/at91/at91sam9260.c Sat Aug 11 05:12:46 2012 (r239189) @@ -122,21 +122,30 @@ static const struct cpu_devs at91_devs[] { 0, 0, 0, 0, 0 } }; +/* + * The following is unused currently since we don't ever set the PLLA + * frequency of the device. + */ static uint32_t at91_pll_outa(int freq) { + uint32_t outa = 0; - if (freq > 195000000) - return (0x20000000); - else - return (0x20008000); + /* + * Set OUTA, per the data sheet. See Table 40-15 titled + * PLLA Characteristics in the SAM9260 doc. + */ + + if (freq > 155000000) + outa = 2 << 14; + return ((1 << 29) | outa); } static uint32_t at91_pll_outb(int freq) { - return (0x4000); + return (1 << 14); } static void @@ -173,7 +182,7 @@ at91_clock_init(void) * to be near the optimal 2 MHz per datasheet. We know * we are going to be using this for the USB clock at 96 MHz. * Causes no extra frequency deviation for all recomended crystal - * values. + * values. See Note 1, table 40-16 SAM9260 doc. */ clk = at91_pmc_clock_ref("pllb"); clk->pll_min_in = SAM9260_PLL_B_MIN_IN_FREQ; /* 1 MHz */