📄 sbc8260.h
字号:
"zapenv="\ "protect off 1:1;" \ "erase 1:1;" \ "protect on 1:1\0" \ "root-on-initrd="\ "setenv bootcmd "\ "version;" \ "echo;" \ "bootp;" \ "setenv bootargs root=/dev/ram0 rw " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ "run boot-hook;" \ "bootm\0" \ "root-on-nfs="\ "setenv bootcmd "\ "version;" \ "echo;" \ "bootp;" \ "setenv bootargs root=/dev/nfs rw " \ "nfsroot=${serverip}:${rootpath} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ "run boot-hook;" \ "bootm\0" \ "boot-hook=echo\0"/* Define a command string that is automatically executed when no character * is read on the console interface withing "Boot Delay" after reset. */#undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */#define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */#ifdef CONFIG_BOOT_ROOT_INITRD#define CONFIG_BOOTCOMMAND \ "version;" \ "echo;" \ "bootp;" \ "setenv bootargs root=/dev/ram0 rw " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ "bootm"#endif /* CONFIG_BOOT_ROOT_INITRD */#ifdef CONFIG_BOOT_ROOT_NFS#define CONFIG_BOOTCOMMAND \ "version;" \ "echo;" \ "bootp;" \ "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ "bootm"#endif /* CONFIG_BOOT_ROOT_NFS *//* Add support for a few extra bootp options like: * - File size * - DNS (up to 2 servers) * - Send hostname to DHCP server */#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \ CONFIG_BOOTP_BOOTFILESIZE | \ CONFIG_BOOTP_DNS | \ CONFIG_BOOTP_DNS2 | \ CONFIG_BOOTP_SEND_HOSTNAME)/* undef this to save memory */#define CFG_LONGHELP/* Monitor Command Prompt */#define CFG_PROMPT "=> "#undef CFG_HUSH_PARSER#ifdef CFG_HUSH_PARSER#define CFG_PROMPT_HUSH_PS2 "> "#endif/* When CONFIG_TIMESTAMP is selected, the timestamp (date and time) * of an image is printed by image commands like bootm or iminfo. */#define CONFIG_TIMESTAMP/* If this variable is defined, an environment variable named "ver" * is created by U-Boot showing the U-Boot version. */#define CONFIG_VERSION_VARIABLE/* What U-Boot subsytems do you want enabled? */#ifdef CONFIG_ETHER_ON_FCC# define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ CFG_CMD_ASKENV | \ CFG_CMD_ELF | \ CFG_CMD_I2C | \ CFG_CMD_IMMAP | \ CFG_CMD_MII | \ CFG_CMD_PING | \ CFG_CMD_REGINFO | \ CFG_CMD_SDRAM )#else# define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ CFG_CMD_ASKENV | \ CFG_CMD_ELF | \ CFG_CMD_I2C | \ CFG_CMD_IMMAP | \ CFG_CMD_PING | \ CFG_CMD_REGINFO | \ CFG_CMD_SDRAM )#endif /* CONFIG_ETHER_ON_FCC */#undef CONFIG_WATCHDOG /* disable the watchdog *//* Where do the internal registers live? */#define CFG_IMMR 0xF0000000/***************************************************************************** * * You should not have to modify any of the following settings * *****************************************************************************/#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */#define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */#define CONFIG_CPM2 1 /* Has a CPM2 *//* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */#include <cmd_confdefs.h>/* * Miscellaneous configurable options */#if (CONFIG_COMMANDS & CFG_CMD_KGDB)# define CFG_CBSIZE 1024 /* Console I/O Buffer Size */#else# define CFG_CBSIZE 256 /* Console I/O Buffer Size */#endif/* Print Buffer Size */#define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT)+16)#define CFG_MAXARGS 32 /* max number of command args */#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */#define CFG_LOAD_ADDR 0x400000 /* default load address */#define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */#define CFG_ALT_MEMTEST /* Select full-featured memory test */#define CFG_MEMTEST_START 0x2000 /* memtest works from the end of */ /* the exception vector table */ /* to the end of the DRAM */ /* less monitor and malloc area */#define CFG_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */#define CFG_MEM_END_USAGE ( CFG_MONITOR_LEN \ + CFG_MALLOC_LEN \ + CFG_ENV_SECT_SIZE \ + CFG_STACK_USAGE )#define CFG_MEMTEST_END ( CFG_SDRAM_SIZE * 1024 * 1024 \ - CFG_MEM_END_USAGE )/* valid baudrates */#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }/* * Low Level Configuration Settings * (address mappings, register initial values, etc.) * You should know what you are doing if you make changes here. */#define CFG_FLASH_BASE CFG_FLASH0_BASE#define CFG_FLASH_SIZE CFG_FLASH0_SIZE#define CFG_SDRAM_BASE CFG_SDRAM0_BASE#define CFG_SDRAM_SIZE CFG_SDRAM0_SIZE/*----------------------------------------------------------------------- * Hard Reset Configuration Words */#if defined(CFG_SBC_BOOT_LOW)# define CFG_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS)#else# define CFG_SBC_HRCW_BOOT_FLAGS (0)#endif /* defined(CFG_SBC_BOOT_LOW) *//* get the HRCW ISB field from CFG_IMMR */#define CFG_SBC_HRCW_IMMR ( ((CFG_IMMR & 0x10000000) >> 10) | \ ((CFG_IMMR & 0x01000000) >> 7) | \ ((CFG_IMMR & 0x00100000) >> 4) )#define CFG_HRCW_MASTER ( HRCW_BPS11 | \ HRCW_DPPC11 | \ CFG_SBC_HRCW_IMMR | \ HRCW_MMR00 | \ HRCW_LBPC11 | \ HRCW_APPC10 | \ HRCW_CS10PC00 | \ (CFG_SBC_MODCK_H & HRCW_MODCK_H1111) | \ CFG_SBC_HRCW_BOOT_FLAGS )/* no slaves */#define CFG_HRCW_SLAVE1 0#define CFG_HRCW_SLAVE2 0#define CFG_HRCW_SLAVE3 0#define CFG_HRCW_SLAVE4 0#define CFG_HRCW_SLAVE5 0#define CFG_HRCW_SLAVE6 0#define CFG_HRCW_SLAVE7 0/*----------------------------------------------------------------------- * Definitions for initial stack pointer and data area (in DPRAM) */#define CFG_INIT_RAM_ADDR CFG_IMMR#define CFG_INIT_RAM_END 0x4000 /* End of used area in DPRAM */#define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET/*----------------------------------------------------------------------- * Start addresses for the final memory configuration * (Set up by the startup code) * Please note that CFG_SDRAM_BASE _must_ start at 0 * Note also that the logic that sets CFG_RAMBOOT is platform dependent. */#define CFG_MONITOR_BASE CFG_FLASH0_BASE#if (CFG_MONITOR_BASE < CFG_FLASH_BASE)# define CFG_RAMBOOT#endif#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */#define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() *//* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux *//*----------------------------------------------------------------------- * FLASH and environment organization */#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */#define CFG_MAX_FLASH_SECT 16 /* max number of sectors on one chip */#define CFG_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */#define CFG_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */#ifndef CFG_RAMBOOT# define CFG_ENV_IS_IN_FLASH 1# ifdef CFG_ENV_IN_OWN_SECT# define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000)# define CFG_ENV_SECT_SIZE 0x40000# else# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN - CFG_ENV_SECT_SIZE)# define CFG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */# define CFG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */# endif /* CFG_ENV_IN_OWN_SECT */#else# define CFG_ENV_IS_IN_NVRAM 1# define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000)# define CFG_ENV_SIZE 0x200#endif /* CFG_RAMBOOT *//*----------------------------------------------------------------------- * Cache Configuration */#define CFG_CACHELINE_SIZE 32 /* For MPC8260 CPU */#if (CONFIG_COMMANDS & CFG_CMD_KGDB)# define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */#endif/*----------------------------------------------------------------------- * HIDx - Hardware Implementation-dependent Registers 2-11 *----------------------------------------------------------------------- * HID0 also contains cache control - initially enable both caches and * invalidate contents, then the final state leaves only the instruction * cache enabled. Note that Power-On and Hard reset invalidate the caches, * but Soft reset does not. * * HID1 has only read-only information - nothing to set. */#define CFG_HID0_INIT (HID0_ICE |\ HID0_DCE |\ HID0_ICFI |\ HID0_DCI |\ HID0_IFEM |\ HID0_ABE)#define CFG_HID0_FINAL (HID0_ICE |\ HID0_IFEM |\ HID0_ABE |\ HID0_EMCP)#define CFG_HID2 0/*----------------------------------------------------------------------- * RMR - Reset Mode Register *----------------------------------------------------------------------- */#define CFG_RMR 0/*----------------------------------------------------------------------- * BCR - Bus Configuration 4-25 *----------------------------------------------------------------------- */#define CFG_BCR (BCR_ETM)/*----------------------------------------------------------------------- * SIUMCR - SIU Module Configuration 4-31 *----------------------------------------------------------------------- */#define CFG_SIUMCR (SIUMCR_DPPC11 |\ SIUMCR_L2CPC00 |\ SIUMCR_APPC10 |\ SIUMCR_MMR00)/*----------------------------------------------------------------------- * SYPCR - System Protection Control 11-9 * SYPCR can only be written once after reset! *----------------------------------------------------------------------- * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable */#if defined(CONFIG_WATCHDOG)#define CFG_SYPCR (SYPCR_SWTC |\ SYPCR_BMT |\ SYPCR_PBME |\ SYPCR_LBME |\ SYPCR_SWRI |\ SYPCR_SWP |\ SYPCR_SWE)#else#define CFG_SYPCR (SYPCR_SWTC |\ SYPCR_BMT |\ SYPCR_PBME |\ SYPCR_LBME |\ SYPCR_SWRI |\ SYPCR_SWP)#endif /* CONFIG_WATCHDOG *//*----------------------------------------------------------------------- * TMCNTSC - Time Counter Status and Control 4-40 *----------------------------------------------------------------------- * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk, * and enable Time Counter */#define CFG_TMCNTSC (TMCNTSC_SEC |\ TMCNTSC_ALR |\ TMCNTSC_TCF |\ TMCNTSC_TCE)/*----------------------------------------------------------------------- * PISCR - Periodic Interrupt Status and Control 4-42 *----------------------------------------------------------------------- * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable * Periodic timer */#define CFG_PISCR (PISCR_PS |\ PISCR_PTF |\ PISCR_PTE)/*----------------------------------------------------------------------- * SCCR - System Clock Control 9-8 *-----------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -