diff options
author | imp <imp@FreeBSD.org> | 2014-01-25 21:52:19 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-01-25 21:52:19 +0000 |
commit | 81ef37301f6fd6d7a82f5b9be933a58c7a5653e9 (patch) | |
tree | c73b675b52577a4d61e883df71e4baca239af694 /sys/arm/at91/at91.c | |
parent | 872f58584632914543b935ae115b14b50c15e3bc (diff) | |
download | FreeBSD-src-81ef37301f6fd6d7a82f5b9be933a58c7a5653e9.zip FreeBSD-src-81ef37301f6fd6d7a82f5b9be933a58c7a5653e9.tar.gz |
Bus space handles need to be the VA of the requested resource, not the
rounded page VA. Correct so the DBGU device can be mapped for FDT
console since it isn't on a page boundary.
Diffstat (limited to 'sys/arm/at91/at91.c')
-rw-r--r-- | sys/arm/at91/at91.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c index fbd7bf2..0ad4888 100644 --- a/sys/arm/at91/at91.c +++ b/sys/arm/at91/at91.c @@ -65,11 +65,13 @@ at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, pa = trunc_page(bpa); if (pa >= AT91_PA_BASE + 0xff00000) { - *bshp = pa - AT91_PA_BASE + AT91_BASE; + *bshp = bpa - AT91_PA_BASE + AT91_BASE; return (0); } - if (pa >= AT91_BASE + 0xff00000) + if (pa >= AT91_BASE + 0xff00000) { + *bshp = bpa; return (0); + } endpa = round_page(bpa + size); *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); |