From owner-freebsd-arm@FreeBSD.ORG Wed Aug 11 10:49:54 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 AE2791065670 for ; Wed, 11 Aug 2010 10:49:54 +0000 (UTC) (envelope-from ben.r.gray@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 413E88FC0C for ; Wed, 11 Aug 2010 10:49:53 +0000 (UTC) Received: by wwf26 with SMTP id 26so4867365wwf.1 for ; Wed, 11 Aug 2010 03:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=I5vfXin7z4aYglij5sKcA7ArwKjcBV8ulkAtTDTmKew=; b=O5bNNt9fzbKyr8lRSuYufhjhnpw3UhYYqx2N2QexnY4bEgjj4x1vg4xu0gTpiwR/wo 6d5LHwDrWlEMxWTbN3aJUYOx93Ik4CbjUP8kEkVlrpUXqTKVoc/lOpkTfzemUs9U5UEi 8SdZxYe3ZZWlRz2l5b964hVXiNHLsb7w2rrkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=TvWTB3VZ9jTkUvnSTtCuZ+YtWDEwiTUzHTP+EftnFM0WHgN4NZAoI3VseD3LSpZNiK s9JhmkSMDKokPXBL1vKVpMeJd2GwjqRJy4Q20KbSCvBxK0XA6hZK+kaFRuG1EAo2I4Ia 0izpM4IfHQX1MFGDOH34E1gu5nP8lfeFlTSPY= Received: by 10.216.48.146 with SMTP id v18mr16541293web.56.1281523793130; Wed, 11 Aug 2010 03:49:53 -0700 (PDT) Received: from Bens-MBP.local (ip-80-238-8-128.bskyb.com [80.238.8.128]) by mx.google.com with ESMTPS id n40sm3982069weq.29.2010.08.11.03.49.51 (version=SSLv3 cipher=RC4-MD5); Wed, 11 Aug 2010 03:49:52 -0700 (PDT) Message-ID: <4C62804F.5080007@gmail.com> Date: Wed, 11 Aug 2010 11:49:51 +0100 From: Ben Gray User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Olivier Houchard References: <4C607639.9050506@gmail.com> <20100810090533.GA56784@ci0.org> In-Reply-To: <20100810090533.GA56784@ci0.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org 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: Wed, 11 Aug 2010 10:49:54 -0000 Thanks Olivier, PSB > On Mon, Aug 09, 2010 at 10:42:17PM +0100, Ben Gray wrote: > >> Hi, >> >> > > Hi Ben, > > >> I've been working on a port of FreeBSD to Texas Instruments OMAP3530 >> 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. >> >> > > That's great to hear ! > How hackish is your work ? There's an ongoing work to support armv6/armv7, so > maybe it's best to avoid duplicating efforts ? > Well it might not be to much of a hack, but I'm reasonably new to ARMv7 and very new to FreeBSD so some of my assumptions might not be correct. I noticed Rafal Jaworowski has posted a link to some ARMv6 code so I'll take a look at that as well. I'll post my changes on googlecode shortly, once I tidy it up and remove the extra verbose debugging. > >> The 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). These 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. So what is the correct solution >> for this? How do I delay device initialisation to after this? >> >> > > If you need to do stuff once IRQ are enabled, you may try to use > config_intrhook_establish(), that should do exactly what you need. > Thanks for this, it looks exactly like what I want :-) > Regards, > > Olivier >