Chapter 4. Basic board driver
Prev |  | Next

# Chapter 4. Basic board driver

For most boards it will be sufficient to provide just the basic functions and fill out some really board dependent members in the nand chip description structure.

## 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 void __iomem *baseaddr;

Static example

    static struct mtd_info board_mtd;
    static struct nand_chip board_chip;
    static void __iomem *baseaddr;

Prev |  | Next
Struct member identifiers [XXX] | Home | Partition defines