2008-11-19 15:32:36 +00:00
|
|
|
/*
|
|
|
|
* Header file for UBI 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_UBI_H
|
|
|
|
#define __UBOOT_UBI_H
|
|
|
|
|
2009-09-01 16:58:03 +00:00
|
|
|
#include <compiler.h>
|
2014-06-24 08:10:03 +00:00
|
|
|
#include <linux/compat.h>
|
2008-11-19 15:32:36 +00:00
|
|
|
#include <malloc.h>
|
|
|
|
#include <div64.h>
|
2014-06-24 08:10:03 +00:00
|
|
|
#include <linux/math64.h>
|
2008-11-19 15:32:36 +00:00
|
|
|
#include <linux/crc32.h>
|
2009-03-19 14:35:05 +00:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/rbtree.h>
|
|
|
|
#include <linux/string.h>
|
2008-11-19 15:32:36 +00:00
|
|
|
#include <linux/mtd/mtd.h>
|
2009-03-19 14:35:05 +00:00
|
|
|
#include <linux/mtd/ubi.h>
|
2008-11-19 15:32:36 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_CMD_ONENAND
|
|
|
|
#include <onenand_uboot.h>
|
|
|
|
#endif
|
|
|
|
|
2016-09-21 02:28:55 +00:00
|
|
|
#include <linux/errno.h>
|
2008-11-19 15:32:36 +00:00
|
|
|
|
|
|
|
/* build.c */
|
|
|
|
#define get_device(...)
|
|
|
|
#define put_device(...)
|
|
|
|
#define ubi_sysfs_init(...) 0
|
|
|
|
#define ubi_sysfs_close(...) do { } while (0)
|
|
|
|
|
2009-03-19 14:35:05 +00:00
|
|
|
#ifndef __UBIFS_H__
|
2008-11-19 15:32:36 +00:00
|
|
|
#include "../drivers/mtd/ubi/ubi.h"
|
2009-03-19 14:35:05 +00:00
|
|
|
#endif
|
2008-11-19 15:32:36 +00:00
|
|
|
|
|
|
|
/* functions */
|
|
|
|
extern int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
|
|
|
|
extern int ubi_init(void);
|
2008-11-27 13:07:09 +00:00
|
|
|
extern void ubi_exit(void);
|
2013-04-08 10:32:47 +00:00
|
|
|
extern int ubi_part(char *part_name, const char *vid_header_offset);
|
|
|
|
extern int ubi_volume_write(char *volume, void *buf, size_t size);
|
|
|
|
extern int ubi_volume_read(char *volume, char *buf, size_t size);
|
2008-11-19 15:32:36 +00:00
|
|
|
|
|
|
|
extern struct ubi_device *ubi_devices[];
|
2018-07-06 08:26:01 +00:00
|
|
|
int cmd_ubifs_mount(char *vol_name);
|
2018-07-06 08:25:12 +00:00
|
|
|
int cmd_ubifs_umount(void);
|
2008-11-19 15:32:36 +00:00
|
|
|
|
|
|
|
#endif
|