svn commit: r262920 - head/sys/dev/uart

Warner Losh imp at FreeBSD.org
Sat Mar 8 03:39:10 UTC 2014


Author: imp
Date: Sat Mar  8 03:39:09 2014
New Revision: 262920
URL: http://svnweb.freebsd.org/changeset/base/262920

Log:
  Make clock optional on uart nodes. It is a FreeBSD-specific extention,
  and won't be present in vendor supplied dts files.

Modified:
  head/sys/dev/uart/uart_bus_fdt.c

Modified: head/sys/dev/uart/uart_bus_fdt.c
==============================================================================
--- head/sys/dev/uart/uart_bus_fdt.c	Sat Mar  8 03:22:25 2014	(r262919)
+++ head/sys/dev/uart/uart_bus_fdt.c	Sat Mar  8 03:39:09 2014	(r262920)
@@ -97,9 +97,12 @@ uart_fdt_get_clock(phandle_t node, pcell
 {
 	pcell_t clock;
 
+	/*
+	 * clock-frequency is a FreeBSD-specific hack. Make its presence optional.
+	 */
 	if ((OF_getprop(node, "clock-frequency", &clock,
 	    sizeof(clock))) <= 0)
-		return (ENXIO);
+		clock = 0;
 
 	if (clock == 0)
 		/* Try to retrieve parent 'bus-frequency' */


More information about the svn-src-head mailing list