/linux-4.4.14/drivers/mfd/ |
H A D | rtsx_usb.c | 45 struct rtsx_ucr *ucr = (struct rtsx_ucr *)data; rtsx_usb_sg_timed_out() local 47 dev_dbg(&ucr->pusb_intf->dev, "%s: sg transfer timed out", __func__); rtsx_usb_sg_timed_out() 48 usb_sg_cancel(&ucr->current_sg); rtsx_usb_sg_timed_out() 51 ucr->current_sg.status = -ETIMEDOUT; rtsx_usb_sg_timed_out() 54 static int rtsx_usb_bulk_transfer_sglist(struct rtsx_ucr *ucr, rtsx_usb_bulk_transfer_sglist() argument 60 dev_dbg(&ucr->pusb_intf->dev, "%s: xfer %u bytes, %d entries\n", rtsx_usb_bulk_transfer_sglist() 62 ret = usb_sg_init(&ucr->current_sg, ucr->pusb_dev, pipe, 0, rtsx_usb_bulk_transfer_sglist() 67 ucr->sg_timer.expires = jiffies + msecs_to_jiffies(timeout); rtsx_usb_bulk_transfer_sglist() 68 add_timer(&ucr->sg_timer); rtsx_usb_bulk_transfer_sglist() 69 usb_sg_wait(&ucr->current_sg); rtsx_usb_bulk_transfer_sglist() 70 del_timer_sync(&ucr->sg_timer); rtsx_usb_bulk_transfer_sglist() 73 *act_len = ucr->current_sg.bytes; rtsx_usb_bulk_transfer_sglist() 75 return ucr->current_sg.status; rtsx_usb_bulk_transfer_sglist() 78 int rtsx_usb_transfer_data(struct rtsx_ucr *ucr, unsigned int pipe, rtsx_usb_transfer_data() argument 86 return rtsx_usb_bulk_transfer_sglist(ucr, pipe, rtsx_usb_transfer_data() 90 return usb_bulk_msg(ucr->pusb_dev, pipe, buf, len, act_len, rtsx_usb_transfer_data() 95 static inline void rtsx_usb_seq_cmd_hdr(struct rtsx_ucr *ucr, rtsx_usb_seq_cmd_hdr() argument 98 rtsx_usb_cmd_hdr_tag(ucr); rtsx_usb_seq_cmd_hdr() 100 ucr->cmd_buf[PACKET_TYPE] = seq_type; rtsx_usb_seq_cmd_hdr() 101 ucr->cmd_buf[5] = (u8)(len >> 8); rtsx_usb_seq_cmd_hdr() 102 ucr->cmd_buf[6] = (u8)len; rtsx_usb_seq_cmd_hdr() 103 ucr->cmd_buf[8] = (u8)(addr >> 8); rtsx_usb_seq_cmd_hdr() 104 ucr->cmd_buf[9] = (u8)addr; rtsx_usb_seq_cmd_hdr() 107 ucr->cmd_buf[STAGE_FLAG] = 0; rtsx_usb_seq_cmd_hdr() 109 ucr->cmd_buf[STAGE_FLAG] = STAGE_R; rtsx_usb_seq_cmd_hdr() 112 static int rtsx_usb_seq_write_register(struct rtsx_ucr *ucr, rtsx_usb_seq_write_register() argument 123 rtsx_usb_seq_cmd_hdr(ucr, addr, len, SEQ_WRITE); rtsx_usb_seq_write_register() 124 memcpy(ucr->cmd_buf + SEQ_WRITE_DATA_OFFSET, data, len); rtsx_usb_seq_write_register() 126 return rtsx_usb_transfer_data(ucr, rtsx_usb_seq_write_register() 127 usb_sndbulkpipe(ucr->pusb_dev, EP_BULK_OUT), rtsx_usb_seq_write_register() 128 ucr->cmd_buf, cmd_len, 0, NULL, 100); rtsx_usb_seq_write_register() 131 static int rtsx_usb_seq_read_register(struct rtsx_ucr *ucr, rtsx_usb_seq_read_register() argument 143 rtsx_usb_seq_cmd_hdr(ucr, addr, len, SEQ_READ); rtsx_usb_seq_read_register() 144 ret = rtsx_usb_transfer_data(ucr, rtsx_usb_seq_read_register() 145 usb_sndbulkpipe(ucr->pusb_dev, EP_BULK_OUT), rtsx_usb_seq_read_register() 146 ucr->cmd_buf, 12, 0, NULL, 100); rtsx_usb_seq_read_register() 150 ret = rtsx_usb_transfer_data(ucr, rtsx_usb_seq_read_register() 151 usb_rcvbulkpipe(ucr->pusb_dev, EP_BULK_IN), rtsx_usb_seq_read_register() 159 ret = rtsx_usb_read_register(ucr, addr + rsp_len + i, rtsx_usb_seq_read_register() 168 int rtsx_usb_read_ppbuf(struct rtsx_ucr *ucr, u8 *buf, int buf_len) rtsx_usb_read_ppbuf() argument 170 return rtsx_usb_seq_read_register(ucr, PPBUF_BASE2, (u16)buf_len, buf); rtsx_usb_read_ppbuf() 174 int rtsx_usb_write_ppbuf(struct rtsx_ucr *ucr, u8 *buf, int buf_len) rtsx_usb_write_ppbuf() argument 176 return rtsx_usb_seq_write_register(ucr, PPBUF_BASE2, (u16)buf_len, buf); rtsx_usb_write_ppbuf() 180 int rtsx_usb_ep0_write_register(struct rtsx_ucr *ucr, u16 addr, rtsx_usb_ep0_write_register() argument 189 return usb_control_msg(ucr->pusb_dev, rtsx_usb_ep0_write_register() 190 usb_sndctrlpipe(ucr->pusb_dev, 0), RTSX_USB_REQ_REG_OP, rtsx_usb_ep0_write_register() 196 int rtsx_usb_ep0_read_register(struct rtsx_ucr *ucr, u16 addr, u8 *data) rtsx_usb_ep0_read_register() argument 212 ret = usb_control_msg(ucr->pusb_dev, rtsx_usb_ep0_read_register() 213 usb_rcvctrlpipe(ucr->pusb_dev, 0), RTSX_USB_REQ_REG_OP, rtsx_usb_ep0_read_register() 223 void rtsx_usb_add_cmd(struct rtsx_ucr *ucr, u8 cmd_type, u16 reg_addr, rtsx_usb_add_cmd() argument 228 if (ucr->cmd_idx < (IOBUF_SIZE - CMD_OFFSET) / 4) { rtsx_usb_add_cmd() 229 i = CMD_OFFSET + ucr->cmd_idx * 4; rtsx_usb_add_cmd() 231 ucr->cmd_buf[i++] = ((cmd_type & 0x03) << 6) | rtsx_usb_add_cmd() 233 ucr->cmd_buf[i++] = (u8)reg_addr; rtsx_usb_add_cmd() 234 ucr->cmd_buf[i++] = mask; rtsx_usb_add_cmd() 235 ucr->cmd_buf[i++] = data; rtsx_usb_add_cmd() 237 ucr->cmd_idx++; rtsx_usb_add_cmd() 242 int rtsx_usb_send_cmd(struct rtsx_ucr *ucr, u8 flag, int timeout) rtsx_usb_send_cmd() argument 246 ucr->cmd_buf[CNT_H] = (u8)(ucr->cmd_idx >> 8); rtsx_usb_send_cmd() 247 ucr->cmd_buf[CNT_L] = (u8)(ucr->cmd_idx); rtsx_usb_send_cmd() 248 ucr->cmd_buf[STAGE_FLAG] = flag; rtsx_usb_send_cmd() 250 ret = rtsx_usb_transfer_data(ucr, rtsx_usb_send_cmd() 251 usb_sndbulkpipe(ucr->pusb_dev, EP_BULK_OUT), rtsx_usb_send_cmd() 252 ucr->cmd_buf, ucr->cmd_idx * 4 + CMD_OFFSET, rtsx_usb_send_cmd() 255 rtsx_usb_clear_fsm_err(ucr); rtsx_usb_send_cmd() 263 int rtsx_usb_get_rsp(struct rtsx_ucr *ucr, int rsp_len, int timeout) rtsx_usb_get_rsp() argument 270 return rtsx_usb_transfer_data(ucr, rtsx_usb_get_rsp() 271 usb_rcvbulkpipe(ucr->pusb_dev, EP_BULK_IN), rtsx_usb_get_rsp() 272 ucr->rsp_buf, rsp_len, 0, NULL, timeout); rtsx_usb_get_rsp() 276 static int rtsx_usb_get_status_with_bulk(struct rtsx_ucr *ucr, u16 *status) rtsx_usb_get_status_with_bulk() argument 280 rtsx_usb_init_cmd(ucr); rtsx_usb_get_status_with_bulk() 281 rtsx_usb_add_cmd(ucr, READ_REG_CMD, CARD_EXIST, 0x00, 0x00); rtsx_usb_get_status_with_bulk() 282 rtsx_usb_add_cmd(ucr, READ_REG_CMD, OCPSTAT, 0x00, 0x00); rtsx_usb_get_status_with_bulk() 283 ret = rtsx_usb_send_cmd(ucr, MODE_CR, 100); rtsx_usb_get_status_with_bulk() 287 ret = rtsx_usb_get_rsp(ucr, 2, 100); rtsx_usb_get_status_with_bulk() 291 *status = ((ucr->rsp_buf[0] >> 2) & 0x0f) | rtsx_usb_get_status_with_bulk() 292 ((ucr->rsp_buf[1] & 0x03) << 4); rtsx_usb_get_status_with_bulk() 297 int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status) rtsx_usb_get_card_status() argument 310 ret = usb_control_msg(ucr->pusb_dev, rtsx_usb_get_card_status() 311 usb_rcvctrlpipe(ucr->pusb_dev, 0), rtsx_usb_get_card_status() 319 ret = rtsx_usb_get_status_with_bulk(ucr, status); rtsx_usb_get_card_status() 330 static int rtsx_usb_write_phy_register(struct rtsx_ucr *ucr, u8 addr, u8 val) rtsx_usb_write_phy_register() argument 332 dev_dbg(&ucr->pusb_intf->dev, "Write 0x%x to phy register 0x%x\n", rtsx_usb_write_phy_register() 335 rtsx_usb_init_cmd(ucr); rtsx_usb_write_phy_register() 337 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VSTAIN, 0xFF, val); rtsx_usb_write_phy_register() 338 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VCONTROL, 0xFF, addr & 0x0F); rtsx_usb_write_phy_register() 339 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VLOADM, 0xFF, 0x00); rtsx_usb_write_phy_register() 340 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VLOADM, 0xFF, 0x00); rtsx_usb_write_phy_register() 341 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VLOADM, 0xFF, 0x01); rtsx_usb_write_phy_register() 342 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VCONTROL, rtsx_usb_write_phy_register() 344 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VLOADM, 0xFF, 0x00); rtsx_usb_write_phy_register() 345 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VLOADM, 0xFF, 0x00); rtsx_usb_write_phy_register() 346 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, HS_VLOADM, 0xFF, 0x01); rtsx_usb_write_phy_register() 348 return rtsx_usb_send_cmd(ucr, MODE_C, 100); rtsx_usb_write_phy_register() 351 int rtsx_usb_write_register(struct rtsx_ucr *ucr, u16 addr, u8 mask, u8 data) rtsx_usb_write_register() argument 353 rtsx_usb_init_cmd(ucr); rtsx_usb_write_register() 354 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, addr, mask, data); rtsx_usb_write_register() 355 return rtsx_usb_send_cmd(ucr, MODE_C, 100); rtsx_usb_write_register() 359 int rtsx_usb_read_register(struct rtsx_ucr *ucr, u16 addr, u8 *data) rtsx_usb_read_register() argument 366 rtsx_usb_init_cmd(ucr); rtsx_usb_read_register() 367 rtsx_usb_add_cmd(ucr, READ_REG_CMD, addr, 0, 0); rtsx_usb_read_register() 368 ret = rtsx_usb_send_cmd(ucr, MODE_CR, 100); rtsx_usb_read_register() 372 ret = rtsx_usb_get_rsp(ucr, 1, 100); rtsx_usb_read_register() 377 *data = ucr->rsp_buf[0]; rtsx_usb_read_register() 400 int rtsx_usb_switch_clock(struct rtsx_ucr *ucr, unsigned int card_clock, rtsx_usb_switch_clock() argument 407 ucr->cur_clk = 0; rtsx_usb_switch_clock() 419 ret = rtsx_usb_write_register(ucr, SD_CFG1, rtsx_usb_switch_clock() 425 dev_dbg(&ucr->pusb_intf->dev, rtsx_usb_switch_clock() 430 dev_dbg(&ucr->pusb_intf->dev, rtsx_usb_switch_clock() 432 card_clock, ucr->cur_clk); rtsx_usb_switch_clock() 434 if (card_clock == ucr->cur_clk) rtsx_usb_switch_clock() 453 dev_dbg(&ucr->pusb_intf->dev, "n = %d, div = %d\n", n, div); rtsx_usb_switch_clock() 459 dev_dbg(&ucr->pusb_intf->dev, "ssc_depth = %d\n", ssc_depth); rtsx_usb_switch_clock() 461 rtsx_usb_init_cmd(ucr); rtsx_usb_switch_clock() 462 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CLK_DIV, CLK_CHANGE, CLK_CHANGE); rtsx_usb_switch_clock() 463 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CLK_DIV, rtsx_usb_switch_clock() 465 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, 0); rtsx_usb_switch_clock() 466 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SSC_CTL2, rtsx_usb_switch_clock() 468 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SSC_DIV_N_0, 0xFF, n); rtsx_usb_switch_clock() 469 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, SSC_RSTB); rtsx_usb_switch_clock() 471 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_VPCLK0_CTL, rtsx_usb_switch_clock() 473 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_VPCLK0_CTL, rtsx_usb_switch_clock() 477 ret = rtsx_usb_send_cmd(ucr, MODE_C, 2000); rtsx_usb_switch_clock() 481 ret = rtsx_usb_write_register(ucr, SSC_CTL1, 0xff, rtsx_usb_switch_clock() 489 ret = rtsx_usb_write_register(ucr, CLK_DIV, CLK_CHANGE, 0); rtsx_usb_switch_clock() 493 ucr->cur_clk = card_clock; rtsx_usb_switch_clock() 499 int rtsx_usb_card_exclusive_check(struct rtsx_ucr *ucr, int card) rtsx_usb_card_exclusive_check() argument 508 ret = rtsx_usb_get_card_status(ucr, &val); rtsx_usb_card_exclusive_check() 523 static int rtsx_usb_reset_chip(struct rtsx_ucr *ucr) rtsx_usb_reset_chip() argument 528 rtsx_usb_init_cmd(ucr); rtsx_usb_reset_chip() 530 if (CHECK_PKG(ucr, LQFP48)) { rtsx_usb_reset_chip() 531 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PWR_CTL, rtsx_usb_reset_chip() 533 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PWR_CTL, rtsx_usb_reset_chip() 535 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, rtsx_usb_reset_chip() 537 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, rtsx_usb_reset_chip() 539 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, rtsx_usb_reset_chip() 543 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SYS_DUMMY0, NYET_MSAK, NYET_EN); rtsx_usb_reset_chip() 544 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CD_DEGLITCH_WIDTH, 0xFF, 0x08); rtsx_usb_reset_chip() 545 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, rtsx_usb_reset_chip() 547 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD30_DRIVE_SEL, rtsx_usb_reset_chip() 549 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, rtsx_usb_reset_chip() 551 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, LDO_POWER_CFG, 0xE0, 0x0); rtsx_usb_reset_chip() 553 if (ucr->is_rts5179) rtsx_usb_reset_chip() 554 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, rtsx_usb_reset_chip() 557 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_DMA1_CTL, rtsx_usb_reset_chip() 559 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_INT_PEND, rtsx_usb_reset_chip() 563 ret = rtsx_usb_send_cmd(ucr, MODE_C, 100); rtsx_usb_reset_chip() 568 rtsx_usb_read_register(ucr, CFG_MODE, &val); rtsx_usb_reset_chip() 570 ret = rtsx_usb_write_phy_register(ucr, 0xC2, 0x7C); rtsx_usb_reset_chip() 578 static int rtsx_usb_init_chip(struct rtsx_ucr *ucr) rtsx_usb_init_chip() argument 583 rtsx_usb_clear_fsm_err(ucr); rtsx_usb_init_chip() 586 ret = rtsx_usb_write_register(ucr, rtsx_usb_init_chip() 592 ret = rtsx_usb_write_register(ucr, CLK_DIV, CLK_CHANGE, 0x00); rtsx_usb_init_chip() 597 ret = rtsx_usb_read_register(ucr, HW_VERSION, &val); rtsx_usb_init_chip() 601 ucr->ic_version = val & HW_VER_MASK; rtsx_usb_init_chip() 604 ret = rtsx_usb_read_register(ucr, CARD_SHARE_MODE, &val); rtsx_usb_init_chip() 609 ucr->package = LQFP48; rtsx_usb_init_chip() 610 dev_dbg(&ucr->pusb_intf->dev, "Package: LQFP48\n"); rtsx_usb_init_chip() 612 ucr->package = QFN24; rtsx_usb_init_chip() 613 dev_dbg(&ucr->pusb_intf->dev, "Package: QFN24\n"); rtsx_usb_init_chip() 617 rtsx_usb_read_register(ucr, CFG_MODE_1, &val); rtsx_usb_init_chip() 619 ucr->is_rts5179 = true; rtsx_usb_init_chip() 620 dev_dbg(&ucr->pusb_intf->dev, "Device is rts5179\n"); rtsx_usb_init_chip() 622 ucr->is_rts5179 = false; rtsx_usb_init_chip() 625 return rtsx_usb_reset_chip(ucr); rtsx_usb_init_chip() 632 struct rtsx_ucr *ucr; rtsx_usb_probe() local 639 ucr = devm_kzalloc(&intf->dev, sizeof(*ucr), GFP_KERNEL); rtsx_usb_probe() 640 if (!ucr) rtsx_usb_probe() 643 ucr->pusb_dev = usb_dev; rtsx_usb_probe() 645 ucr->iobuf = usb_alloc_coherent(ucr->pusb_dev, IOBUF_SIZE, rtsx_usb_probe() 646 GFP_KERNEL, &ucr->iobuf_dma); rtsx_usb_probe() 647 if (!ucr->iobuf) rtsx_usb_probe() 650 usb_set_intfdata(intf, ucr); rtsx_usb_probe() 652 ucr->vendor_id = id->idVendor; rtsx_usb_probe() 653 ucr->product_id = id->idProduct; rtsx_usb_probe() 654 ucr->cmd_buf = ucr->rsp_buf = ucr->iobuf; rtsx_usb_probe() 656 mutex_init(&ucr->dev_mutex); rtsx_usb_probe() 658 ucr->pusb_intf = intf; rtsx_usb_probe() 661 ret = rtsx_usb_init_chip(ucr); rtsx_usb_probe() 666 setup_timer(&ucr->sg_timer, rtsx_usb_sg_timed_out, (unsigned long) ucr); rtsx_usb_probe() 681 usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf, rtsx_usb_probe() 682 ucr->iobuf_dma); rtsx_usb_probe() 688 struct rtsx_ucr *ucr = (struct rtsx_ucr *)usb_get_intfdata(intf); rtsx_usb_disconnect() local 694 usb_set_intfdata(ucr->pusb_intf, NULL); rtsx_usb_disconnect() 695 usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf, rtsx_usb_disconnect() 696 ucr->iobuf_dma); rtsx_usb_disconnect() 702 struct rtsx_ucr *ucr = rtsx_usb_suspend() local 710 if (mutex_trylock(&ucr->dev_mutex)) { rtsx_usb_suspend() 711 rtsx_usb_get_card_status(ucr, &val); rtsx_usb_suspend() 712 mutex_unlock(&ucr->dev_mutex); rtsx_usb_suspend() 733 struct rtsx_ucr *ucr = rtsx_usb_reset_resume() local 736 rtsx_usb_reset_chip(ucr); rtsx_usb_reset_resume() 751 struct rtsx_ucr *ucr = (struct rtsx_ucr *)usb_get_intfdata(intf); rtsx_usb_pre_reset() local 753 mutex_lock(&ucr->dev_mutex); rtsx_usb_pre_reset() 759 struct rtsx_ucr *ucr = (struct rtsx_ucr *)usb_get_intfdata(intf); rtsx_usb_post_reset() local 761 mutex_unlock(&ucr->dev_mutex); rtsx_usb_post_reset()
|
/linux-4.4.14/drivers/mmc/host/ |
H A D | rtsx_usb_sdmmc.c | 46 struct rtsx_ucr *ucr; member in struct:rtsx_usb_sdmmc 77 struct rtsx_ucr *ucr = host->ucr; sd_clear_error() local 78 rtsx_usb_ep0_write_register(ucr, CARD_STOP, sd_clear_error() 82 rtsx_usb_clear_dma_err(ucr); sd_clear_error() 83 rtsx_usb_clear_fsm_err(ucr); sd_clear_error() 89 struct rtsx_ucr *ucr = host->ucr; sd_print_debug_regs() local 92 rtsx_usb_ep0_read_register(ucr, SD_STAT1, &val); sd_print_debug_regs() 94 rtsx_usb_ep0_read_register(ucr, SD_STAT2, &val); sd_print_debug_regs() 96 rtsx_usb_ep0_read_register(ucr, SD_BUS_STAT, &val); sd_print_debug_regs() 106 struct rtsx_ucr *ucr = host->ucr; sd_read_data() local 113 rtsx_usb_init_cmd(ucr); sd_read_data() 122 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_read_data() 124 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_read_data() 126 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_read_data() 128 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_read_data() 130 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_read_data() 136 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BYTE_CNT_L, 0xFF, (u8)byte_cnt); sd_read_data() 137 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BYTE_CNT_H, sd_read_data() 139 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BLOCK_CNT_L, 0xFF, 1); sd_read_data() 140 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BLOCK_CNT_H, 0xFF, 0); sd_read_data() 142 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG2, 0xFF, sd_read_data() 146 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_read_data() 149 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_TRANSFER, sd_read_data() 151 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, SD_TRANSFER, sd_read_data() 155 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD1, 0, 0); sd_read_data() 156 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD2, 0, 0); sd_read_data() 157 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD3, 0, 0); sd_read_data() 158 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD4, 0, 0); sd_read_data() 161 err = rtsx_usb_send_cmd(ucr, MODE_CR, timeout); sd_read_data() 168 err = rtsx_usb_get_rsp(ucr, !cmd ? 1 : 5, timeout); sd_read_data() 169 if (err || (ucr->rsp_buf[0] & SD_TRANSFER_ERR)) { sd_read_data() 175 ucr->rsp_buf[0]); sd_read_data() 186 cmd->resp[0] = get_unaligned_be32(ucr->rsp_buf + 1); sd_read_data() 193 err = rtsx_usb_read_ppbuf(ucr, buf, byte_cnt - (byte_cnt % 2)); sd_read_data() 202 return rtsx_usb_read_register(ucr, sd_read_data() 213 struct rtsx_ucr *ucr = host->ucr; sd_write_data() local 221 err = rtsx_usb_write_ppbuf(ucr, buf, buf_len); sd_write_data() 231 rtsx_usb_init_cmd(ucr); sd_write_data() 236 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_write_data() 238 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_write_data() 240 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_write_data() 242 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_write_data() 244 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_write_data() 248 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BYTE_CNT_L, 0xFF, (u8)byte_cnt); sd_write_data() 249 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BYTE_CNT_H, sd_write_data() 251 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BLOCK_CNT_L, 0xFF, 1); sd_write_data() 252 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BLOCK_CNT_H, 0xFF, 0); sd_write_data() 254 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG2, 0xFF, sd_write_data() 257 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_write_data() 260 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_TRANSFER, 0xFF, sd_write_data() 262 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, SD_TRANSFER, sd_write_data() 266 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD1, 0, 0); sd_write_data() 267 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD2, 0, 0); sd_write_data() 268 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD3, 0, 0); sd_write_data() 269 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_CMD4, 0, 0); sd_write_data() 272 err = rtsx_usb_send_cmd(ucr, MODE_CR, timeout); sd_write_data() 279 err = rtsx_usb_get_rsp(ucr, !cmd ? 1 : 5, timeout); sd_write_data() 288 cmd->resp[0] = get_unaligned_be32(ucr->rsp_buf + 1); sd_write_data() 299 struct rtsx_ucr *ucr = host->ucr; sd_send_cmd_get_rsp() local 349 err = rtsx_usb_write_register(ucr, SD_BUS_STAT, sd_send_cmd_get_rsp() 356 rtsx_usb_init_cmd(ucr); sd_send_cmd_get_rsp() 358 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CMD0, 0xFF, 0x40 | cmd_idx); sd_send_cmd_get_rsp() 359 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CMD1, 0xFF, (u8)(arg >> 24)); sd_send_cmd_get_rsp() 360 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CMD2, 0xFF, (u8)(arg >> 16)); sd_send_cmd_get_rsp() 361 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CMD3, 0xFF, (u8)(arg >> 8)); sd_send_cmd_get_rsp() 362 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CMD4, 0xFF, (u8)arg); sd_send_cmd_get_rsp() 364 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG2, 0xFF, rsp_type); sd_send_cmd_get_rsp() 365 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_DATA_SOURCE, sd_send_cmd_get_rsp() 367 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_TRANSFER, sd_send_cmd_get_rsp() 369 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, SD_TRANSFER, sd_send_cmd_get_rsp() 376 rtsx_usb_add_cmd(ucr, READ_REG_CMD, (u16)i, 0, 0); sd_send_cmd_get_rsp() 381 rtsx_usb_add_cmd(ucr, READ_REG_CMD, (u16)i, 0, 0); sd_send_cmd_get_rsp() 386 rtsx_usb_add_cmd(ucr, READ_REG_CMD, SD_STAT1, 0, 0); sd_send_cmd_get_rsp() 388 err = rtsx_usb_send_cmd(ucr, MODE_CR, 100); sd_send_cmd_get_rsp() 395 err = rtsx_usb_get_rsp(ucr, len, timeout); sd_send_cmd_get_rsp() 396 if (err || (ucr->rsp_buf[0] & SD_TRANSFER_ERR)) { sd_send_cmd_get_rsp() 403 ucr->rsp_buf[0]); sd_send_cmd_get_rsp() 419 ptr = ucr->rsp_buf + 1; sd_send_cmd_get_rsp() 462 struct rtsx_ucr *ucr = host->ucr; sd_rw_multi() local 485 rtsx_usb_init_cmd(ucr); sd_rw_multi() 487 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BYTE_CNT_L, 0xFF, 0x00); sd_rw_multi() 488 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BYTE_CNT_H, 0xFF, 0x02); sd_rw_multi() 489 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BLOCK_CNT_L, sd_rw_multi() 491 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BLOCK_CNT_H, sd_rw_multi() 494 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_DATA_SOURCE, sd_rw_multi() 497 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC3, sd_rw_multi() 499 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC2, sd_rw_multi() 501 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC1, sd_rw_multi() 503 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC0, sd_rw_multi() 507 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_CTL, sd_rw_multi() 512 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_CTL, sd_rw_multi() 517 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG2, 0xFF, cfg2); sd_rw_multi() 518 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_TRANSFER, 0xFF, sd_rw_multi() 520 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, SD_TRANSFER, sd_rw_multi() 523 err = rtsx_usb_send_cmd(ucr, flag, 100); sd_rw_multi() 528 pipe = usb_rcvbulkpipe(ucr->pusb_dev, EP_BULK_IN); sd_rw_multi() 530 pipe = usb_sndbulkpipe(ucr->pusb_dev, EP_BULK_OUT); sd_rw_multi() 532 err = rtsx_usb_transfer_data(ucr, pipe, data->sg, data_len, sd_rw_multi() 541 return rtsx_usb_get_rsp(ucr, 1, 2000); sd_rw_multi() 546 rtsx_usb_write_register(host->ucr, SD_CFG1, sd_enable_initial_mode() 552 rtsx_usb_write_register(host->ucr, SD_CFG1, sd_disable_initial_mode() 592 struct rtsx_ucr *ucr = host->ucr; sd_change_phase() local 598 rtsx_usb_init_cmd(ucr); sd_change_phase() 600 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CLK_DIV, CLK_CHANGE, CLK_CHANGE); sd_change_phase() 603 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_VPCLK0_CTL, sd_change_phase() 606 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_VPCLK1_CTL, sd_change_phase() 609 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_VPCLK0_CTL, PHASE_NOT_RESET, 0); sd_change_phase() 610 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_VPCLK0_CTL, sd_change_phase() 612 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CLK_DIV, CLK_CHANGE, 0); sd_change_phase() 613 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG1, SD_ASYNC_FIFO_RST, 0); sd_change_phase() 615 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_change_phase() 672 err = rtsx_usb_ep0_read_register(host->ucr, sd_wait_data_idle() 766 struct rtsx_ucr *ucr = host->ucr; sdmmc_get_ro() local 773 mutex_lock(&ucr->dev_mutex); sdmmc_get_ro() 776 err = rtsx_usb_get_card_status(ucr, &val); sdmmc_get_ro() 778 mutex_unlock(&ucr->dev_mutex); sdmmc_get_ro() 794 struct rtsx_ucr *ucr = host->ucr; sdmmc_get_cd() local 801 mutex_lock(&ucr->dev_mutex); sdmmc_get_cd() 804 err = rtsx_usb_get_card_status(ucr, &val); sdmmc_get_cd() 806 mutex_unlock(&ucr->dev_mutex); sdmmc_get_cd() 825 struct rtsx_ucr *ucr = host->ucr; sdmmc_request() local 853 mutex_lock(&ucr->dev_mutex); sdmmc_request() 873 rtsx_usb_write_register(ucr, MC_FIFO_CTL, sdmmc_request() 888 mutex_unlock(&ucr->dev_mutex); sdmmc_request() 919 err = rtsx_usb_write_register(host->ucr, SD_CFG1, sd_set_bus_width() 925 static int sd_pull_ctl_disable_lqfp48(struct rtsx_ucr *ucr) sd_pull_ctl_disable_lqfp48() argument 927 rtsx_usb_init_cmd(ucr); sd_pull_ctl_disable_lqfp48() 929 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x55); sd_pull_ctl_disable_lqfp48() 930 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55); sd_pull_ctl_disable_lqfp48() 931 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95); sd_pull_ctl_disable_lqfp48() 932 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); sd_pull_ctl_disable_lqfp48() 933 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x55); sd_pull_ctl_disable_lqfp48() 934 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0xA5); sd_pull_ctl_disable_lqfp48() 936 return rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_pull_ctl_disable_lqfp48() 939 static int sd_pull_ctl_disable_qfn24(struct rtsx_ucr *ucr) sd_pull_ctl_disable_qfn24() argument 941 rtsx_usb_init_cmd(ucr); sd_pull_ctl_disable_qfn24() 943 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x65); sd_pull_ctl_disable_qfn24() 944 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55); sd_pull_ctl_disable_qfn24() 945 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95); sd_pull_ctl_disable_qfn24() 946 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); sd_pull_ctl_disable_qfn24() 947 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x56); sd_pull_ctl_disable_qfn24() 948 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0x59); sd_pull_ctl_disable_qfn24() 950 return rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_pull_ctl_disable_qfn24() 953 static int sd_pull_ctl_enable_lqfp48(struct rtsx_ucr *ucr) sd_pull_ctl_enable_lqfp48() argument 955 rtsx_usb_init_cmd(ucr); sd_pull_ctl_enable_lqfp48() 957 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0xAA); sd_pull_ctl_enable_lqfp48() 958 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0xAA); sd_pull_ctl_enable_lqfp48() 959 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0xA9); sd_pull_ctl_enable_lqfp48() 960 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); sd_pull_ctl_enable_lqfp48() 961 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x55); sd_pull_ctl_enable_lqfp48() 962 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0xA5); sd_pull_ctl_enable_lqfp48() 964 return rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_pull_ctl_enable_lqfp48() 967 static int sd_pull_ctl_enable_qfn24(struct rtsx_ucr *ucr) sd_pull_ctl_enable_qfn24() argument 969 rtsx_usb_init_cmd(ucr); sd_pull_ctl_enable_qfn24() 971 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0xA5); sd_pull_ctl_enable_qfn24() 972 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x9A); sd_pull_ctl_enable_qfn24() 973 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0xA5); sd_pull_ctl_enable_qfn24() 974 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x9A); sd_pull_ctl_enable_qfn24() 975 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x65); sd_pull_ctl_enable_qfn24() 976 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0x5A); sd_pull_ctl_enable_qfn24() 978 return rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_pull_ctl_enable_qfn24() 983 struct rtsx_ucr *ucr = host->ucr; sd_power_on() local 987 rtsx_usb_init_cmd(ucr); sd_power_on() 988 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL); sd_power_on() 989 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_SHARE_MODE, sd_power_on() 991 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_EN, sd_power_on() 993 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_power_on() 997 if (CHECK_PKG(ucr, LQFP48)) sd_power_on() 998 err = sd_pull_ctl_enable_lqfp48(ucr); sd_power_on() 1000 err = sd_pull_ctl_enable_qfn24(ucr); sd_power_on() 1004 err = rtsx_usb_write_register(ucr, CARD_PWR_CTL, sd_power_on() 1011 rtsx_usb_init_cmd(ucr); sd_power_on() 1012 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PWR_CTL, sd_power_on() 1014 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_OE, sd_power_on() 1017 return rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_power_on() 1022 struct rtsx_ucr *ucr = host->ucr; sd_power_off() local 1026 rtsx_usb_init_cmd(ucr); sd_power_off() 1028 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_EN, SD_CLK_EN, 0); sd_power_off() 1029 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_OE, SD_OUTPUT_EN, 0); sd_power_off() 1030 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PWR_CTL, sd_power_off() 1032 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PWR_CTL, sd_power_off() 1035 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_power_off() 1039 if (CHECK_PKG(ucr, LQFP48)) sd_power_off() 1040 return sd_pull_ctl_disable_lqfp48(ucr); sd_power_off() 1041 return sd_pull_ctl_disable_qfn24(ucr); sd_power_off() 1072 struct rtsx_ucr *ucr = host->ucr; sd_set_timing() local 1077 rtsx_usb_init_cmd(ucr); sd_set_timing() 1082 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG1, sd_set_timing() 1085 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, sd_set_timing() 1092 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG1, sd_set_timing() 1095 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, sd_set_timing() 1097 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_PUSH_POINT_CTL, sd_set_timing() 1099 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_SAMPLE_POINT_CTL, sd_set_timing() 1106 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_CFG1, sd_set_timing() 1108 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, sd_set_timing() 1110 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_PUSH_POINT_CTL, sd_set_timing() 1112 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_SAMPLE_POINT_CTL, sd_set_timing() 1117 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_set_timing() 1119 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_SOURCE, 0xFF, sd_set_timing() 1121 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, sd_set_timing() 1123 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_SAMPLE_POINT_CTL, sd_set_timing() 1128 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); sd_set_timing() 1136 struct rtsx_ucr *ucr = host->ucr; sdmmc_set_ios() local 1139 mutex_lock(&ucr->dev_mutex); sdmmc_set_ios() 1141 if (rtsx_usb_card_exclusive_check(ucr, RTSX_USB_SD_CARD)) { sdmmc_set_ios() 1142 mutex_unlock(&ucr->dev_mutex); sdmmc_set_ios() 1172 rtsx_usb_switch_clock(host->ucr, host->clock, host->ssc_depth, sdmmc_set_ios() 1175 mutex_unlock(&ucr->dev_mutex); sdmmc_set_ios() 1182 struct rtsx_ucr *ucr = host->ucr; sdmmc_switch_voltage() local 1194 mutex_lock(&ucr->dev_mutex); sdmmc_switch_voltage() 1196 err = rtsx_usb_card_exclusive_check(ucr, RTSX_USB_SD_CARD); sdmmc_switch_voltage() 1198 mutex_unlock(&ucr->dev_mutex); sdmmc_switch_voltage() 1205 rtsx_usb_init_cmd(ucr); sdmmc_switch_voltage() 1208 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_PAD_CTL, sdmmc_switch_voltage() 1210 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, LDO_POWER_CFG, sdmmc_switch_voltage() 1213 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_BUS_STAT, sdmmc_switch_voltage() 1216 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, SD_PAD_CTL, sdmmc_switch_voltage() 1218 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, LDO_POWER_CFG, sdmmc_switch_voltage() 1222 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); sdmmc_switch_voltage() 1223 mutex_unlock(&ucr->dev_mutex); sdmmc_switch_voltage() 1231 struct rtsx_ucr *ucr = host->ucr; sdmmc_card_busy() local 1239 mutex_lock(&ucr->dev_mutex); sdmmc_card_busy() 1241 err = rtsx_usb_write_register(ucr, SD_BUS_STAT, sdmmc_card_busy() 1249 err = rtsx_usb_read_register(ucr, SD_BUS_STAT, &stat); sdmmc_card_busy() 1253 err = rtsx_usb_write_register(ucr, SD_BUS_STAT, sdmmc_card_busy() 1256 mutex_unlock(&ucr->dev_mutex); sdmmc_card_busy() 1271 struct rtsx_ucr *ucr = host->ucr; sdmmc_execute_tuning() local 1277 mutex_lock(&ucr->dev_mutex); sdmmc_execute_tuning() 1282 mutex_unlock(&ucr->dev_mutex); sdmmc_execute_tuning() 1315 struct rtsx_ucr *ucr = host->ucr; rtsx_usb_update_led() local 1317 mutex_lock(&ucr->dev_mutex); rtsx_usb_update_led() 1320 rtsx_usb_turn_off_led(ucr); rtsx_usb_update_led() 1322 rtsx_usb_turn_on_led(ucr); rtsx_usb_update_led() 1324 mutex_unlock(&ucr->dev_mutex); rtsx_usb_update_led() 1357 struct rtsx_ucr *ucr; rtsx_usb_sdmmc_drv_probe() local 1362 ucr = usb_get_intfdata(to_usb_interface(pdev->dev.parent)); rtsx_usb_sdmmc_drv_probe() 1363 if (!ucr) rtsx_usb_sdmmc_drv_probe() 1373 host->ucr = ucr; rtsx_usb_sdmmc_drv_probe()
|
/linux-4.4.14/drivers/memstick/host/ |
H A D | rtsx_usb_ms.c | 37 struct rtsx_ucr *ucr; member in struct:rtsx_usb_ms 61 struct rtsx_ucr *ucr = host->ucr; ms_clear_error() local 62 rtsx_usb_ep0_write_register(ucr, CARD_STOP, ms_clear_error() 66 rtsx_usb_clear_dma_err(ucr); ms_clear_error() 67 rtsx_usb_clear_fsm_err(ucr); ms_clear_error() 74 struct rtsx_ucr *ucr = host->ucr; ms_print_debug_regs() local 79 rtsx_usb_init_cmd(ucr); ms_print_debug_regs() 83 rtsx_usb_add_cmd(ucr, READ_REG_CMD, i, 0, 0); ms_print_debug_regs() 87 rtsx_usb_add_cmd(ucr, READ_REG_CMD, i, 0, 0); ms_print_debug_regs() 91 rtsx_usb_add_cmd(ucr, READ_REG_CMD, i, 0, 0); ms_print_debug_regs() 94 rtsx_usb_add_cmd(ucr, READ_REG_CMD, CARD_DATA_SOURCE, 0, 0); ms_print_debug_regs() 95 rtsx_usb_add_cmd(ucr, READ_REG_CMD, CARD_SELECT, 0, 0); ms_print_debug_regs() 96 rtsx_usb_add_cmd(ucr, READ_REG_CMD, CARD_CLK_EN, 0, 0); ms_print_debug_regs() 97 rtsx_usb_add_cmd(ucr, READ_REG_CMD, CARD_PWR_CTL, 0, 0); ms_print_debug_regs() 99 rtsx_usb_send_cmd(ucr, MODE_CR, 100); ms_print_debug_regs() 100 rtsx_usb_get_rsp(ucr, 21, 100); ms_print_debug_regs() 102 ptr = ucr->rsp_buf; ms_print_debug_regs() 124 static int ms_pull_ctl_disable_lqfp48(struct rtsx_ucr *ucr) ms_pull_ctl_disable_lqfp48() argument 126 rtsx_usb_init_cmd(ucr); ms_pull_ctl_disable_lqfp48() 128 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x55); ms_pull_ctl_disable_lqfp48() 129 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55); ms_pull_ctl_disable_lqfp48() 130 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95); ms_pull_ctl_disable_lqfp48() 131 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); ms_pull_ctl_disable_lqfp48() 132 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x55); ms_pull_ctl_disable_lqfp48() 133 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0xA5); ms_pull_ctl_disable_lqfp48() 135 return rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_pull_ctl_disable_lqfp48() 138 static int ms_pull_ctl_disable_qfn24(struct rtsx_ucr *ucr) ms_pull_ctl_disable_qfn24() argument 140 rtsx_usb_init_cmd(ucr); ms_pull_ctl_disable_qfn24() 142 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x65); ms_pull_ctl_disable_qfn24() 143 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55); ms_pull_ctl_disable_qfn24() 144 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95); ms_pull_ctl_disable_qfn24() 145 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); ms_pull_ctl_disable_qfn24() 146 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x56); ms_pull_ctl_disable_qfn24() 147 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0x59); ms_pull_ctl_disable_qfn24() 149 return rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_pull_ctl_disable_qfn24() 152 static int ms_pull_ctl_enable_lqfp48(struct rtsx_ucr *ucr) ms_pull_ctl_enable_lqfp48() argument 154 rtsx_usb_init_cmd(ucr); ms_pull_ctl_enable_lqfp48() 156 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x55); ms_pull_ctl_enable_lqfp48() 157 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55); ms_pull_ctl_enable_lqfp48() 158 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95); ms_pull_ctl_enable_lqfp48() 159 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); ms_pull_ctl_enable_lqfp48() 160 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x55); ms_pull_ctl_enable_lqfp48() 161 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0xA5); ms_pull_ctl_enable_lqfp48() 163 return rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_pull_ctl_enable_lqfp48() 166 static int ms_pull_ctl_enable_qfn24(struct rtsx_ucr *ucr) ms_pull_ctl_enable_qfn24() argument 168 rtsx_usb_init_cmd(ucr); ms_pull_ctl_enable_qfn24() 170 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL1, 0xFF, 0x65); ms_pull_ctl_enable_qfn24() 171 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL2, 0xFF, 0x55); ms_pull_ctl_enable_qfn24() 172 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL3, 0xFF, 0x95); ms_pull_ctl_enable_qfn24() 173 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL4, 0xFF, 0x55); ms_pull_ctl_enable_qfn24() 174 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL5, 0xFF, 0x55); ms_pull_ctl_enable_qfn24() 175 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PULL_CTL6, 0xFF, 0x59); ms_pull_ctl_enable_qfn24() 177 return rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_pull_ctl_enable_qfn24() 182 struct rtsx_ucr *ucr = host->ucr; ms_power_on() local 187 rtsx_usb_init_cmd(ucr); ms_power_on() 188 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_SELECT, 0x07, MS_MOD_SEL); ms_power_on() 189 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_SHARE_MODE, ms_power_on() 191 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_EN, ms_power_on() 193 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_power_on() 197 if (CHECK_PKG(ucr, LQFP48)) ms_power_on() 198 err = ms_pull_ctl_enable_lqfp48(ucr); ms_power_on() 200 err = ms_pull_ctl_enable_qfn24(ucr); ms_power_on() 204 err = rtsx_usb_write_register(ucr, CARD_PWR_CTL, ms_power_on() 211 rtsx_usb_init_cmd(ucr); ms_power_on() 212 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_PWR_CTL, ms_power_on() 214 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_OE, ms_power_on() 217 return rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_power_on() 222 struct rtsx_ucr *ucr = host->ucr; ms_power_off() local 227 rtsx_usb_init_cmd(ucr); ms_power_off() 229 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_CLK_EN, MS_CLK_EN, 0); ms_power_off() 230 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_OE, MS_OUTPUT_EN, 0); ms_power_off() 232 err = rtsx_usb_send_cmd(ucr, MODE_C, 100); ms_power_off() 236 if (CHECK_PKG(ucr, LQFP48)) ms_power_off() 237 return ms_pull_ctl_disable_lqfp48(ucr); ms_power_off() 239 return ms_pull_ctl_disable_qfn24(ucr); ms_power_off() 245 struct rtsx_ucr *ucr = host->ucr; ms_transfer_data() local 264 pipe = usb_rcvbulkpipe(ucr->pusb_dev, EP_BULK_IN); ms_transfer_data() 272 pipe = usb_sndbulkpipe(ucr->pusb_dev, EP_BULK_OUT); ms_transfer_data() 275 rtsx_usb_init_cmd(ucr); ms_transfer_data() 277 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); ms_transfer_data() 279 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_SECTOR_CNT_H, ms_transfer_data() 281 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_SECTOR_CNT_L, ms_transfer_data() 284 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TRANS_CFG, 0xFF, cfg); ms_transfer_data() 286 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC3, ms_transfer_data() 288 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC2, ms_transfer_data() 290 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC1, ms_transfer_data() 292 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_TC0, 0xFF, ms_transfer_data() 294 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MC_DMA_CTL, ms_transfer_data() 296 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_DATA_SOURCE, ms_transfer_data() 299 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TRANSFER, ms_transfer_data() 301 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, MS_TRANSFER, ms_transfer_data() 304 err = rtsx_usb_send_cmd(ucr, flag | STAGE_MS_STATUS, 100); ms_transfer_data() 308 err = rtsx_usb_transfer_data(ucr, pipe, sg, length, ms_transfer_data() 313 err = rtsx_usb_get_rsp(ucr, 3, 15000); ms_transfer_data() 317 if (ucr->rsp_buf[0] & MS_TRANSFER_ERR || ms_transfer_data() 318 ucr->rsp_buf[1] & (MS_CRC16_ERR | MS_RDY_TIMEOUT)) { ms_transfer_data() 331 struct rtsx_ucr *ucr = host->ucr; ms_write_bytes() local 336 rtsx_usb_init_cmd(ucr); ms_write_bytes() 339 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, ms_write_bytes() 343 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, ms_write_bytes() 346 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); ms_write_bytes() 347 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_BYTE_CNT, 0xFF, cnt); ms_write_bytes() 348 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TRANS_CFG, 0xFF, cfg); ms_write_bytes() 349 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_DATA_SOURCE, ms_write_bytes() 352 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TRANSFER, ms_write_bytes() 354 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, MS_TRANSFER, ms_write_bytes() 356 rtsx_usb_add_cmd(ucr, READ_REG_CMD, MS_TRANS_CFG, 0, 0); ms_write_bytes() 358 err = rtsx_usb_send_cmd(ucr, MODE_CR, 100); ms_write_bytes() 362 err = rtsx_usb_get_rsp(ucr, 2, 5000); ms_write_bytes() 363 if (err || (ucr->rsp_buf[0] & MS_TRANSFER_ERR)) { ms_write_bytes() 366 rtsx_usb_ep0_read_register(ucr, MS_TRANS_CFG, &val); ms_write_bytes() 390 *int_reg = ucr->rsp_buf[1] & 0x0F; ms_write_bytes() 398 struct rtsx_ucr *ucr = host->ucr; ms_read_bytes() local 404 rtsx_usb_init_cmd(ucr); ms_read_bytes() 406 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); ms_read_bytes() 407 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_BYTE_CNT, 0xFF, cnt); ms_read_bytes() 408 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TRANS_CFG, 0xFF, cfg); ms_read_bytes() 409 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, CARD_DATA_SOURCE, ms_read_bytes() 412 rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TRANSFER, ms_read_bytes() 414 rtsx_usb_add_cmd(ucr, CHECK_REG_CMD, MS_TRANSFER, ms_read_bytes() 417 rtsx_usb_add_cmd(ucr, READ_REG_CMD, PPBUF_BASE2 + i, 0, 0); ms_read_bytes() 419 rtsx_usb_add_cmd(ucr, READ_REG_CMD, PPBUF_BASE2 + cnt, 0, 0); ms_read_bytes() 421 rtsx_usb_add_cmd(ucr, READ_REG_CMD, ms_read_bytes() 424 rtsx_usb_add_cmd(ucr, READ_REG_CMD, MS_TRANS_CFG, 0, 0); ms_read_bytes() 426 err = rtsx_usb_send_cmd(ucr, MODE_CR, 100); ms_read_bytes() 430 err = rtsx_usb_get_rsp(ucr, cnt + 2, 5000); ms_read_bytes() 431 if (err || (ucr->rsp_buf[0] & MS_TRANSFER_ERR)) { ms_read_bytes() 434 rtsx_usb_ep0_read_register(ucr, MS_TRANS_CFG, &val); ms_read_bytes() 457 ptr = ucr->rsp_buf + 1; ms_read_bytes() 522 struct rtsx_ucr *ucr = host->ucr; rtsx_usb_ms_handle_req() local 532 mutex_lock(&ucr->dev_mutex); rtsx_usb_ms_handle_req() 534 if (rtsx_usb_card_exclusive_check(ucr, rtsx_usb_ms_handle_req() 541 mutex_unlock(&ucr->dev_mutex); rtsx_usb_ms_handle_req() 565 struct rtsx_ucr *ucr = host->ucr; rtsx_usb_ms_set_param() local 573 mutex_lock(&ucr->dev_mutex); rtsx_usb_ms_set_param() 575 err = rtsx_usb_card_exclusive_check(ucr, RTSX_USB_MS_CARD); rtsx_usb_ms_set_param() 603 err = rtsx_usb_write_register(ucr, MS_CFG, 0x5A, rtsx_usb_ms_set_param() 611 err = rtsx_usb_write_register(ucr, MS_CFG, 0x5A, rtsx_usb_ms_set_param() 621 err = rtsx_usb_switch_clock(ucr, clock, rtsx_usb_ms_set_param() 637 mutex_unlock(&ucr->dev_mutex); rtsx_usb_ms_set_param() 679 struct rtsx_ucr *ucr = host->ucr; rtsx_usb_detect_ms_card() local 684 mutex_lock(&ucr->dev_mutex); rtsx_usb_detect_ms_card() 687 err = rtsx_usb_read_register(ucr, CARD_INT_PEND, &val); rtsx_usb_detect_ms_card() 689 mutex_unlock(&ucr->dev_mutex); rtsx_usb_detect_ms_card() 694 rtsx_usb_write_register(ucr, CARD_INT_PEND, rtsx_usb_detect_ms_card() 698 mutex_unlock(&ucr->dev_mutex); rtsx_usb_detect_ms_card() 720 struct rtsx_ucr *ucr; rtsx_usb_ms_drv_probe() local 723 ucr = usb_get_intfdata(to_usb_interface(pdev->dev.parent)); rtsx_usb_ms_drv_probe() 724 if (!ucr) rtsx_usb_ms_drv_probe() 735 host->ucr = ucr; rtsx_usb_ms_drv_probe()
|
/linux-4.4.14/include/linux/mfd/ |
H A D | rtsx_usb.h | 48 #define CHECK_PKG(ucr, pkg) ((ucr)->package == (pkg)) 79 extern int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status); 81 extern int rtsx_usb_read_register(struct rtsx_ucr *ucr, u16 addr, u8 *data); 82 extern int rtsx_usb_write_register(struct rtsx_ucr *ucr, u16 addr, u8 mask, 85 extern int rtsx_usb_ep0_write_register(struct rtsx_ucr *ucr, u16 addr, u8 mask, 87 extern int rtsx_usb_ep0_read_register(struct rtsx_ucr *ucr, u16 addr, 90 extern void rtsx_usb_add_cmd(struct rtsx_ucr *ucr, u8 cmd_type, 92 extern int rtsx_usb_send_cmd(struct rtsx_ucr *ucr, u8 flag, int timeout); 93 extern int rtsx_usb_get_rsp(struct rtsx_ucr *ucr, int rsp_len, int timeout); 94 extern int rtsx_usb_transfer_data(struct rtsx_ucr *ucr, unsigned int pipe, 98 extern int rtsx_usb_read_ppbuf(struct rtsx_ucr *ucr, u8 *buf, int buf_len); 99 extern int rtsx_usb_write_ppbuf(struct rtsx_ucr *ucr, u8 *buf, int buf_len); 100 extern int rtsx_usb_switch_clock(struct rtsx_ucr *ucr, unsigned int card_clock, 102 extern int rtsx_usb_card_exclusive_check(struct rtsx_ucr *ucr, int card); 141 #define rtsx_usb_cmd_hdr_tag(ucr) \ 143 ucr->cmd_buf[0] = 'R'; \ 144 ucr->cmd_buf[1] = 'T'; \ 145 ucr->cmd_buf[2] = 'C'; \ 146 ucr->cmd_buf[3] = 'R'; \ 149 static inline void rtsx_usb_init_cmd(struct rtsx_ucr *ucr) rtsx_usb_init_cmd() argument 151 rtsx_usb_cmd_hdr_tag(ucr); rtsx_usb_init_cmd() 152 ucr->cmd_idx = 0; rtsx_usb_init_cmd() 153 ucr->cmd_buf[PACKET_TYPE] = BATCH_CMD; rtsx_usb_init_cmd() 606 static inline int rtsx_usb_turn_on_led(struct rtsx_ucr *ucr) rtsx_usb_turn_on_led() argument 608 return rtsx_usb_ep0_write_register(ucr, CARD_GPIO, 0x03, 0x02); rtsx_usb_turn_on_led() 611 static inline int rtsx_usb_turn_off_led(struct rtsx_ucr *ucr) rtsx_usb_turn_off_led() argument 613 return rtsx_usb_ep0_write_register(ucr, CARD_GPIO, 0x03, 0x03); rtsx_usb_turn_off_led() 617 static inline void rtsx_usb_clear_fsm_err(struct rtsx_ucr *ucr) rtsx_usb_clear_fsm_err() argument 619 rtsx_usb_ep0_write_register(ucr, SFSM_ED, 0xf8, 0xf8); rtsx_usb_clear_fsm_err() 622 static inline void rtsx_usb_clear_dma_err(struct rtsx_ucr *ucr) rtsx_usb_clear_dma_err() argument 624 rtsx_usb_ep0_write_register(ucr, MC_FIFO_CTL, rtsx_usb_clear_dma_err() 626 rtsx_usb_ep0_write_register(ucr, MC_DMA_RST, DMA_RESET, DMA_RESET); rtsx_usb_clear_dma_err()
|
/linux-4.4.14/drivers/tty/serial/ |
H A D | imx.c | 293 struct imx_port_ucrs *ucr) imx_port_ucrs_save() 296 ucr->ucr1 = readl(port->membase + UCR1); imx_port_ucrs_save() 297 ucr->ucr2 = readl(port->membase + UCR2); imx_port_ucrs_save() 298 ucr->ucr3 = readl(port->membase + UCR3); imx_port_ucrs_save() 302 struct imx_port_ucrs *ucr) imx_port_ucrs_restore() 305 writel(ucr->ucr1, port->membase + UCR1); imx_port_ucrs_restore() 306 writel(ucr->ucr2, port->membase + UCR2); imx_port_ucrs_restore() 307 writel(ucr->ucr3, port->membase + UCR3); imx_port_ucrs_restore() 292 imx_port_ucrs_save(struct uart_port *port, struct imx_port_ucrs *ucr) imx_port_ucrs_save() argument 301 imx_port_ucrs_restore(struct uart_port *port, struct imx_port_ucrs *ucr) imx_port_ucrs_restore() argument
|
/linux-4.4.14/drivers/media/usb/gspca/ |
H A D | vicam.c | 11 * John Tyner (jtyner@cs.ucr.edu),
|
/linux-4.4.14/drivers/scsi/ |
H A D | qlogicfas408.c | 12 grif@cs.ucr.edu
|
/linux-4.4.14/drivers/tty/vt/ |
H A D | vt_ioctl.c | 6 * Restrict VT switching via ioctl() - grif@cs.ucr.edu - Dec 1995
|
/linux-4.4.14/drivers/tty/ |
H A D | tty_io.c | 44 * -- grif@cs.ucr.edu, 5-Dec-95
|