lkml.org 
[lkml]   [2023]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] PCI: mediatek-gen3: Fix translation window
From
Il 23/10/23 10:14, Jianjun Wang ha scritto:
> The size of translation table should be a power of 2, using fls()
> cannot get the proper value when the size is not a power of 2. For
> example, fls(0x3e00000) - 1 = 25, hence the PCIe translation window
> size will be set to 0x2000000 instead of the expected size 0x3e00000.
>
> Fix translation window by splitting the MMIO space to multiple tables if
> its size is not a power of 2.
>
> Fixes: d3bf75b579b9 ("PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192")
> Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


\
 
 \ /
  Last update: 2023-10-23 14:34    [W:0.179 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site