From owner-svn-src-all@FreeBSD.ORG Tue Jul 10 02:14:51 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 2C0F7106564A; Tue, 10 Jul 2012 02:14:51 +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 0BC638FC0C; Tue, 10 Jul 2012 02:14:51 +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 q6A2Eo9O053730; Tue, 10 Jul 2012 02:14:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6A2EoWF053721; Tue, 10 Jul 2012 02:14:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201207100214.q6A2EoWF053721@svn.freebsd.org> From: Warner Losh Date: Tue, 10 Jul 2012 02:14:50 +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: r238330 - 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: Tue, 10 Jul 2012 02:14:51 -0000 Author: imp Date: Tue Jul 10 02:14:50 2012 New Revision: 238330 URL: http://svn.freebsd.org/changeset/base/238330 Log: Eliminate the AT91XXXX_BASE for each SoC. AT91_BASE is the right way to spell this since we only have one AT91_BASE for all Atmel arm9 SoCs. Modified: head/sys/arm/at91/at91_reset.S head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91rm92reg.h head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9g20reg.h head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91sam9x25reg.h head/sys/arm/at91/uart_cpu_at91rm9200usart.c Modified: head/sys/arm/at91/at91_reset.S ============================================================================== --- head/sys/arm/at91/at91_reset.S Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91_reset.S Tue Jul 10 02:14:50 2012 (r238330) @@ -1,13 +1,14 @@ #include #include +#include #include __FBSDID("$FreeBSD$"); -#define SDRAM_TR (AT91SAM9G20_BASE + \ +#define SDRAM_TR (AT91_BASE + \ AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_TR) -#define SDRAM_LPR (AT91SAM9G20_BASE + \ +#define SDRAM_LPR (AT91_BASE + \ AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_LPR) -#define RSTC_RCR (AT91SAM9G20_BASE + \ +#define RSTC_RCR (AT91_BASE + \ AT91SAM9G20_RSTC_BASE + RST_CR) /* Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91rm9200.c Tue Jul 10 02:14:50 2012 (r238330) @@ -164,8 +164,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91RM92_BASE) - addr += AT91RM92_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91rm92reg.h ============================================================================== --- head/sys/arm/at91/at91rm92reg.h Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91rm92reg.h Tue Jul 10 02:14:50 2012 (r238330) @@ -70,7 +70,6 @@ * 0xf0000000 - 0xfffffffff : Peripherals */ -#define AT91RM92_BASE 0xd0000000 /* Usart */ #define AT91RM92_USART_SIZE 0x4000 Modified: head/sys/arm/at91/at91sam9g20.c ============================================================================== --- head/sys/arm/at91/at91sam9g20.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9g20.c Tue Jul 10 02:14:50 2012 (r238330) @@ -157,8 +157,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91SAM9G20_BASE) - addr += AT91SAM9G20_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91sam9g20reg.h ============================================================================== --- head/sys/arm/at91/at91sam9g20reg.h Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9g20reg.h Tue Jul 10 02:14:50 2012 (r238330) @@ -73,8 +73,6 @@ #define AT91_CHIPSELECT_7 0x80000000 -#define AT91SAM9G20_BASE 0xd0000000 - #define AT91SAM9G20_EMAC_BASE 0xffc4000 #define AT91SAM9G20_EMAC_SIZE 0x4000 Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9x25.c Tue Jul 10 02:14:50 2012 (r238330) @@ -160,8 +160,8 @@ at91_add_child(device_t dev, int prio, c bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); if (irq2 != 0) bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); - if (addr != 0 && addr < AT91SAM9X25_BASE) - addr += AT91SAM9X25_BASE; + if (addr != 0 && addr < AT91_BASE) + addr += AT91_BASE; if (addr != 0) bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } Modified: head/sys/arm/at91/at91sam9x25reg.h ============================================================================== --- head/sys/arm/at91/at91sam9x25reg.h Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/at91sam9x25reg.h Tue Jul 10 02:14:50 2012 (r238330) @@ -73,8 +73,6 @@ #define AT91_CHIPSELECT_4 0x50000000 #define AT91_CHIPSELECT_5 0x60000000 -#define AT91SAM9X25_BASE 0xd0000000 - #define AT91SAM9X25_EMAC_SIZE 0x4000 #define AT91SAM9X25_EMAC0_BASE 0x802c000 #define AT91SAM9X25_EMAC0_SIZE AT91SAM9X25_EMAC_SIZE Modified: head/sys/arm/at91/uart_cpu_at91rm9200usart.c ============================================================================== --- head/sys/arm/at91/uart_cpu_at91rm9200usart.c Tue Jul 10 01:49:50 2012 (r238329) +++ head/sys/arm/at91/uart_cpu_at91rm9200usart.c Tue Jul 10 02:14:50 2012 (r238330) @@ -73,7 +73,7 @@ uart_cpu_getdev(int devtype, struct uart * XXX: Not pretty, but will work because we map the needed addresses * early. */ - di->bas.bsh = AT91RM92_BASE + AT91RM92_DBGU_BASE; + di->bas.bsh = AT91_BASE + AT91RM92_DBGU_BASE; di->baudrate = 115200; di->bas.regshft = 0; di->bas.rclk = 0;