svn commit: r332196 - head/sys/dev/spibus

Ian Lepore ian at FreeBSD.org
Sat Apr 7 18:58:59 UTC 2018


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)


More information about the svn-src-all mailing list