Atmel at91sam9261-ek support.

Arnar Mar Sig antab at freebsd.org
Tue Mar 24 05:16:09 PDT 2009


On Mar 24, 2009, at 10:10 AM, Sylvestre Gallon wrote:

> On Tue, Mar 24, 2009 at 3:45 AM, Arnar Mar Sig <antab at freebsd.org>  
> 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 :
>>>  - an AT91SAM9261EK conf file.
>>>  - an std.at91sam9261ek file.
>>>  - a begin of dme driver (dm9000 ethernet chip driver). I
>>>   will work this week on it to send you another diff that
>>>   complete this driver :)
>>>  - a board_at91sam9261ek.c file.
>>>  - an include for at91sam9261 registers.
>>>  - a new watchdog driver (at91_wdt)
>>>  - a new smc driver (static memory controller)
>>
>> Looks like the at91sam9261 uses the same SMC core as at32ap700x, we  
>> should
>> look into using the same driver for both archs. I already have  
>> at32_smc in
>> 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)
Code is in p4:
http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/avr32/src/sys/avr32/avr32&HIDEDEL=NO

Note the driver dose not use KVA, instead it uses unmapped memory  
segment in avr32, but that only works for 5 of the 6 chips select so  
it will be needed later on.

>
>>
>>>  - 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 did
>> 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.
cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32  
all devices registers can be addressed without mmu lookups.

>
> Cheers,
>
> -- 
> Sylvestre Gallon (http://devsyl.blogspot.com)
> Fifth Grade Student @ Epitech & Researcher @ LSE
> R&D @ Rathaxes (http://www.rathaxes.org)
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"



More information about the freebsd-arm mailing list