opal: Re-sync failed chiptod with neighboring chiptod.
opal: Re-sync failed chiptod with neighboring chiptod.

The current implementation fails to recover from TOD error on slave chip
where TOD on active master is also stopped due to an error.

This patch improves the TOD recovery for slave chip TODs. Below are the
steps for TOD recovery on slave chips:
a. HMI received on slave chip TOD (e.g. chipS).
b. Check if TOD is running on active master. If yes, jump to step (e).
c. TOD on active master is not running. Scan through all neighboring
   chips and identify one (e.g. chipX) that has TOD in running state.
d. Enable TTYPE-4 mode on 'chipX' so that it would respond to TTYPE-3
   request from another chip.
e. Move 'chipS' TOD into 'Not-set' mode.
f. Issue TTYPE-3 request from 'chipS' to request TOD value from another
   chipTOD.
g. TOD from 'chipS' will receive TOD value from 'chipX' OR from active master.
h. Check if TOD on 'chipS' is moved to 'running' state. if yes, then return
   success else return failure.

Signed-off-by: Mahesh Salgaonkar <6a890e1065a1d4e8df9dcf1d9a2c9c740bbcf8aa@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

ddstreet/skiboot,stewart-ibm/skiboot,mikey/skiboot,csmart/skiboot,qemu/skiboot,legoater/skiboot,shenki/skiboot,shenki/skiboot,shenki/skiboot,legoater/skiboot,shenki/skiboot,stewart-ibm/skiboot,open-power/skiboot,ddstreet/skiboot,apopple/skiboot,open-power/skiboot,open-power/skiboot,stewart-ibm/skiboot,qemu/skiboot,legoater/skiboot,legoater/skiboot,csmart/skiboot,qemu/skiboot,open-power/skiboot,ddstreet/skiboot,csmart/skiboot,legoater/skiboot,mikey/skiboot,qemu/skiboot,open-power/skiboot,mikey/skiboot,qemu/skiboot,shenki/skiboot,apopple/skiboot,apopple/skiboot