2007-09-10 16:15:14 +08:00
|
|
|
/*
|
|
|
|
* Header file for OneNAND support for U-Boot
|
|
|
|
*
|
|
|
|
* Adaptation from kernel to U-Boot
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005-2007 Samsung Electronics
|
|
|
|
* Kyungmin Park <kyungmin.park@samsung.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UBOOT_ONENAND_H
|
|
|
|
#define __UBOOT_ONENAND_H
|
|
|
|
|
2008-05-22 23:49:00 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2009-02-01 19:27:53 +08:00
|
|
|
/* Forward declarations */
|
2008-05-22 23:49:00 +08:00
|
|
|
struct mtd_info;
|
2009-02-01 19:27:53 +08:00
|
|
|
struct mtd_oob_ops;
|
2008-05-22 23:49:00 +08:00
|
|
|
struct erase_info;
|
2008-11-04 08:24:07 +08:00
|
|
|
struct onenand_chip;
|
2008-05-22 23:49:00 +08:00
|
|
|
|
2008-08-19 07:42:53 +08:00
|
|
|
extern struct mtd_info onenand_mtd;
|
|
|
|
|
2008-11-04 08:24:07 +08:00
|
|
|
/* board */
|
|
|
|
extern void onenand_board_init(struct mtd_info *);
|
|
|
|
|
2007-09-10 16:15:14 +08:00
|
|
|
/* Functions */
|
|
|
|
extern void onenand_init(void);
|
|
|
|
extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|
|
|
size_t * retlen, u_char * buf);
|
2008-11-04 08:24:07 +08:00
|
|
|
extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
|
2007-09-10 16:15:14 +08:00
|
|
|
extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len,
|
|
|
|
size_t * retlen, const u_char * buf);
|
|
|
|
extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
|
|
|
|
|
2008-11-04 08:24:07 +08:00
|
|
|
extern char *onenand_print_device_info(int device, int version);
|
2007-09-10 16:15:14 +08:00
|
|
|
|
2008-11-04 08:24:07 +08:00
|
|
|
/* S3C64xx */
|
|
|
|
extern void s3c64xx_onenand_init(struct mtd_info *);
|
|
|
|
extern void s3c64xx_set_width_regs(struct onenand_chip *);
|
2007-09-10 16:15:14 +08:00
|
|
|
|
|
|
|
#endif /* __UBOOT_ONENAND_H */
|