On 10 February 2014 23:02, Rob Herring <robherri...@gmail.com> wrote: > From: Rob Herring <rob.herr...@linaro.org> > > Non-PCI AHCI support is broken due to assertion failures when trying > to convert AHCIState to a PCIDevice pointer as AHCIState can have > different container structs. Fix this by using the non-asserting object > cast and checking the returned pointer is not NULL. > > The AddressSpace pointer is also being initialized to NULL and causing > dma_memory_map call to fail. Fix this by initializing to > address_space_memory for sysbus instances. > > Also correct AHCI_VMSTATE to use the correct container SysbusAHCIState > for sysbus instances. > > Signed-off-by: Rob Herring <rob.herr...@linaro.org>
Andreas just confirmed on IRC that the cast syntax you've used is fine, so I'll take this into target-arm.next (since Highbank is the only user of sysbus-ahci). I expect to get this into rc1. Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM