Skip to content

Commit e3f41d4

Browse files
jernejskapritzel
authored andcommitted
fel-lib: Fix parsing scratchpad field
Field has 32 bits, not 16, as it is currently handled. This fixes scratchpad address print when using "sunxi-fel ver" command on A523. Before it printed "0x1500" and afterwards "0x61500", which makes much more sense and it was verified by BROM disassembly. Signed-off-by: Jernej Skrabec <[email protected]>
1 parent f88e5fe commit e3f41d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fel_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static void aw_fel_get_version(feldev_handle *dev, struct aw_fel_version *buf)
201201
buf->soc_id = (le32toh(buf->soc_id) >> 8) & 0xFFFF;
202202
buf->unknown_0a = le32toh(buf->unknown_0a);
203203
buf->protocol = le32toh(buf->protocol);
204-
buf->scratchpad = le16toh(buf->scratchpad);
204+
buf->scratchpad = le32toh(buf->scratchpad);
205205
buf->pad[0] = le32toh(buf->pad[0]);
206206
buf->pad[1] = le32toh(buf->pad[1]);
207207
}

0 commit comments

Comments
 (0)