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

📄 config.h

📁 s3c2510 VxWorks BSP包
💻 H
字号:
/* config.h - SAMSUNG SMDK2510 configuration header */

/* Copyright 2002 SAMSUNG ELECTRONICS */

/*
modification history
--------------------
01a,08feb02,jmLee   created.
*/


#ifndef INCconfigh
#define INCconfigh



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

#define BSP_VER_1_1                     1
#define BSP_VER_1_2                     0
#define BSP_VERSION                     "1.0"
#define BSP_REV                         "/1"                /* 0 for first revision */

#include "configAll.h"


#undef  HOST_NAME_DEFAULT
#define HOST_NAME_DEFAULT               "host"              /* host name */
#undef  TARGET_NAME_DEFAULT
#define TARGET_NAME_DEFAULT             "smdk2510"          /* target name (tn) */
#undef  HOST_USER_DEFAULT
#define HOST_USER_DEFAULT               "smdk2510"          /* user (u) */
#undef  HOST_PASSWORD_DEFAULT
#define HOST_PASSWORD_DEFAULT           "smdk2510"          /* password (pw) */
#undef  LOGIN_USER_NAME
#define LOGIN_USER_NAME                 "root"              /* user name (u) */
#undef  LOGIN_PASSWORD
#define LOGIN_PASSWORD                  "RcQbRbzRyc"        /* password, "password" */

#if 1
#define DEFAULT_BOOT_LINE "secEnd(0,0)host:vxWorks.st h=12.25.167.133 e=12.25.167.11:fffffe00 g=12.25.166.1 u=smdk2510 pw=smdk2510 tn=smdk2510 f=0x8"
#else
#define DEFAULT_BOOT_LINE "secEnd(0,0)host:vxWorks2.st h=192.168.2.1 e=192.168.2.12:ffffff00 g=192.168.2.1 u=smdk2510 pw=smdk2510 tn=smdk2510 f=0x8"
#endif


/*
 * 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


/*
#undef  USER_D_CACHE_ENABLE 
#undef  USER_I_CACHE_ENABLE 
*/

/*
 * ARM 940T have an MPU and not a full MMU, so only INCLUDE_MMU_MPU can be
 * supported, and not full page-table-style MMU. Include support for the MPU by
 * default (this can be overridden, if desired).
 */

#undef  INCLUDE_MMU_FULL
#undef  INCLUDE_MMU_BASIC
#define INCLUDE_MMU_MPU
#define INCLUDE_MMU


/*
 * 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  /* _ASMLANGUAGE */
#define INCLUDE_SYS_HW_INIT_0
#define SYS_HW_INIT_0()                 sysHwInit0()

/*
 * All ARM 940T BSPs must define a variable sysCacheUncachedAdrs: a pointer to a
 * word that is uncached and is safe to read (i.e. has no side effects). This is
 * used by the cacheLib code to perform a read (only) to drain the write-buffer.
 * Clearly this address must be present within one of the regions created within
 * sysPhysMemDesc, where it must be marked as non-cacheable. There are many such
 * addresses we could use on the board, but we choose to use an address here
 * that will be mapped in on just about all configurations: a safe address
 * within the interrupt controller: the IRQ Enabled status register. This saves
 * us from having to define a region just for this pointer. This constant
 * defined here is used to initialize sysCacheUncachedAdrs in sysLib.c and is
 * also used by the startup code in sysALib.s and romInit.s in draining the
 * write-buffer.
 */

/*#define SYS_CACHE_UNCACHED_ADRS         S3C2510_CLKST */
#define SYS_CACHE_UNCACHED_ADRS         S3C2510_REG_BASE_ADRS

/* NVRAM configuration. */

#define NV_RAM_SIZE                     NONE


/*
 * PLL configurations
 *
 * Input oscillator frequency clocking the S3C2510
 */

#define XCLK_FREQ                       10                  /* 10 Mhz */

/* System clock divider */

#define SYSCLK_DIV_FACTOR               S3C2510_CLKCON_DIV_1

/* Clock Mode */

#define CLOCK_MODE                      S3C2510_CLKST_MODE_ASYNC

/* Core PLL frequency */

#define CPLL_FREQ                       166                 /* 166 Mhz */

/* System PLL frequency */

#define SPLL_FREQ                       133                 /* 133 Mhz */

/* USB PLL frequency */

#define UPLL_FREQ                       48                  /* 48 Mhz */

/* PHY PLL frequency */

#define PPLL_FREQ                       25                  /* 25 Mhz */


/* Clock rates */

#define SYS_CLK_RATE_MIN                1                   /* minimum system clock rate */
#define SYS_CLK_RATE_MAX                1000000             /* maximum system clock rate */
#define AUX_CLK_RATE_MIN                1                   /* minimum auxiliary clock rate */
#define AUX_CLK_RATE_MAX                1000000             /* maximum auxiliary clock rate */

/* Optional timestamp support */

#undef  INCLUDE_TIMESTAMP                                   /* include timestamp driver */


/* Memory configuration */

#undef  LOCAL_MEM_AUTOSIZE                                  /* run-time memory sizing */
#define LOCAL_MEM_LOCAL_ADRS            0x00000000          /* base of RAM */
#define LOCAL_MEM_SIZE                  0x02000000          /* 32 Mbytes */

/* RAM address for ROM boot */

#define RAM_HIGH_ADRS                   (LOCAL_MEM_LOCAL_ADRS + 0x00600000)

/* RAM address for sys image */

#define RAM_LOW_ADRS                    (LOCAL_MEM_LOCAL_ADRS + 0x00001000)

/* User reserved memory size */

#define USER_RESERVED_MEM               0x00200000          /* 2 Mbytes, if 0, use SRAM 1Mbyte */
#define SYS_MEM_TOP                     (LOCAL_MEM_LOCAL_ADRS + LOCAL_MEM_SIZE - USER_RESERVED_MEM)

/* Common refresh time 15.6 usec. */

#define SDRAM_REFRESH_CYCL              ((SPLL_FREQ * 15) + ((SPLL_FREQ * 6) / 10))

/*
 * The constants ROM_TEXT_ADRS, ROM_SIZE, and RAM_HIGH_ADRS are defined
 * in config.h, MakeSkel, Makefile, and Makefile.*
 * All definitions for these constants must be identical.
 */

#define ROM_BASE_ADRS                   0x80000000          /* base address of ROM */
#define ROM_TEXT_ADRS                   ROM_BASE_ADRS       /* code start addr in ROM */
#define ROM_SIZE                        0x00080000          /* 512K ROM space */

/*
 * 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                  0x10000             /* size of ISR stack, in bytes */


/* Serial port configuration */

#undef  NUM_TTY
#define NUM_TTY                         N_SIO_CHANNELS

#undef  CONSOLE_BAUD_RATE
#define CONSOLE_BAUD_RATE               115200
#undef  WDB_TTY_BAUD
#define WDB_TTY_BAUD                    CONSOLE_BAUD_RATE

/* UART BRG clock frequency */

#define UARTCLK_FREQ                    29491200            /* 29.4912 Mhz */
#define PCLK2_FREQ                      (SPLL_FREQ * 1000000 / 2)

/* UART BRG clock source */

#undef  UARTCLK_EXTERNAL 
#define UARTCLK_EXTERNAL 

#ifdef  UARTCLK_EXTERNAL
#define UART_BRGCLK_FREQ                UARTCLK_FREQ
#else   /* UARTCLK_EXTERNAL */
#define UART_BRGCLK_FREQ                PCLK2_FREQ
#endif  /* UARTCLK_EXTERNAL */

/* UART BRG clock divider */

#define UART_BRGCLK_DIV_FACTOR          S3C2510_UBRD_DIV_1


/* USB clock source */

#undef  UCLK_EXTERNAL

/* PHY clock source */

#undef  PCLK_EXTERNAL


/* Network driver configuration. */

#ifdef  INCLUDE_NETWORK
#define INCLUDE_SEC_END                                     /* include the S3C2510 ethernet driver */
#endif  /* INCLUDE_NETWORK */

#ifdef  INCLUDE_SEC_END
#ifndef INCLUDE_END
#define INCLUDE_END                                         /* only END-style driver for */
#endif  /* INCLUDE_END */
#endif  /* INCLUDE_SEC_END */


/* Optional TrueFFS support */

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

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


/* Add necessary drivers */

#ifdef  STANDALONE                                          /* stand alone build, VxWorks.st, VxWorks.st_rom.hex */
#define STANDALONE_NET                                      /* network subsystem code */
#undef  INCLUDE_WDB                                         /* WDB debug agent */
#undef  INCLUDE_DEBUG                                       /* pre-tornado debugging */
#else   /* STANDALONE */
#define INCLUDE_SHELL                                       /* interactive c-expression interpreter */
#define INCLUDE_SHOW_ROUTINES                               /* show routines for system facilities*/
#endif  /* STANDALONE */

#define INCLUDE_SECURITY                                    /* shell security for network access */
#define INCLUDE_SYM_TBL                                     /* symbol table package */
#define INCLUDE_DOSFS                                       /* dosFs file system */

#ifdef  INCLUDE_NETWORK
#define INCLUDE_PING                                        /* ping() utility */
#define INCLUDE_ARP                                         /* user interface to ARP table */
#define INCLUDE_TELNET                                      /* telnet-style remote login */
#define INCLUDE_FTP_SERVER                                  /* ftp server */
#define INCLUDE_FTPD_SECURITY                               /* password security for ftp sessions */
#define INCLUDE_TFTP_SERVER                                 /* tftp server */
#define INCLUDE_NET_SHOW                                    /* network info and status facilities */
#ifdef  STANDALONE
#undef  INCLUDE_NET_REM_IO                                  /* network remote file i/o driver */
#define INCLUDE_STANDALONE_SYM_TBL                          /* compiled-in symbol table */
#else   /* STANDALONE */
#define INCLUDE_SYM_TBL_SYNC                                /* synchronize host and target symbol tables */
#endif  /* STANDALONE */
#define INCLUDE_ZBUF_SOCK                                   /* zbuf socket interface */
#endif  /* INCLUDE_NETWORK */


/* Add user application */

#ifndef _ASMLANGUAGE
IMPORT int usrAppInit(void);
#define INCLUDE_USER_APPL
#define USER_APPL_INIT                  usrAppInit()
#endif  /* _ASMLANGUAGE */


#include "smdk2510.h"

#endif  /* INCconfigh */

#ifdef  PRJ_BUILD
#include "prjParams.h"
#endif

⌨️ 快捷键说明

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