Boot order
[email protected] (Peter Seebach) Sun, 19 Feb 2006 11:01:20 -0600
| Newsgroups | gmane.os.netbsd.devel.ports |
|---|---|
| Message-ID | <[email protected]> |
Okay, I think I understand config_defer. Here's the situation: I have to read configuration data from an EEPROM. The eeprom device probes fairly late. I need the data from it to configure two network cards, one of which probes fairly early. I can config_defer the network cards, to have them finish their configuration later. That's easy. Because the emac network card already has code to use the board_info stuff to get its address, it's even fairly clean. Here's the problem: I want to write a routine which, at some unspecified time after the EEPROM has been probed, reads some data from it. It seems insanely ugly to, for instance, simply tack this code onto the seeprom driver... But where else would I put it? What I ideally want is to have, perhaps in tams3011_machdep.c, a function that is registered to be called "after the XXX device probes, if one is found". Or perhaps there's another way to express this. My next option over, of course, is to just declare a global i2c_tag_t variable, have the seeprom driver store its i2c tag there when it's done attaching, and read it from the other driver... Ugly. -s