From owner-freebsd-arm@FreeBSD.ORG Tue Aug 10 13:00:53 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37DE11065670 for ; Tue, 10 Aug 2010 13:00:53 +0000 (UTC) (envelope-from gballet@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id E3D468FC2B for ; Tue, 10 Aug 2010 13:00:52 +0000 (UTC) Received: by vws7 with SMTP id 7so9101990vws.13 for ; Tue, 10 Aug 2010 06:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=/+0+wP9bzitpLF1wTD5V2b25TO7klSAgkJrFRoO5xXQ=; b=rj3p8N4eKuSt3uAs/vSEV8GUVvkue26nDeoneKdsWGQI7ngv0rWUQJbdIRUk/GuHaj TpfZ8Ah6DQOoiUaauiHUy3aS+xG+TowAdghdx82hHZjS4rYLQ3L32gaGXYaDYLhunZSB A2VvdD5XTB7I0xCeh0bGyU3nxWi9faR24T/5M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=XEMvFvHP64L3QucsDUP+DMQP2AbvMOXByA+ByQA/fA8Spxw4ofOmYVUJRi05e9XImB uVik+EQYTSpS4pMo7xjFEoiFHIE83CeitE49+80W7wjnhXgzMSYwszRfGSTTLpWrmwHp MR9bz5tyxOr42DguramolE4W/zQ3igTJbcx5s= MIME-Version: 1.0 Received: by 10.220.61.140 with SMTP id t12mr10446584vch.194.1281443817126; Tue, 10 Aug 2010 05:36:57 -0700 (PDT) Received: by 10.220.108.69 with HTTP; Tue, 10 Aug 2010 05:36:57 -0700 (PDT) Date: Tue, 10 Aug 2010 14:36:57 +0200 Message-ID: From: Guillaume Ballet To: freebsd-arm@freebsd.org, ben.r.gray@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: OMAP3530 - Beagleboard and I2C problems X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2010 13:00:53 -0000 Hey Ben, I have been working for a port myself, at http://code.google.com/p/beagleboard-freebsd/ Haven't had the time to work on it lately, though. > Message: 2 > Date: Mon, 09 Aug 2010 22:42:17 +0100 > From: Ben Gray > Subject: OMAP3530 - Beagleboard and I2C problems > To: freebsd-arm@freebsd.org > Message-ID: <4C607639.9050506@gmail.com> > Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed > > Hi, > > =A0 =A0I've been working on a port of FreeBSD to Texas Instruments OMAP35= 30 > for a while now. I have the basic drivers, Clocks, MMC, DMA, GPIO's, > etc. The kernel is coming up, however it crashes with a seg fault when > starting the init process, this is probably caused by the hacks I had to > put in the pmap code to get it to work with ARMv7 MMU's, but that's an > email for another day. > > =A0 =A0The problem I'm currently having is with the I2C code and it is > perhaps highlighting a more fundamental problem with my port so far. > Currently I have an 'omap3' bus device, which is the parent for all the > other peripheral drivers (I2C, MMC, DMA, etc). =A0These child bus drivers > are added during the attach call of the parent, but at that time IRQ's > are not enabled and nor is the system clocking code. So the problem I > have is that during the attach phase of the I2C device driver I want to > be able to send messages over the I2C bus, but my bus driver doesn't > work because IRQ's are still disabled. =A0So what is the correct solution > for this? =A0How do I delay device initialisation to after this? I had some basic intc controller that I tested with the timer. I also have an even more basic interrupt allocation support in the form of a bus. I also have some changes for the pmap you might be interested in. I can check at what I have tonight that you don't have and send it to you. I will help you with the merge of what you don't already have. > > =A0 =A0Is there documentation anyone can point me at that describes the > startup phases? or alternatively examples in the existing code base? > I've looked at the current ARM ports, and on the face of it they seem to > suffer the same problem. > I only took a quick look at your code (once again, will take a closer look at it tonight), and I didn't find the part where you are inserting the devices. As far as I recall (possibly incorrectly), you can specify in which order you insert devices. What I did was to insert the intc device first, so that it would be ready when inserting other drivers. > > =A0 =A0In case anyone is interested some of my work to date is available = on > googlecode here . At the > moment it can't just be pulled into the tree, partially because it's > missing the patches needed for the pmap code, but mostly because large > parts of it don't work properly :-) I'll try it with my own pmap changes :) > > =A0 =A0And thanks to to the author of the freebsd-bgb googlecode project, > without that I probably wouldn't have got started. You are welcome. I'm still interested in the port even if I have less time to work on it for the moment - still I'm available for doing some work, though :) Guillaume