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

📄 config.h

📁 这是micrel公司宽带路由ARM9芯片的VXWORKS BSP 源代码
💻 H
字号:
/* config.h - KS8695, KS8695X, or KS8695P demo board configuration header */



/*
modification history
--------------------
V1.09:---------------------------------------------------------------------
05/13/2004 pcd
(1).Integrate KS8695/KS8695X to KS8695P. Different features are on following ('x' as support):
               WAN  LAN  HPNA  PCI  FlowCntl  SDRAM  WAN_PHY(0xEA14)
      KS8695    x    x    x                    16MB   0xB000
      KS8695X   x    x                         16MB   0xB000
      KS8695P   x    x          x    x         32MB   0x0 (default)

     The default is           is for KS8695P
     The definition "KS8695"  is for KS8695 
     The definition "KS8695X" is for KS8695X 
(2). Added to support AMD AM29LV033 flash chip to dosFS.
(3). changed BSP_REV from "/08" to "/09".
---------------------------------------------------------------------
9/15/2003  Ritter Yeh  created 
*/

/*
This module contains the configuration parameters for the KS8695P demo board BSP.
*/

#ifndef	INCconfigh
#define	INCconfigh

#ifdef __cplusplus
extern "C" {
#endif



/* BSP version/revision identification, before configAll.h */

#define BSP_VERSION	"1.0"
#define BSP_REV		"/9"	/* 0 for first revision */

#include "configAll.h"

/*
 * STANDALONE_NET must be defined for network debug with
 * standalone vxWorks
 */
#undef STANDALONE_NET

/*
 * Define SERIAL_DEBUG to enable debugging
 * via the serial ports
 */
#undef SERIAL_DEBUG

#define INCLUDE_FLASH_BOOT	/* flash driver in boot ROM */

#define DEFAULT_BOOT_LINE \
    "ks(0,0) host:vxWorks " \
    "h=192.168.1.10 e=192.168.1.1:ffffff00 u=ks8695p pw=wind tn=KS8695WAN"

/* Memory configuration */

#define	LOCAL_MEM_AUTOSIZE			/* run-time memory sizing */
#define USER_RESERVED_MEM	0		/* see sysMemTop() */

/*
 * Local-to-Bus memory address constants:
 * the local memory address always appears at 0 locally;
 * it is not dual ported.
 */

#define LOCAL_MEM_LOCAL_ADRS	0x00000000	/* fixed at zero */
#define LOCAL_MEM_BUS_ADRS	    0x00000000	/* fixed at zero */

/*
 *  make static memory size to 32MB here. Later on, 
 *  a variable "local_mem_size" indicates the memory size by 
 *  if "KS8695 || KS8695X || KS8695P" board.  Defined in sysLib.c
 *  KS8695P: local_mem_size = 0x02000000 (32MB)
 *  KS8695X: local_mem_size = 0x01000000 (16MB)
 *  KS8695 : local_mem_size = 0x01000000 (16MB)
 */

#define LOCAL_MEM_SIZE		    0x01000000	/* 16 Mbytes for default */

#define LOCAL_MEM_END_ADRS	    (LOCAL_MEM_LOCAL_ADRS + LOCAL_MEM_SIZE) /* Address of second SDRAM */

/*
 * Boot ROM is an image written into Flash. Part of the Flash can be
 * reserved for boot parameters etc. (see the Flash section below).
 *
 * The following parameters are defined here and in the Makefile.
 * They must be kept synchronized; effectively config.h depends on Makefile.
 * Any changes made here must be made in the Makefile and vice versa.
 *
 * ROM_BASE_ADRS is the base of the Flash ROM/EPROM.
 * ROM_TEXT_ADRS is the entry point of the VxWorks image
 * ROM_SIZE is the size of the part of the Flash ROM/EPROM allocated to
 *		the VxWorks image (block size - size of headers)
 *
 * Two other constants are used:
 * ROM_COPY_SIZE is the size of the part of the ROM to be copied into RAM
 * 		 (e.g. in uncompressed boot ROM)
 * ROM_SIZE_TOTAL is the size of the entire Flash ROM (used in sysPhysMemDesc)
 *
 * The values are given as literals here to make it easier to ensure
 * that they are the same as those in the Makefile.
 */

#define ROM_BASE_ADRS       0x02800000     /* base of Flash/EPROM */
#define ROM_TEXT_ADRS       ROM_BASE_ADRS  /* code start addr in ROM */
#define ROM_SIZE            0x00100000     /* size of ROM holding VxWorks*/

#define ROM_COPY_SIZE       ROM_SIZE
#define ROM_SIZE_TOTAL      0x00400000	   /* total size of ROM */

#define RAM_LOW_ADRS	    0x00001000	   /* VxWorks image entry point */
#define RAM_HIGH_ADRS	    0x00600000	   /* RAM address for ROM boot */

/*
 * Flash/NVRAM memory configuration
 *
 * A block of the Flash memory (FLASH_SIZE bytes at FLASH_ADRS) is
 * reserved for non-volatile storage of data.
 *
 * See also integrator.h
 */

/* Flash definitions */

#define FLASH_BASE		ROM_BASE_ADRS	/* Base address of Flash part */

#define FLASH_CHIP_WIDTH         1
#define FLASH_WIDTH              1 
#define FLASH_WIDTH_SPECIAL_2			/* see flash28.h */
#define SYS_FLASH_WRITE				    /* use enable/disable routines*/

/* Constants for NVRAM  */
#define NV_OFF_BINDFIX		0x0108	    /* See sysLib.c:sysBindFix() (1b) */

#define INCLUDE_FLASH
#undef  INCLUDE_NVM_SPACE

#ifdef INCLUDE_FLASH
#define FLASH_SIZE		0x00010000	    /* one 64kbyte block of Flash*/
#define NV_RAM_SIZE		     0x100		/* how much we use as NVRAM */
#undef	NV_BOOT_OFFSET
#define NV_BOOT_OFFSET		     0		/* bootline at start of NVRAM */
#define FLASH_NO_OVERLAY			    /* do not read-modify-write all of Flash */
#define INCLUDE_FLASH_SIB_FOOTER        /* add a SIB footer to block */
#else	/* INCLUDE_FLASH */
#define NV_RAM_SIZE		NONE

#endif	/* INCLUDE_FLASH */

/*RLQ, move this here since we need some defines */
#include "ks8695p.h"

/* Serial port configuration */

#define INCLUDE_SERIAL
#undef	NUM_TTY
#define NUM_TTY			N_SIO_CHANNELS

/*
 * Define SERIAL_DEBUG to enable debugging
 * via the serial ports
 */
 #undef SERIAL_DEBUG
 #ifdef SERIAL_DEBUG
  #define WDB_NO_BAUD_AUTO_CONFIG

  #undef WDB_COMM_TYPE
  #undef WDB_TTY_BAUD
  #undef WDB_TTY_CHANNEL
  #undef WDB_TTY_DEV_NAME

  #define WDB_COMM_TYPE       WDB_COMM_SERIAL /* WDB in Serial mode */
  #define WDB_TTY_BAUD        38400          /* Baud rate for WDB Connection */
  #define WDB_TTY_CHANNEL     1               /* COM PORT #2 */
  #define WDB_TTY_DEV_NAME    "/tyCo/1"       /* default TYCODRV_5_2 device name */
 #endif /* SERIAL_DEBUG */

/*
 * We use the generic architecture libraries, with caches/MMUs present. A
 * call to sysHwInit0() is needed from within usrInit before
 * cacheLibInit() is called.
 */

#ifndef _ASMLANGUAGE
IMPORT void sysHwInit0 (void);
#endif
#define INCLUDE_SYS_HW_INIT_0
#define SYS_HW_INIT_0()         sysHwInit0 ()

/*
 * Cache/MMU configuration
 *
 * Note that when MMU is enabled, cache modes are controlled by
 * the MMU table entries in sysPhysMemDesc[], not the cache mode
 * macros defined here.
 */

#undef  USER_I_CACHE_MODE
#define USER_I_CACHE_MODE       CACHE_WRITETHROUGH

#undef  USER_D_CACHE_MODE
#define USER_D_CACHE_MODE       CACHE_COPYBACK

/*
 * Include MMU BASIC and CACHE support for command line and project builds
 */
#define	 INCLUDE_MMU_BASIC
#define  INCLUDE_CACHE_SUPPORT

/*
 * Network driver configuration.
 *
 * De-select unused (default) network drivers selected in configAll.h.
 */

#undef	INCLUDE_ENP		/* include CMC Ethernet interface*/
#undef	INCLUDE_EX		/* include Excelan Ethernet interface */
#undef	INCLUDE_SM_NET		/* include backplane net interface */
#undef	INCLUDE_SM_SEQ_ADDR	/* shared memory network auto address setup */

/* Enhanced Network Driver (END) Support */

#define INCLUDE_END

#ifdef	INCLUDE_END
#undef INCLUDE_DEC21X40END	/* include PCI-based DEC 21X4X END Ethernet */
#undef INCLUDE_FEI82557END	/* include PCI-based Intel END Ethernet */

#if defined(KS8695) || defined(KS8695X)    
/* for KS8695/X, no PCI device support */
#ifdef INCLUDE_DEC21X40END
#undef INCLUDE_DEC21X40END
#endif
#ifdef INCLUDE_FEI82557END
#undef INCLUDE_FEI82557END
#endif
#endif /* #if defined(KS8695) || defined(KS8695X) */

#ifndef SERIAL_DEBUG
#undef  WDB_COMM_TYPE		/* WDB agent communication path is END */
#define WDB_COMM_TYPE	WDB_COMM_END
#define WBD_AGENT_END
#else
#undef WBD_AGENT_END
#endif /* SERIAL_DEBUG */

#ifdef INCLUDE_DEC21X40END
#define INCLUDE_MIILIB
#endif

#endif  /* INCLUDE_END */


#if !defined(KS8695) && !defined(KS8695X) /* only KS8695P support PCI bus */ 
/* PCI configuration */
#define INCLUDE_PCI
#define INCLUDE_SHOW_ROUTINES
#else                                     
#undef INCLUDE_PCI
#undef INCLUDE_SHOW_ROUTINES
#endif /* #if !defined(KS8695) && !defined(KS8695X) */

/*
 * Interrupt mode - interrupts can be in either preemptive or non-preemptive
 * mode.  For non-preemptive mode, change INT_MODE to INT_NON_PREEMPT_MODEL
 */

#define INT_MODE	INT_PREEMPT_MODEL

/*
 * miscellaneous definitions
 * Note: ISR_STACK_SIZE is defined here rather than in ../all/configAll.h
 * (as is more usual) because the stack size depends on the interrupt
 * structure of the BSP.
 */

#define ISR_STACK_SIZE	0x800	/* size of ISR stack, in bytes */

/* Optional timestamp support */

#undef	INCLUDE_TIMESTAMP	/* define to include timestamp driver */
#define INCLUDE_TIMESTAMP  	/* currently not support yet */

/* Optional TrueFFS support */

#undef	INCLUDE_TFFS		/* define to include TrueFFS driver */

#ifdef INCLUDE_TFFS
#define INCLUDE_SHOW_ROUTINES
#define INCLUDE_DOSFS
#endif /* INCLUDE_TFFS */

/*#include "ks8695p.h"*/

#undef BSP_VTS
#ifdef BSP_VTS
/***************************************************
 * Add these defines for the Validation Test Suite *
 ***************************************************/
#define INCLUDE_SHELL
#define INCLUDE_RLOGIN
#define INCLUDE_SHOW_ROUTINES
#define INCLUDE_NET_SYM_TBL
#define INCLUDE_LOADER

#define INCLUDE_PING
#define INCLUDE_NET_SHOW
#endif /*BSP_VTS*/

#undef INCLUDE_WINDML          /* define to include windML support */

#ifdef __cplusplus
}
#endif
#endif  /* INCconfigh */

#if defined(PRJ_BUILD)
#include "prjParams.h"
#endif

⌨️ 快捷键说明

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