Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2009 05:52:30 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r187513 - projects/mips/sys/mips/atheros
Message-ID:  <200901210552.n0L5qUuN067878@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Wed Jan 21 05:52:30 2009
New Revision: 187513
URL: http://svn.freebsd.org/changeset/base/187513

Log:
  - Use ATH_READ_REG/ATH_WRITE_REG instead of direct memory access

Modified:
  projects/mips/sys/mips/atheros/ar71xx_machdep.c

Modified: projects/mips/sys/mips/atheros/ar71xx_machdep.c
==============================================================================
--- projects/mips/sys/mips/atheros/ar71xx_machdep.c	Wed Jan 21 05:49:30 2009	(r187512)
+++ projects/mips/sys/mips/atheros/ar71xx_machdep.c	Wed Jan 21 05:52:30 2009	(r187513)
@@ -72,11 +72,9 @@ platform_identify(void)
 void
 platform_reset(void)
 {
-	volatile uint32_t * p = 
-	    (void *)MIPS_PHYS_TO_KSEG1(ATH_RST_RESET);
-	uint32_t reg = *p;
+	uint32_t reg = ATH_READ_REG(APB_RST_RESET);
 
-	*p = reg | RST_RESET_FULL_CHIP_RESET;
+	ATH_WRITE_REG(APB_RST_RESET, reg | RST_RESET_FULL_CHIP_RESET);
 	/* Wait for reset */
 	while(1)
 		;



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