Hello Robin,
On 21.12.23 15:02, Ahmad Fatoum wrote:
> On 20.12.23 13:38, Robin van der Gracht wrote:
>> Hi Ahmad,
>>
>> On 2023-12-20 10:00, Ahmad Fatoum wrote:
>>> Hello Robin,
>>>
>>> Thanks for the fix.
>>>
>>> On 20.12.23 09:29, Robin van der Gracht wrote:
- if (roffset + rbytes > stri
On Tue, Jan 02, 2024 at 11:31:43AM +0100, Sascha Hauer wrote:
> On Wed, Dec 20, 2023 at 09:29:08AM +0100, Robin van der Gracht wrote:
> > We should add 1 to the max_register index since counting is zero based.
> >
> > i.e. the stm32mp151 bsec has registers 0 - 95 with reg_stride 4.
> > Size should
On Wed, Dec 20, 2023 at 09:29:08AM +0100, Robin van der Gracht wrote:
> We should add 1 to the max_register index since counting is zero based.
>
> i.e. the stm32mp151 bsec has registers 0 - 95 with reg_stride 4.
> Size should be (95 + 1) * 4 = 384 bytes otherwise we can't access bsec
> register 9
On 20.12.23 13:38, Robin van der Gracht wrote:
> Hi Ahmad,
>
> On 2023-12-20 10:00, Ahmad Fatoum wrote:
>> Hello Robin,
>>
>> Thanks for the fix.
>>
>> On 20.12.23 09:29, Robin van der Gracht wrote:
>>> - if (roffset + rbytes > stride * regmap_get_max_register(map))
>>> + if (roffset + rbyte
Hi Ahmad,
On 2023-12-20 10:00, Ahmad Fatoum wrote:
Hello Robin,
Thanks for the fix.
On 20.12.23 09:29, Robin van der Gracht wrote:
- if (roffset + rbytes > stride * regmap_get_max_register(map))
+ if (roffset + rbytes > regmap_size_bytes(map) * stride)
Shouldn't stride on the ri
Hello Robin,
Thanks for the fix.
On 20.12.23 09:29, Robin van der Gracht wrote:
> - if (roffset + rbytes > stride * regmap_get_max_register(map))
> + if (roffset + rbytes > regmap_size_bytes(map) * stride)
Shouldn't stride on the right hand side be dropped?
Cheers,
Ahmad
>
We should add 1 to the max_register index since counting is zero based.
i.e. the stm32mp151 bsec has registers 0 - 95 with reg_stride 4.
Size should be (95 + 1) * 4 = 384 bytes otherwise we can't access bsec
register 95 (last one).
regmap_size_bytes() does take the +1 into account so we can use t