From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9LQn-0006jT-8V for qemu-devel@nongnu.org; Wed, 16 Dec 2015 18:24:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9LQj-0006Wy-WD for qemu-devel@nongnu.org; Wed, 16 Dec 2015 18:24:25 -0500 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:34812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9LQj-0006Wi-OZ for qemu-devel@nongnu.org; Wed, 16 Dec 2015 18:24:21 -0500 Received: by mail-lf0-x236.google.com with SMTP id y184so40393176lfc.1 for ; Wed, 16 Dec 2015 15:24:21 -0800 (PST) Sender: Paolo Bonzini References: <0209faa3788f57deeb3ce4a197019b095bc2c05f.1450300479.git.alistair.francis@xilinx.com> From: Paolo Bonzini Message-ID: <5671F2A1.6060005@redhat.com> Date: Thu, 17 Dec 2015 00:24:17 +0100 MIME-Version: 1.0 In-Reply-To: <0209faa3788f57deeb3ce4a197019b095bc2c05f.1450300479.git.alistair.francis@xilinx.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, crosthwaitepeter@gmail.com On 16/12/2015 22:45, Alistair Francis wrote: > + > + /* 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); > + qdev_bus_rename(spi_bus, bus_name); > + > + /* Add the SPI buses to the SoC child bus */ > + /* FIXME: This causes the later buses to be duplicated in > + * the SPI devices printout when running qtre. > + */ > + QLIST_INSERT_HEAD(&dev->child_bus, spi_bus, sibling); Isn't the SPI bus accessible with something similar to spi[0-5]/spi0, even without this hack? In any case, I would prefer qdev_bus_rename to stay in xlnx-zynqmp.c. Paolo