From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49094 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBWdg-0001sr-Ls for qemu-devel@nongnu.org; Mon, 10 May 2010 13:19:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBWda-0005CQ-0R for qemu-devel@nongnu.org; Mon, 10 May 2010 13:19:32 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:52409) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBWdZ-0005Bz-Ie for qemu-devel@nongnu.org; Mon, 10 May 2010 13:19:25 -0400 Message-ID: <4BE84019.4080300@mail.berlios.de> Date: Mon, 10 May 2010 19:19:21 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC][MIPS][PATCH 1/6] Initial support of bonito north bridge used by fulong mini pc References: <4BE68342.2020202@mail.berlios.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: chen huacai Cc: qemu-devel@nongnu.org, aurelien@aurel32.net Am 10.05.2010 13:21, schrieb chen huacai: >>> --- a/hw/mips.h >>> +++ b/hw/mips.h >>> @@ -5,6 +5,9 @@ >>> /* gt64xxx.c */ >>> PCIBus *pci_gt64120_init(qemu_irq *pic); >>> >>> +/* bonito.c */ >>> +PCIBus *bonito_init_2e(qemu_irq pic); >>> + >>> /* ds1225y.c */ >>> void *ds1225y_init(target_phys_addr_t mem_base, const char *filename); >>> void ds1225y_set_protection(void *opaque, int protection); >>> ----- >>> >> >> Please see my annotations above. >> >> Kind regards, >> Stefan Weil >> > > Hi, Stefan, do you means that I should do something like this? > > #ifdef CONFIG_FULONG > /* bonito.c */ > PCIBus *bonito_init_2e(qemu_irq pic); > #endif You don't need CONFIG_FULONG here, because you may declare bonito_init_2e even if it not used. By the way: why is it called bonito_init_2e (and not bonito_2e_init)? > > I found that even if I put CONFIG_FULONG=y in > default-configs/mips64el-softmmu.mak, CONFIG_FULONG will not get > defined in config-target.h. > Because CONFIG_FULONG=y will appear config-device.mak, but not > config-target.mak. > Could you please give me some suggestions? CONFIG_FULONG is only used in Makefile.target for the object files which are only needed for fulong. You could also use a CONFIG_XXX for each individual device XXX, for example CONFIG_VT82C686=y (indefault-configs/mips64el-softmmu.mak) obj-mips-$(CONFIG_VT82C686) += vt82c686.o (in Makefile.target) CONFIG_FULONG is not used in your source code, so it is not needed in config-target.h. Kind regards, Stefan Weil