From patchwork Mon Jul 7 07:08:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 33134 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 99EF520C88 for ; Mon, 7 Jul 2014 07:12:11 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf25615372oag.9 for ; Mon, 07 Jul 2014 00:12:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=YjXtJ8nvoL2xGsfPoE3Mjtbh1WixCP+ddX/XoSLEuQs=; b=ZMdt8pgRPRbueSSu+vVkTbpcmaYCoUccSwv0t/GzuLzQ6NMMZqpdpKeVLo/ZjDLXGm AfoyILvWx/B+Coyy2x4H0VxNCeprdRf/P0c3YOLeA+ftM54nRkKsfBljSy8ZRV1YU5ga tb1sRujC2QCa7ZeqaoW5mF+aYtBOQ8yzKdTGo6rS7qgiL0OPMkzIWA+vPQRm6Eh3Cf55 VC53erkS6LzYEg0nZ/FFLv59R/jrO4QWr5sH/BpfqIe0/VSMykvWlnMRq6uFv8sld14K Y3acjpRj4SIejSn5ygW+NirT8MtCZHPIDkLCLpzWZwIfOxROYzfAaAPf/YXJrtORboso IqBQ== X-Gm-Message-State: ALoCoQnJj1uyOkMPkeK4AkQ9VjePRjS3b7PWFBr7m2kjzBAUXqMeaynLjDeZ0VI333PuRNq3rTMy X-Received: by 10.50.126.100 with SMTP id mx4mr25151754igb.6.1404717131234; Mon, 07 Jul 2014 00:12:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.165 with SMTP id 34ls1625466qgl.1.gmail; Mon, 07 Jul 2014 00:12:11 -0700 (PDT) X-Received: by 10.52.0.177 with SMTP id 17mr21789709vdf.12.1404717131165; Mon, 07 Jul 2014 00:12:11 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id ql15si15504126vdb.31.2014.07.07.00.12.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Jul 2014 00:12:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id lf12so3477469vcb.4 for ; Mon, 07 Jul 2014 00:12:11 -0700 (PDT) X-Received: by 10.52.121.6 with SMTP id lg6mr1014549vdb.14.1404717131096; Mon, 07 Jul 2014 00:12:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp644890vcb; Mon, 7 Jul 2014 00:12:10 -0700 (PDT) X-Received: by 10.180.82.199 with SMTP id k7mr35545135wiy.34.1404717129965; Mon, 07 Jul 2014 00:12:09 -0700 (PDT) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by mx.google.com with ESMTPS id o2si48725020wje.108.2014.07.07.00.12.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Jul 2014 00:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.175 as permitted sender) client-ip=209.85.212.175; Received: by mail-wi0-f175.google.com with SMTP id r20so15375215wiv.8 for ; Mon, 07 Jul 2014 00:12:08 -0700 (PDT) X-Received: by 10.195.17.164 with SMTP id gf4mr30012313wjd.45.1404717128393; Mon, 07 Jul 2014 00:12:08 -0700 (PDT) Received: from midway01-04-00.lavalab ([88.98.47.97]) by mx.google.com with ESMTPSA id fb15sm111830218wid.23.2014.07.07.00.12.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Jul 2014 00:12:07 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, kim.phillips@freescale.com, a.rigo@virtualopensystems.com Cc: eric.auger@linaro.org, kvmarm@lists.cs.columbia.edu, alex.williamson@redhat.com, agraf@suse.de, peter.maydell@linaro.org, stuart.yoder@freescale.com, a.motakis@virtualopensystems.com, patches@linaro.org Subject: [PATCH 6/7] hw/misc/platform_devices: add call to sysbus fdt_add_node Date: Mon, 7 Jul 2014 08:08:11 +0100 Message-Id: <1404716892-15600-7-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1404716892-15600-1-git-send-email-eric.auger@linaro.org> References: <1404716892-15600-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Creation of the node in the device tree relies on the new sysbus fdt_add_node method. Signed-off-by: Eric Auger --- hw/misc/platform_devices.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/misc/platform_devices.c b/hw/misc/platform_devices.c index 96ab272..a054606 100644 --- a/hw/misc/platform_devices.c +++ b/hw/misc/platform_devices.c @@ -9,7 +9,8 @@ int sysbus_device_create_devtree(Object *obj, void *opaque) PlatformDevtreeData *data = opaque; Object *dev; SysBusDevice *sbdev; - bool matched = false; + SysBusDeviceClass *k; + dev = object_dynamic_cast(obj, TYPE_SYS_BUS_DEVICE); sbdev = (SysBusDevice *)dev; @@ -19,12 +20,8 @@ int sysbus_device_create_devtree(Object *obj, void *opaque) return object_child_foreach(obj, sysbus_device_create_devtree, data); } - if (!matched) { - error_report("Device %s is not supported by this machine yet.", - qdev_fw_name(DEVICE(dev))); - exit(1); - } - + k = SYS_BUS_DEVICE_GET_CLASS(dev); + k->fdt_add_node(sbdev, data); return 0; }