[Pdbg] [PATCH 6/7] libpdbg/htm: Enable NCU and set single dispatch/instruction mode
Cyril Bur
cyrilbur at gmail.com
Fri Mar 16 14:03:34 AEDT 2018
On Fri, 2018-03-16 at 13:38 +1100, Alistair Popple wrote:
> > + /* Not great to assume the core is the parent of the htm. */
>
> What are the chances of you having time to fix this TODO? Eg. something like
> pdbg_get_parent(child, class) that would just walk up the tree until the write
> target was found would be much nicer.
>
Absolutely. I cut this corner here because I know about my struct
pdbg_target merge with the device tree node code will require these
lines to change anyway.
More than happy to include a pdbg_get_parent(child, class) call at the
end of the rebase of the other series.
> > + if (HTM_ERR(pib_write(htm->target.dn->parent->target, HID0_REGISTER, hid0)))
> > + return -1;
> > +
> > + /* Not great to assume the core is the parent of the htm. */
> > + if (HTM_ERR(pib_read(htm->target.dn->parent->target, NCU_MODE_REGISTER, &ncu)))
> > + return -1;
> > +
> > + ncu |= NCU_MODE_HTM_ENABLE;
> > +
> > + /* Not great to assume the core is the parent of the htm. */
> > + if (HTM_ERR(pib_write(htm->target.dn->parent->target, NCU_MODE_REGISTER, ncu)))
> > return -1;
> >
> > return 0;
> >
>
>
More information about the Pdbg
mailing list