1/* 2 * MTD utility functions 3 * 4 * Copyright 2006, Broadcom Corporation 5 * All Rights Reserved. 6 * 7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY 8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM 9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS 10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. 11 * 12 * $Id: mtd.h,v 1.1.1.1 2008/10/15 03:28:48 james26_jang Exp $ 13 */ 14 15#ifndef _mtd_h_ 16#define _mtd_h_ 17 18/* 19 * Open an MTD device 20 * @param mtd path to or partition name of MTD device 21 * @param flags open() flags 22 * @return return value of open() 23 */ 24extern int mtd_open(const char *mtd, int flags); 25 26/* 27 * Erase an MTD device 28 * @param mtd path to or partition name of MTD device 29 * @return 0 on success and errno on failure 30 */ 31extern int mtd_erase(const char *mtd); 32 33/* 34 * Write a file or a URL to an MTD device 35 * @param path file to write or a URL 36 * @param mtd path to or partition name of MTD device 37 * @return 0 on success and errno on failure 38 */ 39extern int mtd_write(const char *path, const char *mtd); 40 41#endif /* _mtd_h_ */ 42