mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
microblaze: Fix microblaze-generic config file
1. Fix preprocessor statements 2. Clean coding style Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
c82a541d47
commit
4aecfb1602
1 changed files with 119 additions and 100 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* (C) Copyright 2007-2008 Michal Simek
|
||||
* (C) Copyright 2007-2010 Michal Simek
|
||||
*
|
||||
* Michal SIMEK <monstr@monstr.eu>
|
||||
*
|
||||
|
@ -27,7 +27,8 @@
|
|||
|
||||
#include "../board/xilinx/microblaze-generic/xparameters.h"
|
||||
|
||||
#define CONFIG_MICROBLAZE 1 /* MicroBlaze CPU */
|
||||
/* MicroBlaze CPU */
|
||||
#define CONFIG_MICROBLAZE 1
|
||||
#define MICROBLAZE_V5 1
|
||||
|
||||
/* uart */
|
||||
|
@ -42,7 +43,8 @@
|
|||
# define CONFIG_SYS_NS16550_SERIAL
|
||||
# define CONFIG_SYS_NS16550_REG_SIZE -4
|
||||
# define CONFIG_CONS_INDEX 1
|
||||
#define CONFIG_SYS_NS16550_COM1 (XILINX_UART16550_BASEADDR + 0x1000 + 0x3)
|
||||
# define CONFIG_SYS_NS16550_COM1 \
|
||||
(XILINX_UART16550_BASEADDR + 0x1000 + 0x3)
|
||||
# define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ
|
||||
# define CONFIG_BAUDRATE 115200
|
||||
|
||||
|
@ -135,15 +137,20 @@
|
|||
/* global pointer */
|
||||
#define CONFIG_SYS_GBL_DATA_SIZE 128 /* size of global data */
|
||||
/* start of global data */
|
||||
#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE - CONFIG_SYS_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_GBL_DATA_OFFSET \
|
||||
(CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE \
|
||||
- CONFIG_SYS_GBL_DATA_SIZE)
|
||||
|
||||
/* monitor code */
|
||||
#define SIZE 0x40000
|
||||
#define CONFIG_SYS_MONITOR_LEN (SIZE - CONFIG_SYS_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_MONITOR_END (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_MONITOR_BASE \
|
||||
(CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_MONITOR_END \
|
||||
(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
|
||||
#define CONFIG_SYS_MALLOC_LEN SIZE
|
||||
#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
|
||||
#define CONFIG_SYS_MALLOC_BASE \
|
||||
(CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
|
||||
|
||||
/* stack */
|
||||
#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_MALLOC_BASE
|
||||
|
@ -156,10 +163,14 @@
|
|||
# define CONFIG_SYS_FLASH_SIZE XILINX_FLASH_SIZE
|
||||
# define CONFIG_SYS_FLASH_CFI 1
|
||||
# define CONFIG_FLASH_CFI_DRIVER 1
|
||||
#define CONFIG_SYS_FLASH_EMPTY_INFO 1 /* ?empty sector */
|
||||
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
|
||||
#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
|
||||
#define CONFIG_SYS_FLASH_PROTECTION /* hardware flash protection */
|
||||
/* ?empty sector */
|
||||
# define CONFIG_SYS_FLASH_EMPTY_INFO 1
|
||||
/* max number of memory banks */
|
||||
# define CONFIG_SYS_MAX_FLASH_BANKS 1
|
||||
/* max number of sectors on one chip */
|
||||
# define CONFIG_SYS_MAX_FLASH_SECT 512
|
||||
/* hardware flash protection */
|
||||
# define CONFIG_SYS_FLASH_PROTECTION
|
||||
|
||||
# ifdef RAMENV
|
||||
# define CONFIG_ENV_IS_NOWHERE 1
|
||||
|
@ -168,8 +179,10 @@
|
|||
|
||||
# else /* !RAMENV */
|
||||
# define CONFIG_ENV_IS_IN_FLASH 1
|
||||
#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
|
||||
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + (2 * CONFIG_ENV_SECT_SIZE))
|
||||
/* 128K(one sector) for env */
|
||||
# define CONFIG_ENV_SECT_SIZE 0x20000
|
||||
# define CONFIG_ENV_ADDR \
|
||||
(CONFIG_SYS_FLASH_BASE + (2 * CONFIG_ENV_SECT_SIZE))
|
||||
# define CONFIG_ENV_SIZE 0x20000
|
||||
# endif /* !RAMBOOT */
|
||||
#else /* !FLASH */
|
||||
|
@ -178,7 +191,8 @@
|
|||
# define CONFIG_ENV_IS_NOWHERE 1
|
||||
# define CONFIG_ENV_SIZE 0x1000
|
||||
# define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE)
|
||||
#define CONFIG_SYS_FLASH_PROTECTION /* hardware flash protection */
|
||||
/* hardware flash protection */
|
||||
# define CONFIG_SYS_FLASH_PROTECTION
|
||||
#endif /* !FLASH */
|
||||
|
||||
/* system ace */
|
||||
|
@ -270,11 +284,16 @@
|
|||
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_PROMPT "U-Boot-mONStR> "
|
||||
#define CONFIG_SYS_CBSIZE 512 /* size of console buffer */
|
||||
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* print buffer size */
|
||||
#define CONFIG_SYS_MAXARGS 15 /* max number of command args */
|
||||
/* size of console buffer */
|
||||
#define CONFIG_SYS_CBSIZE 512
|
||||
/* print buffer size */
|
||||
#define CONFIG_SYS_PBSIZE \
|
||||
(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|
||||
/* max number of command args */
|
||||
#define CONFIG_SYS_MAXARGS 15
|
||||
#define CONFIG_SYS_LONGHELP
|
||||
#define CONFIG_SYS_LOAD_ADDR XILINX_RAM_START /* default load address */
|
||||
/* default load address */
|
||||
#define CONFIG_SYS_LOAD_ADDR XILINX_RAM_START
|
||||
|
||||
#define CONFIG_BOOTDELAY -1 /* -1 disables auto-boot */
|
||||
#define CONFIG_BOOTARGS "root=romfs"
|
||||
|
@ -291,7 +310,7 @@
|
|||
|
||||
#define CONFIG_PREBOOT "echo U-BOOT for ${hostname};setenv preboot;echo"
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0" /* hardware flash protection */\
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0" \
|
||||
"nor0=flash-0\0"\
|
||||
"mtdparts=mtdparts=flash-0:"\
|
||||
"256k(u-boot),256k(env),3m(kernel),"\
|
||||
|
|
Loading…
Add table
Reference in a new issue