/* All registers defined in struct tioce will meet that criteria.  */
static void tioce_mmr_war_pre(struct tioce_kernel *kern, void __iomem *mmr_addr)
/* All registers defined in struct tioce will meet that criteria.  */
static void tioce_mmr_war_pre(struct tioce_kernel *kern, void __iomem *mmr_addr)
{
	u64 mmr_base;
	u64 mmr_offset;
	if (kern->ce_common->ce_rev != TIOCE_REV_A)
		return;
	mmr_base = kern->ce_common->ce_pcibus.bs_base;
	mmr_offset = (unsigned long)mmr_addr - mmr_base;
	if (mmr_offset < 0x45000) {
		u64 mmr_war_offset;
		if (mmr_offset == 0 || mmr_offset == 0x80)
			mmr_war_offset = 0xc0;
		else if (mmr_offset == 0x148 || mmr_offset == 0x200)
			mmr_war_offset = 0x28;
		else
			mmr_war_offset = 0x158;
		readq_relaxed((void __iomem *)(mmr_base + mmr_war_offset));
	}
}