/* __vxge_hw_kdfc_swapper_set - Set the swapper bits for the kdfc. Set the swapper bits appropriately for the vpath.  */
enum vxge_hw_status __vxge_hw_kdfc_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg, struct vxge_hw_vpath_reg __iomem *vpath_reg)
/* __vxge_hw_kdfc_swapper_set - Set the swapper bits for the kdfc. Set the swapper bits appropriately for the vpath.  */
enum vxge_hw_status __vxge_hw_kdfc_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg, struct vxge_hw_vpath_reg __iomem *vpath_reg)
{
	u64 val64;
	val64 = readq(&legacy_reg->pifm_wr_swap_en);
	if (val64 == VXGE_HW_SWAPPER_WRITE_BYTE_SWAP_ENABLE) {
		val64 = readq(&vpath_reg->kdfcctl_cfg0);
		wmb();
		val64 |= VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO0	|
			VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO1	|
			VXGE_HW_KDFCCTL_CFG0_BYTE_SWAPEN_FIFO2;
		writeq(val64, &vpath_reg->kdfcctl_cfg0);
		wmb();
	}
	return VXGE_HW_OK;
}