Date: Mon, 21 May 2012 07:47:57 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235718 - head/sys/arm/at91 Message-ID: <201205210747.q4L7lvFu046204@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon May 21 07:47:57 2012 New Revision: 235718 URL: http://svn.freebsd.org/changeset/base/235718 Log: Be a little less magical, not that these values are likely to change... Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91reg.h Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Mon May 21 06:56:26 2012 (r235717) +++ head/sys/arm/at91/at91.c Mon May 21 07:47:57 2012 (r235718) @@ -69,11 +69,11 @@ at91_bs_map(void *t, bus_addr_t bpa, bus 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"); Modified: head/sys/arm/at91/at91reg.h ============================================================================== --- head/sys/arm/at91/at91reg.h Mon May 21 06:56:26 2012 (r235717) +++ head/sys/arm/at91/at91reg.h Mon May 21 07:47:57 2012 (r235718) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205210747.q4L7lvFu046204>