hw/phb4: Factor out PERST control
hw/phb4: Factor out PERST control

Some time ago Mikey added some code work around a bug we found where a
certain RAID card wouldn't come back again after a fast-reboot. The
workaround is setting the Link Disable bit before asserting PERST and
clear it after de-asserting PERST.

Currently we do this in the FRESET path, but not in the CRESET path.
This patch moves the PERST control into its own function to reduce
duplication and to the workaround is applied in all circumstances.

Signed-off-by: Oliver O'Halloran <3dfaff8fa6ae977f042064a112a6aac576279b9b@gmail.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.ibm.com>

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