karo: tx28: add support for TX28-4033 (with 256MiB flash)
[karo-tx-uboot.git] / include / configs / tx28.h
index a3d3984..5af01dc 100644 (file)
  * NAND flash driver
  */
 #ifdef CONFIG_CMD_NAND
+#define CONFIG_SYS_NAND_BLOCK_SIZE     SZ_128K
 #define CONFIG_MTD_DEVICE
 #define CONFIG_NAND_MXS
 #define CONFIG_APBH_DMA
 #define CONFIG_APBH_DMA_BURST
 #define CONFIG_APBH_DMA_BURST8
-#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x20000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS    CONFIG_SYS_NAND_BLOCK_SIZE
 #define CONFIG_CMD_NAND_TRIMFFS
 #define CONFIG_SYS_MXS_DMA_CHANNEL     4
 #define CONFIG_SYS_NAND_MAX_CHIPS      1
 
 #define CONFIG_ENV_OFFSET              (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
 #define CONFIG_ENV_SIZE                        SZ_128K
-#define CONFIG_ENV_RANGE               0x60000
+#define CONFIG_ENV_RANGE               (3 * CONFIG_SYS_NAND_BLOCK_SIZE)
 #ifdef CONFIG_ENV_OFFSET_REDUND
-#define CONFIG_SYS_ENV_PART_STR                xstr(CONFIG_ENV_RANGE)          \
+#define CONFIG_SYS_ENV_PART_STR                xstr(CONFIG_SYS_ENV_PART_SIZE)  \
        "(env),"                                                        \
-       xstr(CONFIG_ENV_RANGE)                                          \
+       xstr(CONFIG_SYS_ENV_PART_SIZE)                                  \
        "(env2),"
-#define CONFIG_SYS_USERFS_PART_STR     "89216k(userfs)"
+#define CONFIG_SYS_USERFS_PART_STR     xstr(CONFIG_SYS_USERFS_PART_SIZE2) "(userfs)"
 #else
-#define CONFIG_SYS_ENV_PART_STR                xstr(CONFIG_ENV_RANGE)          \
+#define CONFIG_SYS_ENV_PART_STR                xstr(CONFIG_SYS_ENV_PART_SIZE)  \
        "(env),"
-#define CONFIG_SYS_USERFS_PART_STR     "89600k(userfs)"
+#define CONFIG_SYS_USERFS_PART_STR     xstr(CONFIG_SYS_USERFS_PART_SIZE) "(userfs)"
 #endif /* CONFIG_ENV_OFFSET_REDUND */
 
 /*
 #define MTDPARTS_DEFAULT               "mtdparts=" MTD_NAME ":"        \
        "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot),"             \
        CONFIG_SYS_ENV_PART_STR                                         \
-       "6m(linux),32m(rootfs),"                                        \
-       CONFIG_SYS_USERFS_PART_STR ",512k@0x7f00000(dtb),512k@0x7f80000(bbt)ro"
+       "6m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR             \
+       ",512k@" xstr(CONFIG_SYS_NAND_DTB_OFFSET) "(dtb)"               \
+       ",512k@" xstr(CONFIG_SYS_NAND_BBT_OFFSET) "(bbt)ro"
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \