From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 09:10:17 2009 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 78BDC1065677 for ; Tue, 24 Mar 2009 09:10:17 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3AF8FC1B for ; Tue, 24 Mar 2009 09:10:16 +0000 (UTC) (envelope-from ccna.syl@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1508655yxm.13 for ; Tue, 24 Mar 2009 02:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/tbz7j6c5A6g0fEbGlS6IwQTDv0nvN1QgxGN227UuhY=; b=Kasrwm0xD9BdmRgQqmnoChWaf7+6LVDVa/hM75Ql0uE096HobUJFbhoLMPnDssKHAd TBiNICeOwMl73qFkYJd4V6RH9MdiH3UrBVnj91SbLJX3oCF8WaDAez9Kj7UX44O/rdxA k1KdnUKLBOZ7c1xzVSZCGRE+k0LrrkaavgAAo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fi9y3je97Yr4rcEQU4VeQqbba7PDe7rQCZ0oLl37YRFUNdkN1Ze/R08jaxthJSRiG6 PPFbliXnKTV+Ij9/72FVx95iXXPH/q2pJwsle2V0sGaZWSLokpujk/epgGPh01qATFFG VocefK51P5QbVZp06GeKIbP9KMw7MNR4EkH/4= MIME-Version: 1.0 In-Reply-To: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> References: <164b4c9c0903231301p754eebb7k84ea2b22d7b60dc1@mail.gmail.com> <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> Date: Tue, 24 Mar 2009 10:10:00 +0100 Received: by 10.231.31.130 with SMTP id y2mr1530889ibc.52.1237885815173; Tue, 24 Mar 2009 02:10:15 -0700 (PDT) Message-ID: <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> From: Sylvestre Gallon To: Arnar Mar Sig Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: Atmel at91sam9261-ek support. 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, 24 Mar 2009 09:10:18 -0000 On Tue, Mar 24, 2009 at 3:45 AM, Arnar Mar Sig wrote: > > On Mar 23, 2009, at 9:01 PM, Sylvestre Gallon wrote: >> >> Hi freebsd-arm@ >> >> I've got an access to an at91sam9261-ek. This board have a >> at91sam9261 soc that is near the at91rm9200, so I start a >> little port of it into FreeBSD. So I work 3 days on it and that >> results in a Big patch that allow the board to boot. > > Nice work Thanks :) > >> >> As you can see in the dmesg, for the moment the system >> hangs, but it is normal (I haven't yet finish the implementation >> of the dm9000 ethernet driver so NFS don't find any ethernet >> interface and panic). >> >> >> This big diff contains : >> =A0- an AT91SAM9261EK conf file. >> =A0- an std.at91sam9261ek file. >> =A0- a begin of dme driver (dm9000 ethernet chip driver). I >> =A0 will work this week on it to send you another diff that >> =A0 complete this driver :) >> =A0- a board_at91sam9261ek.c file. >> =A0- an include for at91sam9261 registers. >> =A0- a new watchdog driver (at91_wdt) >> =A0- a new smc driver (static memory controller) > > Looks like the at91sam9261 uses the same SMC core as at32ap700x, we shoul= d > look into using the same driver for both archs. I already have at32_smc i= n > p4 to do bus managment and attach childs but no setup code (already done = in > uboot for what i need). I don't found it in the source tree. Where it is located ? If you wan't the smc register description you can take a look at this datasheet in chapter 22: http://www.atmel.org/dyn/resources/prod_documents/doc6242.pdf The smc is not used in the patch yet but I will need to use it for the implement the dm9000 driver (because this chip is attach on the 2nd channel of the smc) > >> =A0- a new pit driver (periodic interval timer) >> >> There is a lot of little modification on the at91 existing >> sources. >> >> As you can see in the diff I work for the moment on a >> define way to separate the two soc code that differ. But I >> think that in the future a .c for each soc should appear. > > What about using hints more for device wiring instead of .c code like i d= id > for avr32? > Yes here we can use hints to factorise a lot of code like a big part of the code where the #ifdef AT91SAM9261 are. But like M. Warner Losh said I think that one needs a .c by SoC to put the cpu_devs structure, the pmap_devmap structure and the errata code. We need to put this in a specific files because these code are dependant of the SoC. Cheers, --=20 Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org)