Commit Graph

23 Commits

Author SHA1 Message Date
jdc
71885a597a Add "i2c-at34c02" AT34C02 EEPROM. This is compatible with the AT24C02
EEPROM, apart from software write protection (not supported in our driver).
2013-10-25 14:32:10 +00:00
jdc
a2f66b838f Add a property "i2c-indirect-config" to allow/disallow i2c indirect config.
If missing, "allowed" is assumed.  Set it to false for OFW machines.
Patch from martin@.  Removes erroneous i2c probe messages that appeared with
wildcard support.
2013-09-24 18:04:53 +00:00
jdc
29f4985ff4 Set the size for EEPROM's that we know about ("i2c-at24c64" is set to 8192).
Allows seeprom(4) to attach correctly, when combined with the direct
configuration support there.
2013-02-08 15:17:00 +00:00
jdc
6be9cf002d The i2c bus number (0 or 1) is encoded in bit 33 of the register for a node,
but we encode it in bit 8 of i2c_addr_t.  If bit 33 is set, unset it and
set bit 9 instead (we later shift by one bit).
2013-02-03 17:41:02 +00:00
jdc
9e836bcfdf Only create the "i2c-child-devices" property if we actually found any
child devices (rather than unconditionally).
Allows indirect config of i2c busses to work (e,g. for Tadpole SPARCle).
2012-11-02 15:44:07 +00:00
martin
3c21532a2a Interpret the "reg" property of i2c nodes more liberal, and depending
on the cell size in use.
I have been unable to find any documents about the i2c bindings for OF,
so this is all pretty much voodoo.
2010-02-28 13:59:05 +00:00
martin
5aa9335e67 Supporting cast for i2c direct configuration on OF machines 2010-02-28 11:35:40 +00:00
martin
65cc18f336 fix a ref counting leak 2010-01-21 15:56:08 +00:00
macallan
7599b5aef4 add another convenience function - of_get_mode_string() to extract a Sun-like
video mode specifier from output-device
2009-11-11 16:56:52 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
garbled
86d671713a Add three new MI functions taken from macppc/autoconf.c:
of_getnode_byname(): Finds a node named X
of_to_uint32_prop(): sets an uint32_t prop_t from an OFW property
of_to_dataprop(): sets a data prop_t from an OFW property

These looked more generally useful, and seemed like something other
OFW-capable machines might want to take advantage of.
2007-11-07 19:26:45 +00:00
garbled
fb3ebfc3c0 Add a new convenience function, of_find_firstchild_byname(), and apply
some minor KNF to this ofw_subr.c.
2007-10-25 16:59:38 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
itojun
aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
wiz
c053751628 compatibility, not compatiblity. 2003-01-06 13:26:24 +00:00
lukem
ab5d9d2b0c add RCSIDs 2001-11-13 07:24:43 +00:00
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
mycroft
d36067b120 Forcibly NUL-terminate the path name, just to be sure. 1998-02-24 07:14:17 +00:00
cgd
819d730e25 s/of_nodename/of_packagename/. Eventually, we'll probably want something
similar for instances.
1998-02-03 16:58:25 +00:00
cgd
5169537359 add of_nodename(), a function to stuff the last component of a node's
name into a caller-provided buffer (helpful for generating
autoconfiguration output).  Also, other minor cleanup.
1998-02-02 21:56:16 +00:00
cgd
b4026f2974 clean up comments and includes. add an of_compatible() function
which checks for the presence of any of a set of caller-provided
strings in a node's "compatible" property (the _right_ way to
determine driver compatibility).
1998-01-28 00:01:01 +00:00
cgd
cf90ace319 new file containing common OFW-related routines. Right now just contains
of_decode_int(), a function which decodes OFW integer properties.
1998-01-26 21:48:40 +00:00