mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
dp8393x: replace PROP_PTR with PROP_LINK
Link property is the correct way to pass a MemoryRegion to a device for DMA purposes. Sidenote: as a sysbus device, this remains non-usercreatable even though we can drop the specific flag here. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Tested-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
3af6eb8f9b
commit
3110ce8192
3 changed files with 7 additions and 6 deletions
|
@ -175,7 +175,7 @@ typedef struct dp8393xState {
|
|||
int loopback_packet;
|
||||
|
||||
/* Memory access */
|
||||
void *dma_mr;
|
||||
MemoryRegion *dma_mr;
|
||||
AddressSpace as;
|
||||
} dp8393xState;
|
||||
|
||||
|
@ -948,7 +948,8 @@ static const VMStateDescription vmstate_dp8393x = {
|
|||
|
||||
static Property dp8393x_properties[] = {
|
||||
DEFINE_NIC_PROPERTIES(dp8393xState, conf),
|
||||
DEFINE_PROP_PTR("dma_mr", dp8393xState, dma_mr),
|
||||
DEFINE_PROP_LINK("dma_mr", dp8393xState, dma_mr,
|
||||
TYPE_MEMORY_REGION, MemoryRegion *),
|
||||
DEFINE_PROP_UINT8("it_shift", dp8393xState, it_shift, 0),
|
||||
DEFINE_PROP_BOOL("big_endian", dp8393xState, big_endian, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
|
@ -963,8 +964,6 @@ static void dp8393x_class_init(ObjectClass *klass, void *data)
|
|||
dc->reset = dp8393x_reset;
|
||||
dc->vmsd = &vmstate_dp8393x;
|
||||
dc->props = dp8393x_properties;
|
||||
/* Reason: dma_mr property can't be set */
|
||||
dc->user_creatable = false;
|
||||
}
|
||||
|
||||
static const TypeInfo dp8393x_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue