Files
u-boot-krane/include/ubi_uboot.h
T
Weijie GaoandHeiko Schocher b63af5e2c2 cmd: ubi: use void * for buf parameter in ubi_volume_read
Use void * to avoid explicit type casting as what ubi_volume_write has done
already.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2026-07-08 11:29:55 +02:00

69 lines
1.6 KiB
C

/*
* 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
#include <compiler.h>
#include <linux/compat.h>
#include <malloc.h>
#include <div64.h>
#include <linux/math64.h>
#include <linux/crc32.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/rbtree.h>
#include <linux/string.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/ubi.h>
#ifdef CONFIG_CMD_ONENAND
#include <onenand_uboot.h>
#endif
#include <linux/errno.h>
/* build.c */
#define get_device(...)
#define put_device(...)
#define ubi_sysfs_init(...) 0
#define ubi_sysfs_close(...) do { } while (0)
#ifndef __UBIFS_H__
#include "../drivers/mtd/ubi/ubi.h"
#endif
/* functions */
int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
int ubi_init(void);
void ubi_exit(void);
int ubi_part(const char *part_name, const char *vid_header_offset);
int ubi_volume_write(const char *volume, const void *buf, loff_t offset,
size_t size);
int ubi_volume_read(const char *volume, void *buf, loff_t offset, size_t size);
extern struct ubi_device *ubi_devices[];
int cmd_ubifs_mount(char *vol_name);
int cmd_ubifs_umount(void);
#if IS_ENABLED(CONFIG_UBI_BLOCK)
int ubi_bind(struct udevice *dev);
#else
static inline int ubi_bind(struct udevice *dev)
{
return -EOPNOTSUPP;
}
#endif
#endif