Files
qdl/patch.h
Bjorn Andersson 8f7987f756 qdl: Communicate using USBFS instead of qcserial
On some newer platforms the device ignore the configure request to
disable ZLP, causing the Firehose program request to stall, when the
device is waiting for a ZLP to end a transfer.

Mitigate this by circumventing the qcserial driver and drive the USB
traffic directly using USBFS. The tool will attempt to detach qcserial
from the device, in case it's already attached, so no changes are needed
in the kernel or system configuration.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-01-07 16:36:50 -08:00

23 lines
433 B
C

#ifndef __PATCH_H__
#define __PATCH_H__
struct qdl_device;
struct patch {
unsigned sector_size;
unsigned byte_offset;
const char *filename;
unsigned partition;
unsigned size_in_bytes;
const char *start_sector;
const char *value;
const char *what;
struct patch *next;
};
int patch_load(const char *patch_file);
int patch_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, struct patch *patch));
#endif