Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Apr 2018 18:58:58 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r332196 - head/sys/dev/spibus
Message-ID:  <201804071858.w37Iwwdo040241@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sat Apr  7 18:58:58 2018
New Revision: 332196
URL: https://svnweb.freebsd.org/changeset/base/332196

Log:
  Return BUS_PROBE_DEFAULT, not zero, because this is not the one driver
  implementation that must be used, it's just the base system default driver.
  
  Also add a comment noting that we're being more liberal about the bus
  frequency property than the dts binding documents require.

Modified:
  head/sys/dev/spibus/ofw_spibus.c

Modified: head/sys/dev/spibus/ofw_spibus.c
==============================================================================
--- head/sys/dev/spibus/ofw_spibus.c	Sat Apr  7 18:25:07 2018	(r332195)
+++ head/sys/dev/spibus/ofw_spibus.c	Sat Apr  7 18:58:58 2018	(r332196)
@@ -71,7 +71,7 @@ ofw_spibus_probe(device_t dev)
 		return (ENXIO);
 	device_set_desc(dev, "OFW SPI bus");
 
-	return (0);
+	return (BUS_PROBE_DEFAULT);
 }
 
 static int
@@ -126,6 +126,10 @@ ofw_spibus_attach(device_t dev)
 		/*
 		 * Get the maximum clock frequency for device, zero means
 		 * use the default bus speed.
+		 *
+		 * XXX Note that the current (2018-04-07) dts bindings say that
+		 * spi-max-frequency is a required property (but says nothing of
+		 * how to interpret a value of zero).
 		 */
 		if (OF_getencprop(child, "spi-max-frequency", &clock,
 		    sizeof(clock)) == -1)



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