This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: support for AM29LV256M flash device
On Fri, 2005-02-25 at 15:25 +0100, Manfred Gruber wrote:
> Hi !
>
> ----------- > I added this to flash_amd_am29xxxxx.cdl
>
> cdl_option CYGHWR_DEVS_FLASH_AMD_AM29LV256M {
> display "AMD AM29LV256M flash memory support"
> default_value 0
> implements CYGINT_DEVS_FLASH_AMD_VARIANTS
> description "
> When this option is enabled, the AMD flash driver will be
> able to recognize and handle the AM29LV256M
> part in the family."
> }
>
> ----------- > I added this to flash_am29xxxxx_parts.inl 16 bit devices
>
> #ifdef CYGHWR_DEVS_FLASH_AMD_AM29LV256M
> { // AM29LV256M
> device_id : FLASHWORD(0x227E),
> block_size : 0x10000 * CYGNUM_FLASH_INTERLEAVE,
> block_count: 512,
> device_size: 0x2000000 * CYGNUM_FLASH_INTERLEAVE,
> base_mask : ~(0x2000000 * CYGNUM_FLASH_INTERLEAVE - 1),
> bootblock : false,
> banked : false
> },
> #endif
You probably need a little more than this if you want to reliably
recognize multiple parts as a number of devices have the first ID of
0x227E. Something like this:
long_device_id: true,
device_id : FLASHWORD(0x227e),
device_id2 : FLASHWORD(0x2212),
device_id3 : FLASHWORD(0x2201),
> ----------- >I changed pkgconf(.ldi and .h) things to match my flash.
>
> ----------- > Added a file arm_micro9_flash.c, for defines. (MICRO9 is my
> custom board).
>
> //==========================================================================
> //
> // arm_micro9_flash.c
> //
> // Flash programming for AMD Flash devices on
> // CONTEC hypercontrol MICRO9
> //
> //--------------------------------------------------------------------------
> // Device properties
>
> #define CYGNUM_FLASH_INTERLEAVE (2)
> #define CYGNUM_FLASH_SERIES (1)
> #define CYGNUM_FLASH_WIDTH (16)
> #define CYGNUM_FLASH_BASE (0x10000000u)
>
> //--------------------------------------------------------------------------
> // Platform specific extras
>
> //--------------------------------------------------------------------------
> #include <cyg/infra/diag.h> // diag_printf
> // Now include the driver code.
> #include "cyg/io/flash_am29xxxxx.inl"
>
> ----------- >Added a cdl script for my platform:
> #====================================================================
> #
> # flash_micro9.cdl
> #
> # FLASH memory - Hardware support on MICRO9
> #
> #====================================================================
>
> cdl_package CYGPKG_DEVS_FLASH_MICRO9 {
> display "MICRO 9 FLASH memory support"
> description "FLASH memory device support for MICRO9"
>
> parent CYGPKG_IO_FLASH
> active_if CYGPKG_IO_FLASH
> requires CYGPKG_HAL_ARM_ARM9_EP93XX
>
> implements CYGHWR_IO_FLASH_DEVICE
> compile arm_micro9_flash.c
>
> implements CYGINT_DEVS_FLASH_AMD_AM29XXXXX_REQUIRED
>
> # Arguably this should do in the generic package
> # but then there is a logic loop so you can never enable it.
> cdl_interface CYGINT_DEVS_FLASH_AMD_AM29XXXXX_REQUIRED {
> display "Generic AMD FlashFile driver required"
> }
>
> # requires CYGINT_DEVS_FLASH_AMD_VARIANTS
> requires CYGHWR_DEVS_FLASH_AMD_AM29LV256M
> }
>
> ----------- > And I changed cdl script for my custom board that
> CYGPKG_DEVS_FLASH_MICRO9 is used.
>
> I hope that was it .... :-)
>
>
> regards manfred gruber
>
>
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss