]> git.proxmox.com Git - mirror_qemu.git/commit
ppc/pnv: Fix number of I2C engines and ports for power9/10
authorGlenn Miles <milesg@linux.vnet.ibm.com>
Wed, 25 Oct 2023 15:27:14 +0000 (10:27 -0500)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Tue, 7 Nov 2023 18:49:41 +0000 (15:49 -0300)
commit0d1dcb0bb168ee876445a7c94d753aee8d8a2e15
treed9c39d8c89c7332e50b59e5ca24ff0609a2df0fb
parent1ceda19c28a11cf51ca5f670c50934c66b7785bd
ppc/pnv: Fix number of I2C engines and ports for power9/10

Power9 is supposed to have 4 PIB-connected I2C engines with the
following number of ports on each engine:

    0: 2
    1: 13
    2: 2
    3: 2

Power10 also has 4 engines but has the following number of ports
on each engine:

    0: 14
    1: 14
    2: 2
    3: 16

Current code assumes that they all have the same (maximum) number.
This can be a problem if software expects to see a certain number
of ports present (Power Hypervisor seems to care).

Fixed this by adding separate tables for power9 and power10 that
map the I2C controller number to the number of I2C buses that should
be attached for that engine.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
Message-ID: <20231025152714.956664-1-milesg@linux.vnet.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/ppc/pnv.c
include/hw/ppc/pnv_chip.h