From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK9lP-0001qr-Q5 for qemu-devel@nongnu.org; Thu, 12 Sep 2013 12:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK9lJ-0006Rc-7W for qemu-devel@nongnu.org; Thu, 12 Sep 2013 12:29:03 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:34390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK9lJ-0006RJ-1N for qemu-devel@nongnu.org; Thu, 12 Sep 2013 12:28:57 -0400 Received: by mail-pd0-f170.google.com with SMTP id x10so28160pdj.29 for ; Thu, 12 Sep 2013 09:28:55 -0700 (PDT) Date: Thu, 12 Sep 2013 09:29:05 -0700 From: Christoffer Dall Message-ID: <20130912162905.GR9860@cbox> References: <1378981073-9989-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1378981073-9989-1-git-send-email-peter.maydell@linaro.org> Subject: Re: [Qemu-devel] [PATCH v7 0/3] hw/arm: Add 'virt' platform List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: patches@linaro.org, qemu-devel@nongnu.org, kvmarm@lists.cs.columbia.edu On Thu, Sep 12, 2013 at 11:17:50AM +0100, Peter Maydell wrote: > This patch series adds a 'virt' platform which uses the > kernel's mach-virt (fully device-tree driven) support > to create a simple minimalist platform intended for > use for KVM VM guests. looks good to me. fwiw Reviewed-by: Chritoffer Dall > > The major change here is that I've added a PL011 UART. > > Sample command line: > > qemu-system-arm -machine type=virt -display none \ > -kernel zImage \ > -append 'root=/dev/vda rw console=ttyAMA0 rootwait' > -cpu cortex-a15 \ > -device virtio-blk-device,drive=foo \ > -drive if=none,file=arm-wheezy.img,id=foo \ > -m 2048 -serial stdio > > Note that there is no earlyprintk via the PL011 because > there's no defined device tree binding for "hey, here > is your earlyprintk UART". > > > *** NOTE *** to get the PL011 to work you'll need to > tweak the kernel a bit: > > diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c > index b184e57..2b6aceb 100644 > --- a/arch/arm/mach-virt/virt.c > +++ b/arch/arm/mach-virt/virt.c > @@ -21,11 +21,13 @@ > #include > #include > #include > +#include > > #include > > static void __init virt_init(void) > { > + of_clk_init(NULL); > of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); > } > > > Otherwise the kernel doesn't ever add the clock to its > list, and then it refuses to probe for the PL011. > (I'm told this isn't really the right fix, though, and > ideally the call should be done in some generic location > rather than in every machine's init function.) > > The alternative would be for the kernel to be fixed to > follow its own device tree binding documentation and not > require clocks/clock-names properties on the pl011 node. Is anyone taking a look at a proper fix as far as you know? -Christoffer