On Thu, Jun 28, 2012 at 11:05 PM, Andreas Färber <afaer...@suse.de> wrote: > Am 28.06.2012 03:08, schrieb Peter Crosthwaite: >> On Thu, Jun 28, 2012 at 9:06 AM, Alexander Graf <ag...@suse.de> wrote: >>> > [...] >>> [...] Why did commas in names work before, but now don't? Or put >>> differently: Was this change on purpose? > [...] >>>>>> --- >>>>>> hw/xilinx.h | 2 +- >>>>>> hw/xilinx_axidma.c | 4 ++-- >>>>>> 2 files changed, 3 insertions(+), 3 deletions(-) >>>>>> >>>>>> diff --git a/hw/xilinx.h b/hw/xilinx.h >>>>>> index 8f915b4..7df21eb 100644 >>>>>> --- a/hw/xilinx.h >>>>>> +++ b/hw/xilinx.h >>>>>> @@ -75,7 +75,7 @@ xilinx_axiethernetdma_create(void *dmach, >>>>>> { >>>>>> DeviceState *dev = NULL; >>>>>> >>>>>> - dev = qdev_create(NULL, "xilinx,axidma"); >>>>>> + dev = qdev_create(NULL, "xlnx.axi-dma"); >>> >>> comma -> dot >>> >>>>>> qdev_prop_set_uint32(dev, "freqhz", freqhz); >>>>>> qdev_prop_set_ptr(dev, "dmach", dmach); >>>>>> qdev_init_nofail(dev); >>>>>> diff --git a/hw/xilinx_axidma.c b/hw/xilinx_axidma.c >>>>>> index 59373b5..f4bec37 100644 >>>>>> --- a/hw/xilinx_axidma.c >>>>>> +++ b/hw/xilinx_axidma.c >>>>>> @@ -473,7 +473,7 @@ static int xilinx_axidma_init(SysBusDevice *dev) >>>>>> xlx_dma_connect_dma(s->dmach, s, axidma_push); >>>>>> >>>>>> memory_region_init_io(&s->iomem, &axidma_ops, s, >>>>>> - "axidma", R_MAX * 4 * 2); >>>>>> + "xlnx.axi-dma", R_MAX * 4 * 2); >>>>>> sysbus_init_mmio(dev, &s->iomem); >>>>>> >>>>>> for (i = 0; i < 2; i++) { >>>>>> @@ -502,7 +502,7 @@ static void axidma_class_init(ObjectClass *klass, >>>>>> void *data) >>>>>> } >>>>>> >>>>>> static TypeInfo axidma_info = { >>>>>> - .name = "xilinx,axidma", >>>>>> + .name = "xlnx.axi-dma", >>> >>> comma -> dot >>> >> >> The -device command line arg. E.G. qemu-system-microblaze -device >> xilinx.axidma,foo=bar, ... >> >> If I have ,'s in the device name i need to escape them as they are >> syntax in -device. > > QOM is perfectly capable of handling commas and SPARC uses "SUNW,", too. > Using QMP in the future (Markus' RFC) should not be a problem either. > > Do you really need to construct board-level devices using -device? > > Maybe you have a suggestion to fix the syntax escaping issue for > Anthony's suggested -object? Because a comma is rather common in OF/FDT.
Yeh, our names are OF/FDT based, which is where the commas come from. I got rid of the comma though as something of a take the most defensive approach and handle the rest in external tools. > > Adjusting device names to match what your Xilinx tool set uses sounds > very reasonable. But translating from "," to "." in two places does not > sound superior to translating from "," to ",," in one place to me? Maybe > I'm misunderstanding something? It might help to introduce QOM-style > TYPE_ constants, then the name is in a single location only. So does escaping ","s with -device work today? Regards, Peter > > Cheers, > Andreas > P.S. Egdar and Me are on opposite sides of the world (Sweden and Australia). > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg