From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu8aG-0002YT-ML for qemu-devel@nongnu.org; Thu, 27 Nov 2014 18:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xu8aA-0003iG-Hd for qemu-devel@nongnu.org; Thu, 27 Nov 2014 18:34:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu8aA-0003i3-9L for qemu-devel@nongnu.org; Thu, 27 Nov 2014 18:34:42 -0500 Message-ID: <5477B503.7060001@redhat.com> Date: Fri, 28 Nov 2014 00:34:27 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <5477B0FD.9040806@redhat.com> <1417130307-17714-1-git-send-email-lersek@redhat.com> <1417130307-17714-3-git-send-email-lersek@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [qemu PATCH 2/2] arm: add fw_cfg to "virt" board List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Andrew Jones , Ard Biesheuvel , "Michael S. Tsirkin" , "edk2-devel@lists.sourceforge.net" , QEMU Developers , Igor Mammedov On 11/28/14 00:28, Peter Maydell wrote: > On 27 November 2014 at 23:18, Laszlo Ersek wrote: >> fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c, >> ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt" >> board. >> >> The mmio register block of fw_cfg is advertized in the device tree. As >> base address we pick 0x09020000, which conforms to the comment preceding >> "a15memmap": it falls in the miscellaneous device I/O range 128MB..256MB, >> and it is aligned at 64KB. > >> + nodename = g_strdup_printf("/fw-cfg@%" PRIx64, base); >> + qemu_fdt_add_subnode(vbi->fdt, nodename); >> + qemu_fdt_setprop_string(vbi->fdt, nodename, >> + "compatible", "fw-cfg,mmio"); >> + qemu_fdt_setprop_sized_cells(vbi->fdt, nodename, "reg", >> + 2, base, 2, FW_CFG_SIZE, >> + 2, base + FW_CFG_SIZE, 2, FW_CFG_DATA_SIZE); >> + g_free(nodename); > > Are you planning to submit this DT binding to the kernel folks > as a proper official one (ie documented)? I know the kernel > doesn't need to read/write it, but the kernel doc tree is > AFAIK the only place that's actually documenting ARM DT > bindings right now... Thanks for the hint, I was actually wondering if some official registry existed for the node names and types. So yeah I'll attempt to get it in there. (Once I find the docs in question in the kernel :)) Thanks! Laszlo