Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Aug 2014 18:15:28 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269760 - head/sys/dev/ath/ath_hal
Message-ID:  <53e66540.2642.8d597fa@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Aug  9 18:15:28 2014
New Revision: 269760
URL: http://svnweb.freebsd.org/changeset/base/269760

Log:
  Bump the HAL_REGRANGE fields from 16 bit to 32 bit.
  
  The AR9380 and later chips have a 128KiB register window, so the register
  read diag api needs changing.
  
  The tools are about to be updated as well.  No, they're not backwards
  compatible.

Modified:
  head/sys/dev/ath/ath_hal/ah.c
  head/sys/dev/ath/ath_hal/ah_internal.h

Modified: head/sys/dev/ath/ath_hal/ah.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.c	Sat Aug  9 17:13:02 2014	(r269759)
+++ head/sys/dev/ath/ath_hal/ah.c	Sat Aug  9 18:15:28 2014	(r269760)
@@ -850,10 +850,11 @@ ath_hal_getregdump(struct ath_hal *ah, c
 	int i;
 
 	for (i = 0; space >= 2*sizeof(uint32_t); i++) {
-		u_int r = regs[i].start;
-		u_int e = regs[i].end;
-		*dp++ = (r<<16) | e;
-		space -= sizeof(uint32_t);
+		uint32_t r = regs[i].start;
+		uint32_t e = regs[i].end;
+		*dp++ = r;
+		*dp++ = e;
+		space -= 2*sizeof(uint32_t);
 		do {
 			*dp++ = OS_REG_READ(ah, r);
 			r += sizeof(uint32_t);

Modified: head/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_internal.h	Sat Aug  9 17:13:02 2014	(r269759)
+++ head/sys/dev/ath/ath_hal/ah_internal.h	Sat Aug  9 18:15:28 2014	(r269760)
@@ -50,8 +50,8 @@
 #endif
 
 typedef struct {
-	uint16_t	start;		/* first register */
-	uint16_t	end;		/* ending register or zero */
+	uint32_t	start;		/* first register */
+	uint32_t	end;		/* ending register or zero */
 } HAL_REGRANGE;
 
 typedef struct {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e66540.2642.8d597fa>