From owner-svn-src-head@FreeBSD.ORG Fri Aug 10 04:48:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DCAA106568A; Fri, 10 Aug 2012 04:48:07 +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 555508FC1B; Fri, 10 Aug 2012 04:48:07 +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 q7A4m7XV093087; Fri, 10 Aug 2012 04:48:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7A4m7gu093085; Fri, 10 Aug 2012 04:48:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201208100448.q7A4m7gu093085@svn.freebsd.org> From: Warner Losh Date: Fri, 10 Aug 2012 04:48:07 +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: r239168 - 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: Fri, 10 Aug 2012 04:48:07 -0000 Author: imp Date: Fri Aug 10 04:48:06 2012 New Revision: 239168 URL: http://svn.freebsd.org/changeset/base/239168 Log: More comments about setting PLLA, or rather that we never do. Modified: head/sys/arm/at91/at91_pmc.c Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Fri Aug 10 04:47:20 2012 (r239167) +++ head/sys/arm/at91/at91_pmc.c Fri Aug 10 04:48:06 2012 (r239168) @@ -500,6 +500,7 @@ at91_pmc_init_clock(void) uhpck.pmc_mask = PMC_SCER_UHP_SAM9; udpck.pmc_mask = PMC_SCER_UDP_SAM9; } + /* There is no pllb on AT91SAM9G45 */ if (at91_cpu_is(AT91_T_SAM9G45)) { uhpck.parent = &upll; @@ -509,6 +510,9 @@ at91_pmc_init_clock(void) mckr = RD4(sc, PMC_MCKR); main_ck.hz = main_clock; + // Note: this means outa calc code for plla never used since + // we never change it. If we did, we'd also have to mind + // ICPLLA to get the charge pump current right. at91_pmc_pll_rate(&plla, RD4(sc, CKGR_PLLAR)); if (at91_cpu_is(AT91_T_SAM9G45) && (mckr & PMC_MCKR_PLLADIV2)) @@ -516,16 +520,17 @@ at91_pmc_init_clock(void) /* * Initialize the usb clock. This sets up pllb, but disables the - * actual clock. + * actual clock. XXX except for the if 0 :( */ - pllb_init = at91_pmc_pll_calc(&pllb, 48000000 * 2) | 0x10000000; - at91_pmc_pll_rate(&pllb, pllb_init); - + if (!at91_cpu_is(AT91_T_SAM9G45)) { + pllb_init = at91_pmc_pll_calc(&pllb, 48000000 * 2) | 0x10000000; + at91_pmc_pll_rate(&pllb, pllb_init); #if 0 - /* Turn off USB clocks */ - at91_pmc_set_periph_mode(&ohci_clk, 0); - at91_pmc_set_periph_mode(&udc_clk, 0); + /* Turn off USB clocks */ + at91_pmc_set_periph_mode(&ohci_clk, 0); + at91_pmc_set_periph_mode(&udc_clk, 0); #endif + } if (at91_is_rm92()) { WR4(sc, PMC_SCDR, PMC_SCER_UHP | PMC_SCER_UDP);