From patchwork Mon Dec 6 13:54:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 378242 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB6Dt4Wv005823 for ; Mon, 6 Dec 2010 13:55:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853Ab0LFNy7 (ORCPT ); Mon, 6 Dec 2010 08:54:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33858 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657Ab0LFNy4 (ORCPT ); Mon, 6 Dec 2010 08:54:56 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB6DsnZ1032043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Dec 2010 08:54:49 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oB6DsmKM031906; Mon, 6 Dec 2010 08:54:48 -0500 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id E36B418D39D; Mon, 6 Dec 2010 15:54:47 +0200 (IST) From: Gleb Natapov To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, blauwirbel@gmail.com, anthony@codemonkey.ws, kevin@koconnor.net Subject: [PATCHv7 02/16] Introduce new BusInfo callback get_fw_dev_path. Date: Mon, 6 Dec 2010 15:54:33 +0200 Message-Id: <1291643687-32232-3-git-send-email-gleb@redhat.com> In-Reply-To: <1291643687-32232-1-git-send-email-gleb@redhat.com> References: <1291643687-32232-1-git-send-email-gleb@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 06 Dec 2010 13:55:04 +0000 (UTC) diff --git a/hw/qdev.h b/hw/qdev.h index bc71110..f72fbde 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -49,6 +49,12 @@ struct DeviceState { typedef void (*bus_dev_printfn)(Monitor *mon, DeviceState *dev, int indent); typedef char *(*bus_get_dev_path)(DeviceState *dev); +/* + * This callback is used to create Open Firmware device path in accordance with + * OF spec http://forthworks.com/standards/of1275.pdf. Indicidual bus bindings + * can be found here http://playground.sun.com/1275/bindings/. + */ +typedef char *(*bus_get_fw_dev_path)(DeviceState *dev); typedef int (qbus_resetfn)(BusState *bus); struct BusInfo { @@ -56,6 +62,7 @@ struct BusInfo { size_t size; bus_dev_printfn print_dev; bus_get_dev_path get_dev_path; + bus_get_fw_dev_path get_fw_dev_path; qbus_resetfn *reset; Property *props; };