[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/5] xlnx-zynqmp: Connect the SPI devices
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/5] xlnx-zynqmp: Connect the SPI devices |
Date: |
Tue, 15 Dec 2015 18:46:06 +0000 |
On 23 November 2015 at 08:54, Alistair Francis
<address@hidden> wrote:
> Connect the Xilinx SPI devices to the ZynqMP model.
>
> Signed-off-by: Alistair Francis <address@hidden>
> + /* Rename each SPI bus after the SPI device to allow the board
> + * to access all of the busses from the SoC.
> + */
> + spi_bus = qdev_get_child_bus(DEVICE(&s->spi[i]), "spi0");
> + snprintf(bus_name, 6, "spi%d", i);
> + memcpy((char *) spi_bus->name, bus_name, 6 * sizeof(char));
This looks very dubious. If we need to be able to rename buses
can we provide a proper API to do it please, rather than just
memcpying into the name field?
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v4 4/5] xlnx-zynqmp: Connect the SPI devices,
Peter Maydell <=