]>
Commit | Line | Data |
---|---|---|
d7e8ce10 KP |
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 <[email protected]> | |
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 | ||
229c56f0 SW |
17 | #include <linux/types.h> |
18 | ||
bd99ec14 | 19 | /* Forward declarations */ |
229c56f0 | 20 | struct mtd_info; |
bd99ec14 | 21 | struct mtd_oob_ops; |
229c56f0 | 22 | struct erase_info; |
ef0921d6 | 23 | struct onenand_chip; |
229c56f0 | 24 | |
bfd7f386 | 25 | extern struct mtd_info onenand_mtd; |
cacbe919 | 26 | extern struct onenand_chip onenand_chip; |
bfd7f386 | 27 | |
ef0921d6 KP |
28 | /* board */ |
29 | extern void onenand_board_init(struct mtd_info *); | |
30 | ||
d7e8ce10 KP |
31 | /* Functions */ |
32 | extern void onenand_init(void); | |
33 | extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, | |
34 | size_t * retlen, u_char * buf); | |
ef0921d6 | 35 | extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops); |
d7e8ce10 KP |
36 | extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len, |
37 | size_t * retlen, const u_char * buf); | |
38 | extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr); | |
39 | ||
ef0921d6 | 40 | extern char *onenand_print_device_info(int device, int version); |
d7e8ce10 | 41 | |
cacbe919 AKS |
42 | extern unsigned onenand_block(struct onenand_chip *this, loff_t addr); |
43 | ||
44 | extern loff_t onenand_addr(struct onenand_chip *this, int block); | |
45 | ||
46 | extern int flexonenand_region(struct mtd_info *mtd, loff_t addr); | |
47 | ||
48 | extern int flexonenand_set_boundary(struct mtd_info *mtd, int die, | |
49 | int boundary, int lock); | |
50 | ||
ef0921d6 KP |
51 | /* S3C64xx */ |
52 | extern void s3c64xx_onenand_init(struct mtd_info *); | |
53 | extern void s3c64xx_set_width_regs(struct onenand_chip *); | |
d7e8ce10 KP |
54 | |
55 | #endif /* __UBOOT_ONENAND_H */ |