From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6691 invoked by alias); 12 Feb 2009 14:27:27 -0000 Received: (qmail 6679 invoked by uid 22791); 12 Feb 2009 14:27:25 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from anchor-post-2.mail.demon.net (HELO anchor-post-2.mail.demon.net) (195.173.77.133) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Feb 2009 14:27:18 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-2.mail.demon.net with esmtp (Exim 4.69) id 1LXcX5-0006R4-lB; Thu, 12 Feb 2009 14:27:15 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 2A7B31386AA; Thu, 12 Feb 2009 14:27:14 +0000 (GMT) To: Andrew Lunn Cc: John Dallaway , ecos-maintainers@ecos.sourceware.org Subject: Re: AT91EB55 and DataFlash References: <4994113A.4040308@dallaway.org.uk> <20090212125602.GI24614@donkey.ma.tech.ascom.ch> <20090212134950.GL24614@donkey.ma.tech.ascom.ch> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Thu, 12 Feb 2009 14:27:00 -0000 In-Reply-To: <20090212134950.GL24614@donkey.ma.tech.ascom.ch> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact ecos-maintainers-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-maintainers-owner@ecos.sourceware.org X-SW-Source: 2009-02/txt/msg00018.txt.bz2 Andrew Lunn writes: > On Thu, Feb 12, 2009 at 01:56:02PM +0100, Andrew Lunn wrote: > > On Thu, Feb 12, 2009 at 12:08:26PM +0000, John Dallaway wrote: > > > eCos maintainers > > >=20 > > > Building RedBoot for the AT91EB55 target (eb55) is currently failing = due to: > > >=20 > > > a) CYGPKG_ERROR missing in the RedBoot .ecm files. It is required by > > > CYGPKG_DEVS_FLASH_ATMEL_DATAFLASH. > >=20 > > I think this is because of the inclusion of IO_SPI in all targets > > which have SPI. The dataflash CDL contains: > >=20 > > cdl_package CYGPKG_DEVS_FLASH_ATMEL_DATAFLASH { > > display "Atmel DataFlash parts support" > > description "Support for Atmel DataFlash" > > active_if CYGPKG_IO_SPI > > requires CYGPKG_ERROR=20=20=20=20 > >=20 > > I think just adding > >=20 > > active_if CYGPKG_IO_FLASH >=20 > Ah, not so easy afterall. From the Changelog: >=20 > 2005-06-29 Jani Monoses >=20 > * include/dataflash.h: Allow the package to be compiled without > io/flash. Return correct value from cyg_dataflash_get_page_count() >=20 > It looks like the requires statement is wrong, CYGPKG_ERROR is not > needed by dataflash. This fixes this problem, but it then explodes > later. >=20 > I think somebody from eCosCentric needs to look at this and compare > with there working code in their private branch. All of the redboot ECM files for our boards with dataflash contain CYGPKG_ERROR. CYGPKG_DEVS_FLASH_ATMEL_DATAFLASH does not, but the AT91 SPI driver needs it. So adding CYGPKG_ERROR to the ECM file seems the simplest option. There are also some link problems with the EB55 dataflash code. The following fixes all of this. I'll check it in with suitable ChangeLogs: Index: devs/flash/arm/eb55/current/src/eb55_flash.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/ecos/ecos/packages/devs/flash/arm/eb55/current/src/eb55_flas= h.c,v retrieving revision 1.4 diff -u -5 -r1.4 eb55_flash.c --- devs/flash/arm/eb55/current/src/eb55_flash.c 29 Jan 2009 17:48:21 -0000= 1.4 +++ devs/flash/arm/eb55/current/src/eb55_flash.c 12 Feb 2009 14:24:12 -0000 @@ -72,11 +72,11 @@ #include =20 __externC cyg_spi_at91_device_t spi_dataflash_dev0; =20 CYG_DATAFLASH_FLASH_DRIVER( cyg_eb55_dataflash, - cyg_spi_dataflash_dev0, + &spi_dataflash_dev0, 0x08000000, 0, 16 ); =20 #endif Index: devs/spi/arm/eb55/current/src/spi_eb55.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/ecos/ecos/packages/devs/spi/arm/eb55/current/src/spi_eb55.c,v retrieving revision 1.2 diff -u -5 -r1.2 spi_eb55.c --- devs/spi/arm/eb55/current/src/spi_eb55.c 29 Jan 2009 17:48:45 -0000 1.2 +++ devs/spi/arm/eb55/current/src/spi_eb55.c 12 Feb 2009 14:24:12 -0000 @@ -55,11 +55,11 @@ =20 // -----------------------------------------------------------------------= -- // AT91EB55 SPI exported devices=20 =20 // AT45DB321B DataFlash -static cyg_spi_at91_device_t spi_dataflash_dev0 CYG_SPI_DEVICE_ON_BUS(0) = =3D=20 +cyg_spi_at91_device_t spi_dataflash_dev0 CYG_SPI_DEVICE_ON_BUS(0) =3D=20 { .spi_device.spi_bus =3D &cyg_spi_at91_bus.spi_bus, =20 .dev_num =3D 0, // Device number .cl_pol =3D 1, // Clock polarity (0 or 1) @@ -68,9 +68,7 @@ .cs_up_udly =3D 1, // Delay in usec between CS up and transfer = start .cs_dw_udly =3D 1, // Delay in usec between transfer end and CS= down .tr_bt_udly =3D 1 // Delay in usec between two transfers }; =20 -cyg_spi_device *cyg_spi_dataflash_dev0 =3D &spi_dataflash_dev0.spi_device; - // -----------------------------------------------------------------------= -- // EOF spi_eb55.c Index: hal/arm/at91/eb55/current/misc/redboot_RAM.ecm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/misc/redboot_RA= M.ecm,v retrieving revision 1.1 diff -u -5 -r1.1 redboot_RAM.ecm --- hal/arm/at91/eb55/current/misc/redboot_RAM.ecm 13 May 2003 18:27:59 -00= 00 1.1 +++ hal/arm/at91/eb55/current/misc/redboot_RAM.ecm 12 Feb 2009 14:24:13 -00= 00 @@ -7,10 +7,11 @@ cdl_savefile_command cdl_option { value_source user_value wizard_value inf= erred_value }; cdl_savefile_command cdl_interface { value_source user_value wizard_value = inferred_value }; =20 cdl_configuration eCos { package CYGPKG_IO_FLASH current ; + package CYGPKG_ERROR current ; }; =20 cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { user_value 6144 }; Index: hal/arm/at91/eb55/current/misc/redboot_ROM.ecm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/eb55/current/misc/redboot_RO= M.ecm,v retrieving revision 1.1 diff -u -5 -r1.1 redboot_ROM.ecm --- hal/arm/at91/eb55/current/misc/redboot_ROM.ecm 13 May 2003 18:27:59 -00= 00 1.1 +++ hal/arm/at91/eb55/current/misc/redboot_ROM.ecm 12 Feb 2009 14:24:13 -00= 00 @@ -7,10 +7,11 @@ cdl_savefile_command cdl_option { value_source user_value wizard_value inf= erred_value }; cdl_savefile_command cdl_interface { value_source user_value wizard_value = inferred_value }; =20 cdl_configuration eCos { package CYGPKG_IO_FLASH current ; + package CYGPKG_ERROR current ; }; =20 cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { user_value 6144 }; --=20 Nick Garnett eCos Kernel Architect eCosCentric Limited http://www.eCosCentric.com The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No: 4422071 Besuchen Sie uns vom 3.-5.03.09 auf der Embedded World 2009, Stand 11-300 Visit us at Embedded World 2009, N=C3=BCrnberg, Germany, 3-5 Mar, Stand 11-= 300