[Skiboot] [PATCH v2 01/10] npu2: Add a function to detect POWER9 DD1
Alistair Popple
alistair at popple.id.au
Mon Jul 31 13:49:11 AEST 2017
I guess this could be useful outside of npu2.c, but at some point all this DD1
code is just going to get removed anyway so probably ok just to have a static
version.
Acked-by: Alistair Popple <alistair at popple.id.au>
On Fri, 21 Jul 2017 10:47:38 AM Reza Arbab wrote:
> Provide a convenience we'll use quite a bit to preserve backwards
> compatibility with DD1.
>
> Signed-off-by: Reza Arbab <arbab at linux.vnet.ibm.com>
> Acked-by: Alistair Popple <alistair at popple.id.au>
> Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> Cc: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> ---
> hw/npu2.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/hw/npu2.c b/hw/npu2.c
> index 83451c3..a986652 100644
> --- a/hw/npu2.c
> +++ b/hw/npu2.c
> @@ -58,6 +58,16 @@
>
> #define VENDOR_CAP_PCI_DEV_OFFSET 0x0d
>
> +static bool is_p9dd1(void)
> +{
> + struct proc_chip *chip = next_chip(NULL);
> +
> + return chip &&
> + (chip->type == PROC_CHIP_P9_NIMBUS ||
> + chip->type == PROC_CHIP_P9_CUMULUS) &&
> + (chip->ec_level & 0xf0) == 0x10;
> +}
> +
> /*
> * We use the indirect method because it uses the same addresses as
> * the MMIO offsets (NPU RING)
>
More information about the Skiboot
mailing list