Author: adrian
Date: Thu Mar 28 05:43:03 2013
New Revision: 248809
URL: http://svnweb.freebsd.org/changeset/base/248809

Log:
  Fix the AR933x platform device start/stop code.
  
  This was ported from the AR724x code and I think that also doesn't
  quite work.  I'll investigate that soon.
  
  With this in place the system reset path works, so 'reset' from kdb
  actually resets the SoC.
  
  Tested:
  
  * AP121 test board

Modified:
  head/sys/mips/atheros/ar933x_chip.c

Modified: head/sys/mips/atheros/ar933x_chip.c
==============================================================================
--- head/sys/mips/atheros/ar933x_chip.c Thu Mar 28 05:39:45 2013        
(r248808)
+++ head/sys/mips/atheros/ar933x_chip.c Thu Mar 28 05:43:03 2013        
(r248809)
@@ -119,25 +119,19 @@ ar933x_chip_detect_sys_frequency(void)
 static void
 ar933x_chip_device_stop(uint32_t mask)
 {
-       uint32_t mask_inv, reg;
+       uint32_t reg;
 
-       mask_inv = mask;
        reg = ATH_READ_REG(AR933X_RESET_REG_RESET_MODULE);
-       reg |= mask;
-       reg &= ~mask_inv;
-       ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg);
+       ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg | mask);
 }
 
 static void
 ar933x_chip_device_start(uint32_t mask)
 {
-       uint32_t mask_inv, reg;
+       uint32_t reg;
 
-       mask_inv = mask;
        reg = ATH_READ_REG(AR933X_RESET_REG_RESET_MODULE);
-       reg &= ~mask;
-       reg |= mask_inv;
-       ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg);
+       ATH_WRITE_REG(AR933X_RESET_REG_RESET_MODULE, reg & ~mask);
 }
 
 static int
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to