/* lp->indirect_mutex must be held when calling this function  */
u32 temac_indirect_in32(struct temac_local *lp, int reg)
/* lp->indirect_mutex must be held when calling this function  */
u32 temac_indirect_in32(struct temac_local *lp, int reg)
{
	u32 val;
	if (temac_indirect_busywait(lp))
		return -ETIMEDOUT;
	temac_iow(lp, XTE_CTL0_OFFSET, reg);
	if (temac_indirect_busywait(lp))
		return -ETIMEDOUT;
	val = temac_ior(lp, XTE_LSW0_OFFSET);
	return val;
}