From owner-freebsd-arm@FreeBSD.ORG Tue Mar 24 14:43:52 2009 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB4B1065672; Tue, 24 Mar 2009 14:43:52 +0000 (UTC) (envelope-from imp@BSDIMP.COM) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4B9A08FC08; Tue, 24 Mar 2009 14:43:52 +0000 (UTC) (envelope-from imp@BSDIMP.COM) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n2OEfvSB092786; Tue, 24 Mar 2009 08:41:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 24 Mar 2009 08:42:33 -0600 (MDT) Message-Id: <20090324.084233.1626286031.imp@bsdimp.com> To: antab@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> References: <8BC7AFF2-E0E1-4498-82E8-29C3F64C5E2E@FreeBSD.org> <164b4c9c0903240210v4d05770du1f02de26f42f6454@mail.gmail.com> <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org Subject: Re: Atmel at91sam9261-ek support. X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 14:43:52 -0000 In message: <00675D70-A3F9-412F-BDB9-F9CF8C91D75A@freebsd.org> Arnar Mar Sig writes: : >>> As you can see in the diff I work for the moment on a : >>> define way to separate the two soc code that differ. But I : >>> think that in the future a .c for each soc should appear. : >> : >> What about using hints more for device wiring instead of .c code : >> like i did : >> for avr32? : >> : > : > Yes here we can use hints to factorise a lot of code like : > a big part of the code where the #ifdef AT91SAM9261 are. : > But like M. Warner Losh said I think that one needs a .c : > by SoC to put the cpu_devs structure, the pmap_devmap : > structure and the errata code. We need to put this in a specific : > files because these code are dependant of the SoC. : cpu_devs can be in hints, but i dont know about pmap_devmap. on avr32 : all devices registers can be addressed without mmu lookups. All of this hand wringing is because we've boguslly collapsed the core support, the SoC support and the board support into one file. We have to move away from that model and properly layer things to move forward. The means by which we load this or that thing isn't going to matter so much until we adopt this better structure. Warner