Be a little less magical, not that these values are likely to change...

This commit is contained in:
Warner Losh 2012-05-21 07:47:57 +00:00
parent c69a673406
commit 32f648079f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235718
2 changed files with 7 additions and 4 deletions

View File

@ -69,11 +69,11 @@ at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
vm_paddr_t pa, endpa;
pa = trunc_page(bpa);
if (pa >= 0xfff00000) {
*bshp = pa - 0xf0000000 + 0xd0000000;
if (pa >= AT91_PA_BASE + 0xff00000) {
*bshp = pa - AT91_PA_BASE + AT91_BASE;
return (0);
}
if (pa >= 0xdff00000)
if (pa >= AT91_BASE + 0xff00000)
return (0);
endpa = round_page(bpa + size);
@ -269,7 +269,7 @@ at91_attach(device_t dev)
sc->sc_mem_rman.rm_descr = "AT91 Memory";
if (rman_init(&sc->sc_mem_rman) != 0)
panic("at91_attach: failed to set up memory rman");
for ( pdevmap = at91_devmap; pdevmap->pd_va != 0; pdevmap++) {
for (pdevmap = at91_devmap; pdevmap->pd_va != 0; pdevmap++) {
if (rman_manage_region(&sc->sc_mem_rman, pdevmap->pd_va,
pdevmap->pd_va + pdevmap->pd_size - 1) != 0)
panic("at91_attach: failed to set up memory rman");

View File

@ -35,6 +35,9 @@
/* Where builtin peripherals start in KVM */
#define AT91_BASE 0xd0000000
/* Where builtin peripherals start PA */
#define AT91_PA_BASE 0xf0000000
/* A few things that we count on being the same
* throught the whole family of SOCs */