[ECOS] FW: Adding flash device using the flash v2 drivers

Alex Lindeijer Alex.L@3D-Perception.com
Mon Dec 22 23:38:00 GMT 2008


Hi
OK I get it. I can remove it from the python_flash.cdl, and than the
number is 1. That one looks then like this:
cdl_package CYGPKG_DEVS_FLASH_POWERPC_PYTHON {
    display       "A&M Python (MPC85xx) FLASH memory support"
    compile       python_flash.c
       
}
But should I remove it here the Am29xxxx_V2 driver are used indirectly
through the CYG_FLASH_DRIVER as defined in python_flash.c
In python_flash.c
#include "cyg/io/am29xxxxx_dev.h"

#ifdef CYGPKG_DEVS_FLASH_AMD_AM29XXXXX_V2

#include "cyg/io/flash.h"
#include "cyg/io/flash_dev.h"


static const CYG_FLASH_FUNS(hal_mw2_flash_amd_funs,
    cyg_am29xxxxx_init_cfi_16,
    cyg_flash_devfn_query_nop,
    cyg_am29xxxxx_erase_16,
    cyg_am29xxxxx_program_16,
    (int (*)(struct cyg_flash_dev*, const cyg_flashaddr_t, void*,
size_t))0,
    cyg_flash_devfn_lock_nop,
    cyg_flash_devfn_unlock_nop);

static cyg_am29xxxxx_dev hal_mw2_flash_priv= {
    .devid      = 0x45,
    .block_info = {
        { 0x00004000, 1 },
        { 0x00002000, 2 },
        { 0x00008000, 1 },
        { 0x00010000, 63 }
    }
};

CYG_FLASH_DRIVER(hal_mw2_flash,
                 &hal_mw2_flash_amd_funs,
                 0,
                 0xF0000000,
                 0xFFFFFFFF,
                 4,
                 hal_mw2_flash_priv.block_info,
                 &hal_mw2_flash_priv
);
#endif

Thanks for the swift answers
Alex Lindeijer
3D Perception - Senior System Designer



-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch] 
Sent: 23. desember 2008 00:00
To: Alex Lindeijer
Cc: ecos-discuss@sourceware.org
Subject: Re: [ECOS] FW: Adding flash device using the flash v2 drivers

On Mon, Dec 22, 2008 at 11:46:46PM +0100, Alex Lindeijer wrote:
> Hi again
> I'm still struggeling with the use of flash v2.
> In my install directory I see: #define CYGHWR_IO_FLASH_DEVICE 2 , i.e.
expects 2 devices. What is causing this define? My .ecc has an entry:
> 
> # >
> # Hardware FLASH device drivers
> # This calculated option gives the number of flash devices
> # on the current platform. The generic flash support requires
> # at least one device.
> #
> cdl_interface CYGHWR_IO_FLASH_DEVICE {
>     # Implemented by CYGPKG_DEVS_FLASH_POWERPC_PYTHON, active, enabled
>     # Implemented by CYGPKG_DEVS_FLASH_AMD_AM29XXXXX_V2, active,
enabled

These two statements are your clue. You have two device drivers
loaded, both which are implementing CYGHWR_IO_FLASH_DEVICE.

I'm guessing one of these should not have the implements statement in
its CDL, probably the PYTHON one wants to be removed. However since
the PYTHON driver is not in anonymous CVS i cannot say.

      Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list