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);
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to