From owner-svn-src-all@freebsd.org Fri Feb 24 00:53:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AD67CE8765; Fri, 24 Feb 2017 00:53:31 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (kanar.ci0.org [IPv6:2001:bc8:35e6::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE20D91C; Fri, 24 Feb 2017 00:53:30 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.9/8.14.8) with ESMTP id v1O0rRHN046698; Fri, 24 Feb 2017 01:53:27 +0100 (CET) (envelope-from cognet@ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.9/8.14.8/Submit) id v1O0rRIA046697; Fri, 24 Feb 2017 01:53:27 +0100 (CET) (envelope-from cognet@ci0.org) X-Authentication-Warning: kanar.ci0.org: doginou set sender to cognet@ci0.org using -f Date: Fri, 24 Feb 2017 01:53:27 +0100 From: Olivier Houchard To: Pedro Giffuni Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314186 - head/sys/arm/at91 Message-ID: <20170224005327.GA46682@ci0.org> References: <201702232348.v1NNmiED031217@repo.freebsd.org> <1487894717.25520.18.camel@freebsd.org> <66C0031D-1C8C-4922-B452-4E5874D75156@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66C0031D-1C8C-4922-B452-4E5874D75156@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 24 Feb 2017 00:53:31 -0000 On Thu, Feb 23, 2017 at 07:23:36PM -0500, Pedro Giffuni wrote: > Hi; > > > Il giorno 23 feb 2017, alle ore 19:05, Ian Lepore ha scritto: > > > > On Thu, 2017-02-23 at 23:48 +0000, Pedro F. Giffuni wrote: > >> Author: pfg > >> Date: Thu Feb 23 23:48:44 2017 > >> New Revision: 314186 > >> URL: https://svnweb.freebsd.org/changeset/base/314186 > >> > >> Log: > >> at91: double assignment. > >> > >> Found with: coccinelle (da.cocci) > >> Suggested by: cognet > >> > >> Modified: > >> head/sys/arm/at91/at91sam9260.c > >> > >> Modified: head/sys/arm/at91/at91sam9260.c > >> ===================================================================== > >> ========= > >> --- head/sys/arm/at91/at91sam9260.c Thu Feb 23 22:46:01 2017 > >> (r314185) > >> +++ head/sys/arm/at91/at91sam9260.c Thu Feb 23 23:48:44 2017 > >> (r314186) > >> @@ -193,7 +193,6 @@ at91_clock_init(void) > >> */ > >> clk = at91_pmc_clock_ref("pllb"); > >> clk->pll_min_in = SAM9260_PLL_B_MIN_IN_FREQ; > >> /* 1 MHz */ > >> - clk->pll_max_in = SAM9260_PLL_B_MAX_IN_FREQ; > >> /* 5 MHz */ > >> clk->pll_max_in = 2999999; > >> /* ~3 MHz */ > >> clk->pll_min_out = SAM9260_PLL_B_MIN_OUT_FREQ; /* > >> 70 MHz */ > >> clk->pll_max_out = SAM9260_PLL_B_MAX_OUT_FREQ; /* > >> 130 MHz */ > >> > > > > Just looking at this by eye (but without digging out the at91 manuals) > > I'd say this looks like fallout from a mismerge and the correct line to > > keep would be the named constant. Keeping the one that has actually > > been in effect all this time isn't the same as keeping the right one, > > and this deletion may remove the only clue someone might find when they > > eventually get around to debugging this (if ever, the sam9260 is a > > pretty old chip). > > > > -- ian > > > > > > According to SVN annotations it is not a mismerge:. The first line looks more technical but cognet@ stated from the second one is correct and matches the (long) initial comment. > > It???s also what is in effective use now, so I wouldn???t change it unless someone with the hardware confirms first. > As Pedro says, there's a large comment that says : * Fudge MAX pll in frequence down below 3.0 MHz to ensure * PMC alogrithm choose the divisor that causes the input clock * 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 recommended crystal * values. See Note 1, table 40-16 SAM9260 doc. So I just assumed it was OK. (And it's been that way since the code was first submitted). Olivier