2 * linux/arch/arm/mach-omap1/board-nand.c
4 * Common OMAP1 board NAND code
6 * Copyright (C) 2004, 2012 Texas Instruments, Inc.
7 * Copyright (C) 2002 MontaVista Software, Inc.
8 * Copyright (C) 2001 RidgeRun, Inc.
9 * Author: RidgeRun, Inc.
10 * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 #include <linux/kernel.h>
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/rawnand.h>
23 void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
25 struct nand_chip *this = mtd_to_nand(mtd);
28 if (cmd == NAND_CMD_NONE)
31 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
35 writeb(cmd, this->IO_ADDR_W + mask);