qdev: get_child_bus(): Use QOM lookup if available
qbus_realize() adds busses as a QOM child of the device in addition to adding it to the qdev bus list. Change get_child_bus() to use the QOM child if it is available. This takes priority over the bus-list, but the child object is checked for type correctness. This prepares support for aliasing of buses. The use case is SoCs, where a SoC container needs to present buses to the board level, but the buses are implemented by controller IP we already model as self contained qbus-containing devices. Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com> Acked-by: NAlistair Francis <alistair.francis@xilinx.com> Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Showing
想要评论请 注册 或 登录