Message ID | 20200331094735.82874-1-fbarrat@linux.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] npu2-hw-procedures: Add platform hook to tune PHY setup | expand |
On 31/3/20 8:47 pm, Frederic Barrat wrote: > Add a hook to tune the PHY settings if needed. Only on the opencapi > path for now, since it seems to be only useful there. > It will be used on a later patch for Mihawk. > > Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> > Cc: skiboot-stable@lists.ozlabs.org # skiboot-op940.x Looks fine to me, though see my comments on the next patch Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
diff --git a/hw/npu2-hw-procedures.c b/hw/npu2-hw-procedures.c index 6236380a..890b25a8 100644 --- a/hw/npu2-hw-procedures.c +++ b/hw/npu2-hw-procedures.c @@ -1020,6 +1020,9 @@ void npu2_opencapi_bump_ui_lane(struct npu2_dev *dev) void npu2_opencapi_phy_init(struct npu2_dev *dev) { + if (platform.ocapi->phy_setup) + platform.ocapi->phy_setup(dev); + run_procedure(dev, 5); /* procedure_phy_tx_zcal */ /* * This is only required for OpenCAPI - Hostboot tries to set this diff --git a/include/platform.h b/include/platform.h index 6aa263ae..c045883d 100644 --- a/include/platform.h +++ b/include/platform.h @@ -11,6 +11,7 @@ struct pci_slot; struct errorlog; struct npu2; struct npu3; +struct npu2_dev; enum resource_id { RESOURCE_ID_KERNEL, @@ -64,6 +65,7 @@ struct platform_ocapi { bool odl_phy_swap; /* Swap ODL1 to use brick 2 rather than * brick 1 lanes */ const char *(*ocapi_slot_label)(uint32_t chip_id, uint32_t brick_index); + void (*phy_setup)(struct npu2_dev *dev); }; struct dt_node;
Add a hook to tune the PHY settings if needed. Only on the opencapi path for now, since it seems to be only useful there. It will be used on a later patch for Mihawk. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Cc: skiboot-stable@lists.ozlabs.org # skiboot-op940.x --- hw/npu2-hw-procedures.c | 3 +++ include/platform.h | 2 ++ 2 files changed, 5 insertions(+)