From owner-freebsd-arm@FreeBSD.ORG Mon Nov 20 22:13:19 2006 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EFE116A492 for ; Mon, 20 Nov 2006 22:13:19 +0000 (UTC) (envelope-from Danovitsch@vitsch.net) Received: from amsfep12-int.chello.nl (amsfep17-int.chello.nl [213.46.243.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3962243D5D for ; Mon, 20 Nov 2006 22:12:56 +0000 (GMT) (envelope-from Danovitsch@vitsch.net) Received: from Tuinhuisje.Vitsch.net ([62.195.87.223]) by amsfep12-int.chello.nl (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20061120221306.VAUS1928.amsfep12-int.chello.nl@Tuinhuisje.Vitsch.net>; Mon, 20 Nov 2006 23:13:06 +0100 Received: from self (f23025.upc-f.chello.nl [80.56.23.25]) (authenticated bits=0) by Tuinhuisje.Vitsch.net (8.13.1/8.13.1) with ESMTP id kAKMCnCQ061082; Mon, 20 Nov 2006 23:12:54 +0100 (CET) (envelope-from Danovitsch@vitsch.net) From: "Daan Vreeken [PA4DAN]" Organization: Vitsch Electronics To: "M. Warner Losh" Date: Mon, 20 Nov 2006 23:12:57 +0100 User-Agent: KMail/1.9.1 References: <7380637.post@talk.nabble.com> <20061116.093638.63053940.imp@bsdimp.com> <200611202303.52817.Danovitsch@vitsch.net> In-Reply-To: <200611202303.52817.Danovitsch@vitsch.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611202312.58007.Danovitsch@vitsch.net> Cc: freebsd-arm@freebsd.org Subject: Re: At91rm9200 how to start with FreeBSD 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, 20 Nov 2006 22:13:19 -0000 On Monday 20 November 2006 23:03, Daan Vreeken [PA4DAN] wrote: > Hi Warner (and the list), > > On Thursday 16 November 2006 17:36, M. Warner Losh wrote: > > In message: <7380637.post@talk.nabble.com> > > > > Zuy writes: > > : How I'm soldering board based on AT91RM9200 with 16mb SDRAM and othe > > : standartpPeripherals(USB, SD, UART ...). I'm going to run FreeBSD on > > : this board, but unfortunately I do not know how to start. > > : I havn't found any files connected with AT91RM9200 in FreeBSD6.0 Stable > > : source files directory. > > : I found from this board that freebsd works on at91rm9200. > > > > Yes. It does. FreeBSD-current has the most up to date tested code > > for this platform. FreeBSD 6.2 will contain the tools you need to > > build it, as well as a slightly less advanced version (the freeze date > > for 6.2 was a while ago). 6.3 is likely to have even more advanced > > support. > > ... > > > Here's the broad outlines. > > ... followed by a very nice ARM-introduction :) ... > > > Feel free to ask questions. the more people that ask, the bigger my > > collection of email on the topic gets, and the easier it will be for > > me to synthesize a tutorial. Also, if there are areas that I've been > > vague, please don't hesitate to let me know. > > This email got me to dust-off the KB9202B board my company bought a while > back for a project that hasn't started (yet). With your email it was quite > easy to get the board to work. I now use the original Kwikbyte boot loader > to load the kernel with tftp. After that the kernel mounts root over NFS > and everything works like a charm. > If I am going to use this board in the project it was intended for, we will > need USB support, so I took a shot at getting USB working... Stupid me, I pressed [ctrl+enter] while typing this email instead of [enter], so a piece of the intended story didn't make it into the first email :-s The conclusion : I've got USB to work. What I changed : > o updated hints.at91rm9200 (ohci controller is on ASB) o I've added a mapping for the OHCI controller in kb920x_machdep.c that maps the controller to 0xdfe00000 (just below where the IO region is mapped) After enabling the ohci controller it crashed in usbd_transfer() because of missing device->bus->buffer_dmatag so I added : > o allocate dma tags in ohci_atmelarm_attach() > (inspired by ohci_pci.c) > o destroy dma tags in ohc_atmelarm_detach() With these changes USB is now working on the board I have here. I have succesfully read the entire content of a memory stick inside a digital camera with it. There are some problems though (not sure yet where they come from). I have a if_axe device here that doesn't want to work. (Will investigate further). Also, I'm not sure if I need to tell the kernel more about the VA/PA mapping I have added and wheter or not there is a better way/place to do the mapping. Any comments are appreciated. If time permits I'll try to implement a driver for the USB Device Port as it could also come in handy when we're going to use these boards. btw: This work is sponsored by Vitsch Electronics. -- Daan