summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91/at91_machdep.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-01-31 15:38:05 +0000
committerimp <imp@FreeBSD.org>2014-01-31 15:38:05 +0000
commit9190257f1a260a4d61b397c99c7fdd219464be13 (patch)
tree431ccebf5b12ed89d9d0e5b90c6c774f379527c4 /sys/arm/at91/at91_machdep.c
parent3f99ec60916b6b854460761559605c52dcb65f21 (diff)
downloadFreeBSD-src-9190257f1a260a4d61b397c99c7fdd219464be13.zip
FreeBSD-src-9190257f1a260a4d61b397c99c7fdd219464be13.tar.gz
Switch to using PAs rather than VAs for the addresses we map for
devices. This is a nop, except for what's reported by atmelbus for the resources. It would be nice if we could dymanically allocated these things, but the pmap_mapdev panics if we don't keep the static mappings, so we still need to play the carefully allocate VA space between all supported SoC game. User's with their own devices may need to make adjustments.
Diffstat (limited to 'sys/arm/at91/at91_machdep.c')
-rw-r--r--sys/arm/at91/at91_machdep.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arm/at91/at91_machdep.c b/sys/arm/at91/at91_machdep.c
index 2eb00a1d..6501285 100644
--- a/sys/arm/at91/at91_machdep.c
+++ b/sys/arm/at91/at91_machdep.c
@@ -146,6 +146,7 @@ const struct arm_devmap_entry at91_devmap[] = {
VM_PROT_READ|VM_PROT_WRITE,
PTE_NOCACHE,
},
+ /* There's a notion that we should do the rest of these lazily. */
/*
* We can't just map the OHCI registers VA == PA, because
* AT91xx_xxx_BASE belongs to the userland address space.
@@ -163,16 +164,16 @@ const struct arm_devmap_entry at91_devmap[] = {
* on this chip select for a VA/PA mapping.
*/
/* Internal Memory 1MB */
+ AT91RM92_OHCI_VA_BASE,
AT91RM92_OHCI_BASE,
- AT91RM92_OHCI_PA_BASE,
0x00100000,
VM_PROT_READ|VM_PROT_WRITE,
PTE_NOCACHE,
},
{
/* CompactFlash controller. Portion of EBI CS4 1MB */
+ AT91RM92_CF_VA_BASE,
AT91RM92_CF_BASE,
- AT91RM92_CF_PA_BASE,
0x00100000,
VM_PROT_READ|VM_PROT_WRITE,
PTE_NOCACHE,
@@ -183,16 +184,16 @@ const struct arm_devmap_entry at91_devmap[] = {
*/
{
/* Internal Memory 1MB */
+ AT91SAM9G20_OHCI_VA_BASE,
AT91SAM9G20_OHCI_BASE,
- AT91SAM9G20_OHCI_PA_BASE,
0x00100000,
VM_PROT_READ|VM_PROT_WRITE,
PTE_NOCACHE,
},
{
/* EBI CS3 256MB */
+ AT91SAM9G20_NAND_VA_BASE,
AT91SAM9G20_NAND_BASE,
- AT91SAM9G20_NAND_PA_BASE,
AT91SAM9G20_NAND_SIZE,
VM_PROT_READ|VM_PROT_WRITE,
PTE_NOCACHE,
@@ -202,8 +203,8 @@ const struct arm_devmap_entry at91_devmap[] = {
*/
{
/* Internal Memory 1MB */
+ AT91SAM9G45_OHCI_VA_BASE,
AT91SAM9G45_OHCI_BASE,
- AT91SAM9G45_OHCI_PA_BASE,
0x00100000,
VM_PROT_READ|VM_PROT_WRITE,
PTE_NOCACHE,
OpenPOWER on IntegriCloud