Lines Matching refs:reg_offs
432 u32 reg_offs = 0; in mtk_snand_mac_io() local
448 for (i = 0; i < op->cmd.nbytes; i++, reg_offs++) { in mtk_snand_mac_io()
450 val |= b << (8 * (reg_offs % 4)); in mtk_snand_mac_io()
451 if (reg_offs % 4 == 3) { in mtk_snand_mac_io()
452 nfi_write32(snf, SNF_GPRAM + reg_offs - 3, val); in mtk_snand_mac_io()
457 for (i = 0; i < op->addr.nbytes; i++, reg_offs++) { in mtk_snand_mac_io()
459 val |= b << (8 * (reg_offs % 4)); in mtk_snand_mac_io()
460 if (reg_offs % 4 == 3) { in mtk_snand_mac_io()
461 nfi_write32(snf, SNF_GPRAM + reg_offs - 3, val); in mtk_snand_mac_io()
466 for (i = 0; i < op->dummy.nbytes; i++, reg_offs++) { in mtk_snand_mac_io()
467 if (reg_offs % 4 == 3) { in mtk_snand_mac_io()
468 nfi_write32(snf, SNF_GPRAM + reg_offs - 3, val); in mtk_snand_mac_io()
474 for (i = 0; i < op->data.nbytes; i++, reg_offs++) { in mtk_snand_mac_io()
475 val |= tx_buf[i] << (8 * (reg_offs % 4)); in mtk_snand_mac_io()
476 if (reg_offs % 4 == 3) { in mtk_snand_mac_io()
477 nfi_write32(snf, SNF_GPRAM + reg_offs - 3, val); in mtk_snand_mac_io()
483 if (reg_offs % 4) in mtk_snand_mac_io()
484 nfi_write32(snf, SNF_GPRAM + (reg_offs & ~3), val); in mtk_snand_mac_io()
486 for (i = 0; i < reg_offs; i += 4) in mtk_snand_mac_io()
490 dev_dbg(snf->dev, "SNF TX: %u RX: %u", reg_offs, rx_len); in mtk_snand_mac_io()
492 ret = mtk_snand_mac_trigger(snf, reg_offs, rx_len); in mtk_snand_mac_io()
499 nfi_read_data(snf, SNF_GPRAM + reg_offs, rx_buf, rx_len); in mtk_snand_mac_io()