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

Ian Lepore ian at FreeBSD.org
Mon Feb 25 23:49:59 UTC 2019


Author: ian
Date: Mon Feb 25 23:49:58 2019
New Revision: 344556
URL: https://svnweb.freebsd.org/changeset/base/344556

Log:
  Set maximum bus clock speed from hints when attaching hinted spibus(4) children.
  
  Some devices (such as spigen(4)) document that this works, but it appears that the
  code to implement it never got added.

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

Modified: head/sys/dev/spibus/spibus.c
==============================================================================
--- head/sys/dev/spibus/spibus.c	Mon Feb 25 23:45:36 2019	(r344555)
+++ head/sys/dev/spibus/spibus.c	Mon Feb 25 23:49:58 2019	(r344556)
@@ -216,6 +216,7 @@ spibus_hinted_child(device_t bus, const char *dname, i
 	child = BUS_ADD_CHILD(bus, 0, dname, dunit);
 	devi = SPIBUS_IVAR(child);
 	devi->mode = SPIBUS_MODE_NONE;
+	resource_int_value(dname, dunit, "clock", &devi->clock);
 	resource_int_value(dname, dunit, "cs", &devi->cs);
 	resource_int_value(dname, dunit, "mode", &devi->mode);
 }


More information about the svn-src-head mailing list