On 13/03/20 23:16, BALATON Zoltan wrote: >> >> + pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide"); >> + pci_ide_create_devs(pci_dev); > > Additionally, I think it may also make sense to move pci_ide_create_devs > call into the realize methods of these IDE controllers so boards do not > need to do it explicitely. These calls always follow the creation of the > device immediately so could just be done internally in IDE device and > simplify it further. I can attempt to prepare additional patches for > that but first I'd like to hear if anyone has anything against that to > avoid doing useless work.
No, it's better to do it separately. I think that otherwise you could add another IDE controller with -device, and both controllers would try to add the drives. Basically, separating the call means that only automatically added controllers obey "if=ide". Paolo
