From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9MhR-0002xc-LU for qemu-devel@nongnu.org; Wed, 16 Dec 2015 19:45:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9MhQ-0007qh-TF for qemu-devel@nongnu.org; Wed, 16 Dec 2015 19:45:41 -0500 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:34378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9MhQ-0007qX-P9 for qemu-devel@nongnu.org; Wed, 16 Dec 2015 19:45:40 -0500 Received: by mail-oi0-x22b.google.com with SMTP id o124so34408602oia.1 for ; Wed, 16 Dec 2015 16:45:40 -0800 (PST) MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: <5671F2A1.6060005@redhat.com> References: <0209faa3788f57deeb3ce4a197019b095bc2c05f.1450300479.git.alistair.francis@xilinx.com> <5671F2A1.6060005@redhat.com> From: Alistair Francis Date: Wed, 16 Dec 2015 16:45:10 -0800 Message-ID: Content-Type: text/plain; charset=UTF-8 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: Paolo Bonzini Cc: Peter Maydell , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Alistair Francis On Wed, Dec 16, 2015 at 3:24 PM, Paolo Bonzini wrote: > > > 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? Not that I know of. That doesn't work for me. > > In any case, I would prefer qdev_bus_rename to stay in xlnx-zynqmp.c. That's fine with me. Thanks, Alistair > > Paolo >