blob: 6605e4f218d2c99e3a38414dbd1093bd454efc6f [file] [log] [blame]
Kyungmin Parkd7e8ce12007-09-10 17:15:14 +09001/*
2 * Header file for OneNAND support for U-Boot
3 *
4 * Adaptation from kernel to U-Boot
5 *
6 * Copyright (C) 2005-2007 Samsung Electronics
7 * Kyungmin Park <kyungmin.park@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __UBOOT_ONENAND_H
15#define __UBOOT_ONENAND_H
16
Scott Wood229c56f2008-05-22 10:49:00 -050017#include <linux/types.h>
18
Scott Wood229c56f2008-05-22 10:49:00 -050019struct mtd_info;
20struct erase_info;
21
Kyungmin Parkbfd7f382008-08-19 08:42:53 +090022extern struct mtd_info onenand_mtd;
23
Kyungmin Parkd7e8ce12007-09-10 17:15:14 +090024/* Functions */
25extern void onenand_init(void);
26extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
27 size_t * retlen, u_char * buf);
Kyungmin Parkbfd7f382008-08-19 08:42:53 +090028extern int onenand_read_oob(struct mtd_info *mtd, loff_t from,
29 struct mtd_oob_ops *ops);
Kyungmin Parkd7e8ce12007-09-10 17:15:14 +090030extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len,
31 size_t * retlen, const u_char * buf);
32extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
33
34extern int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len);
35
Fathi BOUDRA195ccfc2008-08-06 10:06:20 +020036extern char *onenand_print_device_info(int device);
Kyungmin Parkd7e8ce12007-09-10 17:15:14 +090037
38#endif /* __UBOOT_ONENAND_H */