From owner-svn-src-all@FreeBSD.ORG Tue Jan 1 22:09:19 2013 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 6A2C4119; Tue, 1 Jan 2013 22:09:19 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp-out3.electric.net (smtp-out3.electric.net [72.35.12.184]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1698FC0A; Tue, 1 Jan 2013 22:09:19 +0000 (UTC) Received: from [204.11.168.155] (helo=securemail.onebox.com) by opel.electric.net with esmtp (Exim 4.77) (envelope-from ) id 1TqA1O-0006bW-Tf; Tue, 01 Jan 2013 14:09:18 -0800 Received: from localhost (unverified [49.224.140.241]) by securemail.onebox.com (Rockliffe SMTPRA 9.3.1) with ESMTP id ; Tue, 1 Jan 2013 17:09:22 -0500 Date: Wed, 2 Jan 2013 11:08:56 +1300 From: Andrew Turner To: "Robert N. M. Watson" Subject: Re: svn commit: r244899 - head/sys/mips/beri Message-ID: <20130102110856.7c280fd5@fubar.geek.nz> In-Reply-To: References: <201212311106.qBVB6chM016661@svn.freebsd.org> <20130102081746.5435db05@fubar.geek.nz> Organization: SMTP: smtp.paradise.net.nz X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 01 Jan 2013 22:09:19 -0000 On Tue, 1 Jan 2013 20:56:15 +0000 "Robert N. M. Watson" wrote: > > On 1 Jan 2013, at 19:17, Andrew Turner wrote: > > > This looks like it is too late in the boot process. If you are using > > FDT you will need to use the FDT uart which is initialised in > > cninit. > > On a semi-related note: the current obstacle to moving more devices > over to using FDT on BERI is that our FDT implementation appears to > require a PIC to be configured. We're not actually using a PIC on > BERI currently. It works fine attached to nexus, as the implied > fallback for not having a PIC is to simply use the suitably numbered > interrupt wires direct into the MIPS. However, trying the same setup > described using FDT leads to an interrupt-related warning at boot, > and no interrupt being provided to the driver. I suspect I need to > provide a PIC-alike software component as a fall-back for the non-PIC > case. From a brief e-mail exchange with JC, it sounds like the XLP > FDT setup is actually not using interrupts either, currently. I'm not sure if a PIC is required. From my reading of the code it appears not. By the look of it if you are using the nexus to handle interrupts you need to put an interrupts property in the device and "#interrupt-cells = <1>;" in the soc node. You will also need to implement an interrupt decode function and add it to the fdt_pic_table array. ARM has a number of almost identical copies of this function you can use for inspration. Andrew