host-drivers/base-driver/vca/plx87xx/plx_hw.c
void plx_init_vca_g2_gpios(struct plx_device *xdev)
{
	u32 data;
	mutex_lock(&xdev->mmio_lock);
	data = plx_mmio_read(&xdev->mmio, GPIO_REG);
	// GPIO initialization done only once for all 3 nodes
	if (!(data & PLX_CARD_RESET_BIT)) {
		data = PLX_MV_DEF_GPIO_VAL;
		plx_mmio_write(&xdev->mmio, data, GPIO_REG);
		msleep(GPIO_DEF_WAIT_TIME);
	}
	mutex_unlock(&xdev->mmio_lock);
}
/**
 * plx_init_vca_g2_gpios - Initialize GPIO outputs for gen2 device
 * @xdev: pointer to plx_device instance
 *
 * VCA GEN2 device doesn't have GPIO default states
 * programmed in EEPROM, thus driver needs to
 * program them at start (only once, for all nodes)
 */
Initialize GPIO outputs for gen2 device
@xdev: pointer to plx_device instance

VCA GEN2 device doesn't have GPIO default states
programmed in EEPROM, thus driver needs to
program them at start (only once, for all nodes)
Initialize GPIO outputs for gen2 device @xdev : pointer to plx_device instance VCA GEN2 device doesn ' t have GPIO default states programmed in EEPROM thus driver needs to program them at start ( only once for all nodes )
void plx_init_vca_g2_gpios(struct plx_device *xdev)
{
	u32 data;
	mutex_lock(&xdev->mmio_lock);
	data = plx_mmio_read(&xdev->mmio, GPIO_REG);
	if (!(data & PLX_CARD_RESET_BIT)) {
		data = PLX_MV_DEF_GPIO_VAL;
		plx_mmio_write(&xdev->mmio, data, GPIO_REG);
		msleep(GPIO_DEF_WAIT_TIME);
	}
	mutex_unlock(&xdev->mmio_lock);
}
void plx_init_vca_g2_gpios ( struct plx_device * xdev ) { u32 data ; mutex_lock ( & xdev -> mmio_lock ) ; data = plx_mmio_read ( & xdev -> mmio , GPIO_REG ) ; if ( ! ( data & PLX_CARD_RESET_BIT ) ) { data = PLX_MV_DEF_GPIO_VAL ; plx_mmio_write ( & xdev -> mmio , data , GPIO_REG ) ; msleep ( GPIO_DEF_WAIT_TIME ) ; } mutex_unlock ( & xdev -> mmio_lock ) ; }
plx_init_vca_g2_gpios - Initialize GPIO outputs for gen2 device
 @xdev: pointer to plx_device instance
plx_init_vca_g2_gpios - Initialize GPIO outputs for gen2 device @xdev : pointer to plx_device instance
// GPIO initialization done only once for all 3 nodes