2 * Header file for UBI support for U-Boot
4 * Adaptation from kernel to U-Boot
6 * Copyright (C) 2005-2007 Samsung Electronics
7 * Kyungmin Park <kyungmin.park@samsung.com>
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.
19 #include <linux/compat.h>
22 #include <linux/math64.h>
23 #include <linux/crc32.h>
24 #include <linux/types.h>
25 #include <linux/list.h>
26 #include <linux/rbtree.h>
27 #include <linux/string.h>
28 #include <linux/mtd/mtd.h>
29 #include <linux/mtd/ubi.h>
31 #ifdef CONFIG_CMD_ONENAND
32 #include <onenand_uboot.h>
35 #include <linux/errno.h>
38 #define get_device(...)
39 #define put_device(...)
40 #define ubi_sysfs_init(...) 0
41 #define ubi_sysfs_close(...) do { } while (0)
44 #include "../drivers/mtd/ubi/ubi.h"
48 extern int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
49 extern int ubi_init(void);
50 extern void ubi_exit(void);
51 extern int ubi_part(char *part_name, const char *vid_header_offset);
52 extern int ubi_volume_write(char *volume, void *buf, size_t size);
53 extern int ubi_volume_read(char *volume, char *buf, size_t size);
55 extern struct ubi_device *ubi_devices[];
56 int cmd_ubifs_mount(char *vol_name);
57 int cmd_ubifs_umount(void);