]> git.ipfire.org Git - thirdparty/u-boot.git/blame - include/fs_loader.h
colibri_imx6: switch to zimage
[thirdparty/u-boot.git] / include / fs_loader.h
CommitLineData
62030004
TFC
1/*
2 * Copyright (C) 2018 Intel Corporation <www.intel.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0
5 */
6#ifndef _FS_LOADER_H_
7#define _FS_LOADER_H_
8
9#include <dm.h>
10
62030004
TFC
11/**
12 * struct phandle_part - A place for storing phandle of node and its partition
13 *
14 * This holds information about a phandle of the block device, and its
15 * partition where the firmware would be loaded from.
16 *
17 * @phandle: Phandle of storage device node
18 * @partition: Partition of block device
19 */
20struct phandle_part {
21 u32 phandle;
22 u32 partition;
23};
24
25/**
26 * struct phandle_part - A place for storing all supported storage devices
27 *
28 * This holds information about all supported storage devices for driver use.
29 *
30 * @phandlepart: Attribute data for block device.
31 * @mtdpart: MTD partition for ubi partition.
32 * @ubivol: UBI volume-name for ubifsmount.
33 */
34struct device_platdata {
35 struct phandle_part phandlepart;
36 char *mtdpart;
37 char *ubivol;
38};
39
62030004
TFC
40/**
41 * request_firmware_into_buf - Load firmware into a previously allocated buffer.
31a2cf1c 42 * @dev: An instance of a driver.
62030004
TFC
43 * @name: Name of firmware file.
44 * @buf: Address of buffer to load firmware into.
45 * @size: Size of buffer.
46 * @offset: Offset of a file for start reading into buffer.
62030004 47 *
31a2cf1c 48 * The firmware is loaded directly into the buffer pointed to by @buf.
62030004
TFC
49 *
50 * Return: Size of total read, negative value when error.
51 */
31a2cf1c 52int request_firmware_into_buf(struct udevice *dev,
62030004 53 const char *name,
31a2cf1c 54 void *buf, size_t size, u32 offset);
62030004 55#endif