fsm 273 drivers/input/touchscreen/ti_am335x_tsc.c unsigned int fsm, status, irqclr = 0; fsm 285 drivers/input/touchscreen/ti_am335x_tsc.c fsm = titsc_readl(ts_dev, REG_ADCFSM); fsm 286 drivers/input/touchscreen/ti_am335x_tsc.c if (fsm == ADCFSM_STEPID) { fsm 21 drivers/isdn/mISDN/fsm.c mISDN_FsmNew(struct Fsm *fsm, fsm 26 drivers/isdn/mISDN/fsm.c fsm->jumpmatrix = fsm 27 drivers/isdn/mISDN/fsm.c kzalloc(array3_size(sizeof(FSMFNPTR), fsm->state_count, fsm 28 drivers/isdn/mISDN/fsm.c fsm->event_count), fsm 30 drivers/isdn/mISDN/fsm.c if (fsm->jumpmatrix == NULL) fsm 34 drivers/isdn/mISDN/fsm.c if ((fnlist[i].state >= fsm->state_count) || fsm 35 drivers/isdn/mISDN/fsm.c (fnlist[i].event >= fsm->event_count)) { fsm 38 drivers/isdn/mISDN/fsm.c i, (long)fnlist[i].state, (long)fsm->state_count, fsm 39 drivers/isdn/mISDN/fsm.c (long)fnlist[i].event, (long)fsm->event_count); fsm 41 drivers/isdn/mISDN/fsm.c fsm->jumpmatrix[fsm->state_count * fnlist[i].event + fsm 48 drivers/isdn/mISDN/fsm.c mISDN_FsmFree(struct Fsm *fsm) fsm 50 drivers/isdn/mISDN/fsm.c kfree((void *) fsm->jumpmatrix); fsm 59 drivers/isdn/mISDN/fsm.c if ((fi->state >= fi->fsm->state_count) || fsm 60 drivers/isdn/mISDN/fsm.c (event >= fi->fsm->event_count)) { fsm 63 drivers/isdn/mISDN/fsm.c (long)fi->state, (long)fi->fsm->state_count, event, fsm 64 drivers/isdn/mISDN/fsm.c (long)fi->fsm->event_count); fsm 67 drivers/isdn/mISDN/fsm.c r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state]; fsm 71 drivers/isdn/mISDN/fsm.c fi->fsm->strState[fi->state], fsm 72 drivers/isdn/mISDN/fsm.c fi->fsm->strEvent[event]); fsm 78 drivers/isdn/mISDN/fsm.c fi->fsm->strState[fi->state], fsm 79 drivers/isdn/mISDN/fsm.c fi->fsm->strEvent[event]); fsm 91 drivers/isdn/mISDN/fsm.c fi->fsm->strState[newstate]); fsm 29 drivers/isdn/mISDN/fsm.h struct Fsm *fsm; fsm 382 drivers/isdn/mISDN/layer1.c nl1->l1m.fsm = &l1fsm_s; fsm 2197 drivers/isdn/mISDN/layer2.c l2->l2m.fsm = &l2fsm; fsm 817 drivers/isdn/mISDN/tei.c l2->tm->tei_m.fsm = &teifsmn; fsm 1061 drivers/isdn/mISDN/tei.c l2->tm->tei_m.fsm = &teifsmu; fsm 1069 drivers/isdn/mISDN/tei.c l2->tm->tei_m.fsm = &teifsmn; fsm 1369 drivers/isdn/mISDN/tei.c mgr->deact.fsm = &deactfsm; fsm 294 drivers/mmc/host/bcm2835.c u32 edm, fsm; fsm 297 drivers/mmc/host/bcm2835.c fsm = edm & SDEDM_FSM_MASK; fsm 299 drivers/mmc/host/bcm2835.c if ((fsm == SDEDM_FSM_IDENTMODE) || fsm 300 drivers/mmc/host/bcm2835.c (fsm == SDEDM_FSM_DATAMODE)) fsm 302 drivers/mmc/host/bcm2835.c if (fsm == alternate_idle) { fsm 765 drivers/mmc/host/bcm2835.c u32 edm, fsm; fsm 776 drivers/mmc/host/bcm2835.c fsm = edm & SDEDM_FSM_MASK; fsm 777 drivers/mmc/host/bcm2835.c if (fsm == SDEDM_FSM_READWAIT || fsm 778 drivers/mmc/host/bcm2835.c fsm == SDEDM_FSM_WRITESTART1) fsm 1164 drivers/mmc/host/bcm2835.c u32 edm, fsm; fsm 1193 drivers/mmc/host/bcm2835.c fsm = edm & SDEDM_FSM_MASK; fsm 1195 drivers/mmc/host/bcm2835.c if ((fsm != SDEDM_FSM_IDENTMODE) && fsm 1196 drivers/mmc/host/bcm2835.c (fsm != SDEDM_FSM_DATAMODE)) { fsm 312 drivers/mtd/devices/st_spi_fsm.c static int stfsm_n25q_config(struct stfsm *fsm); fsm 313 drivers/mtd/devices/st_spi_fsm.c static int stfsm_mx25_config(struct stfsm *fsm); fsm 314 drivers/mtd/devices/st_spi_fsm.c static int stfsm_s25fl_config(struct stfsm *fsm); fsm 315 drivers/mtd/devices/st_spi_fsm.c static int stfsm_w25q_config(struct stfsm *fsm); fsm 703 drivers/mtd/devices/st_spi_fsm.c static inline int stfsm_is_idle(struct stfsm *fsm) fsm 705 drivers/mtd/devices/st_spi_fsm.c return readl(fsm->base + SPI_FAST_SEQ_STA) & 0x10; fsm 708 drivers/mtd/devices/st_spi_fsm.c static inline uint32_t stfsm_fifo_available(struct stfsm *fsm) fsm 710 drivers/mtd/devices/st_spi_fsm.c return (readl(fsm->base + SPI_FAST_SEQ_STA) >> 5) & 0x7f; fsm 713 drivers/mtd/devices/st_spi_fsm.c static inline void stfsm_load_seq(struct stfsm *fsm, fsm 716 drivers/mtd/devices/st_spi_fsm.c void __iomem *dst = fsm->base + SPI_FAST_SEQ_TRANSFER_SIZE; fsm 720 drivers/mtd/devices/st_spi_fsm.c BUG_ON(!stfsm_is_idle(fsm)); fsm 729 drivers/mtd/devices/st_spi_fsm.c static void stfsm_wait_seq(struct stfsm *fsm) fsm 740 drivers/mtd/devices/st_spi_fsm.c if (stfsm_is_idle(fsm)) fsm 746 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "timeout on sequence completion\n"); fsm 749 drivers/mtd/devices/st_spi_fsm.c static void stfsm_read_fifo(struct stfsm *fsm, uint32_t *buf, uint32_t size) fsm 755 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "Reading %d bytes from FIFO\n", size); fsm 761 drivers/mtd/devices/st_spi_fsm.c avail = stfsm_fifo_available(fsm); fsm 769 drivers/mtd/devices/st_spi_fsm.c readsl(fsm->base + SPI_FAST_SEQ_DATA_REG, buf, words); fsm 800 drivers/mtd/devices/st_spi_fsm.c static void stfsm_clear_fifo(struct stfsm *fsm) fsm 806 drivers/mtd/devices/st_spi_fsm.c words = stfsm_fifo_available(fsm); fsm 809 drivers/mtd/devices/st_spi_fsm.c readl(fsm->base + SPI_FAST_SEQ_DATA_REG); fsm 810 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "cleared %d words from FIFO\n", words); fsm 819 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 820 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 821 drivers/mtd/devices/st_spi_fsm.c words = stfsm_fifo_available(fsm); fsm 826 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "failed to clear bytes from the data FIFO\n"); fsm 831 drivers/mtd/devices/st_spi_fsm.c readl(fsm->base + SPI_FAST_SEQ_DATA_REG); fsm 833 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "cleared %d byte(s) from the data FIFO\n", 4 - i); fsm 836 drivers/mtd/devices/st_spi_fsm.c static int stfsm_write_fifo(struct stfsm *fsm, const uint32_t *buf, fsm 841 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "writing %d bytes to FIFO\n", size); fsm 845 drivers/mtd/devices/st_spi_fsm.c writesl(fsm->base + SPI_FAST_SEQ_DATA_REG, buf, words); fsm 850 drivers/mtd/devices/st_spi_fsm.c static int stfsm_enter_32bit_addr(struct stfsm *fsm, int enter) fsm 852 drivers/mtd/devices/st_spi_fsm.c struct stfsm_seq *seq = &fsm->stfsm_seq_en_32bit_addr; fsm 860 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 862 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 867 drivers/mtd/devices/st_spi_fsm.c static uint8_t stfsm_wait_busy(struct stfsm *fsm) fsm 880 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 890 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 892 drivers/mtd/devices/st_spi_fsm.c stfsm_read_fifo(fsm, &status, 4); fsm 897 drivers/mtd/devices/st_spi_fsm.c if ((fsm->configuration & CFG_S25FL_CHECK_ERROR_FLAGS) && fsm 904 drivers/mtd/devices/st_spi_fsm.c writel(seq->seq_cfg, fsm->base + SPI_FAST_SEQ_CFG); fsm 909 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "timeout on wait_busy\n"); fsm 914 drivers/mtd/devices/st_spi_fsm.c static int stfsm_read_status(struct stfsm *fsm, uint8_t cmd, fsm 922 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "read 'status' register [0x%02x], %d byte(s)\n", fsm 930 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 932 drivers/mtd/devices/st_spi_fsm.c stfsm_read_fifo(fsm, &tmp, 4); fsm 937 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 942 drivers/mtd/devices/st_spi_fsm.c static int stfsm_write_status(struct stfsm *fsm, uint8_t cmd, fsm 947 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, fsm 959 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 961 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 964 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_busy(fsm); fsm 989 drivers/mtd/devices/st_spi_fsm.c static bool stfsm_can_handle_soc_reset(struct stfsm *fsm) fsm 992 drivers/mtd/devices/st_spi_fsm.c if (fsm->reset_signal && fsm->info->flags & FLASH_FLAG_RESET) fsm 996 drivers/mtd/devices/st_spi_fsm.c if (fsm->reset_por) fsm 1004 drivers/mtd/devices/st_spi_fsm.c static void stfsm_prepare_erasesec_seq(struct stfsm *fsm, fsm 1007 drivers/mtd/devices/st_spi_fsm.c int addr1_cycles = fsm->info->flags & FLASH_FLAG_32BIT_ADDR ? 16 : 8; fsm 1018 drivers/mtd/devices/st_spi_fsm.c stfsm_search_seq_rw_configs(struct stfsm *fsm, fsm 1022 drivers/mtd/devices/st_spi_fsm.c int flags = fsm->info->flags; fsm 1032 drivers/mtd/devices/st_spi_fsm.c static void stfsm_prepare_rw_seq(struct stfsm *fsm, fsm 1054 drivers/mtd/devices/st_spi_fsm.c addr1_cycles = (fsm->info->flags & FLASH_FLAG_32BIT_ADDR) ? 16 : 8; fsm 1100 drivers/mtd/devices/st_spi_fsm.c static int stfsm_search_prepare_rw_seq(struct stfsm *fsm, fsm 1106 drivers/mtd/devices/st_spi_fsm.c config = stfsm_search_seq_rw_configs(fsm, cfgs); fsm 1108 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "failed to find suitable config\n"); fsm 1112 drivers/mtd/devices/st_spi_fsm.c stfsm_prepare_rw_seq(fsm, seq, config); fsm 1118 drivers/mtd/devices/st_spi_fsm.c static int stfsm_prepare_rwe_seqs_default(struct stfsm *fsm) fsm 1120 drivers/mtd/devices/st_spi_fsm.c uint32_t flags = fsm->info->flags; fsm 1124 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read, fsm 1127 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, fsm 1134 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_write, fsm 1137 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, fsm 1144 drivers/mtd/devices/st_spi_fsm.c stfsm_prepare_erasesec_seq(fsm, &stfsm_seq_erase_sector); fsm 1149 drivers/mtd/devices/st_spi_fsm.c static int stfsm_mx25_config(struct stfsm *fsm) fsm 1151 drivers/mtd/devices/st_spi_fsm.c uint32_t flags = fsm->info->flags; fsm 1160 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_prepare_rwe_seqs_default(fsm); fsm 1169 drivers/mtd/devices/st_spi_fsm.c stfsm_mx25_en_32bit_addr_seq(&fsm->stfsm_seq_en_32bit_addr); fsm 1171 drivers/mtd/devices/st_spi_fsm.c soc_reset = stfsm_can_handle_soc_reset(fsm); fsm 1172 drivers/mtd/devices/st_spi_fsm.c if (soc_reset || !fsm->booted_from_spi) fsm 1175 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 1); fsm 1180 drivers/mtd/devices/st_spi_fsm.c fsm->configuration = (CFG_READ_TOGGLE_32BIT_ADDR | fsm 1186 drivers/mtd/devices/st_spi_fsm.c stfsm_read_status(fsm, SPINOR_OP_RDSR, &sta, 1); fsm 1187 drivers/mtd/devices/st_spi_fsm.c data_pads = ((fsm->stfsm_seq_read.seq_cfg >> 16) & 0x3) + 1; fsm 1193 drivers/mtd/devices/st_spi_fsm.c stfsm_write_status(fsm, SPINOR_OP_WRSR, sta, 1, 1); fsm 1200 drivers/mtd/devices/st_spi_fsm.c stfsm_write_status(fsm, SPINOR_OP_WRSR, sta, 1, 1); fsm 1207 drivers/mtd/devices/st_spi_fsm.c static int stfsm_n25q_config(struct stfsm *fsm) fsm 1209 drivers/mtd/devices/st_spi_fsm.c uint32_t flags = fsm->info->flags; fsm 1216 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read, fsm 1219 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read, fsm 1222 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, fsm 1229 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_write, fsm 1232 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, fsm 1239 drivers/mtd/devices/st_spi_fsm.c stfsm_prepare_erasesec_seq(fsm, &stfsm_seq_erase_sector); fsm 1243 drivers/mtd/devices/st_spi_fsm.c stfsm_n25q_en_32bit_addr_seq(&fsm->stfsm_seq_en_32bit_addr); fsm 1245 drivers/mtd/devices/st_spi_fsm.c soc_reset = stfsm_can_handle_soc_reset(fsm); fsm 1246 drivers/mtd/devices/st_spi_fsm.c if (soc_reset || !fsm->booted_from_spi) { fsm 1251 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 1); fsm 1257 drivers/mtd/devices/st_spi_fsm.c fsm->configuration = (CFG_WRITE_TOGGLE_32BIT_ADDR | fsm 1267 drivers/mtd/devices/st_spi_fsm.c stfsm_write_status(fsm, N25Q_CMD_WRVCR, vcr, 1, 0); fsm 1285 drivers/mtd/devices/st_spi_fsm.c static void stfsm_s25fl_read_dyb(struct stfsm *fsm, uint32_t offs, uint8_t *dby) fsm 1312 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, &seq); fsm 1314 drivers/mtd/devices/st_spi_fsm.c stfsm_read_fifo(fsm, &tmp, 4); fsm 1318 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1321 drivers/mtd/devices/st_spi_fsm.c static void stfsm_s25fl_write_dyb(struct stfsm *fsm, uint32_t offs, uint8_t dby) fsm 1350 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, &seq); fsm 1351 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1353 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_busy(fsm); fsm 1356 drivers/mtd/devices/st_spi_fsm.c static int stfsm_s25fl_clear_status_reg(struct stfsm *fsm) fsm 1380 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, &seq); fsm 1382 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1387 drivers/mtd/devices/st_spi_fsm.c static int stfsm_s25fl_config(struct stfsm *fsm) fsm 1389 drivers/mtd/devices/st_spi_fsm.c struct flash_info *info = fsm->info; fsm 1403 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read, fsm 1408 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_write, fsm 1417 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_prepare_rwe_seqs_default(fsm); fsm 1430 drivers/mtd/devices/st_spi_fsm.c stfsm_s25fl_read_dyb(fsm, offs, &dyb); fsm 1432 drivers/mtd/devices/st_spi_fsm.c stfsm_s25fl_write_dyb(fsm, offs, 0xff); fsm 1444 drivers/mtd/devices/st_spi_fsm.c stfsm_read_status(fsm, SPINOR_OP_RDCR, &cr1, 1); fsm 1445 drivers/mtd/devices/st_spi_fsm.c data_pads = ((fsm->stfsm_seq_read.seq_cfg >> 16) & 0x3) + 1; fsm 1462 drivers/mtd/devices/st_spi_fsm.c stfsm_read_status(fsm, SPINOR_OP_RDSR, &sr1, 1); fsm 1464 drivers/mtd/devices/st_spi_fsm.c stfsm_write_status(fsm, SPINOR_OP_WRSR, sta_wr, 2, 1); fsm 1471 drivers/mtd/devices/st_spi_fsm.c fsm->configuration |= CFG_S25FL_CHECK_ERROR_FLAGS; fsm 1476 drivers/mtd/devices/st_spi_fsm.c static int stfsm_w25q_config(struct stfsm *fsm) fsm 1484 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_prepare_rwe_seqs_default(fsm); fsm 1489 drivers/mtd/devices/st_spi_fsm.c stfsm_read_status(fsm, SPINOR_OP_RDCR, &sr2, 1); fsm 1490 drivers/mtd/devices/st_spi_fsm.c data_pads = ((fsm->stfsm_seq_read.seq_cfg >> 16) & 0x3) + 1; fsm 1506 drivers/mtd/devices/st_spi_fsm.c stfsm_read_status(fsm, SPINOR_OP_RDSR, &sr1, 1); fsm 1508 drivers/mtd/devices/st_spi_fsm.c stfsm_write_status(fsm, SPINOR_OP_WRSR, sr_wr, 2, 1); fsm 1514 drivers/mtd/devices/st_spi_fsm.c static int stfsm_read(struct stfsm *fsm, uint8_t *buf, uint32_t size, fsm 1517 drivers/mtd/devices/st_spi_fsm.c struct stfsm_seq *seq = &fsm->stfsm_seq_read; fsm 1527 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "reading %d bytes from 0x%08x\n", size, offset); fsm 1530 drivers/mtd/devices/st_spi_fsm.c if (fsm->configuration & CFG_READ_TOGGLE_32BIT_ADDR) fsm 1531 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 1); fsm 1549 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 1552 drivers/mtd/devices/st_spi_fsm.c stfsm_read_fifo(fsm, (uint32_t *)p, size_lb); fsm 1555 drivers/mtd/devices/st_spi_fsm.c stfsm_read_fifo(fsm, tmp, read_mask + 1); fsm 1564 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1566 drivers/mtd/devices/st_spi_fsm.c stfsm_clear_fifo(fsm); fsm 1569 drivers/mtd/devices/st_spi_fsm.c if (fsm->configuration & CFG_READ_TOGGLE_32BIT_ADDR) fsm 1570 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 0); fsm 1575 drivers/mtd/devices/st_spi_fsm.c static int stfsm_write(struct stfsm *fsm, const uint8_t *buf, fsm 1578 drivers/mtd/devices/st_spi_fsm.c struct stfsm_seq *seq = &fsm->stfsm_seq_write; fsm 1591 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "writing %d bytes to 0x%08x\n", size, offset); fsm 1594 drivers/mtd/devices/st_spi_fsm.c if (fsm->configuration & CFG_WRITE_TOGGLE_32BIT_ADDR) fsm 1595 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 1); fsm 1621 drivers/mtd/devices/st_spi_fsm.c writel(0x00040000, fsm->base + SPI_FAST_SEQ_CFG); fsm 1627 drivers/mtd/devices/st_spi_fsm.c if (fsm->fifo_dir_delay == 0) fsm 1628 drivers/mtd/devices/st_spi_fsm.c readl(fsm->base + SPI_FAST_SEQ_CFG); fsm 1630 drivers/mtd/devices/st_spi_fsm.c udelay(fsm->fifo_dir_delay); fsm 1635 drivers/mtd/devices/st_spi_fsm.c stfsm_write_fifo(fsm, (uint32_t *)p, size_lb); fsm 1645 drivers/mtd/devices/st_spi_fsm.c stfsm_write_fifo(fsm, tmp, write_mask + 1); fsm 1649 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 1652 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1655 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_wait_busy(fsm); fsm 1656 drivers/mtd/devices/st_spi_fsm.c if (ret && fsm->configuration & CFG_S25FL_CHECK_ERROR_FLAGS) fsm 1657 drivers/mtd/devices/st_spi_fsm.c stfsm_s25fl_clear_status_reg(fsm); fsm 1660 drivers/mtd/devices/st_spi_fsm.c if (fsm->configuration & CFG_WRITE_TOGGLE_32BIT_ADDR) fsm 1661 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 0); fsm 1673 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent); fsm 1676 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "%s from 0x%08x, len %zd\n", fsm 1679 drivers/mtd/devices/st_spi_fsm.c mutex_lock(&fsm->lock); fsm 1684 drivers/mtd/devices/st_spi_fsm.c stfsm_read(fsm, buf, bytes, from); fsm 1693 drivers/mtd/devices/st_spi_fsm.c mutex_unlock(&fsm->lock); fsm 1698 drivers/mtd/devices/st_spi_fsm.c static int stfsm_erase_sector(struct stfsm *fsm, uint32_t offset) fsm 1703 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "erasing sector at 0x%08x\n", offset); fsm 1706 drivers/mtd/devices/st_spi_fsm.c if (fsm->configuration & CFG_ERASESEC_TOGGLE_32BIT_ADDR) fsm 1707 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 1); fsm 1712 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 1714 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1717 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_wait_busy(fsm); fsm 1718 drivers/mtd/devices/st_spi_fsm.c if (ret && fsm->configuration & CFG_S25FL_CHECK_ERROR_FLAGS) fsm 1719 drivers/mtd/devices/st_spi_fsm.c stfsm_s25fl_clear_status_reg(fsm); fsm 1722 drivers/mtd/devices/st_spi_fsm.c if (fsm->configuration & CFG_ERASESEC_TOGGLE_32BIT_ADDR) fsm 1723 drivers/mtd/devices/st_spi_fsm.c stfsm_enter_32bit_addr(fsm, 0); fsm 1728 drivers/mtd/devices/st_spi_fsm.c static int stfsm_erase_chip(struct stfsm *fsm) fsm 1732 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "erasing chip\n"); fsm 1734 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 1736 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1738 drivers/mtd/devices/st_spi_fsm.c return stfsm_wait_busy(fsm); fsm 1749 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent); fsm 1756 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "%s to 0x%08x, len %zd\n", __func__, (u32)to, len); fsm 1761 drivers/mtd/devices/st_spi_fsm.c mutex_lock(&fsm->lock); fsm 1767 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_write(fsm, b, bytes, to); fsm 1783 drivers/mtd/devices/st_spi_fsm.c mutex_unlock(&fsm->lock); fsm 1794 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent); fsm 1798 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "%s at 0x%llx, len %lld\n", __func__, fsm 1804 drivers/mtd/devices/st_spi_fsm.c mutex_lock(&fsm->lock); fsm 1808 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_erase_chip(fsm); fsm 1813 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_erase_sector(fsm, addr); fsm 1822 drivers/mtd/devices/st_spi_fsm.c mutex_unlock(&fsm->lock); fsm 1827 drivers/mtd/devices/st_spi_fsm.c mutex_unlock(&fsm->lock); fsm 1832 drivers/mtd/devices/st_spi_fsm.c static void stfsm_read_jedec(struct stfsm *fsm, uint8_t *jedec) fsm 1837 drivers/mtd/devices/st_spi_fsm.c stfsm_load_seq(fsm, seq); fsm 1839 drivers/mtd/devices/st_spi_fsm.c stfsm_read_fifo(fsm, tmp, 8); fsm 1843 drivers/mtd/devices/st_spi_fsm.c stfsm_wait_seq(fsm); fsm 1846 drivers/mtd/devices/st_spi_fsm.c static struct flash_info *stfsm_jedec_probe(struct stfsm *fsm) fsm 1853 drivers/mtd/devices/st_spi_fsm.c stfsm_read_jedec(fsm, id); fsm 1863 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "JEDEC = 0x%08x [%5ph]\n", jedec, id); fsm 1872 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "Unrecognized JEDEC id %06x\n", jedec); fsm 1877 drivers/mtd/devices/st_spi_fsm.c static int stfsm_set_mode(struct stfsm *fsm, uint32_t mode) fsm 1883 drivers/mtd/devices/st_spi_fsm.c ret = readl(fsm->base + SPI_STA_MODE_CHANGE); fsm 1892 drivers/mtd/devices/st_spi_fsm.c writel(mode, fsm->base + SPI_MODESELECT); fsm 1897 drivers/mtd/devices/st_spi_fsm.c static void stfsm_set_freq(struct stfsm *fsm, uint32_t spi_freq) fsm 1902 drivers/mtd/devices/st_spi_fsm.c emi_freq = clk_get_rate(fsm->clk); fsm 1921 drivers/mtd/devices/st_spi_fsm.c fsm->fifo_dir_delay = 0; fsm 1923 drivers/mtd/devices/st_spi_fsm.c fsm->fifo_dir_delay = 1; fsm 1925 drivers/mtd/devices/st_spi_fsm.c fsm->fifo_dir_delay = DIV_ROUND_UP(clk_div, 10); fsm 1927 drivers/mtd/devices/st_spi_fsm.c dev_dbg(fsm->dev, "emi_clk = %uHZ, spi_freq = %uHZ, clk_div = %u\n", fsm 1930 drivers/mtd/devices/st_spi_fsm.c writel(clk_div, fsm->base + SPI_CLOCKDIV); fsm 1933 drivers/mtd/devices/st_spi_fsm.c static int stfsm_init(struct stfsm *fsm) fsm 1938 drivers/mtd/devices/st_spi_fsm.c writel(SEQ_CFG_SWRESET, fsm->base + SPI_FAST_SEQ_CFG); fsm 1940 drivers/mtd/devices/st_spi_fsm.c writel(0, fsm->base + SPI_FAST_SEQ_CFG); fsm 1943 drivers/mtd/devices/st_spi_fsm.c stfsm_set_freq(fsm, STFSM_FLASH_SAFE_FREQ); fsm 1946 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_set_mode(fsm, SPI_MODESELECT_FSM); fsm 1955 drivers/mtd/devices/st_spi_fsm.c fsm->base + SPI_CONFIGDATA); fsm 1956 drivers/mtd/devices/st_spi_fsm.c writel(STFSM_DEFAULT_WR_TIME, fsm->base + SPI_STATUS_WR_TIME_REG); fsm 1963 drivers/mtd/devices/st_spi_fsm.c writel(0x00000001, fsm->base + SPI_PROGRAM_ERASE_TIME); fsm 1966 drivers/mtd/devices/st_spi_fsm.c stfsm_clear_fifo(fsm); fsm 1973 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = platform_get_drvdata(pdev); fsm 1982 drivers/mtd/devices/st_spi_fsm.c fsm->booted_from_spi = true; fsm 1988 drivers/mtd/devices/st_spi_fsm.c fsm->reset_signal = of_property_read_bool(np, "st,reset-signal"); fsm 1990 drivers/mtd/devices/st_spi_fsm.c fsm->reset_por = of_property_read_bool(np, "st,reset-por"); fsm 2007 drivers/mtd/devices/st_spi_fsm.c fsm->booted_from_spi = false; fsm 2021 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm; fsm 2029 drivers/mtd/devices/st_spi_fsm.c fsm = devm_kzalloc(&pdev->dev, sizeof(*fsm), GFP_KERNEL); fsm 2030 drivers/mtd/devices/st_spi_fsm.c if (!fsm) fsm 2033 drivers/mtd/devices/st_spi_fsm.c fsm->dev = &pdev->dev; fsm 2035 drivers/mtd/devices/st_spi_fsm.c platform_set_drvdata(pdev, fsm); fsm 2043 drivers/mtd/devices/st_spi_fsm.c fsm->base = devm_ioremap_resource(&pdev->dev, res); fsm 2044 drivers/mtd/devices/st_spi_fsm.c if (IS_ERR(fsm->base)) { fsm 2047 drivers/mtd/devices/st_spi_fsm.c return PTR_ERR(fsm->base); fsm 2050 drivers/mtd/devices/st_spi_fsm.c fsm->clk = devm_clk_get(&pdev->dev, NULL); fsm 2051 drivers/mtd/devices/st_spi_fsm.c if (IS_ERR(fsm->clk)) { fsm 2052 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "Couldn't find EMI clock.\n"); fsm 2053 drivers/mtd/devices/st_spi_fsm.c return PTR_ERR(fsm->clk); fsm 2056 drivers/mtd/devices/st_spi_fsm.c ret = clk_prepare_enable(fsm->clk); fsm 2058 drivers/mtd/devices/st_spi_fsm.c dev_err(fsm->dev, "Failed to enable EMI clock.\n"); fsm 2062 drivers/mtd/devices/st_spi_fsm.c mutex_init(&fsm->lock); fsm 2064 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_init(fsm); fsm 2073 drivers/mtd/devices/st_spi_fsm.c info = stfsm_jedec_probe(fsm); fsm 2078 drivers/mtd/devices/st_spi_fsm.c fsm->info = info; fsm 2089 drivers/mtd/devices/st_spi_fsm.c ret = info->config(fsm); fsm 2093 drivers/mtd/devices/st_spi_fsm.c ret = stfsm_prepare_rwe_seqs_default(fsm); fsm 2098 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.name = info->name; fsm 2099 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.dev.parent = &pdev->dev; fsm 2100 drivers/mtd/devices/st_spi_fsm.c mtd_set_of_node(&fsm->mtd, np); fsm 2101 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.type = MTD_NORFLASH; fsm 2102 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.writesize = 4; fsm 2103 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.writebufsize = fsm->mtd.writesize; fsm 2104 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.flags = MTD_CAP_NORFLASH; fsm 2105 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.size = info->sector_size * info->n_sectors; fsm 2106 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.erasesize = info->sector_size; fsm 2108 drivers/mtd/devices/st_spi_fsm.c fsm->mtd._read = stfsm_mtd_read; fsm 2109 drivers/mtd/devices/st_spi_fsm.c fsm->mtd._write = stfsm_mtd_write; fsm 2110 drivers/mtd/devices/st_spi_fsm.c fsm->mtd._erase = stfsm_mtd_erase; fsm 2116 drivers/mtd/devices/st_spi_fsm.c (long long)fsm->mtd.size, (long long)(fsm->mtd.size >> 20), fsm 2117 drivers/mtd/devices/st_spi_fsm.c fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10)); fsm 2119 drivers/mtd/devices/st_spi_fsm.c return mtd_device_register(&fsm->mtd, NULL, 0); fsm 2122 drivers/mtd/devices/st_spi_fsm.c clk_disable_unprepare(fsm->clk); fsm 2128 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = platform_get_drvdata(pdev); fsm 2130 drivers/mtd/devices/st_spi_fsm.c return mtd_device_unregister(&fsm->mtd); fsm 2136 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = dev_get_drvdata(dev); fsm 2138 drivers/mtd/devices/st_spi_fsm.c clk_disable_unprepare(fsm->clk); fsm 2145 drivers/mtd/devices/st_spi_fsm.c struct stfsm *fsm = dev_get_drvdata(dev); fsm 2147 drivers/mtd/devices/st_spi_fsm.c return clk_prepare_enable(fsm->clk); fsm 32 drivers/net/ethernet/brocade/bna/bfa_cs.h typedef void (*bfa_fsm_t)(void *fsm, int event); fsm 40 drivers/net/ethernet/brocade/bna/bfa_cs.h static void oc ## _sm_ ## st(otype * fsm, etype event); \ fsm 41 drivers/net/ethernet/brocade/bna/bfa_cs.h static void oc ## _sm_ ## st ## _entry(otype * fsm) fsm 44 drivers/net/ethernet/brocade/bna/bfa_cs.h (_fsm)->fsm = (bfa_fsm_t)(_state); \ fsm 48 drivers/net/ethernet/brocade/bna/bfa_cs.h #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event))) fsm 50 drivers/net/ethernet/brocade/bna/bfa_cs.h ((_fsm)->fsm == (bfa_fsm_t)(_state)) fsm 2858 drivers/net/ethernet/brocade/bna/bfa_ioc.c enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm); fsm 2863 drivers/net/ethernet/brocade/bna/bfa_ioc.c iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); fsm 2981 drivers/net/ethernet/brocade/bna/bfa_ioc.c iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); fsm 151 drivers/net/ethernet/brocade/bna/bfa_ioc.h bfa_fsm_t fsm; fsm 159 drivers/net/ethernet/brocade/bna/bfa_ioc.h bfa_fsm_t fsm; fsm 59 drivers/net/ethernet/brocade/bna/bfa_msgq.h bfa_fsm_t fsm; fsm 85 drivers/net/ethernet/brocade/bna/bfa_msgq.h bfa_fsm_t fsm; fsm 1260 drivers/net/ethernet/brocade/bna/bna_enet.c if (enet->fsm != (bfa_sm_t)bna_enet_sm_stopped) fsm 1754 drivers/net/ethernet/brocade/bna/bna_enet.c if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_ready) { fsm 1759 drivers/net/ethernet/brocade/bna/bna_enet.c if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_stopped) fsm 1959 drivers/net/ethernet/brocade/bna/bna_tx_rx.c if (rx->fsm == (bfa_fsm_t) bna_rx_sm_stopped) fsm 2538 drivers/net/ethernet/brocade/bna/bna_tx_rx.c if (rx->fsm != (bfa_sm_t)bna_rx_sm_stopped) fsm 3526 drivers/net/ethernet/brocade/bna/bna_tx_rx.c if (tx->fsm != (bfa_sm_t)bna_tx_sm_stopped) fsm 316 drivers/net/ethernet/brocade/bna/bna_types.h bfa_fsm_t fsm; fsm 338 drivers/net/ethernet/brocade/bna/bna_types.h bfa_fsm_t fsm; fsm 364 drivers/net/ethernet/brocade/bna/bna_types.h bfa_fsm_t fsm; fsm 463 drivers/net/ethernet/brocade/bna/bna_types.h bfa_fsm_t fsm; fsm 702 drivers/net/ethernet/brocade/bna/bna_types.h bfa_fsm_t fsm; fsm 778 drivers/net/ethernet/brocade/bna/bna_types.h bfa_fsm_t fsm; fsm 180 drivers/s390/net/ctcm_fsms.c static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg); fsm 183 drivers/s390/net/ctcm_fsms.c static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg); fsm 200 drivers/s390/net/ctcm_fsms.c fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch); fsm 205 drivers/s390/net/ctcm_fsms.c fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch); fsm 210 drivers/s390/net/ctcm_fsms.c fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch); fsm 344 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXUP, ch->netdev); fsm 461 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXUP, dev); fsm 496 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXUP, dev); fsm 532 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXUP, dev); fsm 718 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); fsm 727 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 813 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); fsm 816 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 883 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); fsm 914 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); fsm 938 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); fsm 939 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 943 drivers/s390/net/ctcm_fsms.c fsm_newstate(ch2->fsm, CTC_STATE_DTERM); fsm 968 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 1004 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 1007 drivers/s390/net/ctcm_fsms.c if (!(gptr && (fsm_getstate(gptr->fsm) != MPCG_STATE_READY))) fsm 1025 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 1078 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); fsm 1081 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev); fsm 1309 drivers/s390/net/ctcm_fsms.c fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); fsm 1345 drivers/s390/net/ctcm_fsms.c fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); fsm 1418 drivers/s390/net/ctcm_fsms.c fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); fsm 1421 drivers/s390/net/ctcm_fsms.c switch (fsm_getstate(grp->fsm)) { fsm 1441 drivers/s390/net/ctcm_fsms.c switch (fsm_getstate(grp->fsm)) { fsm 1493 drivers/s390/net/ctcm_fsms.c fsm_getstate(gptr->fsm), ch->protocol); fsm 1509 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_TXUP, dev); fsm 1546 drivers/s390/net/ctcm_fsms.c fsm_getstate(fi), fsm_getstate(grp->fsm)); fsm 1551 drivers/s390/net/ctcm_fsms.c switch (fsm_getstate(grp->fsm)) { fsm 1578 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_RXUP, dev); fsm 1588 drivers/s390/net/ctcm_fsms.c static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg) fsm 1597 drivers/s390/net/ctcm_fsms.c fsm_getstate_str(ch->fsm), fsm_getstate_str(grp->fsm)); fsm 1599 drivers/s390/net/ctcm_fsms.c switch (fsm_getstate(grp->fsm)) { fsm 1604 drivers/s390/net/ctcm_fsms.c if (fsm_getstate(ch->fsm) == CH_XID0_PENDING) { fsm 1609 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch); fsm 1611 drivers/s390/net/ctcm_fsms.c } else if (fsm_getstate(ch->fsm) < CH_XID7_PENDING1) fsm 1613 drivers/s390/net/ctcm_fsms.c fsm_newstate(ch->fsm, CH_XID7_PENDING1); fsm 1620 drivers/s390/net/ctcm_fsms.c if (fsm_getstate(ch->fsm) < CH_XID7_PENDING1) fsm 1621 drivers/s390/net/ctcm_fsms.c fsm_newstate(ch->fsm, CH_XID7_PENDING1); fsm 1627 drivers/s390/net/ctcm_fsms.c switch (fsm_getstate(ch->fsm)) { fsm 1629 drivers/s390/net/ctcm_fsms.c fsm_newstate(ch->fsm, CH_XID7_PENDING1); fsm 1632 drivers/s390/net/ctcm_fsms.c fsm_newstate(ch->fsm, CH_XID7_PENDING3); fsm 1635 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_XID7DONE, dev); fsm 1647 drivers/s390/net/ctcm_fsms.c static void ctcmpc_chx_attnbusy(fsm_instance *fsm, int event, void *arg) fsm 1656 drivers/s390/net/ctcm_fsms.c fsm_getstate_str(ch->fsm), fsm_getstate_str(grp->fsm)); fsm 1660 drivers/s390/net/ctcm_fsms.c switch (fsm_getstate(grp->fsm)) { fsm 1666 drivers/s390/net/ctcm_fsms.c fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW); fsm 1683 drivers/s390/net/ctcm_fsms.c if (fsm_getstate(ch->fsm) == CH_XID0_INPROGRESS) { fsm 1684 drivers/s390/net/ctcm_fsms.c fsm_newstate(ch->fsm, CH_XID0_PENDING) ; fsm 1688 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1708 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1718 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch); fsm 1733 drivers/s390/net/ctcm_fsms.c static void ctcmpc_chx_resend(fsm_instance *fsm, int event, void *arg) fsm 1740 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch); fsm 1749 drivers/s390/net/ctcm_fsms.c static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg) fsm 1773 drivers/s390/net/ctcm_fsms.c if (fsm_getstate(wch->fsm) != CTC_STATE_TXIDLE) { fsm 1788 drivers/s390/net/ctcm_fsms.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1815 drivers/s390/net/ctcm_fsms.c fsm_newstate(wch->fsm, CTC_STATE_TX); fsm 2073 drivers/s390/net/ctcm_fsms.c fsm_event(ch->fsm, CTC_EVENT_START, ch); fsm 2095 drivers/s390/net/ctcm_fsms.c fsm_event(ch->fsm, CTC_EVENT_STOP, ch); fsm 2101 drivers/s390/net/ctcm_fsms.c fsm_newstate(priv->mpcg->fsm, MPCG_STATE_RESET); fsm 2120 drivers/s390/net/ctcm_fsms.c fsm_event(priv->fsm, DEV_EVENT_STOP, dev); fsm 2122 drivers/s390/net/ctcm_fsms.c fsm_newstate(priv->mpcg->fsm, MPCG_STATE_RESET); fsm 192 drivers/s390/net/ctcm_main.c fsm_newstate(ch->fsm, CTC_STATE_IDLE); fsm 219 drivers/s390/net/ctcm_main.c kfree_fsm(ch->fsm); fsm 271 drivers/s390/net/ctcm_main.c fsm_newstate(ch->fsm, CTC_STATE_STOPPED); fsm 323 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_RCRESET, ch); fsm 331 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_RSRESET, ch); fsm 341 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_HWFAIL, ch); fsm 349 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_RXPARITY, ch); fsm 359 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_TXTIMEOUT, ch); fsm 361 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_TXPARITY, ch); fsm 373 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_ZERO, ch); fsm 378 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_UC_UNKNOWN, ch); fsm 431 drivers/s390/net/ctcm_main.c fsm_event(priv->fsm, DEV_EVENT_START, dev); fsm 449 drivers/s390/net/ctcm_main.c fsm_event(priv->fsm, DEV_EVENT_STOP, dev); fsm 480 drivers/s390/net/ctcm_main.c if (fsm_getstate(ch->fsm) != CTC_STATE_TXIDLE) { fsm 568 drivers/s390/net/ctcm_main.c fsm_newstate(ch->fsm, CTC_STATE_TX); fsm 655 drivers/s390/net/ctcm_main.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 678 drivers/s390/net/ctcm_main.c ch->id, fsm_getstate_str(ch->fsm)); fsm 680 drivers/s390/net/ctcm_main.c if ((fsm_getstate(ch->fsm) != CTC_STATE_TXIDLE) || grp->in_sweep) { fsm 826 drivers/s390/net/ctcm_main.c fsm_newstate(ch->fsm, CTC_STATE_TX); fsm 859 drivers/s390/net/ctcm_main.c fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); fsm 901 drivers/s390/net/ctcm_main.c if (fsm_getstate(priv->fsm) != DEV_STATE_RUNNING) { fsm 902 drivers/s390/net/ctcm_main.c fsm_event(priv->fsm, DEV_EVENT_START, dev); fsm 957 drivers/s390/net/ctcm_main.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 972 drivers/s390/net/ctcm_main.c if ((fsm_getstate(priv->fsm) != DEV_STATE_RUNNING) || fsm 973 drivers/s390/net/ctcm_main.c (fsm_getstate(grp->fsm) < MPCG_STATE_XID2INITW)) { fsm 992 drivers/s390/net/ctcm_main.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1006 drivers/s390/net/ctcm_main.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1073 drivers/s390/net/ctcm_main.c if (grp->fsm) fsm 1074 drivers/s390/net/ctcm_main.c kfree_fsm(grp->fsm); fsm 1081 drivers/s390/net/ctcm_main.c if (priv->fsm) { fsm 1082 drivers/s390/net/ctcm_main.c kfree_fsm(priv->fsm); fsm 1083 drivers/s390/net/ctcm_main.c priv->fsm = NULL; fsm 1149 drivers/s390/net/ctcm_main.c priv->fsm = init_fsm("ctcmdev", dev_state_names, dev_event_names, fsm 1152 drivers/s390/net/ctcm_main.c if (priv->fsm == NULL) { fsm 1157 drivers/s390/net/ctcm_main.c fsm_newstate(priv->fsm, DEV_STATE_STOPPED); fsm 1158 drivers/s390/net/ctcm_main.c fsm_settimer(priv->fsm, &priv->restart_timer); fsm 1255 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_SC_UNKNOWN, ch); fsm 1276 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_ATTNBUSY, ch); fsm 1278 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_BUSY, ch); fsm 1282 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_ATTN, ch); fsm 1289 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_FINSTAT, ch); fsm 1291 drivers/s390/net/ctcm_main.c fsm_event(ch->fsm, CTC_EVENT_IRQ, ch); fsm 1444 drivers/s390/net/ctcm_main.c ch->fsm = init_fsm(ch->id, ctc_ch_state_names, fsm 1449 drivers/s390/net/ctcm_main.c ch->fsm = init_fsm(ch->id, ctc_ch_state_names, fsm 1454 drivers/s390/net/ctcm_main.c if (ch->fsm == NULL) fsm 1457 drivers/s390/net/ctcm_main.c fsm_newstate(ch->fsm, CTC_STATE_IDLE); fsm 1476 drivers/s390/net/ctcm_main.c fsm_settimer(ch->fsm, &ch->timer); fsm 1481 drivers/s390/net/ctcm_main.c fsm_settimer(ch->fsm, &ch->sweep_timer); fsm 1494 drivers/s390/net/ctcm_main.c kfree_fsm(ch->fsm); fsm 1609 drivers/s390/net/ctcm_main.c strlcpy(priv->fsm->name, dev->name, sizeof(priv->fsm->name)); fsm 1672 drivers/s390/net/ctcm_main.c if (priv->fsm) fsm 1673 drivers/s390/net/ctcm_main.c kfree_fsm(priv->fsm); fsm 1709 drivers/s390/net/ctcm_main.c if (!wait_event_timeout(priv->fsm->wait_q, fsm 1710 drivers/s390/net/ctcm_main.c fsm_getstate(priv->fsm) == DEV_STATE_STOPPED, CTCM_TIME_5_SEC)) { fsm 194 drivers/s390/net/ctcm_main.h fsm_instance *fsm; /* finite state machine of this channel */ fsm 211 drivers/s390/net/ctcm_main.h fsm_instance *fsm; fsm 112 drivers/s390/net/ctcm_mpc.c static void mpc_action_nop(fsm_instance *fsm, int event, void *arg); fsm 113 drivers/s390/net/ctcm_mpc.c static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg); fsm 117 drivers/s390/net/ctcm_mpc.c static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg); fsm 118 drivers/s390/net/ctcm_mpc.c static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg); fsm 119 drivers/s390/net/ctcm_mpc.c static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg); fsm 120 drivers/s390/net/ctcm_mpc.c static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg); fsm 121 drivers/s390/net/ctcm_mpc.c static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg); fsm 122 drivers/s390/net/ctcm_mpc.c static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg); fsm 345 drivers/s390/net/ctcm_mpc.c CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm)); fsm 347 drivers/s390/net/ctcm_mpc.c switch (fsm_getstate(grp->fsm)) { fsm 369 drivers/s390/net/ctcm_mpc.c fsm_event(priv->fsm, DEV_EVENT_START, dev); fsm 383 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 415 drivers/s390/net/ctcm_mpc.c CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm)); fsm 420 drivers/s390/net/ctcm_mpc.c switch (fsm_getstate(grp->fsm)) { fsm 435 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 457 drivers/s390/net/ctcm_mpc.c if ((fsm_getstate(rch->fsm) > CH_XID0_PENDING) || fsm 458 drivers/s390/net/ctcm_mpc.c (fsm_getstate(wch->fsm) > CH_XID0_PENDING)) { fsm 465 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID0IOWAIT); fsm 473 drivers/s390/net/ctcm_mpc.c (fsm_getstate(rch->fsm) == CH_XID0_PENDING)) fsm 474 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_XID0DO, rch); fsm 487 drivers/s390/net/ctcm_mpc.c (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) fsm 488 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_XID0DO, wch); fsm 540 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 571 drivers/s390/net/ctcm_mpc.c mpcg_state = fsm_getstate(grp->fsm); fsm 580 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_FLOWC); fsm 586 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_READY); fsm 686 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 829 drivers/s390/net/ctcm_mpc.c static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg) fsm 853 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 891 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_READY); fsm 899 drivers/s390/net/ctcm_mpc.c ctcmpc_chx_rxidle(ch->fsm, CTC_EVENT_START, ch); fsm 908 drivers/s390/net/ctcm_mpc.c ctcm_chx_txidle(ch->fsm, CTC_EVENT_START, ch); fsm 947 drivers/s390/net/ctcm_mpc.c fsm_getstate_str(grp->fsm), grp->num_channel_paths, fsm 966 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 993 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID0_PENDING); fsm 997 drivers/s390/net/ctcm_mpc.c (fsm_getstate(grp->fsm) < MPCG_STATE_XID2INITW)) { fsm 998 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW); fsm 1020 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1026 drivers/s390/net/ctcm_mpc.c fsm_getstate_str(grp->fsm), grp->num_channel_paths, fsm 1076 drivers/s390/net/ctcm_mpc.c if ((fsm_getstate(grp->fsm) == MPCG_STATE_FLOWC) || fsm 1077 drivers/s390/net/ctcm_mpc.c ((fsm_getstate(grp->fsm) == MPCG_STATE_READY) && fsm 1101 drivers/s390/net/ctcm_mpc.c if (unlikely(fsm_getstate(grp->fsm) != MPCG_STATE_READY)) fsm 1150 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1200 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_XID2, mpcginfo); fsm 1202 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_DISCONC, mpcginfo); fsm 1221 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1247 drivers/s390/net/ctcm_mpc.c while ((fsm_getstate(grp->fsm) != MPCG_STATE_FLOWC) && fsm 1255 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1280 drivers/s390/net/ctcm_mpc.c grp->fsm = init_fsm("mpcg", mpcg_state_names, mpcg_event_names, fsm 1283 drivers/s390/net/ctcm_mpc.c if (grp->fsm == NULL) { fsm 1288 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_RESET); fsm 1289 drivers/s390/net/ctcm_mpc.c fsm_settimer(grp->fsm, &grp->timer); fsm 1294 drivers/s390/net/ctcm_mpc.c kfree_fsm(grp->fsm); fsm 1314 drivers/s390/net/ctcm_mpc.c kfree_fsm(grp->fsm); fsm 1367 drivers/s390/net/ctcm_mpc.c grp->saved_state = fsm_getstate(grp->fsm); fsm 1368 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_INOP); fsm 1428 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_RESET); fsm 1436 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_RESET); fsm 1465 drivers/s390/net/ctcm_mpc.c switch (fsm_getstate(grp->fsm)) { fsm 1470 drivers/s390/net/ctcm_mpc.c if ((fsm_getstate(rch->fsm) == CH_XID0_PENDING) && fsm 1471 drivers/s390/net/ctcm_mpc.c (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) fsm 1475 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1506 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); fsm 1663 drivers/s390/net/ctcm_mpc.c static void mpc_action_side_xid(fsm_instance *fsm, void *arg, int side) fsm 1820 drivers/s390/net/ctcm_mpc.c static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg) fsm 1822 drivers/s390/net/ctcm_mpc.c mpc_action_side_xid(fsm, arg, XSIDE); fsm 1829 drivers/s390/net/ctcm_mpc.c static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg) fsm 1831 drivers/s390/net/ctcm_mpc.c mpc_action_side_xid(fsm, arg, YSIDE); fsm 1838 drivers/s390/net/ctcm_mpc.c static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg) fsm 1855 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID0_INPROGRESS); fsm 1859 drivers/s390/net/ctcm_mpc.c switch (fsm_getstate(grp->fsm)) { fsm 1870 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_DOIO, ch); fsm 1879 drivers/s390/net/ctcm_mpc.c static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg) fsm 1904 drivers/s390/net/ctcm_mpc.c if (fsm_getstate(ch->fsm) == CH_XID7_PENDING1) { fsm 1905 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID7_PENDING2); fsm 1911 drivers/s390/net/ctcm_mpc.c } else if (fsm_getstate(ch->fsm) < CH_XID7_PENDING2) { fsm 1912 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID7_PENDING2); fsm 1921 drivers/s390/net/ctcm_mpc.c if (fsm_getstate(ch->fsm) < CH_XID7_PENDING4) { fsm 1922 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID7_PENDING4); fsm 1928 drivers/s390/net/ctcm_mpc.c } else if (fsm_getstate(ch->fsm) == CH_XID7_PENDING3) { fsm 1929 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID7_PENDING4); fsm 1938 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_DOIO, ch); fsm 1948 drivers/s390/net/ctcm_mpc.c static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg) fsm 1961 drivers/s390/net/ctcm_mpc.c if (fsm_getstate(ch->fsm) < CH_XID7_PENDING) fsm 1962 drivers/s390/net/ctcm_mpc.c fsm_newstate(ch->fsm, CH_XID7_PENDING); fsm 1970 drivers/s390/net/ctcm_mpc.c switch (fsm_getstate(grp->fsm)) { fsm 1972 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID2INITX); fsm 1976 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID0IOWAIX); fsm 1981 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID7INITW); fsm 1983 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_XID2DONE, dev); fsm 1988 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID7INITI); fsm 1990 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_XID2DONE, dev); fsm 2001 drivers/s390/net/ctcm_mpc.c fsm_getstate_str(grp->fsm), fsm_getstate_str(ch->fsm)); fsm 2011 drivers/s390/net/ctcm_mpc.c static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg) fsm 2029 drivers/s390/net/ctcm_mpc.c switch (fsm_getstate(grp->fsm)) { fsm 2031 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID7INITZ); fsm 2035 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID7INITX); fsm 2046 drivers/s390/net/ctcm_mpc.c fsm_newstate(grp->fsm, MPCG_STATE_XID7INITF); fsm 2049 drivers/s390/net/ctcm_mpc.c fsm_event(grp->fsm, MPCG_EVENT_XID7DONE, dev); fsm 199 drivers/s390/net/ctcm_mpc.h fsm_instance *fsm; /* group xid fsm */ fsm 89 drivers/s390/net/ctcm_sysfs.c fsm_getstate_str(priv->fsm)); fsm 91 drivers/s390/net/ctcm_sysfs.c fsm_getstate_str(priv->channel[CTCM_READ]->fsm)); fsm 93 drivers/s390/net/ctcm_sysfs.c fsm_getstate_str(priv->channel[CTCM_WRITE]->fsm)); fsm 23 drivers/s390/net/fsm.c fsm *f; fsm 34 drivers/s390/net/fsm.c f = kzalloc(sizeof(fsm), order); fsm 65 drivers/s390/net/fsm.h fsm *f; fsm 185 drivers/s390/net/netiucv.c fsm_instance *fsm; fsm 213 drivers/s390/net/netiucv.c fsm_instance *fsm; fsm 522 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_RX, &ev); fsm 533 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_TXDONE, &ev); fsm 540 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_CONN_ACK, conn); fsm 565 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_CONN_REQ, &ev); fsm 578 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_CONN_REJ, conn); fsm 585 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_CONN_SUS, conn); fsm 592 drivers/s390/net/netiucv.c fsm_event(conn->fsm, CONN_EVENT_CONN_RES, conn); fsm 816 drivers/s390/net/netiucv.c fsm_event(privptr->fsm, DEV_EVENT_CONUP, netdev); fsm 838 drivers/s390/net/netiucv.c fsm_event(privptr->fsm, DEV_EVENT_CONUP, netdev); fsm 866 drivers/s390/net/netiucv.c fsm_event(privptr->fsm, DEV_EVENT_CONDOWN, netdev); fsm 971 drivers/s390/net/netiucv.c fsm_event(privptr->fsm, DEV_EVENT_CONDOWN, netdev); fsm 1038 drivers/s390/net/netiucv.c fsm_event(privptr->conn->fsm, CONN_EVENT_START, privptr->conn); fsm 1060 drivers/s390/net/netiucv.c fsm_event(privptr->conn->fsm, CONN_EVENT_STOP, &ev); fsm 1155 drivers/s390/net/netiucv.c if (fsm_getstate(conn->fsm) != CONN_STATE_IDLE) { fsm 1201 drivers/s390/net/netiucv.c fsm_newstate(conn->fsm, CONN_STATE_TX); fsm 1215 drivers/s390/net/netiucv.c fsm_newstate(conn->fsm, CONN_STATE_IDLE); fsm 1258 drivers/s390/net/netiucv.c fsm_event(priv->fsm, DEV_EVENT_START, dev); fsm 1274 drivers/s390/net/netiucv.c fsm_event(priv->fsm, DEV_EVENT_STOP, dev); fsm 1308 drivers/s390/net/netiucv.c priv->pm_state = fsm_getstate(priv->fsm); fsm 1381 drivers/s390/net/netiucv.c if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { fsm 1579 drivers/s390/net/netiucv.c return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); fsm 1590 drivers/s390/net/netiucv.c return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); fsm 1865 drivers/s390/net/netiucv.c conn->fsm = init_fsm("netiucvconn", conn_state_names, fsm 1869 drivers/s390/net/netiucv.c if (!conn->fsm) fsm 1872 drivers/s390/net/netiucv.c fsm_settimer(conn->fsm, &conn->timer); fsm 1873 drivers/s390/net/netiucv.c fsm_newstate(conn->fsm, CONN_STATE_INVALID); fsm 1879 drivers/s390/net/netiucv.c fsm_newstate(conn->fsm, CONN_STATE_STOPPED); fsm 1916 drivers/s390/net/netiucv.c kfree_fsm(conn->fsm); fsm 1936 drivers/s390/net/netiucv.c if (privptr->fsm) fsm 1937 drivers/s390/net/netiucv.c kfree_fsm(privptr->fsm); fsm 1938 drivers/s390/net/netiucv.c privptr->conn = NULL; privptr->fsm = NULL; fsm 1985 drivers/s390/net/netiucv.c privptr->fsm = init_fsm("netiucvdev", dev_state_names, fsm 1988 drivers/s390/net/netiucv.c if (!privptr->fsm) fsm 1996 drivers/s390/net/netiucv.c fsm_newstate(privptr->fsm, DEV_STATE_STOPPED); fsm 2000 drivers/s390/net/netiucv.c kfree_fsm(privptr->fsm); fsm 220 drivers/scsi/bfa/bfa.h bfa_fsm_t fsm; fsm 188 drivers/scsi/bfa/bfa_cs.h static void oc ## _sm_ ## st(otype * fsm, etype event) fsm 208 drivers/scsi/bfa/bfa_cs.h typedef void (*bfa_fsm_t)(void *fsm, int event); fsm 217 drivers/scsi/bfa/bfa_cs.h static void oc ## _sm_ ## st(otype * fsm, etype event); \ fsm 218 drivers/scsi/bfa/bfa_cs.h static void oc ## _sm_ ## st ## _entry(otype * fsm) fsm 221 drivers/scsi/bfa/bfa_cs.h (_fsm)->fsm = (bfa_fsm_t)(_state); \ fsm 225 drivers/scsi/bfa/bfa_cs.h #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event))) fsm 226 drivers/scsi/bfa/bfa_cs.h #define bfa_fsm_get_state(_fsm) ((_fsm)->fsm) fsm 228 drivers/scsi/bfa/bfa_cs.h ((_fsm)->fsm == (bfa_fsm_t)(_state)) fsm 2823 drivers/scsi/bfa/bfa_ioc.c enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm); fsm 2828 drivers/scsi/bfa/bfa_ioc.c iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm); fsm 286 drivers/scsi/bfa/bfa_ioc.h bfa_fsm_t fsm; fsm 294 drivers/scsi/bfa/bfa_ioc.h bfa_fsm_t fsm; fsm 216 drivers/usb/chipidea/ci.h struct otg_fsm fsm; fsm 1228 drivers/usb/chipidea/core.c if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) && fsm 1240 drivers/usb/chipidea/core.c if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) && fsm 1241 drivers/usb/chipidea/core.c (ci->fsm.a_bus_drop == 1) && (ci->fsm.a_bus_req == 0)) { fsm 1243 drivers/usb/chipidea/core.c ci->fsm.a_srp_det = 1; fsm 1244 drivers/usb/chipidea/core.c ci->fsm.a_bus_drop = 0; fsm 1246 drivers/usb/chipidea/core.c ci->fsm.id = 1; fsm 190 drivers/usb/chipidea/debug.c struct otg_fsm *fsm; fsm 195 drivers/usb/chipidea/debug.c fsm = &ci->fsm; fsm 202 drivers/usb/chipidea/debug.c seq_printf(s, "a_bus_drop: %d\n", fsm->a_bus_drop); fsm 204 drivers/usb/chipidea/debug.c seq_printf(s, "a_bus_req: %d\n", fsm->a_bus_req); fsm 206 drivers/usb/chipidea/debug.c seq_printf(s, "a_srp_det: %d\n", fsm->a_srp_det); fsm 208 drivers/usb/chipidea/debug.c seq_printf(s, "a_vbus_vld: %d\n", fsm->a_vbus_vld); fsm 210 drivers/usb/chipidea/debug.c seq_printf(s, "b_conn: %d\n", fsm->b_conn); fsm 212 drivers/usb/chipidea/debug.c seq_printf(s, "adp_change: %d\n", fsm->adp_change); fsm 214 drivers/usb/chipidea/debug.c seq_printf(s, "power_up: %d\n", fsm->power_up); fsm 216 drivers/usb/chipidea/debug.c seq_printf(s, "a_bus_resume: %d\n", fsm->a_bus_resume); fsm 218 drivers/usb/chipidea/debug.c seq_printf(s, "a_bus_suspend: %d\n", fsm->a_bus_suspend); fsm 220 drivers/usb/chipidea/debug.c seq_printf(s, "a_conn: %d\n", fsm->a_conn); fsm 222 drivers/usb/chipidea/debug.c seq_printf(s, "b_bus_req: %d\n", fsm->b_bus_req); fsm 224 drivers/usb/chipidea/debug.c seq_printf(s, "b_bus_suspend: %d\n", fsm->b_bus_suspend); fsm 226 drivers/usb/chipidea/debug.c seq_printf(s, "b_se0_srp: %d\n", fsm->b_se0_srp); fsm 228 drivers/usb/chipidea/debug.c seq_printf(s, "b_ssend_srp: %d\n", fsm->b_ssend_srp); fsm 230 drivers/usb/chipidea/debug.c seq_printf(s, "b_sess_vld: %d\n", fsm->b_sess_vld); fsm 232 drivers/usb/chipidea/debug.c seq_printf(s, "b_srp_done: %d\n", fsm->b_srp_done); fsm 234 drivers/usb/chipidea/debug.c seq_printf(s, "drv_vbus: %d\n", fsm->drv_vbus); fsm 236 drivers/usb/chipidea/debug.c seq_printf(s, "loc_conn: %d\n", fsm->loc_conn); fsm 238 drivers/usb/chipidea/debug.c seq_printf(s, "loc_sof: %d\n", fsm->loc_sof); fsm 240 drivers/usb/chipidea/debug.c seq_printf(s, "adp_prb: %d\n", fsm->adp_prb); fsm 242 drivers/usb/chipidea/debug.c seq_printf(s, "id: %d\n", fsm->id); fsm 244 drivers/usb/chipidea/debug.c seq_printf(s, "protocol: %d\n", fsm->protocol); fsm 40 drivers/usb/chipidea/otg_fsm.c t = scnprintf(next, size, "%d\n", ci->fsm.a_bus_req); fsm 56 drivers/usb/chipidea/otg_fsm.c mutex_lock(&ci->fsm.lock); fsm 58 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bus_req = 0; fsm 61 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.a_bus_drop) { fsm 62 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 65 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bus_req = 1; fsm 66 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) { fsm 68 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 74 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 89 drivers/usb/chipidea/otg_fsm.c t = scnprintf(next, size, "%d\n", ci->fsm.a_bus_drop); fsm 105 drivers/usb/chipidea/otg_fsm.c mutex_lock(&ci->fsm.lock); fsm 107 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bus_drop = 0; fsm 109 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bus_drop = 1; fsm 110 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bus_req = 0; fsm 114 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 129 drivers/usb/chipidea/otg_fsm.c t = scnprintf(next, size, "%d\n", ci->fsm.b_bus_req); fsm 145 drivers/usb/chipidea/otg_fsm.c mutex_lock(&ci->fsm.lock); fsm 147 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_bus_req = 0; fsm 149 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_bus_req = 1; fsm 150 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) { fsm 152 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 158 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 173 drivers/usb/chipidea/otg_fsm.c mutex_lock(&ci->fsm.lock); fsm 175 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_clr_err = 1; fsm 178 drivers/usb/chipidea/otg_fsm.c mutex_unlock(&ci->fsm.lock); fsm 286 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_wait_vrise_tmout = 1; fsm 292 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_wait_vfall_tmout = 1; fsm 298 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_wait_bcon_tmout = 1; fsm 304 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_aidl_bdis_tmout = 1; fsm 310 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_ase0_brst_tmout = 1; fsm 316 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bidl_adis_tmout = 1; fsm 322 drivers/usb/chipidea/otg_fsm.c ci->fsm.a_bus_suspend = 1; fsm 328 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_se0_srp = 1; fsm 334 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_srp_done = 1; fsm 340 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_srp_done = 1; fsm 341 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_bus_req = 0; fsm 342 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.power_up) fsm 343 drivers/usb/chipidea/otg_fsm.c ci->fsm.power_up = 0; fsm 351 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_ssend_srp = 1; fsm 353 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_B_IDLE) fsm 434 drivers/usb/chipidea/otg_fsm.c static void ci_otg_fsm_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) fsm 436 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 443 drivers/usb/chipidea/otg_fsm.c static void ci_otg_fsm_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) fsm 445 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 456 drivers/usb/chipidea/otg_fsm.c static void ci_otg_drv_vbus(struct otg_fsm *fsm, int on) fsm 459 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 477 drivers/usb/chipidea/otg_fsm.c fsm->a_srp_det = 0; fsm 478 drivers/usb/chipidea/otg_fsm.c fsm->power_up = 0; fsm 483 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_drop = 1; fsm 484 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_req = 0; fsm 491 drivers/usb/chipidea/otg_fsm.c static void ci_otg_loc_conn(struct otg_fsm *fsm, int on) fsm 493 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 510 drivers/usb/chipidea/otg_fsm.c static void ci_otg_loc_sof(struct otg_fsm *fsm, int on) fsm 514 drivers/usb/chipidea/otg_fsm.c if (!fsm->otg->host) fsm 517 drivers/usb/chipidea/otg_fsm.c udev = usb_hub_find_child(fsm->otg->host->root_hub, 1); fsm 533 drivers/usb/chipidea/otg_fsm.c static void ci_otg_start_pulse(struct otg_fsm *fsm) fsm 535 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 544 drivers/usb/chipidea/otg_fsm.c static int ci_otg_start_host(struct otg_fsm *fsm, int on) fsm 546 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 558 drivers/usb/chipidea/otg_fsm.c static int ci_otg_start_gadget(struct otg_fsm *fsm, int on) fsm 560 drivers/usb/chipidea/otg_fsm.c struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm); fsm 587 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.id && !(ci->driver) && fsm 588 drivers/usb/chipidea/otg_fsm.c ci->fsm.otg->state < OTG_STATE_A_IDLE) fsm 592 drivers/usb/chipidea/otg_fsm.c if (otg_statemachine(&ci->fsm)) { fsm 593 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.otg->state == OTG_STATE_A_IDLE) { fsm 602 drivers/usb/chipidea/otg_fsm.c if ((ci->fsm.id) || (ci->id_event) || fsm 603 drivers/usb/chipidea/otg_fsm.c (ci->fsm.power_up)) { fsm 614 drivers/usb/chipidea/otg_fsm.c } else if (ci->fsm.otg->state == OTG_STATE_B_IDLE) { fsm 615 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.b_sess_vld) { fsm 616 drivers/usb/chipidea/otg_fsm.c ci->fsm.power_up = 0; fsm 623 drivers/usb/chipidea/otg_fsm.c } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) { fsm 640 drivers/usb/chipidea/otg_fsm.c struct otg_fsm *fsm = &ci->fsm; fsm 646 drivers/usb/chipidea/otg_fsm.c switch (ci->fsm.otg->state) { fsm 649 drivers/usb/chipidea/otg_fsm.c fsm->b_conn = 1; fsm 650 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_req = 1; fsm 656 drivers/usb/chipidea/otg_fsm.c fsm->b_sess_vld = 1; fsm 665 drivers/usb/chipidea/otg_fsm.c if (fsm->a_bus_suspend == 1) fsm 666 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_suspend = 0; fsm 671 drivers/usb/chipidea/otg_fsm.c fsm->a_conn = 0; fsm 672 drivers/usb/chipidea/otg_fsm.c fsm->b_bus_req = 0; fsm 678 drivers/usb/chipidea/otg_fsm.c fsm->b_bus_suspend = 1; fsm 691 drivers/usb/chipidea/otg_fsm.c if (fsm->b_bus_suspend == 1) { fsm 693 drivers/usb/chipidea/otg_fsm.c fsm->b_bus_suspend = 0; fsm 699 drivers/usb/chipidea/otg_fsm.c fsm->b_conn = 0; fsm 711 drivers/usb/chipidea/otg_fsm.c fsm->b_conn = 0; fsm 717 drivers/usb/chipidea/otg_fsm.c fsm->a_conn = 1; fsm 736 drivers/usb/chipidea/otg_fsm.c struct otg_fsm *fsm = &ci->fsm; fsm 740 drivers/usb/chipidea/otg_fsm.c fsm->id = (otgsc & OTGSC_ID) ? 1 : 0; fsm 745 drivers/usb/chipidea/otg_fsm.c fsm->a_srp_det = 1; fsm 746 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_drop = 0; fsm 749 drivers/usb/chipidea/otg_fsm.c if (fsm->id == 0) { fsm 750 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_drop = 0; fsm 751 drivers/usb/chipidea/otg_fsm.c fsm->a_bus_req = 1; fsm 757 drivers/usb/chipidea/otg_fsm.c fsm->b_sess_vld = 1; fsm 760 drivers/usb/chipidea/otg_fsm.c fsm->b_ssend_srp = 0; fsm 762 drivers/usb/chipidea/otg_fsm.c fsm->b_sess_vld = 0; fsm 763 drivers/usb/chipidea/otg_fsm.c if (fsm->id) fsm 769 drivers/usb/chipidea/otg_fsm.c fsm->a_vbus_vld = 1; fsm 771 drivers/usb/chipidea/otg_fsm.c fsm->a_vbus_vld = 0; fsm 772 drivers/usb/chipidea/otg_fsm.c fsm->b_conn = 0; fsm 799 drivers/usb/chipidea/otg_fsm.c ci->fsm.otg = &ci->otg; fsm 800 drivers/usb/chipidea/otg_fsm.c ci->fsm.power_up = 1; fsm 801 drivers/usb/chipidea/otg_fsm.c ci->fsm.id = hw_read_otgsc(ci, OTGSC_ID) ? 1 : 0; fsm 802 drivers/usb/chipidea/otg_fsm.c ci->fsm.otg->state = OTG_STATE_UNDEFINED; fsm 803 drivers/usb/chipidea/otg_fsm.c ci->fsm.ops = &ci_otg_ops; fsm 805 drivers/usb/chipidea/otg_fsm.c ci->fsm.host_req_flag = devm_kzalloc(ci->dev, 1, GFP_KERNEL); fsm 806 drivers/usb/chipidea/otg_fsm.c if (!ci->fsm.host_req_flag) fsm 809 drivers/usb/chipidea/otg_fsm.c mutex_init(&ci->fsm.lock); fsm 829 drivers/usb/chipidea/otg_fsm.c if (ci->fsm.id) { fsm 830 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_ssend_srp = fsm 832 drivers/usb/chipidea/otg_fsm.c ci->fsm.b_sess_vld = fsm 1783 drivers/usb/chipidea/udc.c if (ci_otg_is_fsm_mode(ci) && ci->fsm.id) { fsm 1809 drivers/usb/chipidea/udc.c mutex_lock(&ci->fsm.lock); fsm 1810 drivers/usb/chipidea/udc.c if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) { fsm 1811 drivers/usb/chipidea/udc.c ci->fsm.a_bidl_adis_tmout = 1; fsm 1813 drivers/usb/chipidea/udc.c } else if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) { fsm 1814 drivers/usb/chipidea/udc.c ci->fsm.protocol = PROTO_UNDEF; fsm 1815 drivers/usb/chipidea/udc.c ci->fsm.otg->state = OTG_STATE_UNDEFINED; fsm 1817 drivers/usb/chipidea/udc.c mutex_unlock(&ci->fsm.lock); fsm 29 drivers/usb/common/usb-otg-fsm.c static int otg_set_protocol(struct otg_fsm *fsm, int protocol) fsm 33 drivers/usb/common/usb-otg-fsm.c if (fsm->protocol != protocol) { fsm 35 drivers/usb/common/usb-otg-fsm.c fsm->protocol, protocol); fsm 37 drivers/usb/common/usb-otg-fsm.c if (fsm->protocol == PROTO_HOST) fsm 38 drivers/usb/common/usb-otg-fsm.c ret = otg_start_host(fsm, 0); fsm 39 drivers/usb/common/usb-otg-fsm.c else if (fsm->protocol == PROTO_GADGET) fsm 40 drivers/usb/common/usb-otg-fsm.c ret = otg_start_gadget(fsm, 0); fsm 46 drivers/usb/common/usb-otg-fsm.c ret = otg_start_host(fsm, 1); fsm 48 drivers/usb/common/usb-otg-fsm.c ret = otg_start_gadget(fsm, 1); fsm 52 drivers/usb/common/usb-otg-fsm.c fsm->protocol = protocol; fsm 60 drivers/usb/common/usb-otg-fsm.c static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) fsm 64 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, B_SE0_SRP); fsm 65 drivers/usb/common/usb-otg-fsm.c fsm->b_se0_srp = 0; fsm 66 drivers/usb/common/usb-otg-fsm.c fsm->adp_sns = 0; fsm 67 drivers/usb/common/usb-otg-fsm.c fsm->adp_prb = 0; fsm 70 drivers/usb/common/usb-otg-fsm.c fsm->data_pulse = 0; fsm 71 drivers/usb/common/usb-otg-fsm.c fsm->b_srp_done = 0; fsm 74 drivers/usb/common/usb-otg-fsm.c if (fsm->otg->gadget) fsm 75 drivers/usb/common/usb-otg-fsm.c fsm->otg->gadget->host_request_flag = 0; fsm 78 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, B_ASE0_BRST); fsm 79 drivers/usb/common/usb-otg-fsm.c fsm->b_ase0_brst_tmout = 0; fsm 84 drivers/usb/common/usb-otg-fsm.c fsm->adp_prb = 0; fsm 87 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_WAIT_VRISE); fsm 88 drivers/usb/common/usb-otg-fsm.c fsm->a_wait_vrise_tmout = 0; fsm 91 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_WAIT_BCON); fsm 92 drivers/usb/common/usb-otg-fsm.c fsm->a_wait_bcon_tmout = 0; fsm 95 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_WAIT_ENUM); fsm 98 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_AIDL_BDIS); fsm 99 drivers/usb/common/usb-otg-fsm.c fsm->a_aidl_bdis_tmout = 0; fsm 100 drivers/usb/common/usb-otg-fsm.c fsm->a_suspend_req_inf = 0; fsm 103 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_BIDL_ADIS); fsm 104 drivers/usb/common/usb-otg-fsm.c fsm->a_bidl_adis_tmout = 0; fsm 105 drivers/usb/common/usb-otg-fsm.c if (fsm->otg->gadget) fsm 106 drivers/usb/common/usb-otg-fsm.c fsm->otg->gadget->host_request_flag = 0; fsm 109 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_WAIT_VFALL); fsm 110 drivers/usb/common/usb-otg-fsm.c fsm->a_wait_vfall_tmout = 0; fsm 111 drivers/usb/common/usb-otg-fsm.c otg_del_timer(fsm, A_WAIT_VRISE); fsm 122 drivers/usb/common/usb-otg-fsm.c struct otg_fsm *fsm = container_of(to_delayed_work(work), fsm 125 drivers/usb/common/usb-otg-fsm.c enum usb_otg_state state = fsm->otg->state; fsm 132 drivers/usb/common/usb-otg-fsm.c udev = usb_hub_find_child(fsm->otg->host->root_hub, 1); fsm 134 drivers/usb/common/usb-otg-fsm.c dev_err(fsm->otg->host->controller, fsm 139 drivers/usb/common/usb-otg-fsm.c *fsm->host_req_flag = 0; fsm 147 drivers/usb/common/usb-otg-fsm.c fsm->host_req_flag, fsm 155 drivers/usb/common/usb-otg-fsm.c flag = *fsm->host_req_flag; fsm 158 drivers/usb/common/usb-otg-fsm.c schedule_delayed_work(&fsm->hnp_polling_work, fsm 169 drivers/usb/common/usb-otg-fsm.c if (!fsm->otg->host->b_hnp_enable) { fsm 177 drivers/usb/common/usb-otg-fsm.c fsm->otg->host->b_hnp_enable = 1; fsm 179 drivers/usb/common/usb-otg-fsm.c fsm->a_bus_req = 0; fsm 181 drivers/usb/common/usb-otg-fsm.c fsm->b_bus_req = 0; fsm 184 drivers/usb/common/usb-otg-fsm.c otg_statemachine(fsm); fsm 187 drivers/usb/common/usb-otg-fsm.c static void otg_start_hnp_polling(struct otg_fsm *fsm) fsm 193 drivers/usb/common/usb-otg-fsm.c if (!fsm->host_req_flag) fsm 196 drivers/usb/common/usb-otg-fsm.c INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work); fsm 197 drivers/usb/common/usb-otg-fsm.c schedule_delayed_work(&fsm->hnp_polling_work, fsm 202 drivers/usb/common/usb-otg-fsm.c static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) fsm 204 drivers/usb/common/usb-otg-fsm.c if (fsm->otg->state == new_state) fsm 207 drivers/usb/common/usb-otg-fsm.c otg_leave_state(fsm, fsm->otg->state); fsm 210 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 0); fsm 211 drivers/usb/common/usb-otg-fsm.c otg_chrg_vbus(fsm, 0); fsm 212 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 213 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 218 drivers/usb/common/usb-otg-fsm.c otg_start_adp_sns(fsm); fsm 219 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_UNDEF); fsm 220 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, B_SE0_SRP); fsm 223 drivers/usb/common/usb-otg-fsm.c otg_start_pulse(fsm); fsm 224 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 225 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_UNDEF); fsm 226 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, B_SRP_FAIL); fsm 229 drivers/usb/common/usb-otg-fsm.c otg_chrg_vbus(fsm, 0); fsm 230 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 231 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_GADGET); fsm 232 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 1); fsm 235 drivers/usb/common/usb-otg-fsm.c otg_chrg_vbus(fsm, 0); fsm 236 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 237 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 238 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 239 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, B_ASE0_BRST); fsm 240 drivers/usb/common/usb-otg-fsm.c fsm->a_bus_suspend = 0; fsm 243 drivers/usb/common/usb-otg-fsm.c otg_chrg_vbus(fsm, 0); fsm 244 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 245 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 1); fsm 246 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 247 drivers/usb/common/usb-otg-fsm.c usb_bus_start_enum(fsm->otg->host, fsm 248 drivers/usb/common/usb-otg-fsm.c fsm->otg->host->otg_port); fsm 249 drivers/usb/common/usb-otg-fsm.c otg_start_hnp_polling(fsm); fsm 252 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 0); fsm 253 drivers/usb/common/usb-otg-fsm.c otg_chrg_vbus(fsm, 0); fsm 254 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 255 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 256 drivers/usb/common/usb-otg-fsm.c otg_start_adp_prb(fsm); fsm 257 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 260 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 1); fsm 261 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 262 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 263 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 264 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, A_WAIT_VRISE); fsm 267 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 1); fsm 268 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 269 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 270 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 271 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, A_WAIT_BCON); fsm 274 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 1); fsm 275 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 276 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 1); fsm 277 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 282 drivers/usb/common/usb-otg-fsm.c if (!fsm->a_bus_req || fsm->a_suspend_req_inf) fsm 283 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, A_WAIT_ENUM); fsm 284 drivers/usb/common/usb-otg-fsm.c otg_start_hnp_polling(fsm); fsm 287 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 1); fsm 288 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 289 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 290 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 291 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, A_AIDL_BDIS); fsm 295 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 296 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_GADGET); fsm 297 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 1); fsm 298 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 1); fsm 299 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, A_BIDL_ADIS); fsm 302 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 0); fsm 303 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 304 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 305 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_HOST); fsm 306 drivers/usb/common/usb-otg-fsm.c otg_add_timer(fsm, A_WAIT_VFALL); fsm 309 drivers/usb/common/usb-otg-fsm.c otg_drv_vbus(fsm, 0); fsm 310 drivers/usb/common/usb-otg-fsm.c otg_loc_conn(fsm, 0); fsm 311 drivers/usb/common/usb-otg-fsm.c otg_loc_sof(fsm, 0); fsm 312 drivers/usb/common/usb-otg-fsm.c otg_set_protocol(fsm, PROTO_UNDEF); fsm 318 drivers/usb/common/usb-otg-fsm.c fsm->otg->state = new_state; fsm 319 drivers/usb/common/usb-otg-fsm.c fsm->state_changed = 1; fsm 324 drivers/usb/common/usb-otg-fsm.c int otg_statemachine(struct otg_fsm *fsm) fsm 328 drivers/usb/common/usb-otg-fsm.c mutex_lock(&fsm->lock); fsm 330 drivers/usb/common/usb-otg-fsm.c state = fsm->otg->state; fsm 331 drivers/usb/common/usb-otg-fsm.c fsm->state_changed = 0; fsm 336 drivers/usb/common/usb-otg-fsm.c VDBG("fsm->id = %d\n", fsm->id); fsm 337 drivers/usb/common/usb-otg-fsm.c if (fsm->id) fsm 338 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_IDLE); fsm 340 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_IDLE); fsm 343 drivers/usb/common/usb-otg-fsm.c if (!fsm->id) fsm 344 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_IDLE); fsm 345 drivers/usb/common/usb-otg-fsm.c else if (fsm->b_sess_vld && fsm->otg->gadget) fsm 346 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_PERIPHERAL); fsm 347 drivers/usb/common/usb-otg-fsm.c else if ((fsm->b_bus_req || fsm->adp_change || fsm->power_up) && fsm 348 drivers/usb/common/usb-otg-fsm.c fsm->b_ssend_srp && fsm->b_se0_srp) fsm 349 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_SRP_INIT); fsm 352 drivers/usb/common/usb-otg-fsm.c if (!fsm->id || fsm->b_srp_done) fsm 353 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_IDLE); fsm 356 drivers/usb/common/usb-otg-fsm.c if (!fsm->id || !fsm->b_sess_vld) fsm 357 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_IDLE); fsm 358 drivers/usb/common/usb-otg-fsm.c else if (fsm->b_bus_req && fsm->otg-> fsm 359 drivers/usb/common/usb-otg-fsm.c gadget->b_hnp_enable && fsm->a_bus_suspend) fsm 360 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_WAIT_ACON); fsm 363 drivers/usb/common/usb-otg-fsm.c if (fsm->a_conn) fsm 364 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_HOST); fsm 365 drivers/usb/common/usb-otg-fsm.c else if (!fsm->id || !fsm->b_sess_vld) fsm 366 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_IDLE); fsm 367 drivers/usb/common/usb-otg-fsm.c else if (fsm->a_bus_resume || fsm->b_ase0_brst_tmout) { fsm 368 drivers/usb/common/usb-otg-fsm.c fsm->b_ase0_brst_tmout = 0; fsm 369 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_PERIPHERAL); fsm 373 drivers/usb/common/usb-otg-fsm.c if (!fsm->id || !fsm->b_sess_vld) fsm 374 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_IDLE); fsm 375 drivers/usb/common/usb-otg-fsm.c else if (!fsm->b_bus_req || !fsm->a_conn || fsm->test_device) fsm 376 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_PERIPHERAL); fsm 379 drivers/usb/common/usb-otg-fsm.c if (fsm->id) fsm 380 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_B_IDLE); fsm 381 drivers/usb/common/usb-otg-fsm.c else if (!fsm->a_bus_drop && (fsm->a_bus_req || fsm 382 drivers/usb/common/usb-otg-fsm.c fsm->a_srp_det || fsm->adp_change || fsm->power_up)) fsm 383 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VRISE); fsm 386 drivers/usb/common/usb-otg-fsm.c if (fsm->a_vbus_vld) fsm 387 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); fsm 388 drivers/usb/common/usb-otg-fsm.c else if (fsm->id || fsm->a_bus_drop || fsm 389 drivers/usb/common/usb-otg-fsm.c fsm->a_wait_vrise_tmout) fsm 390 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); fsm 393 drivers/usb/common/usb-otg-fsm.c if (!fsm->a_vbus_vld) fsm 394 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_VBUS_ERR); fsm 395 drivers/usb/common/usb-otg-fsm.c else if (fsm->b_conn) fsm 396 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_HOST); fsm 397 drivers/usb/common/usb-otg-fsm.c else if (fsm->id || fsm->a_bus_drop || fsm->a_wait_bcon_tmout) fsm 398 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); fsm 401 drivers/usb/common/usb-otg-fsm.c if (fsm->id || fsm->a_bus_drop) fsm 402 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); fsm 403 drivers/usb/common/usb-otg-fsm.c else if ((!fsm->a_bus_req || fsm->a_suspend_req_inf) && fsm 404 drivers/usb/common/usb-otg-fsm.c fsm->otg->host->b_hnp_enable) fsm 405 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_SUSPEND); fsm 406 drivers/usb/common/usb-otg-fsm.c else if (!fsm->b_conn) fsm 407 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); fsm 408 drivers/usb/common/usb-otg-fsm.c else if (!fsm->a_vbus_vld) fsm 409 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_VBUS_ERR); fsm 412 drivers/usb/common/usb-otg-fsm.c if (!fsm->b_conn && fsm->otg->host->b_hnp_enable) fsm 413 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_PERIPHERAL); fsm 414 drivers/usb/common/usb-otg-fsm.c else if (!fsm->b_conn && !fsm->otg->host->b_hnp_enable) fsm 415 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); fsm 416 drivers/usb/common/usb-otg-fsm.c else if (fsm->a_bus_req || fsm->b_bus_resume) fsm 417 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_HOST); fsm 418 drivers/usb/common/usb-otg-fsm.c else if (fsm->id || fsm->a_bus_drop || fsm->a_aidl_bdis_tmout) fsm 419 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); fsm 420 drivers/usb/common/usb-otg-fsm.c else if (!fsm->a_vbus_vld) fsm 421 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_VBUS_ERR); fsm 424 drivers/usb/common/usb-otg-fsm.c if (fsm->id || fsm->a_bus_drop) fsm 425 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); fsm 426 drivers/usb/common/usb-otg-fsm.c else if (fsm->a_bidl_adis_tmout || fsm->b_bus_suspend) fsm 427 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); fsm 428 drivers/usb/common/usb-otg-fsm.c else if (!fsm->a_vbus_vld) fsm 429 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_VBUS_ERR); fsm 432 drivers/usb/common/usb-otg-fsm.c if (fsm->a_wait_vfall_tmout) fsm 433 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_IDLE); fsm 436 drivers/usb/common/usb-otg-fsm.c if (fsm->id || fsm->a_bus_drop || fsm->a_clr_err) fsm 437 drivers/usb/common/usb-otg-fsm.c otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); fsm 442 drivers/usb/common/usb-otg-fsm.c mutex_unlock(&fsm->lock); fsm 444 drivers/usb/common/usb-otg-fsm.c VDBG("quit statemachine, changed = %d\n", fsm->state_changed); fsm 445 drivers/usb/common/usb-otg-fsm.c return fsm->state_changed; fsm 117 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_chrg_vbus(struct otg_fsm *fsm, int on) fsm 153 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_drv_vbus(struct otg_fsm *fsm, int on) fsm 171 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_loc_conn(struct otg_fsm *fsm, int on) fsm 190 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_loc_sof(struct otg_fsm *fsm, int on) fsm 205 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_start_pulse(struct otg_fsm *fsm) fsm 218 drivers/usb/phy/phy-fsl-usb.c fsl_otg_add_timer(fsm, b_data_pulse_tmr); fsm 235 drivers/usb/phy/phy-fsl-usb.c fsl_otg_chrg_vbus(&fsl_otg_dev->fsm, 1); fsm 237 drivers/usb/phy/phy-fsl-usb.c fsl_otg_add_timer(&fsl_otg_dev->fsm, b_vbus_pulse_tmr); fsm 242 drivers/usb/phy/phy-fsl-usb.c fsl_otg_chrg_vbus(&fsl_otg_dev->fsm, 0); fsm 250 drivers/usb/phy/phy-fsl-usb.c fsl_otg_add_timer(&fsl_otg_dev->fsm, b_srp_wait_tmr); fsm 259 drivers/usb/phy/phy-fsl-usb.c fsl_otg_dev->fsm.b_sess_vld) fsm 260 drivers/usb/phy/phy-fsl-usb.c fsl_otg_dev->fsm.b_srp_done = 1; fsm 272 drivers/usb/phy/phy-fsl-usb.c fsl_otg_add_timer(&fsl_otg_dev->fsm, a_wait_enum_tmr); fsm 274 drivers/usb/phy/phy-fsl-usb.c otg_statemachine(&fsl_otg_dev->fsm); fsm 284 drivers/usb/phy/phy-fsl-usb.c int fsl_otg_init_timers(struct otg_fsm *fsm) fsm 288 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm->a_wait_vrise_tmout); fsm 293 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm->a_wait_bcon_tmout); fsm 298 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm->a_aidl_bdis_tmout); fsm 303 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm->b_ase0_brst_tmout); fsm 308 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm->b_se0_srp); fsm 313 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm->b_srp_done); fsm 318 drivers/usb/phy/phy-fsl-usb.c (unsigned long)&fsm); fsm 393 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_add_timer(struct otg_fsm *fsm, void *gtimer) fsm 411 drivers/usb/phy/phy-fsl-usb.c static void fsl_otg_fsm_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) fsm 419 drivers/usb/phy/phy-fsl-usb.c fsl_otg_add_timer(fsm, timer); fsm 423 drivers/usb/phy/phy-fsl-usb.c void fsl_otg_del_timer(struct otg_fsm *fsm, void *gtimer) fsm 433 drivers/usb/phy/phy-fsl-usb.c static void fsl_otg_fsm_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) fsm 441 drivers/usb/phy/phy-fsl-usb.c fsl_otg_del_timer(fsm, timer); fsm 457 drivers/usb/phy/phy-fsl-usb.c int fsl_otg_start_host(struct otg_fsm *fsm, int on) fsm 459 drivers/usb/phy/phy-fsl-usb.c struct usb_otg *otg = fsm->otg; fsm 473 drivers/usb/phy/phy-fsl-usb.c fsm->a_vbus_vld = fsm 484 drivers/usb/phy/phy-fsl-usb.c if (fsm->id) { fsm 486 drivers/usb/phy/phy-fsl-usb.c fsl_otg_drv_vbus(fsm, 1); fsm 509 drivers/usb/phy/phy-fsl-usb.c if (fsm->id) fsm 511 drivers/usb/phy/phy-fsl-usb.c fsl_otg_drv_vbus(fsm, 0); fsm 524 drivers/usb/phy/phy-fsl-usb.c int fsl_otg_start_gadget(struct otg_fsm *fsm, int on) fsm 526 drivers/usb/phy/phy-fsl-usb.c struct usb_otg *otg = fsm->otg; fsm 563 drivers/usb/phy/phy-fsl-usb.c otg_dev->fsm.a_bus_drop = 0; fsm 564 drivers/usb/phy/phy-fsl-usb.c otg_dev->fsm.a_bus_req = 1; fsm 570 drivers/usb/phy/phy-fsl-usb.c otg->host->is_b_host = otg_dev->fsm.id; fsm 584 drivers/usb/phy/phy-fsl-usb.c struct otg_fsm *fsm = &otg_dev->fsm; fsm 587 drivers/usb/phy/phy-fsl-usb.c fsm->protocol = PROTO_UNDEF; fsm 593 drivers/usb/phy/phy-fsl-usb.c otg_statemachine(&otg_dev->fsm); fsm 618 drivers/usb/phy/phy-fsl-usb.c otg_dev->fsm.b_bus_req = 0; fsm 619 drivers/usb/phy/phy-fsl-usb.c otg_statemachine(&otg_dev->fsm); fsm 624 drivers/usb/phy/phy-fsl-usb.c otg->gadget->is_a_peripheral = !otg_dev->fsm.id; fsm 626 drivers/usb/phy/phy-fsl-usb.c otg_dev->fsm.b_bus_req = 1; fsm 629 drivers/usb/phy/phy-fsl-usb.c pr_debug("ID pin=%d\n", otg_dev->fsm.id); fsm 630 drivers/usb/phy/phy-fsl-usb.c if (otg_dev->fsm.id == 1) { fsm 631 drivers/usb/phy/phy-fsl-usb.c fsl_otg_start_host(&otg_dev->fsm, 0); fsm 632 drivers/usb/phy/phy-fsl-usb.c otg_drv_vbus(&otg_dev->fsm, 0); fsm 633 drivers/usb/phy/phy-fsl-usb.c fsl_otg_start_gadget(&otg_dev->fsm, 1); fsm 652 drivers/usb/phy/phy-fsl-usb.c struct otg_fsm *fsm = &og->fsm; fsm 654 drivers/usb/phy/phy-fsl-usb.c if (fsm->id) { /* switch to gadget */ fsm 655 drivers/usb/phy/phy-fsl-usb.c fsl_otg_start_host(fsm, 0); fsm 656 drivers/usb/phy/phy-fsl-usb.c otg_drv_vbus(fsm, 0); fsm 657 drivers/usb/phy/phy-fsl-usb.c fsl_otg_start_gadget(fsm, 1); fsm 673 drivers/usb/phy/phy-fsl-usb.c otg_dev->fsm.b_bus_req = 1; fsm 674 drivers/usb/phy/phy-fsl-usb.c otg_statemachine(&otg_dev->fsm); fsm 694 drivers/usb/phy/phy-fsl-usb.c otg_dev->fsm.a_bus_req = 0; fsm 695 drivers/usb/phy/phy-fsl-usb.c otg_statemachine(&otg_dev->fsm); fsm 708 drivers/usb/phy/phy-fsl-usb.c struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm; fsm 719 drivers/usb/phy/phy-fsl-usb.c fsm->id = (otg_sc & OTGSC_STS_USB_ID) ? 1 : 0; fsm 720 drivers/usb/phy/phy-fsl-usb.c otg->default_a = (fsm->id == 0); fsm 725 drivers/usb/phy/phy-fsl-usb.c fsm->id = (otg_sc & OTGSC_STS_USB_ID) ? 1 : 0; fsm 726 drivers/usb/phy/phy-fsl-usb.c otg->default_a = (fsm->id == 0); fsm 728 drivers/usb/phy/phy-fsl-usb.c if (fsm->id) fsm 729 drivers/usb/phy/phy-fsl-usb.c fsm->b_conn = 0; fsm 731 drivers/usb/phy/phy-fsl-usb.c fsm->a_conn = 0; fsm 734 drivers/usb/phy/phy-fsl-usb.c otg->host->is_b_host = fsm->id; fsm 736 drivers/usb/phy/phy-fsl-usb.c otg->gadget->is_a_peripheral = !fsm->id; fsm 737 drivers/usb/phy/phy-fsl-usb.c VDBG("ID int (ID is %d)\n", fsm->id); fsm 739 drivers/usb/phy/phy-fsl-usb.c if (fsm->id) { /* switch to gadget */ fsm 747 drivers/usb/phy/phy-fsl-usb.c fsl_otg_start_gadget(fsm, 0); fsm 748 drivers/usb/phy/phy-fsl-usb.c otg_drv_vbus(fsm, 1); fsm 749 drivers/usb/phy/phy-fsl-usb.c fsl_otg_start_host(fsm, 1); fsm 794 drivers/usb/phy/phy-fsl-usb.c status = fsl_otg_init_timers(&fsl_otg_tc->fsm); fsm 799 drivers/usb/phy/phy-fsl-usb.c mutex_init(&fsl_otg_tc->fsm.lock); fsm 802 drivers/usb/phy/phy-fsl-usb.c fsl_otg_tc->fsm.ops = &fsl_otg_ops; fsm 836 drivers/usb/phy/phy-fsl-usb.c struct otg_fsm *fsm; fsm 843 drivers/usb/phy/phy-fsl-usb.c fsm = &p_otg->fsm; fsm 847 drivers/usb/phy/phy-fsl-usb.c fsm->otg = p_otg->phy.otg; fsm 943 drivers/usb/phy/phy-fsl-usb.c p_otg->fsm.id = 1; fsm 946 drivers/usb/phy/phy-fsl-usb.c p_otg->fsm.id = 0; fsm 949 drivers/usb/phy/phy-fsl-usb.c pr_debug("initial ID pin=%d\n", p_otg->fsm.id); fsm 966 drivers/usb/phy/phy-fsl-usb.c struct otg_fsm *fsm = &fsl_otg_dev->fsm; fsm 971 drivers/usb/phy/phy-fsl-usb.c mutex_lock(&fsm->lock); fsm 1021 drivers/usb/phy/phy-fsl-usb.c fsm->a_bus_req, fsm 1022 drivers/usb/phy/phy-fsl-usb.c fsm->b_bus_req, fsm 1023 drivers/usb/phy/phy-fsl-usb.c fsm->a_bus_resume, fsm 1024 drivers/usb/phy/phy-fsl-usb.c fsm->a_bus_suspend, fsm 1025 drivers/usb/phy/phy-fsl-usb.c fsm->a_conn, fsm 1026 drivers/usb/phy/phy-fsl-usb.c fsm->a_sess_vld, fsm 1027 drivers/usb/phy/phy-fsl-usb.c fsm->a_srp_det, fsm 1028 drivers/usb/phy/phy-fsl-usb.c fsm->a_vbus_vld, fsm 1029 drivers/usb/phy/phy-fsl-usb.c fsm->b_bus_resume, fsm 1030 drivers/usb/phy/phy-fsl-usb.c fsm->b_bus_suspend, fsm 1031 drivers/usb/phy/phy-fsl-usb.c fsm->b_conn, fsm 1032 drivers/usb/phy/phy-fsl-usb.c fsm->b_se0_srp, fsm 1033 drivers/usb/phy/phy-fsl-usb.c fsm->b_ssend_srp, fsm 1034 drivers/usb/phy/phy-fsl-usb.c fsm->b_sess_vld, fsm 1035 drivers/usb/phy/phy-fsl-usb.c fsm->id); fsm 1039 drivers/usb/phy/phy-fsl-usb.c mutex_unlock(&fsm->lock); fsm 1069 drivers/usb/phy/phy-fsl-usb.c fsl_otg_dev->fsm.a_suspend_req_inf = arg; fsm 1073 drivers/usb/phy/phy-fsl-usb.c fsl_otg_dev->fsm.a_bus_drop = arg; fsm 1077 drivers/usb/phy/phy-fsl-usb.c fsl_otg_dev->fsm.a_bus_req = arg; fsm 1081 drivers/usb/phy/phy-fsl-usb.c fsl_otg_dev->fsm.b_bus_req = arg; fsm 1088 drivers/usb/phy/phy-fsl-usb.c otg_statemachine(&fsl_otg_dev->fsm); fsm 359 drivers/usb/phy/phy-fsl-usb.h struct otg_fsm fsm; fsm 390 drivers/usb/phy/phy-fsl-usb.h void fsl_otg_add_timer(struct otg_fsm *fsm, void *timer); fsm 391 drivers/usb/phy/phy-fsl-usb.h void fsl_otg_del_timer(struct otg_fsm *fsm, void *timer); fsm 402 drivers/usb/phy/phy-isp1301-omap.c u8 fsm = omap_readw(OTG_TEST) & 0x0ff; fsm 405 drivers/usb/phy/phy-isp1301-omap.c switch (fsm) { fsm 467 drivers/usb/phy/phy-isp1301-omap.c usb_otg_state_string(state), fsm, state_name(isp), fsm 292 fs/ext4/fsmap.c struct ext4_fsmap *fsm; fsm 294 fs/ext4/fsmap.c fsm = kmalloc(sizeof(*fsm), GFP_NOFS); fsm 295 fs/ext4/fsmap.c if (!fsm) fsm 297 fs/ext4/fsmap.c fsm->fmr_device = 0; fsm 298 fs/ext4/fsmap.c fsm->fmr_flags = 0; fsm 299 fs/ext4/fsmap.c fsm->fmr_physical = fsb; fsm 300 fs/ext4/fsmap.c fsm->fmr_owner = owner; fsm 301 fs/ext4/fsmap.c fsm->fmr_length = len; fsm 302 fs/ext4/fsmap.c list_add_tail(&fsm->fmr_list, meta_list); fsm 203 include/linux/usb/otg-fsm.h void (*chrg_vbus)(struct otg_fsm *fsm, int on); fsm 204 include/linux/usb/otg-fsm.h void (*drv_vbus)(struct otg_fsm *fsm, int on); fsm 205 include/linux/usb/otg-fsm.h void (*loc_conn)(struct otg_fsm *fsm, int on); fsm 206 include/linux/usb/otg-fsm.h void (*loc_sof)(struct otg_fsm *fsm, int on); fsm 207 include/linux/usb/otg-fsm.h void (*start_pulse)(struct otg_fsm *fsm); fsm 208 include/linux/usb/otg-fsm.h void (*start_adp_prb)(struct otg_fsm *fsm); fsm 209 include/linux/usb/otg-fsm.h void (*start_adp_sns)(struct otg_fsm *fsm); fsm 210 include/linux/usb/otg-fsm.h void (*add_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); fsm 211 include/linux/usb/otg-fsm.h void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); fsm 212 include/linux/usb/otg-fsm.h int (*start_host)(struct otg_fsm *fsm, int on); fsm 213 include/linux/usb/otg-fsm.h int (*start_gadget)(struct otg_fsm *fsm, int on); fsm 217 include/linux/usb/otg-fsm.h static inline int otg_chrg_vbus(struct otg_fsm *fsm, int on) fsm 219 include/linux/usb/otg-fsm.h if (!fsm->ops->chrg_vbus) fsm 221 include/linux/usb/otg-fsm.h fsm->ops->chrg_vbus(fsm, on); fsm 225 include/linux/usb/otg-fsm.h static inline int otg_drv_vbus(struct otg_fsm *fsm, int on) fsm 227 include/linux/usb/otg-fsm.h if (!fsm->ops->drv_vbus) fsm 229 include/linux/usb/otg-fsm.h if (fsm->drv_vbus != on) { fsm 230 include/linux/usb/otg-fsm.h fsm->drv_vbus = on; fsm 231 include/linux/usb/otg-fsm.h fsm->ops->drv_vbus(fsm, on); fsm 236 include/linux/usb/otg-fsm.h static inline int otg_loc_conn(struct otg_fsm *fsm, int on) fsm 238 include/linux/usb/otg-fsm.h if (!fsm->ops->loc_conn) fsm 240 include/linux/usb/otg-fsm.h if (fsm->loc_conn != on) { fsm 241 include/linux/usb/otg-fsm.h fsm->loc_conn = on; fsm 242 include/linux/usb/otg-fsm.h fsm->ops->loc_conn(fsm, on); fsm 247 include/linux/usb/otg-fsm.h static inline int otg_loc_sof(struct otg_fsm *fsm, int on) fsm 249 include/linux/usb/otg-fsm.h if (!fsm->ops->loc_sof) fsm 251 include/linux/usb/otg-fsm.h if (fsm->loc_sof != on) { fsm 252 include/linux/usb/otg-fsm.h fsm->loc_sof = on; fsm 253 include/linux/usb/otg-fsm.h fsm->ops->loc_sof(fsm, on); fsm 258 include/linux/usb/otg-fsm.h static inline int otg_start_pulse(struct otg_fsm *fsm) fsm 260 include/linux/usb/otg-fsm.h if (!fsm->ops->start_pulse) fsm 262 include/linux/usb/otg-fsm.h if (!fsm->data_pulse) { fsm 263 include/linux/usb/otg-fsm.h fsm->data_pulse = 1; fsm 264 include/linux/usb/otg-fsm.h fsm->ops->start_pulse(fsm); fsm 269 include/linux/usb/otg-fsm.h static inline int otg_start_adp_prb(struct otg_fsm *fsm) fsm 271 include/linux/usb/otg-fsm.h if (!fsm->ops->start_adp_prb) fsm 273 include/linux/usb/otg-fsm.h if (!fsm->adp_prb) { fsm 274 include/linux/usb/otg-fsm.h fsm->adp_sns = 0; fsm 275 include/linux/usb/otg-fsm.h fsm->adp_prb = 1; fsm 276 include/linux/usb/otg-fsm.h fsm->ops->start_adp_prb(fsm); fsm 281 include/linux/usb/otg-fsm.h static inline int otg_start_adp_sns(struct otg_fsm *fsm) fsm 283 include/linux/usb/otg-fsm.h if (!fsm->ops->start_adp_sns) fsm 285 include/linux/usb/otg-fsm.h if (!fsm->adp_sns) { fsm 286 include/linux/usb/otg-fsm.h fsm->adp_sns = 1; fsm 287 include/linux/usb/otg-fsm.h fsm->ops->start_adp_sns(fsm); fsm 292 include/linux/usb/otg-fsm.h static inline int otg_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer) fsm 294 include/linux/usb/otg-fsm.h if (!fsm->ops->add_timer) fsm 296 include/linux/usb/otg-fsm.h fsm->ops->add_timer(fsm, timer); fsm 300 include/linux/usb/otg-fsm.h static inline int otg_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer) fsm 302 include/linux/usb/otg-fsm.h if (!fsm->ops->del_timer) fsm 304 include/linux/usb/otg-fsm.h fsm->ops->del_timer(fsm, timer); fsm 308 include/linux/usb/otg-fsm.h static inline int otg_start_host(struct otg_fsm *fsm, int on) fsm 310 include/linux/usb/otg-fsm.h if (!fsm->ops->start_host) fsm 312 include/linux/usb/otg-fsm.h return fsm->ops->start_host(fsm, on); fsm 315 include/linux/usb/otg-fsm.h static inline int otg_start_gadget(struct otg_fsm *fsm, int on) fsm 317 include/linux/usb/otg-fsm.h if (!fsm->ops->start_gadget) fsm 319 include/linux/usb/otg-fsm.h return fsm->ops->start_gadget(fsm, on); fsm 322 include/linux/usb/otg-fsm.h int otg_statemachine(struct otg_fsm *fsm); fsm 136 lib/ts_fsm.c struct ts_fsm *fsm = ts_config_priv(conf); fsm 160 lib/ts_fsm.c strict = fsm->tokens[0].recur != TS_FSM_HEAD_IGNORE; fsm 165 lib/ts_fsm.c for (tok_idx = 0; tok_idx < fsm->ntokens; tok_idx++) { fsm 166 lib/ts_fsm.c cur = &fsm->tokens[tok_idx]; fsm 168 lib/ts_fsm.c if (likely(tok_idx < (fsm->ntokens - 1))) fsm 169 lib/ts_fsm.c next = &fsm->tokens[tok_idx + 1]; fsm 260 lib/ts_fsm.c struct ts_fsm *fsm; fsm 263 lib/ts_fsm.c size_t priv_size = sizeof(*fsm) + len; fsm 287 lib/ts_fsm.c fsm = ts_config_priv(conf); fsm 288 lib/ts_fsm.c fsm->ntokens = ntokens; fsm 289 lib/ts_fsm.c memcpy(fsm->tokens, pattern, len); fsm 291 lib/ts_fsm.c for (i = 0; i < fsm->ntokens; i++) { fsm 292 lib/ts_fsm.c struct ts_fsm_token *t = &fsm->tokens[i]; fsm 304 lib/ts_fsm.c struct ts_fsm *fsm = ts_config_priv(conf); fsm 305 lib/ts_fsm.c return fsm->tokens; fsm 310 lib/ts_fsm.c struct ts_fsm *fsm = ts_config_priv(conf); fsm 311 lib/ts_fsm.c return fsm->ntokens * sizeof(struct ts_fsm_token);