Commit a50ec804 authored by Niklas Cassel's avatar Niklas Cassel Committed by Bjorn Andersson
Browse files

qdl: fix qdl when building for 32-bit

The sahara protocol specification defines the image field
for a read64 request as 8 bytes.
Use the correct type to represent this.

This will not change the behavior when building for 64-bit,
where the compiler already aligned the offset field correctly,
in order to satisfy natural alignment requirements.

However, when building for 32-bit, this change results in a
qdl that can flash a device successfully.

Signed-off-by: default avatarNiklas Cassel <>
Signed-off-by: default avatarBjorn Andersson <>
parent 5fc4cdbb
......@@ -78,7 +78,7 @@ struct sahara_pkt {
uint32_t status;
} done_resp;
struct {
uint32_t image;
uint64_t image;
uint64_t offset;
uint64_t length;
} read64_req;
......@@ -157,7 +157,7 @@ static void sahara_read64(int fd, struct sahara_pkt *pkt, const char *mbn)
assert(pkt->length == 0x20);
printf("READ64 image: %d offset: 0x%" PRIx64 " length: 0x%" PRIx64 "\n",
printf("READ64 image: %" PRId64 " offset: 0x%" PRIx64 " length: 0x%" PRIx64 "\n",
pkt->read64_req.image, pkt->read64_req.offset, pkt->read64_req.length);
ret = sahara_read_common(fd, mbn, pkt->read64_req.offset, pkt->read64_req.length);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment