Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 228779d2 authored by David Keitel's avatar David Keitel
Browse files

power: qpnp-fg: fix offset SRAM reads/writes



When a read or write is attempted at a given offset
which is determined by the address, currently the
offset is not correctly accounted for and the data
returned would be as follows:

	address = offset_address - (offset_address % 4)

To allow reading from addresses where the modulus is non-zero
take into account the modulus result when doing SRAM reads
or writes.

Note that for any SRAM writes the third byte in the buffer
must be written to in order for the write to take effect.
For example a write to byte 2 must write bytes 2 and 3 at
a given address.

CRs-Fixed: 711917
Change-Id: Ic889834193223cea8046e36dc1d8f36937f6d27b
Signed-off-by: default avatarDavid Keitel <dkeitel@codeaurora.org>
parent d5fc7ff6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment