Atmel at91sam9261-ek support.

Sylvestre Gallon ccna.syl at gmail.com
Tue Mar 24 05:47:43 PDT 2009


On Tue, Mar 24, 2009 at 1:16 PM, Arnar Mar Sig <antab at freebsd.org> wrote:
>
> On Mar 24, 2009, at 10:10 AM, Sylvestre Gallon wrote:
>
>
> 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.

Thanks I will take a look on it :)

>
>
> cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32 all
> devices registers can be addressed without mmu lookups.
>

It is not a problem for the pmap_devmap because all at91 have the same
memory mapping :

|----------------------------------------| 0x0000 0000
|  Internal Memory Mapping  |
|----------------------------------------| 0x1000 0000
|             EBI 0                   |
|----------------------------------------| 0x2000 0000
|             EBI 1                   |
|----------------------------------------| 0x3000 0000
|             EBI ...                  |
|----------------------------------------| 0xX000 0000
|     Undifined (Abort)           |
|----------------------------------------| 0xF000 0000
|      Internal peripherals       |
|----------------------------------------| 0xFFFF FFFF

So we can have the same devmap for all at91 :

static const struct pmap_devmap at91_devmap[] = {
	/*
	 * Map the on-board devices VA == PA so that we can access them
	 * with the MMU on or off.
	 */
	{
		AT91_REGS_VA,
		AT91_REGS_PA,
		AT91_REGS_SIZE,
		VM_PROT_READ|VM_PROT_WRITE,
		PTE_NOCACHE,
	},
	{
		AT91_MEMS_VA,
		AT91_MEMS_PA,
		AT91_MEMS_SIZE,
		VM_PROT_READ|VM_PROT_WRITE,
		PTE_NOCACHE,
	},
	{
		0,
		0,
		0,
		0,
		0,
	}
};


-- 
Sylvestre Gallon (http://devsyl.blogspot.com)
Fifth Grade Student @ Epitech & Researcher @ LSE
R&D @ Rathaxes (http://www.rathaxes.org)


More information about the freebsd-arm mailing list