[Skiboot] [PATCH 05/14] hdat: Add support for PHB4

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Thu Jan 12 17:53:59 AEDT 2017


On 01/12/2017 09:24 AM, Oliver O'Halloran wrote:
> Adds support for parsing the PHB4 entries in the IOHUB array and
> populating the devicetree appropriately.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
> ---
>   hdata/iohub.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>   hdata/spira.h |  28 ++++++++++----
>   hw/phb4.c     |   2 -
>   3 files changed, 142 insertions(+), 9 deletions(-)
>
> diff --git a/hdata/iohub.c b/hdata/iohub.c
> index 50915f849cff..14b74696deb0 100644
> --- a/hdata/iohub.c
> +++ b/hdata/iohub.c
> @@ -248,6 +248,89 @@ static struct dt_node *io_add_phb3(const struct cechub_io_hub *hub,
>   	return pbcq;
>   }
>
> +static struct dt_node *add_pec_stack(const struct cechub_io_hub *hub,
> +				     struct dt_node *pbcq, int stack_index,
> +				     int phb_index, u8 active_phbs)
> +{
> +	struct dt_node *stack;
> +	u64 eq[8];
> +	int i;
> +
> +	stack = dt_new_addr(pbcq, "stack", stack_index);

assert()  ?


> +
> +	dt_add_property_cells(stack, "reg", stack_index);
> +	dt_add_property_cells(stack, "ibm,phb-index", phb_index);
> +	dt_add_property_string(stack, "compatible", "ibm,power9-phb-stack");
> +
> +	/* XXX: This should probably just return if the PHB is disabled
> +	 *      rather than adding the extra properties.
> +	 */
> +


.../...

> diff --git a/hdata/spira.h b/hdata/spira.h
> index b04a3df33f73..d989c6b40625 100644
> --- a/hdata/spira.h
> +++ b/hdata/spira.h
> @@ -575,6 +575,8 @@ struct cechub_io_hub {
>   #define CECHUB_HUB_FAB_BR0_PDT_PHB1	0x40
>   #define CECHUB_HUB_FAB_BR0_PDT_PHB2	0x20
>   #define CECHUB_HUB_FAB_BR0_PDT_PHB3	0x10
> +#define CECHUB_HUB_FAB_BR0_PDT_PHB4	0x08
> +#define CECHUB_HUB_FAB_BR0_PDT_PHB5	0x04
>   	uint8_t		fab_br1_pdt;	/* p5ioc2 & p7ioc PCI-E */
>   #define CECHUB_HUB_FAB_BR1_PDT_PHB0	0x80
>   #define CECHUB_HUB_FAB_BR1_PDT_PHB1	0x40
> @@ -583,10 +585,14 @@ struct cechub_io_hub {
>   #define CECHUB_HUB_FAB_BR1_PDT_PHB4	0x08 /* p7ioc only */
>   #define CECHUB_HUB_FAB_BR1_PDT_PHB5	0x04 /* p7ioc only */
>   	__be16		iohub_id;	/* the type of hub */
> -#define CECHUB_HUB_P7IOC	0x60e7	/* from VPL3 */
> -#define CECHUB_HUB_MURANO	0x20ef	/* Murano from spec */
> -#define CECHUB_HUB_MURANO_SEGU	0x0001	/* Murano+Seguso from spec */
> -#define CECHUB_HUB_VENICE_WYATT	0x0010	/* Venice+Wyatt from spec */
> +#define CECHUB_HUB_P7IOC		0x60e7	/* from VPL3 */
> +#define CECHUB_HUB_MURANO		0x20ef	/* Murano from spec */
> +#define CECHUB_HUB_MURANO_SEGU		0x0001	/* Murano+Seguso from spec */
> +#define CECHUB_HUB_VENICE_WYATT		0x0010	/* Venice+Wyatt from spec */
> +#define CECHUB_HUB_NIMBUS_SFORAZ	0x0020	/* Nimbus+sforaz from spec */
> +#define CECHUB_HUB_NIMBUS_MONZA		0x0021	/* Nimbus+monza from spec */
> +#define CECHUB_HUB_NIMBUS_LAGRANGE	0x0022	/* Nimbus+lagrange from spec */
> +#define CECHUB_HUB_CUMULUS_DOUMO	0x0031	/* cumulus+doumo from spec */

DUOMO ?

s/0x0031/0x0030/ ?

-Vasant



More information about the Skiboot mailing list