Lines Matching refs:seq
251 uint8_t seq[16]; member
519 static int stfsm_mx25_en_32bit_addr_seq(struct stfsm_seq *seq) in stfsm_mx25_en_32bit_addr_seq() argument
521 seq->seq_opc[0] = (SEQ_OPC_PADS_1 | in stfsm_mx25_en_32bit_addr_seq()
526 seq->seq[0] = STFSM_INST_CMD1; in stfsm_mx25_en_32bit_addr_seq()
527 seq->seq[1] = STFSM_INST_WAIT; in stfsm_mx25_en_32bit_addr_seq()
528 seq->seq[2] = STFSM_INST_STOP; in stfsm_mx25_en_32bit_addr_seq()
530 seq->seq_cfg = (SEQ_CFG_PADS_1 | in stfsm_mx25_en_32bit_addr_seq()
576 .seq = {
592 .seq = {
612 .seq = {
633 .seq = {
651 .seq = {
669 .seq = {
680 static int stfsm_n25q_en_32bit_addr_seq(struct stfsm_seq *seq) in stfsm_n25q_en_32bit_addr_seq() argument
682 seq->seq_opc[0] = (SEQ_OPC_PADS_1 | SEQ_OPC_CYCLES(8) | in stfsm_n25q_en_32bit_addr_seq()
684 seq->seq_opc[1] = (SEQ_OPC_PADS_1 | SEQ_OPC_CYCLES(8) | in stfsm_n25q_en_32bit_addr_seq()
688 seq->seq[0] = STFSM_INST_CMD2; in stfsm_n25q_en_32bit_addr_seq()
689 seq->seq[1] = STFSM_INST_CMD1; in stfsm_n25q_en_32bit_addr_seq()
690 seq->seq[2] = STFSM_INST_WAIT; in stfsm_n25q_en_32bit_addr_seq()
691 seq->seq[3] = STFSM_INST_STOP; in stfsm_n25q_en_32bit_addr_seq()
693 seq->seq_cfg = (SEQ_CFG_PADS_1 | in stfsm_n25q_en_32bit_addr_seq()
713 const struct stfsm_seq *seq) in stfsm_load_seq() argument
716 const uint32_t *src = (const uint32_t *)seq; in stfsm_load_seq()
717 int words = sizeof(*seq) / sizeof(*src); in stfsm_load_seq()
801 const struct stfsm_seq *seq = &stfsm_seq_load_fifo_byte; in stfsm_clear_fifo() local
818 stfsm_load_seq(fsm, seq); in stfsm_clear_fifo()
851 struct stfsm_seq *seq = &fsm->stfsm_seq_en_32bit_addr; in stfsm_enter_32bit_addr() local
854 seq->seq_opc[0] = (SEQ_OPC_PADS_1 | in stfsm_enter_32bit_addr()
859 stfsm_load_seq(fsm, seq); in stfsm_enter_32bit_addr()
868 struct stfsm_seq *seq = &stfsm_seq_read_status_fifo; in stfsm_wait_busy() local
874 seq->seq_opc[0] = (SEQ_OPC_PADS_1 | in stfsm_wait_busy()
879 stfsm_load_seq(fsm, seq); in stfsm_wait_busy()
903 writel(seq->seq_cfg, fsm->base + SPI_FAST_SEQ_CFG); in stfsm_wait_busy()
916 struct stfsm_seq *seq = &stfsm_seq_read_status_fifo; in stfsm_read_status() local
926 seq->seq_opc[0] = (SEQ_OPC_PADS_1 | SEQ_OPC_CYCLES(8) | in stfsm_read_status()
929 stfsm_load_seq(fsm, seq); in stfsm_read_status()
944 struct stfsm_seq *seq = &stfsm_seq_write_status; in stfsm_write_status() local
952 seq->seq_opc[1] = (SEQ_OPC_PADS_1 | SEQ_OPC_CYCLES(8) | in stfsm_write_status()
955 seq->status = (uint32_t)data | STA_PADS_1 | STA_CSDEASSERT; in stfsm_write_status()
956 seq->seq[2] = (bytes == 1) ? STFSM_INST_STA_WR1 : STFSM_INST_STA_WR1_2; in stfsm_write_status()
958 stfsm_load_seq(fsm, seq); in stfsm_write_status()
1004 struct stfsm_seq *seq) in stfsm_prepare_erasesec_seq() argument
1008 seq->addr_cfg = (ADR_CFG_CYCLES_ADD1(addr1_cycles) | in stfsm_prepare_erasesec_seq()
1032 struct stfsm_seq *seq, in stfsm_prepare_rw_seq() argument
1038 memset(seq, 0, sizeof(*seq)); in stfsm_prepare_rw_seq()
1041 seq->seq_opc[i++] = (SEQ_OPC_PADS_1 | in stfsm_prepare_rw_seq()
1047 seq->seq_opc[i++] = (SEQ_OPC_PADS_1 | in stfsm_prepare_rw_seq()
1056 seq->addr_cfg = ((addr1_cycles & 0x3f) << 0 | /* ADD1 cycles */ in stfsm_prepare_rw_seq()
1062 seq->seq_cfg = ((cfg->data_pads - 1) << 16 | in stfsm_prepare_rw_seq()
1066 seq->seq_cfg |= SEQ_CFG_READNOTWRITE; in stfsm_prepare_rw_seq()
1069 seq->mode = ((cfg->mode_data & 0xff) << 0 | /* data */ in stfsm_prepare_rw_seq()
1074 seq->dummy = ((cfg->dummy_cycles & 0x3f) << 16 | /* cycles */ in stfsm_prepare_rw_seq()
1081 seq->seq[i++] = STFSM_INST_CMD2; in stfsm_prepare_rw_seq()
1083 seq->seq[i++] = STFSM_INST_CMD1; in stfsm_prepare_rw_seq()
1085 seq->seq[i++] = STFSM_INST_ADD1; in stfsm_prepare_rw_seq()
1086 seq->seq[i++] = STFSM_INST_ADD2; in stfsm_prepare_rw_seq()
1089 seq->seq[i++] = STFSM_INST_MODE; in stfsm_prepare_rw_seq()
1092 seq->seq[i++] = STFSM_INST_DUMMY; in stfsm_prepare_rw_seq()
1094 seq->seq[i++] = in stfsm_prepare_rw_seq()
1096 seq->seq[i++] = STFSM_INST_STOP; in stfsm_prepare_rw_seq()
1100 struct stfsm_seq *seq, in stfsm_search_prepare_rw_seq() argument
1111 stfsm_prepare_rw_seq(fsm, seq, config); in stfsm_search_prepare_rw_seq()
1271 static void stfsm_s25fl_prepare_erasesec_seq_32(struct stfsm_seq *seq) in stfsm_s25fl_prepare_erasesec_seq_32() argument
1273 seq->seq_opc[1] = (SEQ_OPC_PADS_1 | in stfsm_s25fl_prepare_erasesec_seq_32()
1277 seq->addr_cfg = (ADR_CFG_CYCLES_ADD1(16) | in stfsm_s25fl_prepare_erasesec_seq_32()
1287 struct stfsm_seq seq = { in stfsm_s25fl_read_dyb() local
1298 .seq = { in stfsm_s25fl_read_dyb()
1311 stfsm_load_seq(fsm, &seq); in stfsm_s25fl_read_dyb()
1322 struct stfsm_seq seq = { in stfsm_s25fl_write_dyb() local
1335 .seq = { in stfsm_s25fl_write_dyb()
1349 stfsm_load_seq(fsm, &seq); in stfsm_s25fl_write_dyb()
1357 struct stfsm_seq seq = { in stfsm_s25fl_clear_status_reg() local
1366 .seq = { in stfsm_s25fl_clear_status_reg()
1379 stfsm_load_seq(fsm, &seq); in stfsm_s25fl_clear_status_reg()
1516 struct stfsm_seq *seq = &fsm->stfsm_seq_read; in stfsm_read() local
1533 data_pads = ((seq->seq_cfg >> 16) & 0x3) + 1; in stfsm_read()
1544 seq->data_size = TRANSFER_SIZE(size_ub); in stfsm_read()
1545 seq->addr1 = (offset >> 16) & 0xffff; in stfsm_read()
1546 seq->addr2 = offset & 0xffff; in stfsm_read()
1548 stfsm_load_seq(fsm, seq); in stfsm_read()
1577 struct stfsm_seq *seq = &fsm->stfsm_seq_write; in stfsm_write() local
1597 data_pads = ((seq->seq_cfg >> 16) & 0x3) + 1; in stfsm_write()
1613 seq->data_size = TRANSFER_SIZE(size_ub); in stfsm_write()
1614 seq->addr1 = (offset >> 16) & 0xffff; in stfsm_write()
1615 seq->addr2 = offset & 0xffff; in stfsm_write()
1648 stfsm_load_seq(fsm, seq); in stfsm_write()
1699 struct stfsm_seq *seq = &stfsm_seq_erase_sector; in stfsm_erase_sector() local
1708 seq->addr1 = (offset >> 16) & 0xffff; in stfsm_erase_sector()
1709 seq->addr2 = offset & 0xffff; in stfsm_erase_sector()
1711 stfsm_load_seq(fsm, seq); in stfsm_erase_sector()
1729 const struct stfsm_seq *seq = &stfsm_seq_erase_chip; in stfsm_erase_chip() local
1733 stfsm_load_seq(fsm, seq); in stfsm_erase_chip()
1833 const struct stfsm_seq *seq = &stfsm_seq_read_jedec; in stfsm_read_jedec() local
1836 stfsm_load_seq(fsm, seq); in stfsm_read_jedec()