-#ifdef CFG_USE_NAND
-#undef CFG_ENV_IS_IN_FLASH
-#define CFG_NO_FLASH
-#define CFG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */
-#ifdef CFG_NAND_SMALLPAGE
-#define CFG_ENV_SECT_SIZE 512 /* Env sector Size */
-#define CFG_ENV_SIZE SZ_16K
+#ifdef CONFIG_SYS_USE_NAND
+#define CONFIG_NAND_DAVINCI
+#define CONFIG_SYS_NAND_CS 2
+#undef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */
+#ifdef CONFIG_SYS_NAND_SMALLPAGE
+#define CONFIG_ENV_SECT_SIZE 512 /* Env sector Size */
+#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_MTD_DEVICE
+#define CONFIG_CMD_MTDPARTS
+#define MTDIDS_DEFAULT \
+ "nand0=davinci_nand.0"
+#define MTDPARTS_DEFAULT \
+ "mtdparts=davinci_nand.0:384k(bootloader)ro,4m(kernel),-(filesystem)"