ppc/pnv: Introduce a num_stack class attribute

Each PEC device of the POWER9 chip has a predefined number of stacks,
equivalent of a root port complex:

  PEC0 -> 1 stack
  PEC1 -> 2 stacks
  PEC2 -> 3 stacks

Introduce a class attribute to hold these values and remove the
"num-stacks" property.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211213132830.108372-11-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
Cédric Le Goater 2021-12-17 17:57:19 +01:00
parent 6f43d2551f
commit cf0ee6955c
3 changed files with 12 additions and 8 deletions

View file

@ -223,6 +223,7 @@ struct PnvPhb4PecClass {
int stk_compat_size;
uint64_t version;
uint64_t device_id;
const uint32_t *num_stacks;
};
#endif /* PCI_HOST_PNV_PHB4_H */