From owner-freebsd-mips@FreeBSD.ORG Sun Jan 24 01:44:50 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 390991065692 for ; Sun, 24 Jan 2010 01:44:50 +0000 (UTC) (envelope-from smeagle@bsdler.de) Received: from hell.bsdler.de (hell-fe0.v6.bsdler.de [IPv6:2001:780:0:19::1]) by mx1.freebsd.org (Postfix) with ESMTP id BF9708FC08 for ; Sun, 24 Jan 2010 01:44:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hell.bsdler.de (Postfix) with ESMTP id 8E7E8B874; Sun, 24 Jan 2010 02:44:47 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdler.de Received: from hell.bsdler.de ([127.0.0.1]) by localhost (hell.bsdler.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1VOlChJHGCjo; Sun, 24 Jan 2010 02:44:42 +0100 (CET) Received: from kiste.lan.terror.local (p4FF0BF81.dip.t-dialin.net [79.240.191.129]) by hell.bsdler.de (Postfix) with ESMTPSA id 866EFB873; Sun, 24 Jan 2010 02:44:35 +0100 (CET) Received: from [172.17.21.80] (brain.lan.terror.local [172.17.21.80]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by kiste.lan.terror.local (Postfix) with ESMTPS id CB6904AE07; Sun, 24 Jan 2010 03:13:05 +0100 (CET) From: Florian Kruegl To: Oleksandr Tymoshenko In-Reply-To: References: <1264291220.2647.2.camel@brain.lan.terror.local> <77401129-0991-44BE-88A5-F4AA0E347703@bluezbox.com> <1264293898.2647.15.camel@brain.lan.terror.local> Content-Type: text/plain; charset="us-ascii" Date: Sun, 24 Jan 2010 02:41:51 +0100 Message-ID: <1264297311.2647.51.camel@brain.lan.terror.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: AR71XX RTC X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: smeagle@bsdler.de List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 01:44:50 -0000 On Sat, 2010-01-23 at 16:53 -0800, Oleksandr Tymoshenko wrote: > On 2010-01-23, at 4:44 PM, Florian Kruegl wrote: > > > Hi, > > > > On Sat, 2010-01-23 at 16:21 -0800, Oleksandr Tymoshenko wrote: > >> On 2010-01-23, at 4:00 PM, Florian Kruegl wrote: > >> > >>> Hi, > >>> > >>> anyone working on pfc2123 driver for RouterStation Pro? > >>> Seems quite well documented, one issue might be CS hack, but the rest > >>> should be straight. > >> Driver was commited yesterday: > >> http://svn.freebsd.org/viewvc/base?view=revision&revision=202839 > >> > >> And yes, CS hack is the problem. I'm trying to figure out how to fit it into FreeBSD > >> SPI framework. > > > > sounds good, will do an update as soon as i removed me work from code. > > My CS "solution" was more than crude, but the frames simply didn't > > fit... so I am looking forward for a different one :) > > Yeah, my CS solution was dirty hack too. If for "didn't fit" you mean missing last > byte of frame then this problem was solved to. Bug was in AR71XX SPI code: falling > edge was not provided for last byte in transfer in time and RTC chip acts of falling edge. > Fix was committed before driver. > > > code looks similar, can't tell much about result as kernel hangs for a while before getting this: <<<<<<<<<<<<<<<<<<<<<<<<<<< schnipp >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Trap cause = 2 (TLB miss (load or instr. fetch) - kernel mode) [thread pid 4 tid 100009 ] Stopped at _thread_lock_flags+0x150: lw v0,60(a3) db> bt Tracing pid 4 tid 100009 td 0xc0c47270 db_trace_thread+30 (?,?,?,?) ra 800a6c10 sz 24 800a6af4+11c (0,?,ffffffff,?) ra 800a6604 sz 32 800a6270+394 (?,?,?,?) ra 800a6794 sz 168 db_command_loop+78 (?,?,?,?) ra 800a8e68 sz 24 800a8d60+108 (?,?,?,?) ra 80215ff8 sz 424 kdb_trap+f8 (?,?,?,?) ra 80474350 sz 32 trap+134c (?,?,?,?) ra 8046b7fc sz 176 MipsKernGenException+100 (b,173,804d5de8,deadc0d8) ra 801c593c sz 200 _thread_lock_flags+130 (?,?,?,?) ra 80221f18 sz 56 sleepq_broadcast+ac (?,?,?,?) ra 801e5f20 sz 40 wakeup+2c (?,?,?,?) ra 8016de18 sz 32 g_io_deliver+198 (?,?,?,?) ra 8016bbd4 sz 80 8016b590+644 (?,?,?,?) ra 8016e184 sz 104 g_io_schedule_down+2ec (?,?,?,?) ra 8016eb94 sz 64 8016eb18+7c (?,?,?,?) ra 801a331c sz 24 fork_exit+a0 (?,?,?,?) ra 80478f10 sz 48 fork_trampoline+10 (?,?,?,?) ra 0 sz 0 pid 4 <<<<<<<<<<<<<<<<<<<<<<<<<<< schnapp >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> will use AR71XX as config file tomorrow, mine has many additional devs configured for booting from usb devices. and speaking about delay, I managed to boot using SD-Cards and USB Sticks as rootfs by adding a (configurable) delay to root_mount_prepare(). I am quite good in delaying things. usbus1 is finished, but scsi device is not yet ready. I wonder if SCSI_DELAY should do the trick, but I didn't give it a try. as I believe it's only used for physical SCSI bus. Flo