rta: factor out loop-independent code from calibration
rta: factor out loop-independent code from calibration

credp/lisa,ARM-software/lisa,ARM-software/lisa,credp/lisa,ARM-software/lisa,ARM-software/lisa,credp/lisa,credp/lisa