/* qla2x00_nv_write() - Prepare for NVRAM read/write operation. @ha: HA context @data: Serial interface selector  */
static void qla2x00_nv_write(struct qla_hw_data *ha, uint16_t data)
/* qla2x00_nv_write() - Prepare for NVRAM read/write operation. @ha: HA context @data: Serial interface selector  */
static void qla2x00_nv_write(struct qla_hw_data *ha, uint16_t data)
{
	struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_WRT_ENABLE);
	RD_REG_WORD(&reg->nvram);
	NVRAM_DELAY();
	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_CLOCK |
	    NVR_WRT_ENABLE);
	RD_REG_WORD(&reg->nvram);
	NVRAM_DELAY();
	WRT_REG_WORD(&reg->nvram, data | NVR_SELECT | NVR_WRT_ENABLE);
	RD_REG_WORD(&reg->nvram);
	NVRAM_DELAY();
}