/* General Purpose I/O and Guest bus access This is a bit tricky. When a board lacks a GPIO function, the corresponding GPIO bit number in the card_info structure is set to 0.  */
void GPIO(struct zoran *zr, int bit, unsigned int value)
/* General Purpose I/O and Guest bus access This is a bit tricky. When a board lacks a GPIO function, the corresponding GPIO bit number in the card_info structure is set to 0.  */
void GPIO(struct zoran *zr, int bit, unsigned int value)
{
	u32 reg;
	u32 mask;
	mask = (1 << (24 + bit)) & 0xff000000;
	reg = btread(ZR36057_GPPGCR1) & ~mask;
	if (value) {
		reg |= mask;
	}
	btwrite(reg, ZR36057_GPPGCR1);
	udelay(1);
}