From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5346 invoked by alias); 4 Nov 2008 18:57:15 -0000 Received: (qmail 5329 invoked by uid 22791); 4 Nov 2008 18:57:15 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Nov 2008 18:56:22 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 83EBC21800F; Tue, 4 Nov 2008 18:56:19 +0000 (GMT) X-Virus-Scanned: amavisd-new at ecoscentric.com Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H9teT3AFB9yD; Tue, 4 Nov 2008 18:56:18 +0000 (GMT) Received: from delenn.bartv.net (hagrid.vpn.ecoscentric.com [192.168.145.1]) by mail.ecoscentric.com (Postfix) with ESMTP id DBB2F21800C; Tue, 4 Nov 2008 18:56:17 +0000 (GMT) Date: Tue, 04 Nov 2008 18:57:00 -0000 Message-Id: From: Bart Veer To: munz@speag.ch CC: ecos-devel@sourceware.org In-reply-to: <4910602A.3090408@speag.ch> (munz@speag.ch) Subject: Re: What is the reason to... References: <4910602A.3090408@speag.ch> Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2008-11/txt/msg00001.txt.bz2 >>>>> "Oliver" == oliver munz @ s p e a g writes: Oliver> mark CYGPKG_IO_SPI as HARDWARE? Oliver> I think Generic SPI or I2C and so one should be loadable Oliver> whitout an template. Can we change this? The problem here is that other drivers such as the wallclock or dataflash are likely to depend on the SPI/I2C bus being available. On some platforms there may even be platform HAL dependencies on the bus. Now, by convention you can enable flash support on a given platform simply by e.g. "ecosconfig add flash" and everything sorts itself out. If the SPI or I2C bus driver was not automatically part of the configuration then that would stop working. If you want the SPI or I2C support to be automatically available when needed, working within the limitations of current CDL, then the generic SPI or I2C packages have to be part of the target definition in ecos.db. That means they have to be hardware packages. Also, in most cases the expectation is that the generic SPI and I2C packages will only be usable if the target definition also specifies a device driver appropriate for the hardware. So if you are adding SPI or I2C support to a target then you have to edit the ecos.db target entry anyway, and adding two packages instead of one is no big deal. Now, both the generic SPI and I2C packages have been carefully designed to ensure that they add zero overhead to the application if nothing actually uses the SPI or I2C bus. Any unused functionality gets eliminated at link-time by linker garbage collection. Hence the only real overhead is at build-time: ecosconfig or the configtool may take a little longer to run, and a couple more files get compiled. Neither is likely to be noticed by users unless they sit down with a stopwatch. Bart -- Bart Veer eCos Configuration Architect eCosCentric Limited The eCos experts http://www.ecoscentric.com/ Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071.