From owner-svn-src-all@FreeBSD.ORG Mon May 21 07:47:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A1ED1065674; Mon, 21 May 2012 07:47:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA28B8FC0A; Mon, 21 May 2012 07:47:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4L7lvFa046207; Mon, 21 May 2012 07:47:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4L7lvFu046204; Mon, 21 May 2012 07:47:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205210747.q4L7lvFu046204@svn.freebsd.org> From: Warner Losh Date: Mon, 21 May 2012 07:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235718 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2012 07:47:58 -0000 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 */