From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2yny-0008Jc-JI for qemu-devel@nongnu.org; Wed, 18 May 2016 06:34:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2ynu-0004VF-DH for qemu-devel@nongnu.org; Wed, 18 May 2016 06:34:17 -0400 Received: from m12-18.163.com ([220.181.12.18]:57990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2ynt-0004UZ-JG for qemu-devel@nongnu.org; Wed, 18 May 2016 06:34:14 -0400 References: <1463108878-15956-1-git-send-email-zxq_yx_007@163.com> <1463108878-15956-3-git-send-email-zxq_yx_007@163.com> <573B13D1.2070805@redhat.com> From: xiaoqiang zhao Message-ID: <573C4502.6050206@163.com> Date: Wed, 18 May 2016 18:33:38 +0800 MIME-Version: 1.0 In-Reply-To: <573B13D1.2070805@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 2/4] hw/char: QOM'ify etraxfs_ser.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, agraf@suse.de, michael@walle.cc, edgar.iglesias@gmail.com, cornelia.huck@de.ibm.com 在 2016年05月17日 20:51, Paolo Bonzini 写道: > I'm sorry, this is not enough. You need to learn how to test this > device. CRIS images are available athttp://wiki.qemu.org/Testing. > > You have not added a replacement for the call to > qemu_char_get_next_serial(). The board code in hw/cris/axis_dev88.c > needs to use qemu_char_get_next_serial(). > > I suggest creating a function like > > void etraxfs_ser_create(hwaddr addr, qemu_irq irq, > CharDriverState *chr) { > DeviceState *dev; > SysBusDevice *s; > qemu_irq irq; > > dev = qdev_create(NULL, "extrafs,serial"); > s = SYS_BUS_DEVICE(dev); > qdev_prop_set_chr(s, "chardev", chr); > qdev_init_nofail(dev); > sysbus_mmio_map(s, 0, addr); > sysbus_connect_irq(s, 0, irq); > } Oh, I see.