From owner-freebsd-arm@FreeBSD.ORG Mon Aug 9 22:10:07 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 368951065672 for ; Mon, 9 Aug 2010 22:10:07 +0000 (UTC) (envelope-from ben.r.gray@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE0F78FC16 for ; Mon, 9 Aug 2010 22:10:06 +0000 (UTC) Received: by wyj26 with SMTP id 26so13155574wyj.13 for ; Mon, 09 Aug 2010 15:10:03 -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:subject:content-type :content-transfer-encoding; bh=eKbCQS7GMBqjABnD06jqATNUjqiZNO5WjA9AG8eTCT8=; b=X0OYfCx1OASZE9RmsnohqroZQvs+Zz7gHFj5p493i1HUzwB2F53pHjQo98Syd8VLx6 P60zzUdlZwE5eRoXxqvGgSWt89dlB0SkPwQApBpLTDRw0cDw6pyY/gCqoARw0+yszlnn jrIKBom8O6+EqjyHGscFF1fsCOrBpKHgY5rYI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=tk/sJ8nSk/2B4jnt7K/zENu/yIHaV1wH//jlaGSe/LnnoVwI7AVtd2GGyx5vF86346 j34lFzYiSjRRvREcbtQeV/KVfWJ9ggkXpwDJPparhilV7WI6tW99XW0Gx3GZfgG9l0M1 PYb9AcdSqzv1GinVdxc00lZpOM63kc5PbjJTo= Received: by 10.227.134.18 with SMTP id h18mr14213306wbt.94.1281390139996; Mon, 09 Aug 2010 14:42:19 -0700 (PDT) Received: from bens-mbp.config (78-86-169-240.dsl.cnl.uk.net [78.86.169.240]) by mx.google.com with ESMTPS id h3sm4781881wbb.3.2010.08.09.14.42.18 (version=SSLv3 cipher=RC4-MD5); Mon, 09 Aug 2010 14:42:19 -0700 (PDT) Message-ID: <4C607639.9050506@gmail.com> Date: Mon, 09 Aug 2010 22:42:17 +0100 From: Ben Gray User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 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: Mon, 09 Aug 2010 22:10:07 -0000 Hi, 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. 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? Is 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. In 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 :-) And thanks to to the author of the freebsd-bgb googlecode project, without that I probably wouldn't have got started. Cheers, Ben Gray