From: Albert H. <alb...@ya...> - 2007-04-25 18:28:44
|
Rob Reilink <rob <at> reilink.net> writes: > I've picked up this excellent idea, and designed a schematic and PCB > for this USB host interface. [...] Nice to hear from you again, Rob. > Now the problem is, with both the MAX3421 and the ENC28J60, 0x0000 > means just 'read register 0', which could be anything (might be 0x00 > after reset?). Also, both these parts do not have a 'Request ID' > command, so there's no straight-forward way to probe them. So how do > we identify these parts? Or could there be an easy way for the user > to set the exi channel/device manually? Module parameters? What about > the ethernet controller that might be used to mount the root fs? The current EXI driver is able to handle both "normal" EXI devices (which can answer to an exi_get_id() command) and "custom" EXI devices, like MMC/SD cards, the future USB adapter and your new SPI-based ethernet interface. "Custom" EXI devices have to be registered with an EXI identifier of EXI_ID_NONE. They will be initially matched against channel/device only. The driver probe function is responsible for checking if the device is really a matching device, and in that case it returns 0. Look at the MMC/SD card driver for example. It probes if a MMC/SD card is available by trying the card initialization sequence. If it fails, it assumes no card is there and the driver forgets about the device. This could lead to problems in the future if a driver probe sequence for one device can destroy another one. But, for now I think we can go ahead with what we have. Cheers, Albert |