Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2013 19:42:37 +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: r255764 - head/sys/mips/atheros
Message-ID:  <201309211942.r8LJgb3T025341@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Sep 21 19:42:37 2013
New Revision: 255764
URL: http://svnweb.freebsd.org/changeset/base/255764

Log:
  Fix the AR933x CPU UART support by using the correct clock when calculating
  the UART frequency.
  
  Tested:
  
  * AR933x (carambola 2 board), UART now works again
  
  Approved by:	re

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

Modified: head/sys/mips/atheros/ar933x_chip.c
==============================================================================
--- head/sys/mips/atheros/ar933x_chip.c	Sat Sep 21 16:46:34 2013	(r255763)
+++ head/sys/mips/atheros/ar933x_chip.c	Sat Sep 21 19:42:37 2013	(r255764)
@@ -115,8 +115,14 @@ ar933x_chip_detect_sys_frequency(void)
 		u_ar71xx_ahb_freq = freq / t;
 	}
 
-	/* XXX uart should be the refclk, no? */
-	u_ar71xx_uart_freq = u_ar71xx_ahb_freq;
+	/* On the AR933x, the UART frequency is the reference clock,
+	 * not the AHB bus clock.
+	 */
+	u_ar71xx_uart_freq = u_ar71xx_refclk;
+
+	/*
+	 * XXX check what the watchdog frequency should be?
+	 */
 	u_ar71xx_wdt_freq = u_ar71xx_ahb_freq;
 }
 



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