From patchwork Thu Feb 9 06:11:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 140317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C0FC2B6EE7 for ; Thu, 9 Feb 2012 17:11:45 +1100 (EST) Received: from localhost ([::1]:50231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvNEK-0000Oc-DZ for incoming@patchwork.ozlabs.org; Thu, 09 Feb 2012 01:11:40 -0500 Received: from eggs.gnu.org ([140.186.70.92]:56428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvNED-0000K5-Ut for qemu-devel@nongnu.org; Thu, 09 Feb 2012 01:11:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvNEB-0000TC-W4 for qemu-devel@nongnu.org; Thu, 09 Feb 2012 01:11:33 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:44560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvNEB-0000Sj-Om for qemu-devel@nongnu.org; Thu, 09 Feb 2012 01:11:31 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RvNDw-00006C-Dc; Thu, 09 Feb 2012 06:11:16 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 9 Feb 2012 06:11:16 +0000 Message-Id: <1328767876-357-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: pbonzini@redhat.com, Anthony Liguori , Dmitry Solodkiy , Evgeny Voevodin , patches@linaro.org Subject: [Qemu-devel] [PATCH] ARM devboards: Set arm_sysctl properties before init, not after X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property before device init where it should be done instead. Signed-off-by: Peter Maydell Reviewed-by: Paolo Bonzini --- If somebody would like to commit this simple patch quickly that would probably be a good idea since these models are otherwise totally broken... hw/realview.c | 2 +- hw/versatilepb.c | 2 +- hw/vexpress.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/realview.c b/hw/realview.c index 821e627..8b0b03d 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -217,8 +217,8 @@ static void realview_init(ram_addr_t ram_size, sys_id = is_pb ? 0x01780500 : 0xc1400400; sysctl = qdev_create(NULL, "realview_sysctl"); qdev_prop_set_uint32(sysctl, "sys_id", sys_id); - qdev_init_nofail(sysctl); qdev_prop_set_uint32(sysctl, "proc_id", proc_id); + qdev_init_nofail(sysctl); sysbus_mmio_map(sysbus_from_qdev(sysctl), 0, 0x10000000); if (is_mpcore) { diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 6e28e78..6ea0ce5 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -198,8 +198,8 @@ static void versatile_init(ram_addr_t ram_size, sysctl = qdev_create(NULL, "realview_sysctl"); qdev_prop_set_uint32(sysctl, "sys_id", 0x41007004); - qdev_init_nofail(sysctl); qdev_prop_set_uint32(sysctl, "proc_id", 0x02000000); + qdev_init_nofail(sysctl); sysbus_mmio_map(sysbus_from_qdev(sysctl), 0, 0x10000000); cpu_pic = arm_pic_init_cpu(env); diff --git a/hw/vexpress.c b/hw/vexpress.c index 64fab45..43f47a6 100644 --- a/hw/vexpress.c +++ b/hw/vexpress.c @@ -123,8 +123,8 @@ static void vexpress_a9_init(ram_addr_t ram_size, /* 0x10000000 System registers */ sysctl = qdev_create(NULL, "realview_sysctl"); qdev_prop_set_uint32(sysctl, "sys_id", sys_id); - qdev_init_nofail(sysctl); qdev_prop_set_uint32(sysctl, "proc_id", proc_id); + qdev_init_nofail(sysctl); sysbus_mmio_map(sysbus_from_qdev(sysctl), 0, 0x10000000); /* 0x10001000 SP810 system control */