mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
With the refactoring leading up to the firehose implementation being driven by the client code and the USB code extracted we can implement nbdkit plugin exposing the flash storage to the host PC. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
#ifndef __QDL_H__
|
|
#define __QDL_H__
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "patch.h"
|
|
#include "program.h"
|
|
#include <libxml/tree.h>
|
|
|
|
struct qdl_device;
|
|
struct program;
|
|
struct patch;
|
|
|
|
int firehose_open(struct qdl_device *qdl, bool ufs);
|
|
int sahara_run(struct qdl_device *qdl, const char *prog_mbn);
|
|
void print_hex_dump(const char *prefix, const void *buf, size_t len);
|
|
unsigned attr_as_unsigned(xmlNode *node, const char *attr, int *errors);
|
|
const char *attr_as_string(xmlNode *node, const char *attr, int *errors);
|
|
|
|
int firehose_getsize(struct qdl_device *qdl, int lun, size_t *sector_size,
|
|
size_t *num_sectors);
|
|
int firehose_reset(struct qdl_device *qdl);
|
|
int firehose_set_bootable(struct qdl_device *qdl, int part);
|
|
int firehose_program(struct qdl_device *qdl, struct program *program, int fd);
|
|
int firehose_apply_patch(struct qdl_device *qdl, struct patch *patch);
|
|
|
|
ssize_t firehose_pread(struct qdl_device *qdl, int lun, size_t offset, void *buf,
|
|
size_t sector_size, size_t num_sectors);
|
|
ssize_t firehose_pwrite(struct qdl_device *qdl, int lun, size_t offset,
|
|
const void *buf, size_t sector_size, size_t num_sectors);
|
|
|
|
extern bool qdl_debug;
|
|
|
|
#endif
|