Kyungmin Park | af3d11c | 2007-09-10 17:15:14 +0900 | [diff] [blame] | 1 | /* |
| 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 Wood | 8b75926 | 2008-05-22 10:49:00 -0500 | [diff] [blame] | 17 | #include <linux/types.h> |
Jean-Christophe PLAGNIOL-VILLARD | 7f68a31 | 2008-09-09 00:59:40 +0200 | [diff] [blame] | 18 | #include <linux/mtd/mtd.h> |
Scott Wood | 8b75926 | 2008-05-22 10:49:00 -0500 | [diff] [blame] | 19 | |
Scott Wood | 8b75926 | 2008-05-22 10:49:00 -0500 | [diff] [blame] | 20 | struct mtd_info; |
| 21 | struct erase_info; |
| 22 | |
Kyungmin Park | 5d7a01c | 2008-08-19 08:42:53 +0900 | [diff] [blame] | 23 | extern struct mtd_info onenand_mtd; |
| 24 | |
Kyungmin Park | af3d11c | 2007-09-10 17:15:14 +0900 | [diff] [blame] | 25 | /* Functions */ |
| 26 | extern void onenand_init(void); |
| 27 | extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, |
| 28 | size_t * retlen, u_char * buf); |
Kyungmin Park | 5d7a01c | 2008-08-19 08:42:53 +0900 | [diff] [blame] | 29 | extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, |
| 30 | struct mtd_oob_ops *ops); |
Kyungmin Park | af3d11c | 2007-09-10 17:15:14 +0900 | [diff] [blame] | 31 | extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len, |
| 32 | size_t * retlen, const u_char * buf); |
| 33 | extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr); |
| 34 | |
| 35 | extern int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len); |
| 36 | |
Fathi BOUDRA | 95feb70 | 2008-08-06 10:06:20 +0200 | [diff] [blame] | 37 | extern char *onenand_print_device_info(int device); |
Kyungmin Park | af3d11c | 2007-09-10 17:15:14 +0900 | [diff] [blame] | 38 | |
| 39 | #endif /* __UBOOT_ONENAND_H */ |