On 18 May 2012 00:58, Peter Chubb <email address hidden> wrote:
>>>>>> "Peter" == Peter Maydell <email address hidden> writes:
>
> Peter> You can't use '-device' to try to change the properties for an
> Peter> existing device on the board. '-device' always creates a new
> Peter> device, so it only really makes sense for pluggable buses like
> Peter> USB/PCI. You might try playing with the '-global' option which
> Peter> lets you set properties on existing devices.
>
> Hmmm. According to docs/qdev-device-use.txt the old, relatively
> simple,
>
> -serial tcp:127.0.0.1:4444,server
>
> (which works for uart3, but not for any of the other uarts) should be
> replaced with the more clumsy-to-type:
>
> -chardev socket,host=127.0.0.1,port=4444,server,id=sock3
> -device omap_uart,id=uart3,chardev=sock3
>
> If this is wrong, then it should be updated.
The qdev documentation tends to assume pluggable devices,
like isa-serial. Trying to fiddle with the builtin devices
is not so well tested and documented, I'm afraid.
> I can't see how to use -global to achieve this. It adds global
> properties, not per-instance properties.
In that case I'm out of ideas; I suggest you find an equivalent
case that uses one of the standard models in qemu upstream as
an example, and ask on qemu-devel...
> You could patch beagle.c which would at least enable multiple -serial
> options.
>
> diff --git a/hw/beagle.c b/hw/beagle.c
> index 01d665a..b0d2cd6 100644
> --- a/hw/beagle.c
> +++ b/hw/beagle.c
> @@ -71,7 +71,7 @@ static void beagle_common_init(ram_addr_t ram_size,
> #error MAX_SERIAL_PORTS must be at least 1!
> #endif
> s->cpu = omap3_mpu_init(sysmem, cpu_model, ram_size,
> - NULL, NULL, serial_hds[0], NULL);
> + serial_hds[2], serial_hds[1], serial_hds[0], NULL);
>
> s->nand = nand_init(dmtd ? dmtd->bdrv : NULL, NAND_MFR_MICRON, 0xba);
> nand_setpins(s->nand, 0, 0, 0, 1, 0); /* no write-protect */
Does a beagle actually physically have more than one serial port?
On 18 May 2012 00:58, Peter Chubb <email address hidden> wrote: device- use.txt the old, relatively 0.0.1:4444, server host=127. 0.0.1,port= 4444,server, id=sock3 id=uart3, chardev= sock3
>>>>>> "Peter" == Peter Maydell <email address hidden> writes:
>
> Peter> You can't use '-device' to try to change the properties for an
> Peter> existing device on the board. '-device' always creates a new
> Peter> device, so it only really makes sense for pluggable buses like
> Peter> USB/PCI. You might try playing with the '-global' option which
> Peter> lets you set properties on existing devices.
>
> Hmmm. According to docs/qdev-
> simple,
>
> -serial tcp:127.
>
> (which works for uart3, but not for any of the other uarts) should be
> replaced with the more clumsy-to-type:
>
> -chardev socket,
> -device omap_uart,
>
> If this is wrong, then it should be updated.
The qdev documentation tends to assume pluggable devices,
like isa-serial. Trying to fiddle with the builtin devices
is not so well tested and documented, I'm afraid.
> I can't see how to use -global to achieve this. It adds global
> properties, not per-instance properties.
In that case I'm out of ideas; I suggest you find an equivalent
case that uses one of the standard models in qemu upstream as
an example, and ask on qemu-devel...
> You could patch beagle.c which would at least enable multiple -serial common_ init(ram_ addr_t ram_size, init(sysmem, cpu_model, ram_size, s->nand, 0, 0, 0, 1, 0); /* no write-protect */
> options.
>
> diff --git a/hw/beagle.c b/hw/beagle.c
> index 01d665a..b0d2cd6 100644
> --- a/hw/beagle.c
> +++ b/hw/beagle.c
> @@ -71,7 +71,7 @@ static void beagle_
> #error MAX_SERIAL_PORTS must be at least 1!
> #endif
> s->cpu = omap3_mpu_
> - NULL, NULL, serial_hds[0], NULL);
> + serial_hds[2], serial_hds[1], serial_hds[0], NULL);
>
> s->nand = nand_init(dmtd ? dmtd->bdrv : NULL, NAND_MFR_MICRON, 0xba);
> nand_setpins(
Does a beagle actually physically have more than one serial port?