@@ -314,15 +314,13 @@ static int cfam_hmfsi_probe(struct pdbg_target *target)
{
struct fsi *fsi = target_to_fsi(target);
struct pdbg_target *fsi_parent = target->parent;
- uint32_t value, port;
+ uint32_t value;
int rc;
/* Enable the port in the upstream control register */
- assert(!(pdbg_target_u32_property(target, "port", &port)));
- fsi_read(fsi_parent, 0x3404, &value);
- value |= 1 << (31 - port);
- if ((rc = fsi_write(fsi_parent, 0x3404, value))) {
- PR_ERROR("Unable to enable HMFSI port %d\n", port);
+ assert(!(pdbg_target_u32_property(target, "port", &value)));
+ if ((rc = fsi_write(fsi_parent, 0x3406, 0x80000000 >> value))) {
+ PR_ERROR("Unable to enable HMFSI port %d\n", value);
return rc;
}
Do this with one write to MSENP0 instead of RMW to MENP0. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> --- libpdbg/cfam.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)