diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2007-11-21 06:20:49 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2007-11-21 06:20:49 +0000 |
commit | d2ff24c22d65f24163e9063c78896459384c5627 (patch) | |
tree | dfffba11bf10034e1bd9f9a79707b1bc33fb0d48 /cpukit/libi2c/README_libi2c | |
parent | 2007-11-20 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-d2ff24c22d65f24163e9063c78896459384c5627.tar.bz2 |
2007-11-17 Till Straumann <strauman@slac.stanford.edu>
* libi2c/libi2c.c, libi2c/libi2c.h, libi2c/README_libi2c:
Added checks so that use of 'stdio' is avoided (falling
back to 'printk') before the system is up.
Publish driver entry points so that the libi2c driver could
be added to the applications 'device driver table'.
This is not fully implemented yet, though, since in addition to
initializing libi2c the low-level i2c bus drivers as well
as high-level i2c device drivers need to be registered
with the library.
Updated README_libi2c accordingly.
Diffstat (limited to 'cpukit/libi2c/README_libi2c')
-rw-r--r-- | cpukit/libi2c/README_libi2c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cpukit/libi2c/README_libi2c b/cpukit/libi2c/README_libi2c index e28fe9c1f1..1dd48faede 100644 --- a/cpukit/libi2c/README_libi2c +++ b/cpukit/libi2c/README_libi2c @@ -109,6 +109,28 @@ Any subsequent call to this function will be silently ignored. Typically the BSP startup code will perform this initialization. +A proper place for initializing the i2c layer and populating it +with busses and device drivers (see 'Bus Registration' and +'Device/Driver Registration' below) is the 'predriver_hook' +where most facilities (such as malloc, libio) are already +available. Note, however, that 'stdio' is not yet functional +at this point and all i2c bus and device drivers should carefully +avoid using stdio so that other drivers which may build on top +of i2c devices may be initialized properly (this may happen +just after 'predriver_hook' when stdio is still not available). +E.g., drivers listed in the configuration table are initialized +during this step. + +Note that while 'libi2c' could be initialized from the rtems +configuration table like other drivers there is no easy +way of populating the i2c framework with bus- and device- +drivers at this point (unless a special 'i2c' configuration +table describing the bus layout is implemented in the future). + +For the time being, we must rely on the BSP (predriver_hook) +to initialize the i2c system if it is used by other drivers +(e.g., the RTC driver may have to use a i2c device). + =================== Bus Registration =================== |