From owner-p4-projects@FreeBSD.ORG Wed Jan 10 09:41:54 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D5AF016A407; Wed, 10 Jan 2007 09:41:53 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF43116A417 for ; Wed, 10 Jan 2007 09:41:53 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 41D5F13C44C for ; Wed, 10 Jan 2007 09:41:53 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l0A9JUX2062431; Wed, 10 Jan 2007 10:19:30 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l0A9JJw9022498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Jan 2007 10:19:19 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l0A9JJUa087099; Wed, 10 Jan 2007 10:19:19 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l0A9JJ7l087098; Wed, 10 Jan 2007 10:19:19 +0100 (CET) (envelope-from ticso) Date: Wed, 10 Jan 2007 10:19:18 +0100 From: Bernd Walter To: Warner Losh Message-ID: <20070110091917.GF80390@cicely12.cicely.de> References: <200701100656.l0A6uuTm065800@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701100656.l0A6uuTm065800@repoman.freebsd.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: Perforce Change Reviews Subject: Re: PERFORCE change 112700 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2007 09:41:54 -0000 On Wed, Jan 10, 2007 at 06:56:56AM +0000, Warner Losh wrote: > http://perforce.freebsd.org/chv.cgi?CH=112700 > > Change 112700 by imp@imp_lighthouse on 2007/01/10 06:56:33 > > MF FreeBSD-tsc-6: slow down spi bus enough to make the dataflash > parts reliable on read. MCK / 2 is too fast. I think MCK / 4 > would work too, but MCK / 20 was rock solid. > > I think this works in the boot loader because we're running with > the caches off, slowing things down, but I am actually a bit > baffled. Maybe I just have a bad board... Mmm - you have a 'D' type flash, which allows 33MHz in low frequency mode. My 'C' type allows 33MHz as well. So in theory MCK/2 (30MHz) should work. Older 'B' type max out at 20MHz. I've just used flash access in the bootloader however. > Affected files ... > > .. //depot/projects/arm/src/sys/arm/at91/at91_spi.c#16 edit > > Differences ... > > ==== //depot/projects/arm/src/sys/arm/at91/at91_spi.c#16 (text+ko) ==== > > @@ -115,7 +115,7 @@ > WR4(sc, SPI_MR, (0xf << 24) | SPI_MR_MSTR | SPI_MR_MODFDIS | > (0xE << 16)); > > - WR4(sc, SPI_CSR0, SPI_CSR_CPOL | (4 << 16) | (2 << 8)); > + WR4(sc, SPI_CSR0, SPI_CSR_CPOL | (4 << 16) | (20 << 8)); > WR4(sc, SPI_CR, SPI_CR_SPIEN); > > WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS); -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de