On Mon, 30 May 2022 at 10:50, Damien Hedde <damien.he...@greensocs.com> wrote: > TYPE_SYS_BUS_DEVICE also comes with reset support. > If a device is on not on any bus it is not reached by the root sysbus > reset which propagates to every device (and other sub-buses). > Even if we move all the mmio/sysbus-irq logic into TYPE_DEVICE, we will > still miss that. The bus is needed to handle the reset. > For devices created in machine init code, we have the option to do it in > the machine reset handler. But for user created device, this is an issue.
Yes, the missing reset support in TYPE_DEVICE is a design flaw that we really should try to address. > If we end up putting in TYPE_DEVICE support for mmios, interrupts and > some way to do the bus reset. What would be the difference between the > current TYPE_SYS_BUS_DEVICE ? There would be none, and the idea would be to get rid of TYPE_SYS_BUS_DEVICE entirely... -- PMM