⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ffxconf.h

📁 flashfx pro for vxworks based arm9260
💻 H
字号:
/*---------------------------------------------------------------------------
               ----> DO NOT REMOVE THE FOLLOWING NOTICE <----

      Copyright (c) 1993 - 2006 Datalight, Inc.  All Rights Reserved.

  Datalight, Incorporated is a Washington State corporation located at:

        21520 30th Dr SE, Suite 110,      Tel:  425-951-8086
        Bothell, WA  98021                Fax:  425-951-8094
        USA                               Http://www.datalight.com

  This software, including without limitation, all source code and documen-
  tation, is the confidential, trade secret property of Datalight, Inc., and
  is protected under the copyright laws of the United States and other juris-
  dictions.  Portions of the software may also be subject to one or more the
  following US patents: US#5860082, US#6260156.

  In addition to civil penalties for infringement of copyright under applic-
  able U.S. law, 17 U.S.C. 1204 provides criminal penalties for violation of
  (a) the restrictions on circumvention of copyright protection systems found
  in 17 U.S.C. 1201 and (b) the protections for the integrity of copyright
  management information found in 17 U.S.C. 1202.

  U.S. Government Restricted Rights:  Use, duplication, reproduction, or
  transfer of this commercial product and accompanying documentation is
  restricted in accordance with FAR 12.212 and DFARS 227.7202 and by a
  License Agreement.

  IN ADDITION TO COPYRIGHT AND PATENT LAW, THIS SOFTWARE IS PROTECTED UNDER A
  SOURCE CODE AGREEMENT, NON-DISCLOSURE AGREEMENT (NDA), OR SIMILAR BINDING
  CONTRACT BETWEEN DATALIGHT, INC. AND THE LICENSEE ("BINDING AGREEMENT").
  YOUR RIGHT, IF ANY, TO COPY, PUBLISH, MODIFY OR OTHERWISE USE THE SOFTWARE,
  IS SUBJECT TO THE TERMS AND CONDITIONS OF THE BINDING AGREEMENT.  BY USING
  THE SOFTWARE IN ANY MANNER, IN WHOLE OR IN PART, YOU AGREE TO BE BOUND BY
  THE TERMS OF THE BINDING AGREEMENT.  CONTACT DATALIGHT, INC. AT THE ADDRESS
  SET FORTH ABOVE IF YOU OBTAINED THIS SOFTWARE IN ERROR.
---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------
                                Description

    This module provides the information necessary to configure a VxWorks
    based FlashFX project.
---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------
                                Revision History
    $Log: ffxconf.h $
    Revision 1.8  2006/07/07 19:03:06Z  Garyp
    Renamed the FFXCONF_USEVXWORKSTIMESTAMP setting and moved it
    into dclconf.h.
    Revision 1.7  2006/04/04 01:27:44Z  michaelm
    removed mention of fimlist.pdf and instead refer to website
    Revision 1.6  2006/03/08 20:53:03Z  Garyp
    Changed the NTM init process back to using a list of possible NTMs, rather
    than a single fixed NTM per Device.
    Revision 1.5  2006/03/04 21:39:42Z  Garyp
    Eliminated an unnecessary typecast.
    Revision 1.4  2006/02/12 06:14:19Z  Garyp
    Updated to the new Device and Disk configuration model.
    Revision 1.3  2005/12/30 16:48:59Z  Garyp
    Updated to use renamed thread related settings and functions, which are
    now a part of DCL.
    Revision 1.2  2005/12/08 04:46:42Z  Garyp
    Added a number of basic settings that are new with the merge.
    Revision 1.1  2005/10/22 06:32:36Z  Pauli
    Initial revision
    Revision 1.2  2005/10/22 07:32:35Z  garyp
    Added standardized TRACE, PROFILER, and READBACKVERIFY settings.
    Revision 1.1  2005/10/06 06:41:18Z  Garyp
    Initial revision
    Revision 1.2  2005/08/14 21:56:40Z  garyp
    Added the FFX_DCLTESTPARAMS setting.
    Revision 1.1  2005/05/18 00:57:26Z  pauli
    Initial revision
---------------------------------------------------------------------------*/
#ifndef FFXCONF_H_INCLUDED
#define FFXCONF_H_INCLUDED


            /*------------------------------------------*\
             *              Feature Support             *
             *                                          *
             *  FFXCONF_* settings define the overall   *
             *  feature set which will be compiled into *
             *  the FlashFX device driver.  Disable     *
             *  features which are not being used to    *
             *  reduce the size of the device driver.   *
            \*------------------------------------------*/


/*-------------------------------------------------------------------
    Flash Technologies

    This section defines the flash technologies that the driver
    will support.  At least one of these features must be enabled.
-------------------------------------------------------------------*/
#define FFXCONF_NANDSUPPORT         FALSE
#define FFXCONF_NORSUPPORT          TRUE
#define FFXCONF_ISWFSUPPORT         FALSE


/*-------------------------------------------------------------------
    Bad Block Management (BBM)

    Typically BBM is required if NAND flash is being used.  The
    BBM format feature is typically used during development, and
    may often be trimmed out for production.
#------------------------------------------------------------------*/
#define FFXCONF_BBMSUPPORT          FFXCONF_NANDSUPPORT

#if FFXCONF_BBMSUPPORT
  #define FFXCONF_BBMFORMAT         TRUE
#endif


/*-------------------------------------------------------------------
    File Systems

    Define the types of file systems about which FlashFX should
    include logic to support.  Setting either of these values to
    FALSE will eliminate support for the respective file system.
-------------------------------------------------------------------*/
#define FFXCONF_RELIANCESUPPORT     TRUE
#define FFXCONF_FATSUPPORT          TRUE


/*-------------------------------------------------------------------
    Read-Ahead

    Set FFXCONF_READAHEADENABLED to TRUE to enable the FlashFX
    adaptive readahead feature.
-------------------------------------------------------------------*/
#define FFXCONF_READAHEADENABLED    TRUE



            /*------------------------------------------*\
             *           Device Configuration           *
             *                                          *
             *  Devices are identified as DEV0 to DEVn  *
             *  and correspond to physical flash arrays *
            \*------------------------------------------*/


/*-------------------------------------------------------------------
                     Device Configuration Settings

    FFX_DEVn_FIMS

        Each device has its own list of Flash Interface Modules
        (FIMs), defined in FFX_DEVn_FIMS, using the form shown below.
        The list must be NULL terminated.

    FFX_DEVn_NTMS

        If the NAND FIM is specified for a given device, a list of
        NAND Technology Modules (NTMs) must be specified in the form
        shown below.  The list must be NULL terminated.

        If NOR is being used, this setting should be set to {NULL}.

    FFX_DEVn_SETTINGS

        This defines the basic configuration information for each
        device, in the form:

            {UncachedAddress, ReservedLo, ReservedHi, MaxArraySize}

        UnchachedAddress is the base address of the flash array.
        For devices such as NAND, or the NOR "ram" or "file" FIMs,
        where virtual address mapping is not required, this value
        is not used and is typically set to FFX_BADADDRESS.

        ReservedLo and ReservedHi specify the amount of flash at
        the beginning and end of the flash array which will not
        be touched by FlashFX.

        MaxArraySize is the maximum amount of flash to use in the
        flash array, after removing any reserved space.  For NAND,
        the actual usable amount of flash will be less than that
        specified here if BBM is enabled.

    FFX_DEVn_BBMFORMAT

        This defines the BBM format settings for the device.
        Default values for these settings will be used if this
        option is not specified.  See the FlashFX documentation
        for detailed information about configuring these settings.

    See devflash.c or our website for a complete list of supported
    FIMs, NTMs, flash parts, and NAND controllers.  Note that these
    FIM and NTM designations are case sensitive.
-------------------------------------------------------------------*/
#define FFX_MAX_DEVICES         (4)     /* Max Devices Supported */

#define FFX_DEV0_FIMS           {&FFXFIM_iff2x16, NULL}
#define FFX_DEV0_NTMS           {NULL}
#define FFX_DEV0_SETTINGS       {(void*)0x24400000L, 0, 0, 0x00400000}
#define FFX_DEV0_BBMFORMAT      {FFX_DEFAULT_BBM_SETTINGS}

/* Replicate these settings to configure additional devices... */



            /*------------------------------------------*\
             *            Disk Configuration            *
             *                                          *
             *  Disks are identified as DISK0 to DISKn  *
             *  and are specified as an offset/length   *
             *  on a given device.                      *
            \*------------------------------------------*/


/*-------------------------------------------------------------------
                      Disk Configuration Settings

    Basic Settings

        For VxWorks, basic disk settings, such as which device a
        disk resides on, and the starting offset and length to use,
        are specified in the IDE.  See the FlashFX documentation
        for information on configuring these settings.

    FFX_DISKn_COMPACTION

        This defines the compaction settings for the disk.  See the
        FlashFX documentation for a complete description of how to
        customize this setting.
-------------------------------------------------------------------*/
#define FFX_MAX_DISKS           (8)     /* Max Disks Supported */

#define FFX_DISK0_COMPACTION    {FFX_DEFAULT_COMPACTION_SETTINGS}

/* Replicate these settings to configure additional disks... */



            /*------------------------------------------*\
             *                                          *
             *      Testing and Debugging Settings      *
             *                                          *
            \*------------------------------------------*/



/*-------------------------------------------------------------------
    Set to TRUE to cause the FlashFX tests to be built into the
    device driver, and automatically run at driver initialization
    time.

    NOTE: These tests will destroy all the data on the disk, and
          the disk must be formatted once these tests are complete.

    Set the FFX_xxxTESTPARAMS symbols to the test parameters to be
    used, per the test documentation.  If one of these symbols is
    left undefined, the corresponding test will be skipped.
-------------------------------------------------------------------*/
#define FFXCONF_DRIVERAUTOTEST  FALSE

#if FFXCONF_DRIVERAUTOTEST
  #define  FFX_DCLTESTPARAMS    ""
  #define  FFX_FMSLTESTPARAMS   "/p /e"
  #define  FFX_VBFTESTPARAMS    "/p"
  #define  FFX_MTTESTPARAMS     "/d0 /t5"
#endif


/*-------------------------------------------------------------------
    Error Injection Tests

    See the FlashFX documentation for more information about
    configuring and using the error injection tests.
-------------------------------------------------------------------*/
#define FFXCONF_ERRORINJECTIONTESTS  FALSE

#if FFXCONF_ERRORINJECTIONTESTS
  #define FFX_ERRINJRATE_READ   (10000UL)  /* bit errors per million reads  */
  #define FFX_ERRINJRATE_WRITE    (100UL)  /* I/O errors per million writes */
  #define FFX_ERRINJRATE_ERASE   (1000UL)  /* I/O errors per million erases */
#endif


/*-------------------------------------------------------------------
    FFX_TRACEMASK is used to specify the classes of debug messages
    for which tracing will be enabled.  See fxtrace.h for more
    information.
-------------------------------------------------------------------*/
#define FFX_TRACEMASK                   FFXTRACEBIT_NONE


/*-------------------------------------------------------------------
    Set the various "ReadBackVerify" settings to TRUE to enable
    read-back-verify functionality at the desired level.  Note
    that this will severely impact write performance.
-------------------------------------------------------------------*/
#define FFX_DEVMGR_READBACKVERIFY       FALSE
#define FFX_MEDIAMGR_READBACKVERIFY     FALSE



            /*------------------------------------------*\
             *                                          *
             *          Miscellaneous Settings          *
             *                                          *
            \*------------------------------------------*/


/*-------------------------------------------------------------------
    Define the default file system to be used when an MBR is
    written to the disk by FlashFX.  Note that the respective
    FFXCONF_xxxSUPPORT flag must be set to TRUE to allow the
    DEFAULTFS_FAT and DEFAULTFS_RELIANCE options to be used.

    Possible values are:
       DEFAULTFS_NONE     - None, FFX_USEMBR must be FALSE
       DEFAULTFS_FAT      - FAT (12 or 16 automatically determined)
       DEFAULTFS_RELIANCE - Datalight Reliance
-------------------------------------------------------------------*/
#define FFX_DEFAULTFS           DEFAULTFS_FAT


/*-------------------------------------------------------------------
    Optional _sysdelay() Timing Parameters

    These optional timing parameters are for systems that lack a
    microsecond-resolution time reference for implementing the
    _sysdelay() function.  They define the characteristics of a
    delay loop that is used to control timing of FIM operations.

    The _sysdelay() functionality is only required by the NOR and
    Sibley FIMs.

    These values may be automatically calculated at initialization
    time by calling FfxDelayCalibrate(), typically from the
    FfxHookDriverCreate() function in fhinit.c.  The resulting
    numbers can then be plugged in here to avoid the overhead of
    automatic calculation at run-time.

    See the FlashFX documentation for information on customizing
    this feature.
-------------------------------------------------------------------*/
/*  #define FFX_DELAY_SHIFT    (11)                         */
/*  #define FFX_DELAY_MICROSEC (1UL << FFX_DELAY_SHIFT)     */
/*  #define FFX_DELAY_COUNT    (300UL * FFX_DELAY_MICROSEC) */


/*-------------------------------------------------------------------
    FFX_READAHEAD_SECTORS specifies the number of sectors to cache.
-------------------------------------------------------------------*/
#if FFXCONF_READAHEADENABLED
  #define FFX_READAHEAD_SECTORS         (32)
#endif




#endif /* FFXCONF_H_INCLUDED */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -