From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRwzX-0007dJ-Pu for qemu-devel@nongnu.org; Fri, 17 Jul 2009 19:37:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRwzS-0007d7-DP for qemu-devel@nongnu.org; Fri, 17 Jul 2009 19:37:26 -0400 Received: from [199.232.76.173] (port=39124 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRwzS-0007d4-8A for qemu-devel@nongnu.org; Fri, 17 Jul 2009 19:37:22 -0400 Received: from mx20.gnu.org ([199.232.41.8]:39382) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRwzR-0000H9-Uz for qemu-devel@nongnu.org; Fri, 17 Jul 2009 19:37:22 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRwzQ-0006Tq-Rt for qemu-devel@nongnu.org; Fri, 17 Jul 2009 19:37:21 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: [Qemu-commits] [COMMIT e813376] Sparc32: fix fdc io_base Date: Sat, 18 Jul 2009 00:37:17 +0100 References: <200907171104.n6HB4EDY011438@d01av04.pok.ibm.com> <200907171558.32607.paul@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907180037.17890.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl > > The qdev support for this device is almost completely bogus. > >... > > The mem_mapped property is also fairly suspect. We almost certainly want > > two different devices. On SysBus device a MMIO region, and the other an > > ISA device (using IO ports) - Note that qdev ISA bus support does not > > exist yet. > > How about this cleanup? It's a start. However the init code is still backwards. For example: >@@ -1944,6 +1937,7 @@ fdctrl_t *sun4m_fdctrl_init > fdctrl = FROM_SYSBUS(fdctrl_t, s); >+ fdctrl->sun4m = 1; > fdctrl_init_common(fdctrl, -1, io_base, fds); This code should be in sun4m_fdc_init1. sun4m_fdctrl_init should really live in sun4m.c, not fdc.c. This should make it clear whether you're honoring the abstraction boundaries. >+ .qdev.props = (Property[]) { > {/* end of properties */} > } It is not necessary to specify an empty property list. Paul