Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2012 02:14:50 +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: r238330 - head/sys/arm/at91
Message-ID:  <201207100214.q6A2EoWF053721@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <machine/asm.h>
 #include <arm/at91/at91_rstreg.h>
+#include <arm/at91/at91reg.h>
 #include <arm/at91/at91sam9g20reg.h>
 __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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207100214.q6A2EoWF053721>