@@ -14,6 +14,7 @@
*/
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/mtd/nand.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
@@ -23,6 +24,42 @@
#include <plat/irqs.h>
#include <plat/board.h>
#include <plat/common.h>
+#include <plat/gpmc.h>
+#include <plat/nand.h>
+
+#include "board-flash.h"
+
+#define NAND_BLOCK_SIZE SZ_128K
+
+static struct mtd_partition ti816x_nand_partitions[] = {
+/* All the partition sizes are listed in terms of NAND block size */
+ {
+ .name = "U-Boot",
+ .offset = 0, /* Offset = 0x0 */
+ .size = 18 * NAND_BLOCK_SIZE,
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
+ },
+ {
+ .name = "U-Boot Env",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x240000 */
+ .size = 2 * NAND_BLOCK_SIZE,
+ },
+ {
+ .name = "Kernel",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
+ .size = 34 * NAND_BLOCK_SIZE,
+ },
+ {
+ .name = "File System",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x6C0000 */
+ .size = 1601 * NAND_BLOCK_SIZE,
+ },
+ {
+ .name = "Reserved",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0xCEE0000 */
+ .size = MTDPART_SIZ_FULL,
+ },
+};
static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
};
@@ -35,6 +72,8 @@ static void __init ti8168_init_early(void)
static void __init ti8168_evm_init(void)
{
+ board_nand_init(ti816x_nand_partitions,
+ ARRAY_SIZE(ti816x_nand_partitions), 0, NAND_BUSWIDTH_16);
omap_serial_init();
omap_board_config = ti8168_evm_config;
omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);