1/* 2 * Header file for UBI 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_UBI_H 15#define __UBOOT_UBI_H 16 17#include <compiler.h> 18#include <linux/compat.h> 19#include <malloc.h> 20#include <div64.h> 21#include <linux/math64.h> 22#include <linux/crc32.h> 23#include <linux/types.h> 24#include <linux/list.h> 25#include <linux/rbtree.h> 26#include <linux/string.h> 27#include <linux/mtd/mtd.h> 28#include <linux/mtd/ubi.h> 29 30#ifdef CONFIG_CMD_ONENAND 31#include <onenand_uboot.h> 32#endif 33 34#include <linux/errno.h> 35 36/* build.c */ 37#define get_device(...) 38#define put_device(...) 39#define ubi_sysfs_init(...) 0 40#define ubi_sysfs_close(...) do { } while (0) 41 42#ifndef __UBIFS_H__ 43#include "../drivers/mtd/ubi/ubi.h" 44#endif 45 46/* functions */ 47extern int ubi_mtd_param_parse(const char *val, struct kernel_param *kp); 48extern int ubi_init(void); 49extern void ubi_exit(void); 50extern int ubi_part(char *part_name, const char *vid_header_offset); 51extern int ubi_volume_write(char *volume, void *buf, size_t size); 52extern int ubi_volume_read(char *volume, char *buf, size_t size); 53 54extern struct ubi_device *ubi_devices[]; 55int cmd_ubifs_mount(char *vol_name); 56int cmd_ubifs_umount(void); 57 58#endif 59