Basic defines

At least you have to provide a mtd structure and a storage for the ioremap'ed chip address. You can allocate the mtd structure using kmalloc or you can allocate it statically. In case of static allocation you have to allocate a nand_chip structure too.

Kmalloc based example

static struct mtd_info *board_mtd;
static unsigned long baseaddr;
		

Static example

static struct mtd_info board_mtd;
static struct nand_chip board_chip;
static unsigned long baseaddr;