pnv_phb4_pec: Keep track of instantiated PHBs

Add an array on the PEC object to keep track of the PHBs which are
instantiated. The array can be sparsely populated when using
user-created PHBs. It will be useful for the next patch to only export
instantiated PHBs in the device tree.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20230302163715.129635-2-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Frederic Barrat 2023-03-02 17:37:12 +01:00 committed by Daniel Henrique Barboza
parent e64645ba80
commit 1068ebb606
3 changed files with 10 additions and 5 deletions

View file

@ -185,6 +185,8 @@ struct PnvPhb4PecState {
/* PHBs */
uint32_t num_phbs;
#define MAX_PHBS_PER_PEC 3
PnvPHB *phbs[MAX_PHBS_PER_PEC];
PnvChip *chip;
};