Skip to content
Commit 73e1a264 authored by Hesham Almatary's avatar Hesham Almatary Committed by James Morse
Browse files

MPAM: Fix calculating the bandwidth granularity



The minimum bandwidth granularity is calculated from
MPAMF_MBW_IDR.BWA_WD, which represents the number of bits for
a fixed-point fraction (See Section 11.3.8 MPAM Reference Manual).

Right now, the calculation works fine for 1, but
is wrong for 2 bits and more. For example, 1 bit will equal 50%.
In the current implementation, 2 bits will equal 33% instead of 25%.
Similarly, 3 bits will equal 25% instead of 12.5%.
This commit corrects the calculation.

Signed-off-by: default avatarHesham Almatary <hesham.almatary@huawei.com>
Signed-off-by: James Morse's avatarJames Morse <james.morse@arm.com>
parent c32874cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment