/* Load an address or vlan tag into a CAM  */
static void mac_set_cam(struct mac_regs __iomem *regs, int idx, const u8 *addr)
/* Load an address or vlan tag into a CAM  */
static void mac_set_cam(struct mac_regs __iomem *regs, int idx, const u8 *addr)
{
	int i;
	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
	idx &= (64 - 1);
	writeb(CAMADDR_CAMEN | idx, &regs->CAMADDR);
	for (i = 0; i < 6; i++)
		writeb(*addr++, &(regs->MARCAM[i]));
	BYTE_REG_BITS_ON(CAMCR_CAMWR, &regs->CAMCR);
	udelay(10);
	writeb(0, &regs->CAMADDR);
	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
}