Message ID | 20170723113050.8815-3-hegdevasant@linux.vnet.ibm.com |
---|---|
State | Changes Requested |
Headers | show |
On Sun, 2017-07-23 at 17:00 +0530, Vasant Hegde wrote: > +static void add_xscom_primary_property(const struct HDIF_common_hdr *hdif, > + struct dt_node *xscom) > +{ > + const void *pnor; > + uint32_t size = 0; > + > + pnor = HDIF_get_idata(hdif, SPPCRD_IDATA_PNOR_INFO, &size); > + /* PNOR is attached to master chip only */ > + if (pnor && size > 0) { > + dt_add_property(xscom, "primary", NULL, 0); > + prlog(PR_DEBUG, "XSCOM: Found primary chip ID\n"); > + } > +} Is that true of multi-drawers machine ? I was under the impression that such systems had a PNOR per node ... In fact it would be possible to construe a system where each chip boots independently off its own PNOR before the "connect". There should be a different way of identifying the "primary" SBE via HDAT... Ben.
On 07/24/2017 03:26 AM, Benjamin Herrenschmidt wrote: > On Sun, 2017-07-23 at 17:00 +0530, Vasant Hegde wrote: >> +static void add_xscom_primary_property(const struct HDIF_common_hdr *hdif, >> + struct dt_node *xscom) >> +{ >> + const void *pnor; >> + uint32_t size = 0; >> + >> + pnor = HDIF_get_idata(hdif, SPPCRD_IDATA_PNOR_INFO, &size); >> + /* PNOR is attached to master chip only */ >> + if (pnor && size > 0) { >> + dt_add_property(xscom, "primary", NULL, 0); >> + prlog(PR_DEBUG, "XSCOM: Found primary chip ID\n"); >> + } >> +} > > Is that true of multi-drawers machine ? I was under the impression that > such systems had a PNOR per node ... You are right. It won't work in multi-drawers. I will check with FW folks and fix this in next iteration. Thanks!
diff --git a/hdata/spira.c b/hdata/spira.c index d09dbfe..e6fbf0e 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -401,6 +401,20 @@ static void add_xscom_add_pcia_assoc(struct dt_node *np, uint32_t pcid) } } +static void add_xscom_primary_property(const struct HDIF_common_hdr *hdif, + struct dt_node *xscom) +{ + const void *pnor; + uint32_t size = 0; + + pnor = HDIF_get_idata(hdif, SPPCRD_IDATA_PNOR_INFO, &size); + /* PNOR is attached to master chip only */ + if (pnor && size > 0) { + dt_add_property(xscom, "primary", NULL, 0); + prlog(PR_DEBUG, "XSCOM: Found primary chip ID\n"); + } +} + static bool add_xscom_sppcrd(uint64_t xscom_base) { const struct HDIF_common_hdr *hdif; @@ -471,6 +485,7 @@ static bool add_xscom_sppcrd(uint64_t xscom_base) if (proc_gen >= proc_gen_p9) { add_xive_node(np); parse_i2c_devs(hdif, SPPCRD_IDATA_HOST_I2C, np); + add_xscom_primary_property(hdif, np); } }
Needed for SBE communication as some of the SBE MBOX commands has to be sent to SBE on master chip only. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> --- hdata/spira.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)