phb4/capp: Use link width to allocate STQ engines to CAPP
phb4/capp: Use link width to allocate STQ engines to CAPP

Update phb4_init_capp_regs() to allocates STQ Engines to CAPP/PEC2
based on link width instead of always assuming it to x8.

Also re-factor the function slightly to evaluate the link-width only
once and cache it so that it can also be used to allocate DMA read
engines.

Cc: stable
Fixes: 47c09cdfe7a3("phb4/capp: Calculate STQ/DMA read engines based on link-width for PEC")
Signed-off-by: Vaibhav Jain <e78384dfaa97bf0f3945c4da4075af8ac33ade0a@linux.ibm.com>
Reviewed-by: Frederic Barrat <c90240987c583ac0802fbeb88cb1684edc683e18@linux.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.ibm.com>

shenki/skiboot,qemu/skiboot,shenki/skiboot,legoater/skiboot,qemu/skiboot,open-power/skiboot,legoater/skiboot,open-power/skiboot,qemu/skiboot,shenki/skiboot,stewart-ibm/skiboot,legoater/skiboot,qemu/skiboot,open-power/skiboot,open-power/skiboot,shenki/skiboot,open-power/skiboot,qemu/skiboot,stewart-ibm/skiboot,legoater/skiboot,stewart-ibm/skiboot,shenki/skiboot,legoater/skiboot