Merge with /home/m8/git/u-boot
[oweals/u-boot.git] / include / configs / versatile.h
index 58ed25b3574a56865b4a47e412e0668b14d661b2..16db43bb938df9c33068c697fcbf589b655e9ead 100644 (file)
@@ -72,6 +72,7 @@
  * Size of malloc() pool
  */
 #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
+#define CFG_GBL_DATA_SIZE      128     /* size in bytes reserved for initial data */
 
 /*
  * Hardware drivers
  * NS16550 Configuration
  */
 #define CFG_PL011_SERIAL
+#define CONFIG_PL011_CLOCK     24000000
+#define CONFIG_PL01x_PORTS     { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
 #define CONFIG_CONS_INDEX      0
+
 #define CONFIG_BAUDRATE         38400
 #define CFG_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
 #define CFG_SERIAL0            0x101F1000
 #define CFG_SERIAL1            0x101F2000
 
-#define CONFIG_COMMANDS        (CFG_CMD_DHCP | CFG_CMD_IMI | CFG_CMD_NET | CFG_CMD_PING | CFG_CMD_BDI | CFG_CMD_MEMORY)
+#define CONFIG_COMMANDS        (CFG_CMD_DHCP | CFG_CMD_IMI | CFG_CMD_NET | CFG_CMD_PING | CFG_CMD_BDI | CFG_CMD_MEMORY | CFG_CMD_FLASH | CFG_CMD_ENV)
 
-//#define CONFIG_COMMANDS      (CFG_CMD_IMI | CFG_CMD_BDI | CFG_CMD_MEMORY)
+/*#define CONFIG_COMMANDS      (CFG_CMD_IMI | CFG_CMD_BDI | CFG_CMD_MEMORY) */
 
 #define CONFIG_BOOTP_MASK      CONFIG_BOOTP_DEFAULT
 
 #include <cmd_confdefs.h>
 
 #define CONFIG_BOOTDELAY       2
-#define CONFIG_BOOTARGS        "root=/dev/nfs mem=128M ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0" 
-//#define CONFIG_BOOTCOMMAND "bootp ; bootm"
+#define CONFIG_BOOTARGS "root=/dev/nfs mem=128M ip=dhcp netdev=25,0,0xf1010000,0xf1010010,eth0"
+/*#define CONFIG_BOOTCOMMAND "bootp ; bootm" */
 
 /*
  * Static configuration when assigning fixed address
  */
-//#define CONFIG_NETMASK       255.255.255.0   /* talk on MY local net */
-//#define CONFIG_IPADDR                xx.xx.xx.xx     /* static IP I currently own */
-//#define CONFIG_SERVERIP      xx.xx.xx.xx     /* current IP of my dev pc */
+/*#define CONFIG_NETMASK       255.255.255.0   /--* talk on MY local net */
+/*#define CONFIG_IPADDR                xx.xx.xx.xx     /--* static IP I currently own */
+/*#define CONFIG_SERVERIP      xx.xx.xx.xx     /--* current IP of my dev pc */
 #define CONFIG_BOOTFILE            "/tftpboot/uImage" /* file to load */
 
 
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
  */
-#define CFG_ENV_IS_NOWHERE
+
+#define VERSATILE_SYS_BASE                    0x10000000
+#define VERSATILE_SYS_FLASH_OFFSET            0x4C
+#define VERSATILE_FLASHCTRL                  (VERSATILE_SYS_BASE + VERSATILE_SYS_FLASH_OFFSET)
+#define VERSATILE_FLASHPROG_FLVPPEN          (1 << 0)  /* Enable writing to flash */
+
 #define CFG_MAX_FLASH_BANKS    1               /* max number of memory banks */
 #define PHYS_FLASH_SIZE         0x34000000     /* 64MB */
 /* timeout values are in ticks */
 #define CFG_FLASH_ERASE_TOUT   (20*CFG_HZ)     /* Timeout for Flash Erase */
 #define CFG_FLASH_WRITE_TOUT   (20*CFG_HZ)     /* Timeout for Flash Write */
-#define CFG_MAX_FLASH_SECT 128
-#define CFG_ENV_SIZE 32768
+#define CFG_MAX_FLASH_SECT     (256)
 
 #define PHYS_FLASH_1           (CFG_FLASH_BASE)
 
+#define CFG_ENV_IS_IN_FLASH     1               /* env in flash instead of CFG_ENV_IS_NOWHERE */
+#define CFG_ENV_SECT_SIZE       0x00020000      /* 256 KB sectors (x2) */
+#define CFG_ENV_SIZE            0x10000         /* Total Size of Environment Sector */
+#define CFG_ENV_OFFSET          0x01f00000      /* environment starts here  */
+#define CFG_ENV_ADDR            (CFG_FLASH_BASE + CFG_ENV_OFFSET)
+
 #endif                                                 /* __CONFIG_H */