blob: 5a4fded2705a92cd1a43007d55b4871e645d2de4 [file] [log] [blame]
Kyungmin Parkaf3d11c2007-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 Wood8b759262008-05-22 10:49:00 -050017#include <linux/types.h>
18
Scott Wood8b759262008-05-22 10:49:00 -050019struct mtd_info;
20struct erase_info;
Kyungmin Parkdc7a79c2008-11-04 09:24:07 +090021struct onenand_chip;
Scott Wood8b759262008-05-22 10:49:00 -050022
Kyungmin Park5d7a01c2008-08-19 08:42:53 +090023extern struct mtd_info onenand_mtd;
24
Kyungmin Parkdc7a79c2008-11-04 09:24:07 +090025/* board */
26extern void onenand_board_init(struct mtd_info *);
27
Kyungmin Parkaf3d11c2007-09-10 17:15:14 +090028/* Functions */
29extern void onenand_init(void);
30extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
31 size_t * retlen, u_char * buf);
Kyungmin Parkdc7a79c2008-11-04 09:24:07 +090032extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
Kyungmin Parkaf3d11c2007-09-10 17:15:14 +090033extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len,
34 size_t * retlen, const u_char * buf);
35extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
36
Kyungmin Parkdc7a79c2008-11-04 09:24:07 +090037extern char *onenand_print_device_info(int device, int version);
Kyungmin Parkaf3d11c2007-09-10 17:15:14 +090038
Kyungmin Parkdc7a79c2008-11-04 09:24:07 +090039/* S3C64xx */
40extern void s3c64xx_onenand_init(struct mtd_info *);
41extern void s3c64xx_set_width_regs(struct onenand_chip *);
Kyungmin Parkaf3d11c2007-09-10 17:15:14 +090042
43#endif /* __UBOOT_ONENAND_H */