sport 168 drivers/infiniband/core/ud_header.c { STRUCT_FIELD(udp, sport), sport 1932 drivers/infiniband/hw/bnxt_re/ib_verbs.c qp->qp1_hdr.udp.sport = htons(0x8CD1); sport 3151 drivers/infiniband/hw/mlx4/qp.c sqp->ud_header.udp.sport = htons(MLX4_ROCEV2_QP1_SPORT); sport 484 drivers/infiniband/hw/qedr/qedr_roce_cm.c udh->udp.sport = htons(QEDR_ROCE_V2_UDP_SPORT); sport 37 drivers/infiniband/hw/qib/qib_user_sdma.h qib_user_sdma_queue_create(struct device *dev, int unit, int port, int sport); sport 139 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport; sport 153 drivers/infiniband/ulp/srpt/ib_srpt.c sport = &sdev->port[port_num]; sport 154 drivers/infiniband/ulp/srpt/ib_srpt.c sport->lid = 0; sport 155 drivers/infiniband/ulp/srpt/ib_srpt.c sport->sm_lid = 0; sport 171 drivers/infiniband/ulp/srpt/ib_srpt.c sport = &sdev->port[port_num]; sport 172 drivers/infiniband/ulp/srpt/ib_srpt.c if (!sport->lid && !sport->sm_lid) sport 173 drivers/infiniband/ulp/srpt/ib_srpt.c schedule_work(&sport->work); sport 320 drivers/infiniband/ulp/srpt/ib_srpt.c static void srpt_get_ioc(struct srpt_port *sport, u32 slot, sport 323 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_device *sdev = sport->sdev; sport 362 drivers/infiniband/ulp/srpt/ib_srpt.c iocp->rdma_size = cpu_to_be32(min(sport->port_attrib.srp_max_rdma_size, sport 475 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = (struct srpt_port *)mad_agent->context; sport 507 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_mgmt_method_get(sport, mad_wc->recv_buf.mad, dm_mad); sport 552 drivers/infiniband/ulp/srpt/ib_srpt.c static int srpt_refresh_port(struct srpt_port *sport) sport 563 drivers/infiniband/ulp/srpt/ib_srpt.c ret = ib_modify_port(sport->sdev->device, sport->port, 0, &port_modify); sport 567 drivers/infiniband/ulp/srpt/ib_srpt.c ret = ib_query_port(sport->sdev->device, sport->port, &port_attr); sport 571 drivers/infiniband/ulp/srpt/ib_srpt.c sport->sm_lid = port_attr.sm_lid; sport 572 drivers/infiniband/ulp/srpt/ib_srpt.c sport->lid = port_attr.lid; sport 574 drivers/infiniband/ulp/srpt/ib_srpt.c ret = rdma_query_gid(sport->sdev->device, sport->port, 0, &sport->gid); sport 578 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_guid_wwn.priv = sport; sport 579 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_format_guid(sport->port_guid, sizeof(sport->port_guid), sport 580 drivers/infiniband/ulp/srpt/ib_srpt.c &sport->gid.global.interface_id); sport 581 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_gid_wwn.priv = sport; sport 582 drivers/infiniband/ulp/srpt/ib_srpt.c snprintf(sport->port_gid, sizeof(sport->port_gid), sport 584 drivers/infiniband/ulp/srpt/ib_srpt.c be64_to_cpu(sport->gid.global.subnet_prefix), sport 585 drivers/infiniband/ulp/srpt/ib_srpt.c be64_to_cpu(sport->gid.global.interface_id)); sport 587 drivers/infiniband/ulp/srpt/ib_srpt.c if (!sport->mad_agent) { sport 594 drivers/infiniband/ulp/srpt/ib_srpt.c sport->mad_agent = ib_register_mad_agent(sport->sdev->device, sport 595 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port, sport 600 drivers/infiniband/ulp/srpt/ib_srpt.c sport, 0); sport 601 drivers/infiniband/ulp/srpt/ib_srpt.c if (IS_ERR(sport->mad_agent)) { sport 602 drivers/infiniband/ulp/srpt/ib_srpt.c ret = PTR_ERR(sport->mad_agent); sport 603 drivers/infiniband/ulp/srpt/ib_srpt.c sport->mad_agent = NULL; sport 614 drivers/infiniband/ulp/srpt/ib_srpt.c ib_modify_port(sport->sdev->device, sport->port, 0, &port_modify); sport 632 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport; sport 636 drivers/infiniband/ulp/srpt/ib_srpt.c sport = &sdev->port[i - 1]; sport 637 drivers/infiniband/ulp/srpt/ib_srpt.c WARN_ON(sport->port != i); sport 640 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->mad_agent) { sport 641 drivers/infiniband/ulp/srpt/ib_srpt.c ib_unregister_mad_agent(sport->mad_agent); sport 642 drivers/infiniband/ulp/srpt/ib_srpt.c sport->mad_agent = NULL; sport 918 drivers/infiniband/ulp/srpt/ib_srpt.c ret = rdma_rw_ctx_init(&ctx->rw, ch->qp, ch->sport->port, sport 947 drivers/infiniband/ulp/srpt/ib_srpt.c rdma_rw_ctx_destroy(&ctx->rw, ch->qp, ch->sport->port, sport 965 drivers/infiniband/ulp/srpt/ib_srpt.c rdma_rw_ctx_destroy(&ctx->rw, ch->qp, ch->sport->port, sport 1123 drivers/infiniband/ulp/srpt/ib_srpt.c attr->port_num = ch->sport->port; sport 1125 drivers/infiniband/ulp/srpt/ib_srpt.c ret = ib_find_cached_pkey(ch->sport->sdev->device, ch->sport->port, sport 1627 drivers/infiniband/ulp/srpt/ib_srpt.c ib_dma_sync_single_for_cpu(ch->sport->sdev->device, sport 1670 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_post_recv(ch->sport->sdev, ch, recv_ioctx); sport 1780 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = ch->sport; sport 1781 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_device *sdev = sport->sdev; sport 1783 drivers/infiniband/ulp/srpt/ib_srpt.c int sq_size = sport->port_attrib.srp_sq_size; sport 1823 drivers/infiniband/ulp/srpt/ib_srpt.c qp_init->port_num = ch->sport->port; sport 1958 drivers/infiniband/ulp/srpt/ib_srpt.c static bool srpt_ch_closed(struct srpt_port *sport, struct srpt_rdma_ch *ch) sport 1965 drivers/infiniband/ulp/srpt/ib_srpt.c list_for_each_entry(nexus, &sport->nexus_list, entry) { sport 1982 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = ch->sport; sport 1987 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 1989 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 1991 drivers/infiniband/ulp/srpt/ib_srpt.c while (wait_event_timeout(sport->ch_releaseQ, srpt_ch_closed(sport, ch), sport 1998 drivers/infiniband/ulp/srpt/ib_srpt.c static void __srpt_close_all_ch(struct srpt_port *sport) sport 2003 drivers/infiniband/ulp/srpt/ib_srpt.c lockdep_assert_held(&sport->mutex); sport 2005 drivers/infiniband/ulp/srpt/ib_srpt.c list_for_each_entry(nexus, &sport->nexus_list, entry) { sport 2010 drivers/infiniband/ulp/srpt/ib_srpt.c dev_name(&sport->sdev->device->dev), sport 2011 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port); sport 2021 drivers/infiniband/ulp/srpt/ib_srpt.c static struct srpt_nexus *srpt_get_nexus(struct srpt_port *sport, sport 2028 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 2029 drivers/infiniband/ulp/srpt/ib_srpt.c list_for_each_entry(n, &sport->nexus_list, entry) { sport 2038 drivers/infiniband/ulp/srpt/ib_srpt.c &sport->nexus_list); sport 2041 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2060 drivers/infiniband/ulp/srpt/ib_srpt.c static void srpt_set_enabled(struct srpt_port *sport, bool enabled) sport 2061 drivers/infiniband/ulp/srpt/ib_srpt.c __must_hold(&sport->mutex) sport 2063 drivers/infiniband/ulp/srpt/ib_srpt.c lockdep_assert_held(&sport->mutex); sport 2065 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->enabled == enabled) sport 2067 drivers/infiniband/ulp/srpt/ib_srpt.c sport->enabled = enabled; sport 2069 drivers/infiniband/ulp/srpt/ib_srpt.c __srpt_close_all_ch(sport); sport 2091 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport; sport 2097 drivers/infiniband/ulp/srpt/ib_srpt.c sdev = ch->sport->sdev; sport 2114 drivers/infiniband/ulp/srpt/ib_srpt.c sport = ch->sport; sport 2115 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 2117 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2122 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sport->sdev, ch->rq_size, sport 2133 drivers/infiniband/ulp/srpt/ib_srpt.c wake_up(&sport->ch_releaseQ); sport 2159 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = &sdev->port[port_num - 1]; sport 2181 drivers/infiniband/ulp/srpt/ib_srpt.c port_num, &sport->gid, be16_to_cpu(pkey)); sport 2183 drivers/infiniband/ulp/srpt/ib_srpt.c nexus = srpt_get_nexus(sport, req->initiator_port_id, sport 2206 drivers/infiniband/ulp/srpt/ib_srpt.c if (!sport->enabled) { sport 2209 drivers/infiniband/ulp/srpt/ib_srpt.c dev_name(&sport->sdev->device->dev), port_num); sport 2235 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sport = sport; sport 2253 drivers/infiniband/ulp/srpt/ib_srpt.c ch->max_rsp_size = ch->sport->port_attrib.srp_max_rsp_size; sport 2261 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_alloc_ioctx_ring(ch->sport->sdev, ch->rq_size, sport 2296 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_alloc_ioctx_ring(ch->sport->sdev, ch->rq_size, sport 2327 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->port_guid_tpg.se_tpg_wwn) sport 2328 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sess = target_setup_session(&sport->port_guid_tpg, tag_num, sport 2331 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->port_gid_tpg.se_tpg_wwn && IS_ERR_OR_NULL(ch->sess)) sport 2332 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sess = target_setup_session(&sport->port_gid_tpg, tag_num, sport 2336 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->port_gid_tpg.se_tpg_wwn && IS_ERR_OR_NULL(ch->sess)) sport 2337 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sess = target_setup_session(&sport->port_gid_tpg, tag_num, sport 2352 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 2370 drivers/infiniband/ulp/srpt/ib_srpt.c if (!sport->enabled) { sport 2375 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2379 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2428 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 2429 drivers/infiniband/ulp/srpt/ib_srpt.c if (sport->enabled && ch->state == CH_CONNECTING) { sport 2437 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2458 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sport->sdev, ch->rq_size, sport 2466 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sport->sdev, ch->rq_size, sport 2754 drivers/infiniband/ulp/srpt/ib_srpt.c first_wr = rdma_rw_ctx_wrs(&ctx->rw, ch->qp, ch->sport->port, sport 2796 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_device *sdev = ch->sport->sdev; sport 2831 drivers/infiniband/ulp/srpt/ib_srpt.c ch->sport->port, NULL, first_wr); sport 2928 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = container_of(work, struct srpt_port, work); sport 2930 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_refresh_port(sport); sport 2933 drivers/infiniband/ulp/srpt/ib_srpt.c static bool srpt_ch_list_empty(struct srpt_port *sport) sport 2939 drivers/infiniband/ulp/srpt/ib_srpt.c list_for_each_entry(nexus, &sport->nexus_list, entry) sport 2951 drivers/infiniband/ulp/srpt/ib_srpt.c static int srpt_release_sport(struct srpt_port *sport) sport 2958 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 2959 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_set_enabled(sport, false); sport 2960 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2962 drivers/infiniband/ulp/srpt/ib_srpt.c while (wait_event_timeout(sport->ch_releaseQ, sport 2963 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_ch_list_empty(sport), 5 * HZ) <= 0) { sport 2965 drivers/infiniband/ulp/srpt/ib_srpt.c dev_name(&sport->sdev->device->dev), sport->port); sport 2967 drivers/infiniband/ulp/srpt/ib_srpt.c list_for_each_entry(nexus, &sport->nexus_list, entry) { sport 2977 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 2978 drivers/infiniband/ulp/srpt/ib_srpt.c list_for_each_entry_safe(nexus, next_n, &sport->nexus_list, entry) { sport 2982 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 2991 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport; sport 3000 drivers/infiniband/ulp/srpt/ib_srpt.c sport = &sdev->port[i]; sport 3002 drivers/infiniband/ulp/srpt/ib_srpt.c if (strcmp(sport->port_guid, name) == 0) sport 3003 drivers/infiniband/ulp/srpt/ib_srpt.c return &sport->port_guid_wwn; sport 3004 drivers/infiniband/ulp/srpt/ib_srpt.c if (strcmp(sport->port_gid, name) == 0) sport 3005 drivers/infiniband/ulp/srpt/ib_srpt.c return &sport->port_gid_wwn; sport 3112 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport; sport 3172 drivers/infiniband/ulp/srpt/ib_srpt.c sport = &sdev->port[i - 1]; sport 3173 drivers/infiniband/ulp/srpt/ib_srpt.c INIT_LIST_HEAD(&sport->nexus_list); sport 3174 drivers/infiniband/ulp/srpt/ib_srpt.c init_waitqueue_head(&sport->ch_releaseQ); sport 3175 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_init(&sport->mutex); sport 3176 drivers/infiniband/ulp/srpt/ib_srpt.c sport->sdev = sdev; sport 3177 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port = i; sport 3178 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.srp_max_rdma_size = DEFAULT_MAX_RDMA_SIZE; sport 3179 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.srp_max_rsp_size = DEFAULT_MAX_RSP_SIZE; sport 3180 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.srp_sq_size = DEF_SRPT_SQ_SIZE; sport 3181 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.use_srq = false; sport 3182 drivers/infiniband/ulp/srpt/ib_srpt.c INIT_WORK(&sport->work, srpt_refresh_port_work); sport 3184 drivers/infiniband/ulp/srpt/ib_srpt.c if (srpt_refresh_port(sport)) { sport 3287 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(tpg); sport 3289 drivers/infiniband/ulp/srpt/ib_srpt.c WARN_ON_ONCE(tpg != &sport->port_guid_tpg && sport 3290 drivers/infiniband/ulp/srpt/ib_srpt.c tpg != &sport->port_gid_tpg); sport 3291 drivers/infiniband/ulp/srpt/ib_srpt.c return tpg == &sport->port_guid_tpg ? sport->port_guid : sport 3292 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_gid; sport 3318 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_post_recv(ch->sport->sdev, ch, recv_ioctx); sport 3445 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3447 drivers/infiniband/ulp/srpt/ib_srpt.c return sprintf(page, "%u\n", sport->port_attrib.srp_max_rdma_size); sport 3454 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3473 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.srp_max_rdma_size = val; sport 3482 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3484 drivers/infiniband/ulp/srpt/ib_srpt.c return sprintf(page, "%u\n", sport->port_attrib.srp_max_rsp_size); sport 3491 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3510 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.srp_max_rsp_size = val; sport 3519 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3521 drivers/infiniband/ulp/srpt/ib_srpt.c return sprintf(page, "%u\n", sport->port_attrib.srp_sq_size); sport 3528 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3547 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.srp_sq_size = val; sport 3556 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3558 drivers/infiniband/ulp/srpt/ib_srpt.c return sprintf(page, "%d\n", sport->port_attrib.use_srq); sport 3565 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3566 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_device *sdev = sport->sdev; sport 3580 drivers/infiniband/ulp/srpt/ib_srpt.c ret = mutex_lock_interruptible(&sport->mutex); sport 3583 drivers/infiniband/ulp/srpt/ib_srpt.c enabled = sport->enabled; sport 3585 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_set_enabled(sport, false); sport 3586 drivers/infiniband/ulp/srpt/ib_srpt.c sport->port_attrib.use_srq = val; sport 3587 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_use_srq(sdev, sport->port_attrib.use_srq); sport 3588 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_set_enabled(sport, enabled); sport 3590 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 3702 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3704 drivers/infiniband/ulp/srpt/ib_srpt.c return snprintf(page, PAGE_SIZE, "%d\n", sport->enabled); sport 3711 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(se_tpg); sport 3726 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_lock(&sport->mutex); sport 3727 drivers/infiniband/ulp/srpt/ib_srpt.c srpt_set_enabled(sport, tmp); sport 3728 drivers/infiniband/ulp/srpt/ib_srpt.c mutex_unlock(&sport->mutex); sport 3748 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = wwn->priv; sport 3752 drivers/infiniband/ulp/srpt/ib_srpt.c WARN_ON_ONCE(wwn != &sport->port_guid_wwn && sport 3753 drivers/infiniband/ulp/srpt/ib_srpt.c wwn != &sport->port_gid_wwn); sport 3754 drivers/infiniband/ulp/srpt/ib_srpt.c tpg = wwn == &sport->port_guid_wwn ? &sport->port_guid_tpg : sport 3755 drivers/infiniband/ulp/srpt/ib_srpt.c &sport->port_gid_tpg; sport 3769 drivers/infiniband/ulp/srpt/ib_srpt.c struct srpt_port *sport = srpt_tpg_to_sport(tpg); sport 3771 drivers/infiniband/ulp/srpt/ib_srpt.c sport->enabled = false; sport 312 drivers/infiniband/ulp/srpt/ib_srpt.h struct srpt_port *sport; sport 254 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c flow->l4_key.ports.sport = match.key->src; sport 255 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c flow->l4_mask.ports.sport = match.mask->src; sport 457 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c req.l4_src_port = flow->l4_key.ports.sport; sport 458 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c req.l4_src_port_mask = flow->l4_mask.ports.sport; sport 48 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h __be16 sport; sport 414 drivers/net/ethernet/chelsio/cxgb3/common.h u16 sport; sport 158 drivers/net/ethernet/chelsio/cxgb3/cxgb3_ioctl.h uint16_t sport; sport 3001 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c key[0] = tp->sport | (tp->sip << 16); sport 1526 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c __be32 sip, __be16 sport, __be16 vlan, sport 1543 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c req->local_port = sport; sport 1567 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c const struct in6_addr *sip, __be16 sport, sport 1584 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c req->local_port = sport; sport 2477 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c __be32 sip, __be16 sport, __be16 vlan, sport 2507 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c f->fs.val.lport = cpu_to_be16(sport); sport 189 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h __be32 sip, __be16 sport, __be16 vlan, sport 192 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h const struct in6_addr *sip, __be16 sport, sport 197 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h __be32 sip, __be16 sport, __be16 vlan, sport 438 drivers/net/ethernet/mscc/ocelot_ace.c struct ocelot_vcap_udp_tcp *sport, *dport; sport 453 drivers/net/ethernet/mscc/ocelot_ace.c sport = &ipv4->sport; sport 483 drivers/net/ethernet/mscc/ocelot_ace.c sport = &ipv6->sport; sport 521 drivers/net/ethernet/mscc/ocelot_ace.c sport); sport 144 drivers/net/ethernet/mscc/ocelot_ace.h struct ocelot_vcap_udp_tcp sport; /* UDP/TCP: Source port */ sport 163 drivers/net/ethernet/mscc/ocelot_ace.h struct ocelot_vcap_udp_tcp sport; sport 147 drivers/net/ethernet/mscc/ocelot_flower.c ocelot_rule->frame.ipv4.sport.value = ntohs(match.key->src); sport 148 drivers/net/ethernet/mscc/ocelot_flower.c ocelot_rule->frame.ipv4.sport.mask = ntohs(match.mask->src); sport 42 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c int sport; sport 148 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c thdr->source = htons(attr->sport); sport 153 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c uhdr->source = htons(attr->sport); sport 825 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c attr.sport = 0x321; sport 929 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c attr.sport = 9; sport 1005 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c attr.sport = 9; sport 1483 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c attr.sport = src; sport 7349 drivers/net/ethernet/sun/niu.c u16 sport, dport, spm, dpm; sport 7375 drivers/net/ethernet/sun/niu.c sport = be16_to_cpu(fsp->h_u.tcp_ip4_spec.psrc); sport 7380 drivers/net/ethernet/sun/niu.c tp->key[2] |= (((u64)sport << 16) | dport); sport 885 drivers/net/geneve.c __be16 sport; sport 895 drivers/net/geneve.c sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true); sport 930 drivers/net/geneve.c tos, ttl, df, sport, geneve->info.key.tp_dst, sport 947 drivers/net/geneve.c __be16 sport; sport 956 drivers/net/geneve.c sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true); sport 975 drivers/net/geneve.c info->key.label, sport, geneve->info.key.tp_dst, sport 2221 drivers/net/vxlan.c __be32 daddr, __be32 *saddr, __be16 dport, __be16 sport, sport 2248 drivers/net/vxlan.c fl4.fl4_sport = sport; sport 2276 drivers/net/vxlan.c __be16 dport, __be16 sport, sport 2303 drivers/net/vxlan.c fl6.fl6_sport = sport; sport 2923 drivers/net/vxlan.c __be16 sport, dport; sport 2925 drivers/net/vxlan.c sport = udp_flow_src_port(dev_net(dev), skb, vxlan->cfg.port_min, sport 2935 drivers/net/vxlan.c &info->key.u.ipv4.src, dport, sport, sport 2947 drivers/net/vxlan.c &info->key.u.ipv6.src, dport, sport, sport 2956 drivers/net/vxlan.c info->key.tp_src = sport; sport 890 drivers/rapidio/rio-scan.c u8 sport; sport 909 drivers/rapidio/rio-scan.c sport = RIO_GET_PORT_NUM(swrdev->swpinfo); sport 912 drivers/rapidio/rio-scan.c destid, sport, 0); sport 913 drivers/rapidio/rio-scan.c rswitch->route_table[destid] = sport; sport 1027 drivers/rapidio/rio-scan.c u8 sport; sport 1038 drivers/rapidio/rio-scan.c i, &sport, 0) < 0) sport 1040 drivers/rapidio/rio-scan.c rswitch->route_table[i] = sport; sport 588 drivers/scsi/cxgbi/libcxgbi.c __be16 sport, __be16 dport, u8 tos, sport 594 drivers/scsi/cxgbi/libcxgbi.c dport, sport, IPPROTO_TCP, tos, ifindex); sport 165 drivers/tty/serial/fsl_linflexuart.c static inline void linflex_transmit_buffer(struct uart_port *sport) sport 167 drivers/tty/serial/fsl_linflexuart.c struct circ_buf *xmit = &sport->state->xmit; sport 173 drivers/tty/serial/fsl_linflexuart.c writeb(c, sport->membase + BDRL); sport 176 drivers/tty/serial/fsl_linflexuart.c while (((status = readl(sport->membase + UARTSR)) & sport 182 drivers/tty/serial/fsl_linflexuart.c sport->icount.tx++; sport 185 drivers/tty/serial/fsl_linflexuart.c sport->membase + UARTSR); sport 189 drivers/tty/serial/fsl_linflexuart.c uart_write_wakeup(sport); sport 192 drivers/tty/serial/fsl_linflexuart.c linflex_stop_tx(sport); sport 206 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = dev_id; sport 207 drivers/tty/serial/fsl_linflexuart.c struct circ_buf *xmit = &sport->state->xmit; sport 211 drivers/tty/serial/fsl_linflexuart.c spin_lock_irqsave(&sport->lock, flags); sport 213 drivers/tty/serial/fsl_linflexuart.c if (sport->x_char) { sport 214 drivers/tty/serial/fsl_linflexuart.c writeb(sport->x_char, sport->membase + BDRL); sport 217 drivers/tty/serial/fsl_linflexuart.c while (((status = readl(sport->membase + UARTSR)) & sport 222 drivers/tty/serial/fsl_linflexuart.c sport->membase + UARTSR); sport 227 drivers/tty/serial/fsl_linflexuart.c if (uart_circ_empty(xmit) || uart_tx_stopped(sport)) { sport 228 drivers/tty/serial/fsl_linflexuart.c linflex_stop_tx(sport); sport 232 drivers/tty/serial/fsl_linflexuart.c linflex_transmit_buffer(sport); sport 235 drivers/tty/serial/fsl_linflexuart.c uart_write_wakeup(sport); sport 238 drivers/tty/serial/fsl_linflexuart.c spin_unlock_irqrestore(&sport->lock, flags); sport 244 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = dev_id; sport 246 drivers/tty/serial/fsl_linflexuart.c struct tty_port *port = &sport->state->port; sport 251 drivers/tty/serial/fsl_linflexuart.c spin_lock_irqsave(&sport->lock, flags); sport 253 drivers/tty/serial/fsl_linflexuart.c status = readl(sport->membase + UARTSR); sport 255 drivers/tty/serial/fsl_linflexuart.c rx = readb(sport->membase + BDRM); sport 258 drivers/tty/serial/fsl_linflexuart.c sport->icount.rx++; sport 276 drivers/tty/serial/fsl_linflexuart.c sport->membase + UARTSR); sport 277 drivers/tty/serial/fsl_linflexuart.c status = readl(sport->membase + UARTSR); sport 280 drivers/tty/serial/fsl_linflexuart.c uart_handle_break(sport); sport 283 drivers/tty/serial/fsl_linflexuart.c if (uart_handle_sysrq_char(sport, (unsigned char)rx)) sport 290 drivers/tty/serial/fsl_linflexuart.c spin_unlock_irqrestore(&sport->lock, flags); sport 299 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = dev_id; sport 302 drivers/tty/serial/fsl_linflexuart.c status = readl(sport->membase + UARTSR); sport 335 drivers/tty/serial/fsl_linflexuart.c static void linflex_setup_watermark(struct uart_port *sport) sport 340 drivers/tty/serial/fsl_linflexuart.c ier = readl(sport->membase + LINIER); sport 342 drivers/tty/serial/fsl_linflexuart.c writel(ier, sport->membase + LINIER); sport 344 drivers/tty/serial/fsl_linflexuart.c cr = readl(sport->membase + UARTCR); sport 346 drivers/tty/serial/fsl_linflexuart.c writel(cr, sport->membase + UARTCR); sport 353 drivers/tty/serial/fsl_linflexuart.c writel(cr1, sport->membase + LINCR1); sport 356 drivers/tty/serial/fsl_linflexuart.c while ((readl(sport->membase + LINSR) sport 370 drivers/tty/serial/fsl_linflexuart.c writel(LINFLEXD_UARTCR_UART, sport->membase + UARTCR); sport 375 drivers/tty/serial/fsl_linflexuart.c writel(cr, sport->membase + UARTCR); sport 379 drivers/tty/serial/fsl_linflexuart.c writel(cr1, sport->membase + LINCR1); sport 381 drivers/tty/serial/fsl_linflexuart.c ier = readl(sport->membase + LINIER); sport 385 drivers/tty/serial/fsl_linflexuart.c writel(ier, sport->membase + LINIER); sport 643 drivers/tty/serial/fsl_linflexuart.c static void linflex_string_write(struct uart_port *sport, const char *s, sport 648 drivers/tty/serial/fsl_linflexuart.c ier = readl(sport->membase + LINIER); sport 649 drivers/tty/serial/fsl_linflexuart.c linflex_stop_tx(sport); sport 651 drivers/tty/serial/fsl_linflexuart.c cr = readl(sport->membase + UARTCR); sport 653 drivers/tty/serial/fsl_linflexuart.c writel(cr, sport->membase + UARTCR); sport 655 drivers/tty/serial/fsl_linflexuart.c uart_console_write(sport, s, count, linflex_console_putchar); sport 657 drivers/tty/serial/fsl_linflexuart.c writel(ier, sport->membase + LINIER); sport 663 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = linflex_ports[co->index]; sport 667 drivers/tty/serial/fsl_linflexuart.c if (sport->sysrq) sport 670 drivers/tty/serial/fsl_linflexuart.c locked = spin_trylock_irqsave(&sport->lock, flags); sport 672 drivers/tty/serial/fsl_linflexuart.c spin_lock_irqsave(&sport->lock, flags); sport 674 drivers/tty/serial/fsl_linflexuart.c linflex_string_write(sport, s, count); sport 677 drivers/tty/serial/fsl_linflexuart.c spin_unlock_irqrestore(&sport->lock, flags); sport 685 drivers/tty/serial/fsl_linflexuart.c linflex_console_get_options(struct uart_port *sport, int *parity, int *bits) sport 689 drivers/tty/serial/fsl_linflexuart.c cr = readl(sport->membase + UARTCR); sport 715 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport; sport 731 drivers/tty/serial/fsl_linflexuart.c sport = linflex_ports[co->index]; sport 732 drivers/tty/serial/fsl_linflexuart.c if (!sport) sport 738 drivers/tty/serial/fsl_linflexuart.c linflex_console_get_options(sport, &parity, &bits); sport 740 drivers/tty/serial/fsl_linflexuart.c if (earlycon_port && sport->mapbase == earlycon_port->mapbase) { sport 754 drivers/tty/serial/fsl_linflexuart.c linflex_setup_watermark(sport); sport 756 drivers/tty/serial/fsl_linflexuart.c ret = uart_set_options(sport, co, baud, parity, bits, flow); sport 830 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport; sport 834 drivers/tty/serial/fsl_linflexuart.c sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL); sport 835 drivers/tty/serial/fsl_linflexuart.c if (!sport) sport 849 drivers/tty/serial/fsl_linflexuart.c sport->line = ret; sport 855 drivers/tty/serial/fsl_linflexuart.c sport->mapbase = res->start; sport 856 drivers/tty/serial/fsl_linflexuart.c sport->membase = devm_ioremap_resource(&pdev->dev, res); sport 857 drivers/tty/serial/fsl_linflexuart.c if (IS_ERR(sport->membase)) sport 858 drivers/tty/serial/fsl_linflexuart.c return PTR_ERR(sport->membase); sport 860 drivers/tty/serial/fsl_linflexuart.c sport->dev = &pdev->dev; sport 861 drivers/tty/serial/fsl_linflexuart.c sport->type = PORT_LINFLEXUART; sport 862 drivers/tty/serial/fsl_linflexuart.c sport->iotype = UPIO_MEM; sport 863 drivers/tty/serial/fsl_linflexuart.c sport->irq = platform_get_irq(pdev, 0); sport 864 drivers/tty/serial/fsl_linflexuart.c sport->ops = &linflex_pops; sport 865 drivers/tty/serial/fsl_linflexuart.c sport->flags = UPF_BOOT_AUTOCONF; sport 867 drivers/tty/serial/fsl_linflexuart.c linflex_ports[sport->line] = sport; sport 869 drivers/tty/serial/fsl_linflexuart.c platform_set_drvdata(pdev, sport); sport 871 drivers/tty/serial/fsl_linflexuart.c ret = uart_add_one_port(&linflex_reg, sport); sport 880 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = platform_get_drvdata(pdev); sport 882 drivers/tty/serial/fsl_linflexuart.c uart_remove_one_port(&linflex_reg, sport); sport 890 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = dev_get_drvdata(dev); sport 892 drivers/tty/serial/fsl_linflexuart.c uart_suspend_port(&linflex_reg, sport); sport 899 drivers/tty/serial/fsl_linflexuart.c struct uart_port *sport = dev_get_drvdata(dev); sport 901 drivers/tty/serial/fsl_linflexuart.c uart_resume_port(&linflex_reg, sport); sport 314 drivers/tty/serial/fsl_lpuart.c static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport) sport 316 drivers/tty/serial/fsl_lpuart.c return sport->devtype == IMX8QXP_LPUART; sport 344 drivers/tty/serial/fsl_lpuart.c static int __lpuart_enable_clks(struct lpuart_port *sport, bool is_en) sport 349 drivers/tty/serial/fsl_lpuart.c ret = clk_prepare_enable(sport->ipg_clk); sport 353 drivers/tty/serial/fsl_lpuart.c ret = clk_prepare_enable(sport->baud_clk); sport 355 drivers/tty/serial/fsl_lpuart.c clk_disable_unprepare(sport->ipg_clk); sport 359 drivers/tty/serial/fsl_lpuart.c clk_disable_unprepare(sport->baud_clk); sport 360 drivers/tty/serial/fsl_lpuart.c clk_disable_unprepare(sport->ipg_clk); sport 366 drivers/tty/serial/fsl_lpuart.c static unsigned int lpuart_get_baud_clk_rate(struct lpuart_port *sport) sport 368 drivers/tty/serial/fsl_lpuart.c if (is_imx8qxp_lpuart(sport)) sport 369 drivers/tty/serial/fsl_lpuart.c return clk_get_rate(sport->baud_clk); sport 371 drivers/tty/serial/fsl_lpuart.c return clk_get_rate(sport->ipg_clk); sport 411 drivers/tty/serial/fsl_lpuart.c static void lpuart_dma_tx(struct lpuart_port *sport) sport 413 drivers/tty/serial/fsl_lpuart.c struct circ_buf *xmit = &sport->port.state->xmit; sport 414 drivers/tty/serial/fsl_lpuart.c struct scatterlist *sgl = sport->tx_sgl; sport 415 drivers/tty/serial/fsl_lpuart.c struct device *dev = sport->port.dev; sport 418 drivers/tty/serial/fsl_lpuart.c if (sport->dma_tx_in_progress) sport 421 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_bytes = uart_circ_chars_pending(xmit); sport 424 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_nents = 1; sport 425 drivers/tty/serial/fsl_lpuart.c sg_init_one(sgl, xmit->buf + xmit->tail, sport->dma_tx_bytes); sport 427 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_nents = 2; sport 434 drivers/tty/serial/fsl_lpuart.c ret = dma_map_sg(dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); sport 440 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_desc = dmaengine_prep_slave_sg(sport->dma_tx_chan, sgl, sport 443 drivers/tty/serial/fsl_lpuart.c if (!sport->dma_tx_desc) { sport 444 drivers/tty/serial/fsl_lpuart.c dma_unmap_sg(dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); sport 449 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_desc->callback = lpuart_dma_tx_complete; sport 450 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_desc->callback_param = sport; sport 451 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_in_progress = true; sport 452 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_cookie = dmaengine_submit(sport->dma_tx_desc); sport 453 drivers/tty/serial/fsl_lpuart.c dma_async_issue_pending(sport->dma_tx_chan); sport 463 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = arg; sport 464 drivers/tty/serial/fsl_lpuart.c struct scatterlist *sgl = &sport->tx_sgl[0]; sport 465 drivers/tty/serial/fsl_lpuart.c struct circ_buf *xmit = &sport->port.state->xmit; sport 468 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 470 drivers/tty/serial/fsl_lpuart.c dma_unmap_sg(sport->port.dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); sport 472 drivers/tty/serial/fsl_lpuart.c xmit->tail = (xmit->tail + sport->dma_tx_bytes) & (UART_XMIT_SIZE - 1); sport 474 drivers/tty/serial/fsl_lpuart.c sport->port.icount.tx += sport->dma_tx_bytes; sport 475 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_in_progress = false; sport 476 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 479 drivers/tty/serial/fsl_lpuart.c uart_write_wakeup(&sport->port); sport 481 drivers/tty/serial/fsl_lpuart.c if (waitqueue_active(&sport->dma_wait)) { sport 482 drivers/tty/serial/fsl_lpuart.c wake_up(&sport->dma_wait); sport 486 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 488 drivers/tty/serial/fsl_lpuart.c if (!lpuart_stopped_or_empty(&sport->port)) sport 489 drivers/tty/serial/fsl_lpuart.c lpuart_dma_tx(sport); sport 491 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 494 drivers/tty/serial/fsl_lpuart.c static dma_addr_t lpuart_dma_datareg_addr(struct lpuart_port *sport) sport 496 drivers/tty/serial/fsl_lpuart.c switch (sport->port.iotype) { sport 498 drivers/tty/serial/fsl_lpuart.c return sport->port.mapbase + UARTDATA; sport 500 drivers/tty/serial/fsl_lpuart.c return sport->port.mapbase + UARTDATA + sizeof(u32) - 1; sport 502 drivers/tty/serial/fsl_lpuart.c return sport->port.mapbase + UARTDR; sport 507 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 512 drivers/tty/serial/fsl_lpuart.c dma_tx_sconfig.dst_addr = lpuart_dma_datareg_addr(sport); sport 516 drivers/tty/serial/fsl_lpuart.c ret = dmaengine_slave_config(sport->dma_tx_chan, &dma_tx_sconfig); sport 519 drivers/tty/serial/fsl_lpuart.c dev_err(sport->port.dev, sport 527 drivers/tty/serial/fsl_lpuart.c static bool lpuart_is_32(struct lpuart_port *sport) sport 529 drivers/tty/serial/fsl_lpuart.c return sport->port.iotype == UPIO_MEM32 || sport 530 drivers/tty/serial/fsl_lpuart.c sport->port.iotype == UPIO_MEM32BE; sport 535 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 538 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_tx_use) { sport 539 drivers/tty/serial/fsl_lpuart.c if (sport->dma_tx_in_progress) { sport 540 drivers/tty/serial/fsl_lpuart.c dma_unmap_sg(sport->port.dev, &sport->tx_sgl[0], sport 541 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_nents, DMA_TO_DEVICE); sport 542 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_in_progress = false; sport 544 drivers/tty/serial/fsl_lpuart.c dmaengine_terminate_all(sport->dma_tx_chan); sport 547 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 548 drivers/tty/serial/fsl_lpuart.c val = lpuart32_read(&sport->port, UARTFIFO); sport 550 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, val, UARTFIFO); sport 552 drivers/tty/serial/fsl_lpuart.c val = readb(sport->port.membase + UARTCFIFO); sport 554 drivers/tty/serial/fsl_lpuart.c writeb(val, sport->port.membase + UARTCFIFO); sport 576 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 581 drivers/tty/serial/fsl_lpuart.c sport->port.fifosize = 0; sport 583 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 585 drivers/tty/serial/fsl_lpuart.c writeb(0, sport->port.membase + UARTCR2); sport 587 drivers/tty/serial/fsl_lpuart.c temp = readb(sport->port.membase + UARTPFIFO); sport 590 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTPFIFO); sport 594 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTCFIFO); sport 597 drivers/tty/serial/fsl_lpuart.c if (readb(sport->port.membase + UARTSR1) & UARTSR1_RDRF) { sport 598 drivers/tty/serial/fsl_lpuart.c readb(sport->port.membase + UARTDR); sport 599 drivers/tty/serial/fsl_lpuart.c writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); sport 602 drivers/tty/serial/fsl_lpuart.c writeb(0, sport->port.membase + UARTTWFIFO); sport 603 drivers/tty/serial/fsl_lpuart.c writeb(1, sport->port.membase + UARTRWFIFO); sport 606 drivers/tty/serial/fsl_lpuart.c writeb(UARTCR2_RE | UARTCR2_TE, sport->port.membase + UARTCR2); sport 607 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 630 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 633 drivers/tty/serial/fsl_lpuart.c sport->port.fifosize = 0; sport 635 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 638 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, UARTCTRL, 0); sport 640 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTFIFO); sport 643 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, UARTFIFO, sport 647 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, UARTFIFO, sport 651 drivers/tty/serial/fsl_lpuart.c if (lpuart32_read(&sport->port, UARTSTAT) & UARTSTAT_RDRF) { sport 652 drivers/tty/serial/fsl_lpuart.c lpuart32_read(&sport->port, UARTDATA); sport 653 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, UARTFIFO, UARTFIFO_RXUF); sport 657 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, UARTCTRL, UARTCTRL_RE | UARTCTRL_TE); sport 658 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 678 drivers/tty/serial/fsl_lpuart.c static inline void lpuart_transmit_buffer(struct lpuart_port *sport) sport 680 drivers/tty/serial/fsl_lpuart.c struct circ_buf *xmit = &sport->port.state->xmit; sport 682 drivers/tty/serial/fsl_lpuart.c if (sport->port.x_char) { sport 683 drivers/tty/serial/fsl_lpuart.c writeb(sport->port.x_char, sport->port.membase + UARTDR); sport 684 drivers/tty/serial/fsl_lpuart.c sport->port.icount.tx++; sport 685 drivers/tty/serial/fsl_lpuart.c sport->port.x_char = 0; sport 689 drivers/tty/serial/fsl_lpuart.c if (lpuart_stopped_or_empty(&sport->port)) { sport 690 drivers/tty/serial/fsl_lpuart.c lpuart_stop_tx(&sport->port); sport 695 drivers/tty/serial/fsl_lpuart.c (readb(sport->port.membase + UARTTCFIFO) < sport->txfifo_size)) { sport 696 drivers/tty/serial/fsl_lpuart.c writeb(xmit->buf[xmit->tail], sport->port.membase + UARTDR); sport 698 drivers/tty/serial/fsl_lpuart.c sport->port.icount.tx++; sport 702 drivers/tty/serial/fsl_lpuart.c uart_write_wakeup(&sport->port); sport 705 drivers/tty/serial/fsl_lpuart.c lpuart_stop_tx(&sport->port); sport 708 drivers/tty/serial/fsl_lpuart.c static inline void lpuart32_transmit_buffer(struct lpuart_port *sport) sport 710 drivers/tty/serial/fsl_lpuart.c struct circ_buf *xmit = &sport->port.state->xmit; sport 713 drivers/tty/serial/fsl_lpuart.c if (sport->port.x_char) { sport 714 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, sport->port.x_char, UARTDATA); sport 715 drivers/tty/serial/fsl_lpuart.c sport->port.icount.tx++; sport 716 drivers/tty/serial/fsl_lpuart.c sport->port.x_char = 0; sport 720 drivers/tty/serial/fsl_lpuart.c if (lpuart_stopped_or_empty(&sport->port)) { sport 721 drivers/tty/serial/fsl_lpuart.c lpuart32_stop_tx(&sport->port); sport 725 drivers/tty/serial/fsl_lpuart.c txcnt = lpuart32_read(&sport->port, UARTWATER); sport 728 drivers/tty/serial/fsl_lpuart.c while (!uart_circ_empty(xmit) && (txcnt < sport->txfifo_size)) { sport 729 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, xmit->buf[xmit->tail], UARTDATA); sport 731 drivers/tty/serial/fsl_lpuart.c sport->port.icount.tx++; sport 732 drivers/tty/serial/fsl_lpuart.c txcnt = lpuart32_read(&sport->port, UARTWATER); sport 738 drivers/tty/serial/fsl_lpuart.c uart_write_wakeup(&sport->port); sport 741 drivers/tty/serial/fsl_lpuart.c lpuart32_stop_tx(&sport->port); sport 746 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 753 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_tx_use) { sport 755 drivers/tty/serial/fsl_lpuart.c lpuart_dma_tx(sport); sport 758 drivers/tty/serial/fsl_lpuart.c lpuart_transmit_buffer(sport); sport 764 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 767 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_tx_use) { sport 769 drivers/tty/serial/fsl_lpuart.c lpuart_dma_tx(sport); sport 775 drivers/tty/serial/fsl_lpuart.c lpuart32_transmit_buffer(sport); sport 782 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 787 drivers/tty/serial/fsl_lpuart.c if (sport->dma_tx_in_progress) sport 798 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 803 drivers/tty/serial/fsl_lpuart.c if (sport->dma_tx_in_progress) sport 812 drivers/tty/serial/fsl_lpuart.c static void lpuart_txint(struct lpuart_port *sport) sport 816 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 817 drivers/tty/serial/fsl_lpuart.c lpuart_transmit_buffer(sport); sport 818 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 821 drivers/tty/serial/fsl_lpuart.c static void lpuart_rxint(struct lpuart_port *sport) sport 824 drivers/tty/serial/fsl_lpuart.c struct tty_port *port = &sport->port.state->port; sport 828 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 830 drivers/tty/serial/fsl_lpuart.c while (!(readb(sport->port.membase + UARTSFIFO) & UARTSFIFO_RXEMPT)) { sport 832 drivers/tty/serial/fsl_lpuart.c sport->port.icount.rx++; sport 837 drivers/tty/serial/fsl_lpuart.c sr = readb(sport->port.membase + UARTSR1); sport 838 drivers/tty/serial/fsl_lpuart.c rx = readb(sport->port.membase + UARTDR); sport 840 drivers/tty/serial/fsl_lpuart.c if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) sport 845 drivers/tty/serial/fsl_lpuart.c sport->port.icount.parity++; sport 847 drivers/tty/serial/fsl_lpuart.c sport->port.icount.frame++; sport 852 drivers/tty/serial/fsl_lpuart.c if (sr & sport->port.ignore_status_mask) { sport 858 drivers/tty/serial/fsl_lpuart.c sr &= sport->port.read_status_mask; sport 869 drivers/tty/serial/fsl_lpuart.c sport->port.sysrq = 0; sport 878 drivers/tty/serial/fsl_lpuart.c sport->port.icount.overrun += overrun; sport 884 drivers/tty/serial/fsl_lpuart.c writeb(UARTCFIFO_RXFLUSH, sport->port.membase + UARTCFIFO); sport 885 drivers/tty/serial/fsl_lpuart.c writeb(UARTSFIFO_RXOF, sport->port.membase + UARTSFIFO); sport 888 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 893 drivers/tty/serial/fsl_lpuart.c static void lpuart32_txint(struct lpuart_port *sport) sport 897 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 898 drivers/tty/serial/fsl_lpuart.c lpuart32_transmit_buffer(sport); sport 899 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 902 drivers/tty/serial/fsl_lpuart.c static void lpuart32_rxint(struct lpuart_port *sport) sport 905 drivers/tty/serial/fsl_lpuart.c struct tty_port *port = &sport->port.state->port; sport 909 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 911 drivers/tty/serial/fsl_lpuart.c while (!(lpuart32_read(&sport->port, UARTFIFO) & UARTFIFO_RXEMPT)) { sport 913 drivers/tty/serial/fsl_lpuart.c sport->port.icount.rx++; sport 918 drivers/tty/serial/fsl_lpuart.c sr = lpuart32_read(&sport->port, UARTSTAT); sport 919 drivers/tty/serial/fsl_lpuart.c rx = lpuart32_read(&sport->port, UARTDATA); sport 922 drivers/tty/serial/fsl_lpuart.c if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) sport 927 drivers/tty/serial/fsl_lpuart.c sport->port.icount.parity++; sport 929 drivers/tty/serial/fsl_lpuart.c sport->port.icount.frame++; sport 932 drivers/tty/serial/fsl_lpuart.c sport->port.icount.overrun++; sport 934 drivers/tty/serial/fsl_lpuart.c if (sr & sport->port.ignore_status_mask) { sport 940 drivers/tty/serial/fsl_lpuart.c sr &= sport->port.read_status_mask; sport 951 drivers/tty/serial/fsl_lpuart.c sport->port.sysrq = 0; sport 959 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 966 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = dev_id; sport 969 drivers/tty/serial/fsl_lpuart.c sts = readb(sport->port.membase + UARTSR1); sport 971 drivers/tty/serial/fsl_lpuart.c if (sts & UARTSR1_RDRF && !sport->lpuart_dma_rx_use) sport 972 drivers/tty/serial/fsl_lpuart.c lpuart_rxint(sport); sport 974 drivers/tty/serial/fsl_lpuart.c if (sts & UARTSR1_TDRE && !sport->lpuart_dma_tx_use) sport 975 drivers/tty/serial/fsl_lpuart.c lpuart_txint(sport); sport 982 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = dev_id; sport 985 drivers/tty/serial/fsl_lpuart.c sts = lpuart32_read(&sport->port, UARTSTAT); sport 986 drivers/tty/serial/fsl_lpuart.c rxcount = lpuart32_read(&sport->port, UARTWATER); sport 989 drivers/tty/serial/fsl_lpuart.c if ((sts & UARTSTAT_RDRF || rxcount > 0) && !sport->lpuart_dma_rx_use) sport 990 drivers/tty/serial/fsl_lpuart.c lpuart32_rxint(sport); sport 992 drivers/tty/serial/fsl_lpuart.c if ((sts & UARTSTAT_TDRE) && !sport->lpuart_dma_tx_use) sport 993 drivers/tty/serial/fsl_lpuart.c lpuart32_txint(sport); sport 995 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, sts, UARTSTAT); sport 999 drivers/tty/serial/fsl_lpuart.c static void lpuart_copy_rx_to_tty(struct lpuart_port *sport) sport 1001 drivers/tty/serial/fsl_lpuart.c struct tty_port *port = &sport->port.state->port; sport 1004 drivers/tty/serial/fsl_lpuart.c struct circ_buf *ring = &sport->rx_ring; sport 1008 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 1009 drivers/tty/serial/fsl_lpuart.c unsigned long sr = lpuart32_read(&sport->port, UARTSTAT); sport 1013 drivers/tty/serial/fsl_lpuart.c lpuart32_read(&sport->port, UARTDATA); sport 1016 drivers/tty/serial/fsl_lpuart.c sport->port.icount.parity++; sport 1018 drivers/tty/serial/fsl_lpuart.c sport->port.icount.frame++; sport 1021 drivers/tty/serial/fsl_lpuart.c unsigned char sr = readb(sport->port.membase + UARTSR1); sport 1027 drivers/tty/serial/fsl_lpuart.c cr2 = readb(sport->port.membase + UARTCR2); sport 1029 drivers/tty/serial/fsl_lpuart.c writeb(cr2, sport->port.membase + UARTCR2); sport 1032 drivers/tty/serial/fsl_lpuart.c readb(sport->port.membase + UARTDR); sport 1035 drivers/tty/serial/fsl_lpuart.c sport->port.icount.parity++; sport 1037 drivers/tty/serial/fsl_lpuart.c sport->port.icount.frame++; sport 1047 drivers/tty/serial/fsl_lpuart.c if (readb(sport->port.membase + UARTSFIFO) & sport 1050 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTSFIFO); sport 1052 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTCFIFO); sport 1056 drivers/tty/serial/fsl_lpuart.c writeb(cr2, sport->port.membase + UARTCR2); sport 1060 drivers/tty/serial/fsl_lpuart.c async_tx_ack(sport->dma_rx_desc); sport 1062 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 1064 drivers/tty/serial/fsl_lpuart.c dmastat = dmaengine_tx_status(sport->dma_rx_chan, sport 1065 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_cookie, sport 1069 drivers/tty/serial/fsl_lpuart.c dev_err(sport->port.dev, "Rx DMA transfer failed!\n"); sport 1070 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1075 drivers/tty/serial/fsl_lpuart.c dma_sync_sg_for_cpu(sport->port.dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE); sport 1084 drivers/tty/serial/fsl_lpuart.c ring->head = sport->rx_sgl.length - state.residue; sport 1085 drivers/tty/serial/fsl_lpuart.c BUG_ON(ring->head > sport->rx_sgl.length); sport 1099 drivers/tty/serial/fsl_lpuart.c count = sport->rx_sgl.length - ring->tail; sport 1103 drivers/tty/serial/fsl_lpuart.c sport->port.icount.rx += count; sport 1111 drivers/tty/serial/fsl_lpuart.c if (ring->head >= sport->rx_sgl.length) sport 1114 drivers/tty/serial/fsl_lpuart.c sport->port.icount.rx += count; sport 1117 drivers/tty/serial/fsl_lpuart.c dma_sync_sg_for_device(sport->port.dev, &sport->rx_sgl, 1, sport 1120 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1123 drivers/tty/serial/fsl_lpuart.c mod_timer(&sport->lpuart_timer, jiffies + sport->dma_rx_timeout); sport 1128 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = arg; sport 1130 drivers/tty/serial/fsl_lpuart.c lpuart_copy_rx_to_tty(sport); sport 1135 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = from_timer(sport, t, lpuart_timer); sport 1137 drivers/tty/serial/fsl_lpuart.c lpuart_copy_rx_to_tty(sport); sport 1140 drivers/tty/serial/fsl_lpuart.c static inline int lpuart_start_rx_dma(struct lpuart_port *sport) sport 1143 drivers/tty/serial/fsl_lpuart.c struct circ_buf *ring = &sport->rx_ring; sport 1146 drivers/tty/serial/fsl_lpuart.c struct tty_port *port = &sport->port.state->port; sport 1160 drivers/tty/serial/fsl_lpuart.c sport->rx_dma_rng_buf_len = (DMA_RX_TIMEOUT * baud / bits / 1000) * 2; sport 1161 drivers/tty/serial/fsl_lpuart.c sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1)); sport 1162 drivers/tty/serial/fsl_lpuart.c if (sport->rx_dma_rng_buf_len < 16) sport 1163 drivers/tty/serial/fsl_lpuart.c sport->rx_dma_rng_buf_len = 16; sport 1165 drivers/tty/serial/fsl_lpuart.c ring->buf = kzalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC); sport 1169 drivers/tty/serial/fsl_lpuart.c sg_init_one(&sport->rx_sgl, ring->buf, sport->rx_dma_rng_buf_len); sport 1170 drivers/tty/serial/fsl_lpuart.c nent = dma_map_sg(sport->port.dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE); sport 1173 drivers/tty/serial/fsl_lpuart.c dev_err(sport->port.dev, "DMA Rx mapping error\n"); sport 1177 drivers/tty/serial/fsl_lpuart.c dma_rx_sconfig.src_addr = lpuart_dma_datareg_addr(sport); sport 1181 drivers/tty/serial/fsl_lpuart.c ret = dmaengine_slave_config(sport->dma_rx_chan, &dma_rx_sconfig); sport 1184 drivers/tty/serial/fsl_lpuart.c dev_err(sport->port.dev, sport 1189 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_desc = dmaengine_prep_dma_cyclic(sport->dma_rx_chan, sport 1190 drivers/tty/serial/fsl_lpuart.c sg_dma_address(&sport->rx_sgl), sport 1191 drivers/tty/serial/fsl_lpuart.c sport->rx_sgl.length, sport 1192 drivers/tty/serial/fsl_lpuart.c sport->rx_sgl.length / 2, sport 1195 drivers/tty/serial/fsl_lpuart.c if (!sport->dma_rx_desc) { sport 1196 drivers/tty/serial/fsl_lpuart.c dev_err(sport->port.dev, "Cannot prepare cyclic DMA\n"); sport 1200 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_desc->callback = lpuart_dma_rx_complete; sport 1201 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_desc->callback_param = sport; sport 1202 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_cookie = dmaengine_submit(sport->dma_rx_desc); sport 1203 drivers/tty/serial/fsl_lpuart.c dma_async_issue_pending(sport->dma_rx_chan); sport 1205 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 1206 drivers/tty/serial/fsl_lpuart.c unsigned long temp = lpuart32_read(&sport->port, UARTBAUD); sport 1208 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, temp | UARTBAUD_RDMAE, UARTBAUD); sport 1210 drivers/tty/serial/fsl_lpuart.c writeb(readb(sport->port.membase + UARTCR5) | UARTCR5_RDMAS, sport 1211 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTCR5); sport 1219 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 1222 drivers/tty/serial/fsl_lpuart.c if (sport->dma_rx_chan) sport 1223 drivers/tty/serial/fsl_lpuart.c dmaengine_terminate_all(sport->dma_rx_chan); sport 1225 drivers/tty/serial/fsl_lpuart.c dma_unmap_sg(sport->port.dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE); sport 1226 drivers/tty/serial/fsl_lpuart.c kfree(sport->rx_ring.buf); sport 1227 drivers/tty/serial/fsl_lpuart.c sport->rx_ring.tail = 0; sport 1228 drivers/tty/serial/fsl_lpuart.c sport->rx_ring.head = 0; sport 1229 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_desc = NULL; sport 1230 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_cookie = -EINVAL; sport 1236 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 1239 drivers/tty/serial/fsl_lpuart.c u8 modem = readb(sport->port.membase + UARTMODEM) & sport 1241 drivers/tty/serial/fsl_lpuart.c writeb(modem, sport->port.membase + UARTMODEM); sport 1278 drivers/tty/serial/fsl_lpuart.c sport->port.rs485 = *rs485; sport 1280 drivers/tty/serial/fsl_lpuart.c writeb(modem, sport->port.membase + UARTMODEM); sport 1317 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, sport 1321 drivers/tty/serial/fsl_lpuart.c if (!(sport->port.rs485.flags & SER_RS485_ENABLED)) { sport 1322 drivers/tty/serial/fsl_lpuart.c temp = readb(sport->port.membase + UARTMODEM) & sport 1375 drivers/tty/serial/fsl_lpuart.c static void lpuart_setup_watermark(struct lpuart_port *sport) sport 1380 drivers/tty/serial/fsl_lpuart.c cr2 = readb(sport->port.membase + UARTCR2); sport 1384 drivers/tty/serial/fsl_lpuart.c writeb(cr2, sport->port.membase + UARTCR2); sport 1386 drivers/tty/serial/fsl_lpuart.c val = readb(sport->port.membase + UARTPFIFO); sport 1388 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTPFIFO); sport 1392 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTCFIFO); sport 1395 drivers/tty/serial/fsl_lpuart.c if (readb(sport->port.membase + UARTSR1) & UARTSR1_RDRF) { sport 1396 drivers/tty/serial/fsl_lpuart.c readb(sport->port.membase + UARTDR); sport 1397 drivers/tty/serial/fsl_lpuart.c writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); sport 1400 drivers/tty/serial/fsl_lpuart.c writeb(0, sport->port.membase + UARTTWFIFO); sport 1401 drivers/tty/serial/fsl_lpuart.c writeb(1, sport->port.membase + UARTRWFIFO); sport 1404 drivers/tty/serial/fsl_lpuart.c writeb(cr2_saved, sport->port.membase + UARTCR2); sport 1407 drivers/tty/serial/fsl_lpuart.c static void lpuart_setup_watermark_enable(struct lpuart_port *sport) sport 1411 drivers/tty/serial/fsl_lpuart.c lpuart_setup_watermark(sport); sport 1413 drivers/tty/serial/fsl_lpuart.c cr2 = readb(sport->port.membase + UARTCR2); sport 1415 drivers/tty/serial/fsl_lpuart.c writeb(cr2, sport->port.membase + UARTCR2); sport 1418 drivers/tty/serial/fsl_lpuart.c static void lpuart32_setup_watermark(struct lpuart_port *sport) sport 1423 drivers/tty/serial/fsl_lpuart.c ctrl = lpuart32_read(&sport->port, UARTCTRL); sport 1427 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, ctrl, UARTCTRL); sport 1430 drivers/tty/serial/fsl_lpuart.c val = lpuart32_read(&sport->port, UARTFIFO); sport 1433 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, val, UARTFIFO); sport 1437 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, val, UARTWATER); sport 1440 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, ctrl_saved, UARTCTRL); sport 1443 drivers/tty/serial/fsl_lpuart.c static void lpuart32_setup_watermark_enable(struct lpuart_port *sport) sport 1447 drivers/tty/serial/fsl_lpuart.c lpuart32_setup_watermark(sport); sport 1449 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTCTRL); sport 1451 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, temp, UARTCTRL); sport 1454 drivers/tty/serial/fsl_lpuart.c static void rx_dma_timer_init(struct lpuart_port *sport) sport 1456 drivers/tty/serial/fsl_lpuart.c timer_setup(&sport->lpuart_timer, lpuart_timer_func, 0); sport 1457 drivers/tty/serial/fsl_lpuart.c sport->lpuart_timer.expires = jiffies + sport->dma_rx_timeout; sport 1458 drivers/tty/serial/fsl_lpuart.c add_timer(&sport->lpuart_timer); sport 1461 drivers/tty/serial/fsl_lpuart.c static void lpuart_tx_dma_startup(struct lpuart_port *sport) sport 1465 drivers/tty/serial/fsl_lpuart.c if (sport->dma_tx_chan && !lpuart_dma_tx_request(&sport->port)) { sport 1466 drivers/tty/serial/fsl_lpuart.c init_waitqueue_head(&sport->dma_wait); sport 1467 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_tx_use = true; sport 1468 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 1469 drivers/tty/serial/fsl_lpuart.c uartbaud = lpuart32_read(&sport->port, UARTBAUD); sport 1470 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, sport 1473 drivers/tty/serial/fsl_lpuart.c writeb(readb(sport->port.membase + UARTCR5) | sport 1474 drivers/tty/serial/fsl_lpuart.c UARTCR5_TDMAS, sport->port.membase + UARTCR5); sport 1477 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_tx_use = false; sport 1481 drivers/tty/serial/fsl_lpuart.c static void lpuart_rx_dma_startup(struct lpuart_port *sport) sport 1483 drivers/tty/serial/fsl_lpuart.c if (sport->dma_rx_chan && !lpuart_start_rx_dma(sport)) { sport 1485 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_timeout = msecs_to_jiffies(DMA_RX_TIMEOUT); sport 1486 drivers/tty/serial/fsl_lpuart.c if (!sport->dma_rx_timeout) sport 1487 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_timeout = 1; sport 1489 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_rx_use = true; sport 1490 drivers/tty/serial/fsl_lpuart.c rx_dma_timer_init(sport); sport 1492 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_rx_use = false; sport 1498 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 1503 drivers/tty/serial/fsl_lpuart.c temp = readb(sport->port.membase + UARTPFIFO); sport 1505 drivers/tty/serial/fsl_lpuart.c sport->txfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_TXSIZE_OFF) & sport 1507 drivers/tty/serial/fsl_lpuart.c sport->port.fifosize = sport->txfifo_size; sport 1509 drivers/tty/serial/fsl_lpuart.c sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) & sport 1512 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 1514 drivers/tty/serial/fsl_lpuart.c lpuart_setup_watermark_enable(sport); sport 1516 drivers/tty/serial/fsl_lpuart.c lpuart_rx_dma_startup(sport); sport 1517 drivers/tty/serial/fsl_lpuart.c lpuart_tx_dma_startup(sport); sport 1519 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1524 drivers/tty/serial/fsl_lpuart.c static void lpuart32_configure(struct lpuart_port *sport) sport 1528 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_rx_use) { sport 1530 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTWATER); sport 1532 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, temp, UARTWATER); sport 1534 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTCTRL); sport 1535 drivers/tty/serial/fsl_lpuart.c if (!sport->lpuart_dma_rx_use) sport 1537 drivers/tty/serial/fsl_lpuart.c if (!sport->lpuart_dma_tx_use) sport 1539 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, temp, UARTCTRL); sport 1544 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 1549 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTFIFO); sport 1551 drivers/tty/serial/fsl_lpuart.c sport->txfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_TXSIZE_OFF) & sport 1553 drivers/tty/serial/fsl_lpuart.c sport->port.fifosize = sport->txfifo_size; sport 1555 drivers/tty/serial/fsl_lpuart.c sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_RXSIZE_OFF) & sport 1558 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 1560 drivers/tty/serial/fsl_lpuart.c lpuart32_setup_watermark_enable(sport); sport 1563 drivers/tty/serial/fsl_lpuart.c lpuart_rx_dma_startup(sport); sport 1564 drivers/tty/serial/fsl_lpuart.c lpuart_tx_dma_startup(sport); sport 1566 drivers/tty/serial/fsl_lpuart.c lpuart32_configure(sport); sport 1568 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1572 drivers/tty/serial/fsl_lpuart.c static void lpuart_dma_shutdown(struct lpuart_port *sport) sport 1574 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_rx_use) { sport 1575 drivers/tty/serial/fsl_lpuart.c del_timer_sync(&sport->lpuart_timer); sport 1576 drivers/tty/serial/fsl_lpuart.c lpuart_dma_rx_free(&sport->port); sport 1579 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_tx_use) { sport 1580 drivers/tty/serial/fsl_lpuart.c if (wait_event_interruptible(sport->dma_wait, sport 1581 drivers/tty/serial/fsl_lpuart.c !sport->dma_tx_in_progress) != false) { sport 1582 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_in_progress = false; sport 1583 drivers/tty/serial/fsl_lpuart.c dmaengine_terminate_all(sport->dma_tx_chan); sport 1590 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 1604 drivers/tty/serial/fsl_lpuart.c lpuart_dma_shutdown(sport); sport 1609 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = sport 1624 drivers/tty/serial/fsl_lpuart.c lpuart_dma_shutdown(sport); sport 1631 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 1638 drivers/tty/serial/fsl_lpuart.c cr1 = old_cr1 = readb(sport->port.membase + UARTCR1); sport 1639 drivers/tty/serial/fsl_lpuart.c old_cr2 = readb(sport->port.membase + UARTCR2); sport 1640 drivers/tty/serial/fsl_lpuart.c cr3 = readb(sport->port.membase + UARTCR3); sport 1641 drivers/tty/serial/fsl_lpuart.c cr4 = readb(sport->port.membase + UARTCR4); sport 1642 drivers/tty/serial/fsl_lpuart.c bdh = readb(sport->port.membase + UARTBDH); sport 1643 drivers/tty/serial/fsl_lpuart.c modem = readb(sport->port.membase + UARTMODEM); sport 1675 drivers/tty/serial/fsl_lpuart.c if (sport->port.rs485.flags & SER_RS485_ENABLED) sport 1719 drivers/tty/serial/fsl_lpuart.c if (old && sport->lpuart_dma_rx_use) { sport 1720 drivers/tty/serial/fsl_lpuart.c del_timer_sync(&sport->lpuart_timer); sport 1721 drivers/tty/serial/fsl_lpuart.c lpuart_dma_rx_free(&sport->port); sport 1724 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 1726 drivers/tty/serial/fsl_lpuart.c sport->port.read_status_mask = 0; sport 1728 drivers/tty/serial/fsl_lpuart.c sport->port.read_status_mask |= UARTSR1_FE | UARTSR1_PE; sport 1730 drivers/tty/serial/fsl_lpuart.c sport->port.read_status_mask |= UARTSR1_FE; sport 1733 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask = 0; sport 1735 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask |= UARTSR1_PE; sport 1737 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask |= UARTSR1_FE; sport 1743 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask |= UARTSR1_OR; sport 1750 drivers/tty/serial/fsl_lpuart.c lpuart_wait_bit_set(&sport->port, UARTSR1, UARTSR1_TC); sport 1754 drivers/tty/serial/fsl_lpuart.c sport->port.membase + UARTCR2); sport 1756 drivers/tty/serial/fsl_lpuart.c sbr = sport->port.uartclk / (16 * baud); sport 1757 drivers/tty/serial/fsl_lpuart.c brfa = ((sport->port.uartclk - (16 * sbr * baud)) * 2) / baud; sport 1762 drivers/tty/serial/fsl_lpuart.c writeb(cr4 | brfa, sport->port.membase + UARTCR4); sport 1763 drivers/tty/serial/fsl_lpuart.c writeb(bdh, sport->port.membase + UARTBDH); sport 1764 drivers/tty/serial/fsl_lpuart.c writeb(sbr & 0xFF, sport->port.membase + UARTBDL); sport 1765 drivers/tty/serial/fsl_lpuart.c writeb(cr3, sport->port.membase + UARTCR3); sport 1766 drivers/tty/serial/fsl_lpuart.c writeb(cr1, sport->port.membase + UARTCR1); sport 1767 drivers/tty/serial/fsl_lpuart.c writeb(modem, sport->port.membase + UARTMODEM); sport 1770 drivers/tty/serial/fsl_lpuart.c writeb(old_cr2, sport->port.membase + UARTCR2); sport 1772 drivers/tty/serial/fsl_lpuart.c if (old && sport->lpuart_dma_rx_use) { sport 1773 drivers/tty/serial/fsl_lpuart.c if (!lpuart_start_rx_dma(sport)) sport 1774 drivers/tty/serial/fsl_lpuart.c rx_dma_timer_init(sport); sport 1776 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_rx_use = false; sport 1779 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1783 drivers/tty/serial/fsl_lpuart.c lpuart32_serial_setbrg(struct lpuart_port *sport, unsigned int baudrate) sport 1786 drivers/tty/serial/fsl_lpuart.c u32 clk = sport->port.uartclk; sport 1832 drivers/tty/serial/fsl_lpuart.c dev_warn(sport->port.dev, sport 1835 drivers/tty/serial/fsl_lpuart.c tmp = lpuart32_read(&sport->port, UARTBAUD); sport 1846 drivers/tty/serial/fsl_lpuart.c if (!sport->lpuart_dma_rx_use) sport 1848 drivers/tty/serial/fsl_lpuart.c if (!sport->lpuart_dma_tx_use) sport 1851 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, tmp, UARTBAUD); sport 1858 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = container_of(port, struct lpuart_port, port); sport 1864 drivers/tty/serial/fsl_lpuart.c ctrl = old_ctrl = lpuart32_read(&sport->port, UARTCTRL); sport 1865 drivers/tty/serial/fsl_lpuart.c modem = lpuart32_read(&sport->port, UARTMODIR); sport 1934 drivers/tty/serial/fsl_lpuart.c if (old && sport->lpuart_dma_rx_use) { sport 1935 drivers/tty/serial/fsl_lpuart.c del_timer_sync(&sport->lpuart_timer); sport 1936 drivers/tty/serial/fsl_lpuart.c lpuart_dma_rx_free(&sport->port); sport 1939 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 1941 drivers/tty/serial/fsl_lpuart.c sport->port.read_status_mask = 0; sport 1943 drivers/tty/serial/fsl_lpuart.c sport->port.read_status_mask |= UARTSTAT_FE | UARTSTAT_PE; sport 1945 drivers/tty/serial/fsl_lpuart.c sport->port.read_status_mask |= UARTSTAT_FE; sport 1948 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask = 0; sport 1950 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask |= UARTSTAT_PE; sport 1952 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask |= UARTSTAT_FE; sport 1958 drivers/tty/serial/fsl_lpuart.c sport->port.ignore_status_mask |= UARTSTAT_OR; sport 1965 drivers/tty/serial/fsl_lpuart.c lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC); sport 1968 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE), sport 1971 drivers/tty/serial/fsl_lpuart.c lpuart32_serial_setbrg(sport, baud); sport 1972 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, modem, UARTMODIR); sport 1973 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, ctrl, UARTCTRL); sport 1976 drivers/tty/serial/fsl_lpuart.c if (old && sport->lpuart_dma_rx_use) { sport 1977 drivers/tty/serial/fsl_lpuart.c if (!lpuart_start_rx_dma(sport)) sport 1978 drivers/tty/serial/fsl_lpuart.c rx_dma_timer_init(sport); sport 1980 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_rx_use = false; sport 1983 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 2093 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = lpuart_ports[co->index]; sport 2098 drivers/tty/serial/fsl_lpuart.c if (sport->port.sysrq || oops_in_progress) sport 2099 drivers/tty/serial/fsl_lpuart.c locked = spin_trylock_irqsave(&sport->port.lock, flags); sport 2101 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 2104 drivers/tty/serial/fsl_lpuart.c cr2 = old_cr2 = readb(sport->port.membase + UARTCR2); sport 2107 drivers/tty/serial/fsl_lpuart.c writeb(cr2, sport->port.membase + UARTCR2); sport 2109 drivers/tty/serial/fsl_lpuart.c uart_console_write(&sport->port, s, count, lpuart_console_putchar); sport 2112 drivers/tty/serial/fsl_lpuart.c lpuart_wait_bit_set(&sport->port, UARTSR1, UARTSR1_TC); sport 2114 drivers/tty/serial/fsl_lpuart.c writeb(old_cr2, sport->port.membase + UARTCR2); sport 2117 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 2123 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = lpuart_ports[co->index]; sport 2128 drivers/tty/serial/fsl_lpuart.c if (sport->port.sysrq || oops_in_progress) sport 2129 drivers/tty/serial/fsl_lpuart.c locked = spin_trylock_irqsave(&sport->port.lock, flags); sport 2131 drivers/tty/serial/fsl_lpuart.c spin_lock_irqsave(&sport->port.lock, flags); sport 2134 drivers/tty/serial/fsl_lpuart.c cr = old_cr = lpuart32_read(&sport->port, UARTCTRL); sport 2137 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, cr, UARTCTRL); sport 2139 drivers/tty/serial/fsl_lpuart.c uart_console_write(&sport->port, s, count, lpuart32_console_putchar); sport 2142 drivers/tty/serial/fsl_lpuart.c lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC); sport 2144 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, old_cr, UARTCTRL); sport 2147 drivers/tty/serial/fsl_lpuart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 2155 drivers/tty/serial/fsl_lpuart.c lpuart_console_get_options(struct lpuart_port *sport, int *baud, sport 2161 drivers/tty/serial/fsl_lpuart.c cr = readb(sport->port.membase + UARTCR2); sport 2168 drivers/tty/serial/fsl_lpuart.c cr = readb(sport->port.membase + UARTCR1); sport 2183 drivers/tty/serial/fsl_lpuart.c bdh = readb(sport->port.membase + UARTBDH); sport 2185 drivers/tty/serial/fsl_lpuart.c bdl = readb(sport->port.membase + UARTBDL); sport 2189 drivers/tty/serial/fsl_lpuart.c brfa = readb(sport->port.membase + UARTCR4); sport 2192 drivers/tty/serial/fsl_lpuart.c uartclk = lpuart_get_baud_clk_rate(sport); sport 2199 drivers/tty/serial/fsl_lpuart.c dev_info(sport->port.dev, "Serial: Console lpuart rounded baud rate" sport 2204 drivers/tty/serial/fsl_lpuart.c lpuart32_console_get_options(struct lpuart_port *sport, int *baud, sport 2210 drivers/tty/serial/fsl_lpuart.c cr = lpuart32_read(&sport->port, UARTCTRL); sport 2217 drivers/tty/serial/fsl_lpuart.c cr = lpuart32_read(&sport->port, UARTCTRL); sport 2232 drivers/tty/serial/fsl_lpuart.c bd = lpuart32_read(&sport->port, UARTBAUD); sport 2235 drivers/tty/serial/fsl_lpuart.c uartclk = lpuart_get_baud_clk_rate(sport); sport 2242 drivers/tty/serial/fsl_lpuart.c dev_info(sport->port.dev, "Serial: Console lpuart rounded baud rate" sport 2248 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport; sport 2262 drivers/tty/serial/fsl_lpuart.c sport = lpuart_ports[co->index]; sport 2263 drivers/tty/serial/fsl_lpuart.c if (sport == NULL) sport 2269 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) sport 2270 drivers/tty/serial/fsl_lpuart.c lpuart32_console_get_options(sport, &baud, &parity, &bits); sport 2272 drivers/tty/serial/fsl_lpuart.c lpuart_console_get_options(sport, &baud, &parity, &bits); sport 2274 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) sport 2275 drivers/tty/serial/fsl_lpuart.c lpuart32_setup_watermark(sport); sport 2277 drivers/tty/serial/fsl_lpuart.c lpuart_setup_watermark(sport); sport 2279 drivers/tty/serial/fsl_lpuart.c return uart_set_options(&sport->port, co, baud, parity, bits, flow); sport 2378 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport; sport 2382 drivers/tty/serial/fsl_lpuart.c sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL); sport 2383 drivers/tty/serial/fsl_lpuart.c if (!sport) sport 2387 drivers/tty/serial/fsl_lpuart.c sport->port.membase = devm_ioremap_resource(&pdev->dev, res); sport 2388 drivers/tty/serial/fsl_lpuart.c if (IS_ERR(sport->port.membase)) sport 2389 drivers/tty/serial/fsl_lpuart.c return PTR_ERR(sport->port.membase); sport 2391 drivers/tty/serial/fsl_lpuart.c sport->port.membase += sdata->reg_off; sport 2392 drivers/tty/serial/fsl_lpuart.c sport->port.mapbase = res->start; sport 2393 drivers/tty/serial/fsl_lpuart.c sport->port.dev = &pdev->dev; sport 2394 drivers/tty/serial/fsl_lpuart.c sport->port.type = PORT_LPUART; sport 2395 drivers/tty/serial/fsl_lpuart.c sport->devtype = sdata->devtype; sport 2399 drivers/tty/serial/fsl_lpuart.c sport->port.irq = ret; sport 2400 drivers/tty/serial/fsl_lpuart.c sport->port.iotype = sdata->iotype; sport 2401 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) sport 2402 drivers/tty/serial/fsl_lpuart.c sport->port.ops = &lpuart32_pops; sport 2404 drivers/tty/serial/fsl_lpuart.c sport->port.ops = &lpuart_pops; sport 2405 drivers/tty/serial/fsl_lpuart.c sport->port.flags = UPF_BOOT_AUTOCONF; sport 2407 drivers/tty/serial/fsl_lpuart.c sport->port.rs485_config = lpuart_config_rs485; sport 2409 drivers/tty/serial/fsl_lpuart.c sport->ipg_clk = devm_clk_get(&pdev->dev, "ipg"); sport 2410 drivers/tty/serial/fsl_lpuart.c if (IS_ERR(sport->ipg_clk)) { sport 2411 drivers/tty/serial/fsl_lpuart.c ret = PTR_ERR(sport->ipg_clk); sport 2416 drivers/tty/serial/fsl_lpuart.c sport->baud_clk = NULL; sport 2417 drivers/tty/serial/fsl_lpuart.c if (is_imx8qxp_lpuart(sport)) { sport 2418 drivers/tty/serial/fsl_lpuart.c sport->baud_clk = devm_clk_get(&pdev->dev, "baud"); sport 2419 drivers/tty/serial/fsl_lpuart.c if (IS_ERR(sport->baud_clk)) { sport 2420 drivers/tty/serial/fsl_lpuart.c ret = PTR_ERR(sport->baud_clk); sport 2433 drivers/tty/serial/fsl_lpuart.c sport->id_allocated = true; sport 2440 drivers/tty/serial/fsl_lpuart.c sport->port.line = ret; sport 2442 drivers/tty/serial/fsl_lpuart.c ret = lpuart_enable_clks(sport); sport 2445 drivers/tty/serial/fsl_lpuart.c sport->port.uartclk = lpuart_get_baud_clk_rate(sport); sport 2447 drivers/tty/serial/fsl_lpuart.c lpuart_ports[sport->port.line] = sport; sport 2449 drivers/tty/serial/fsl_lpuart.c platform_set_drvdata(pdev, &sport->port); sport 2451 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 2453 drivers/tty/serial/fsl_lpuart.c ret = devm_request_irq(&pdev->dev, sport->port.irq, lpuart32_int, 0, sport 2454 drivers/tty/serial/fsl_lpuart.c DRIVER_NAME, sport); sport 2457 drivers/tty/serial/fsl_lpuart.c ret = devm_request_irq(&pdev->dev, sport->port.irq, lpuart_int, 0, sport 2458 drivers/tty/serial/fsl_lpuart.c DRIVER_NAME, sport); sport 2464 drivers/tty/serial/fsl_lpuart.c ret = uart_add_one_port(&lpuart_reg, &sport->port); sport 2468 drivers/tty/serial/fsl_lpuart.c uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); sport 2470 drivers/tty/serial/fsl_lpuart.c if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX) sport 2473 drivers/tty/serial/fsl_lpuart.c if (sport->port.rs485.delay_rts_before_send || sport 2474 drivers/tty/serial/fsl_lpuart.c sport->port.rs485.delay_rts_after_send) sport 2477 drivers/tty/serial/fsl_lpuart.c lpuart_config_rs485(&sport->port, &sport->port.rs485); sport 2479 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_chan = dma_request_slave_channel(sport->port.dev, "tx"); sport 2480 drivers/tty/serial/fsl_lpuart.c if (!sport->dma_tx_chan) sport 2481 drivers/tty/serial/fsl_lpuart.c dev_info(sport->port.dev, "DMA tx channel request failed, " sport 2484 drivers/tty/serial/fsl_lpuart.c sport->dma_rx_chan = dma_request_slave_channel(sport->port.dev, "rx"); sport 2485 drivers/tty/serial/fsl_lpuart.c if (!sport->dma_rx_chan) sport 2486 drivers/tty/serial/fsl_lpuart.c dev_info(sport->port.dev, "DMA rx channel request failed, " sport 2493 drivers/tty/serial/fsl_lpuart.c lpuart_disable_clks(sport); sport 2496 drivers/tty/serial/fsl_lpuart.c if (sport->id_allocated) sport 2497 drivers/tty/serial/fsl_lpuart.c ida_simple_remove(&fsl_lpuart_ida, sport->port.line); sport 2503 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = platform_get_drvdata(pdev); sport 2505 drivers/tty/serial/fsl_lpuart.c uart_remove_one_port(&lpuart_reg, &sport->port); sport 2507 drivers/tty/serial/fsl_lpuart.c if (sport->id_allocated) sport 2508 drivers/tty/serial/fsl_lpuart.c ida_simple_remove(&fsl_lpuart_ida, sport->port.line); sport 2510 drivers/tty/serial/fsl_lpuart.c lpuart_disable_clks(sport); sport 2512 drivers/tty/serial/fsl_lpuart.c if (sport->dma_tx_chan) sport 2513 drivers/tty/serial/fsl_lpuart.c dma_release_channel(sport->dma_tx_chan); sport 2515 drivers/tty/serial/fsl_lpuart.c if (sport->dma_rx_chan) sport 2516 drivers/tty/serial/fsl_lpuart.c dma_release_channel(sport->dma_rx_chan); sport 2524 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = dev_get_drvdata(dev); sport 2528 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 2530 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTCTRL); sport 2532 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, temp, UARTCTRL); sport 2535 drivers/tty/serial/fsl_lpuart.c temp = readb(sport->port.membase + UARTCR2); sport 2537 drivers/tty/serial/fsl_lpuart.c writeb(temp, sport->port.membase + UARTCR2); sport 2540 drivers/tty/serial/fsl_lpuart.c uart_suspend_port(&lpuart_reg, &sport->port); sport 2543 drivers/tty/serial/fsl_lpuart.c irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); sport 2545 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_rx_use) { sport 2554 drivers/tty/serial/fsl_lpuart.c del_timer_sync(&sport->lpuart_timer); sport 2555 drivers/tty/serial/fsl_lpuart.c lpuart_dma_rx_free(&sport->port); sport 2559 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) { sport 2560 drivers/tty/serial/fsl_lpuart.c temp = lpuart32_read(&sport->port, UARTBAUD); sport 2561 drivers/tty/serial/fsl_lpuart.c lpuart32_write(&sport->port, temp & ~UARTBAUD_RDMAE, sport 2564 drivers/tty/serial/fsl_lpuart.c writeb(readb(sport->port.membase + UARTCR5) & sport 2565 drivers/tty/serial/fsl_lpuart.c ~UARTCR5_RDMAS, sport->port.membase + UARTCR5); sport 2569 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_tx_use) { sport 2570 drivers/tty/serial/fsl_lpuart.c sport->dma_tx_in_progress = false; sport 2571 drivers/tty/serial/fsl_lpuart.c dmaengine_terminate_all(sport->dma_tx_chan); sport 2574 drivers/tty/serial/fsl_lpuart.c if (sport->port.suspended && !irq_wake) sport 2575 drivers/tty/serial/fsl_lpuart.c lpuart_disable_clks(sport); sport 2582 drivers/tty/serial/fsl_lpuart.c struct lpuart_port *sport = dev_get_drvdata(dev); sport 2583 drivers/tty/serial/fsl_lpuart.c bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); sport 2585 drivers/tty/serial/fsl_lpuart.c if (sport->port.suspended && !irq_wake) sport 2586 drivers/tty/serial/fsl_lpuart.c lpuart_enable_clks(sport); sport 2588 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) sport 2589 drivers/tty/serial/fsl_lpuart.c lpuart32_setup_watermark_enable(sport); sport 2591 drivers/tty/serial/fsl_lpuart.c lpuart_setup_watermark_enable(sport); sport 2593 drivers/tty/serial/fsl_lpuart.c if (sport->lpuart_dma_rx_use) { sport 2595 drivers/tty/serial/fsl_lpuart.c if (!lpuart_start_rx_dma(sport)) sport 2596 drivers/tty/serial/fsl_lpuart.c rx_dma_timer_init(sport); sport 2598 drivers/tty/serial/fsl_lpuart.c sport->lpuart_dma_rx_use = false; sport 2602 drivers/tty/serial/fsl_lpuart.c lpuart_tx_dma_startup(sport); sport 2604 drivers/tty/serial/fsl_lpuart.c if (lpuart_is_32(sport)) sport 2605 drivers/tty/serial/fsl_lpuart.c lpuart32_configure(sport); sport 2607 drivers/tty/serial/fsl_lpuart.c uart_resume_port(&lpuart_reg, &sport->port); sport 284 drivers/tty/serial/imx.c static void imx_uart_writel(struct imx_port *sport, u32 val, u32 offset) sport 288 drivers/tty/serial/imx.c sport->ucr1 = val; sport 291 drivers/tty/serial/imx.c sport->ucr2 = val; sport 294 drivers/tty/serial/imx.c sport->ucr3 = val; sport 297 drivers/tty/serial/imx.c sport->ucr4 = val; sport 300 drivers/tty/serial/imx.c sport->ufcr = val; sport 305 drivers/tty/serial/imx.c writel(val, sport->port.membase + offset); sport 308 drivers/tty/serial/imx.c static u32 imx_uart_readl(struct imx_port *sport, u32 offset) sport 312 drivers/tty/serial/imx.c return sport->ucr1; sport 321 drivers/tty/serial/imx.c if (!(sport->ucr2 & UCR2_SRST)) sport 322 drivers/tty/serial/imx.c sport->ucr2 = readl(sport->port.membase + offset); sport 323 drivers/tty/serial/imx.c return sport->ucr2; sport 326 drivers/tty/serial/imx.c return sport->ucr3; sport 329 drivers/tty/serial/imx.c return sport->ucr4; sport 332 drivers/tty/serial/imx.c return sport->ufcr; sport 335 drivers/tty/serial/imx.c return readl(sport->port.membase + offset); sport 339 drivers/tty/serial/imx.c static inline unsigned imx_uart_uts_reg(struct imx_port *sport) sport 341 drivers/tty/serial/imx.c return sport->devdata->uts_reg; sport 344 drivers/tty/serial/imx.c static inline int imx_uart_is_imx1(struct imx_port *sport) sport 346 drivers/tty/serial/imx.c return sport->devdata->devtype == IMX1_UART; sport 349 drivers/tty/serial/imx.c static inline int imx_uart_is_imx21(struct imx_port *sport) sport 351 drivers/tty/serial/imx.c return sport->devdata->devtype == IMX21_UART; sport 354 drivers/tty/serial/imx.c static inline int imx_uart_is_imx53(struct imx_port *sport) sport 356 drivers/tty/serial/imx.c return sport->devdata->devtype == IMX53_UART; sport 359 drivers/tty/serial/imx.c static inline int imx_uart_is_imx6q(struct imx_port *sport) sport 361 drivers/tty/serial/imx.c return sport->devdata->devtype == IMX6Q_UART; sport 367 drivers/tty/serial/imx.c static void imx_uart_ucrs_save(struct imx_port *sport, sport 371 drivers/tty/serial/imx.c ucr->ucr1 = imx_uart_readl(sport, UCR1); sport 372 drivers/tty/serial/imx.c ucr->ucr2 = imx_uart_readl(sport, UCR2); sport 373 drivers/tty/serial/imx.c ucr->ucr3 = imx_uart_readl(sport, UCR3); sport 376 drivers/tty/serial/imx.c static void imx_uart_ucrs_restore(struct imx_port *sport, sport 380 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr->ucr1, UCR1); sport 381 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr->ucr2, UCR2); sport 382 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr->ucr3, UCR3); sport 387 drivers/tty/serial/imx.c static void imx_uart_rts_active(struct imx_port *sport, u32 *ucr2) sport 391 drivers/tty/serial/imx.c sport->port.mctrl |= TIOCM_RTS; sport 392 drivers/tty/serial/imx.c mctrl_gpio_set(sport->gpios, sport->port.mctrl); sport 396 drivers/tty/serial/imx.c static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2) sport 401 drivers/tty/serial/imx.c sport->port.mctrl &= ~TIOCM_RTS; sport 402 drivers/tty/serial/imx.c mctrl_gpio_set(sport->gpios, sport->port.mctrl); sport 408 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 411 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 412 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 416 drivers/tty/serial/imx.c if (sport->dma_is_enabled) { sport 424 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 425 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 431 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 438 drivers/tty/serial/imx.c if (sport->dma_is_txing) sport 441 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 442 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1 & ~UCR1_TRDYEN, UCR1); sport 446 drivers/tty/serial/imx.c imx_uart_readl(sport, USR2) & USR2_TXDC) { sport 447 drivers/tty/serial/imx.c u32 ucr2 = imx_uart_readl(sport, UCR2), ucr4; sport 449 drivers/tty/serial/imx.c imx_uart_rts_active(sport, &ucr2); sport 451 drivers/tty/serial/imx.c imx_uart_rts_inactive(sport, &ucr2); sport 452 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 456 drivers/tty/serial/imx.c ucr4 = imx_uart_readl(sport, UCR4); sport 458 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4, UCR4); sport 465 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 468 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 469 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 471 drivers/tty/serial/imx.c if (sport->dma_is_enabled) { sport 477 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 480 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 486 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 488 drivers/tty/serial/imx.c mod_timer(&sport->timer, jiffies); sport 490 drivers/tty/serial/imx.c mctrl_gpio_enable_ms(sport->gpios); sport 493 drivers/tty/serial/imx.c static void imx_uart_dma_tx(struct imx_port *sport); sport 496 drivers/tty/serial/imx.c static inline void imx_uart_transmit_buffer(struct imx_port *sport) sport 498 drivers/tty/serial/imx.c struct circ_buf *xmit = &sport->port.state->xmit; sport 500 drivers/tty/serial/imx.c if (sport->port.x_char) { sport 502 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->port.x_char, URTX0); sport 503 drivers/tty/serial/imx.c sport->port.icount.tx++; sport 504 drivers/tty/serial/imx.c sport->port.x_char = 0; sport 508 drivers/tty/serial/imx.c if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { sport 509 drivers/tty/serial/imx.c imx_uart_stop_tx(&sport->port); sport 513 drivers/tty/serial/imx.c if (sport->dma_is_enabled) { sport 519 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 521 drivers/tty/serial/imx.c if (sport->dma_is_txing) { sport 523 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 525 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 526 drivers/tty/serial/imx.c imx_uart_dma_tx(sport); sport 533 drivers/tty/serial/imx.c !(imx_uart_readl(sport, imx_uart_uts_reg(sport)) & UTS_TXFULL)) { sport 536 drivers/tty/serial/imx.c imx_uart_writel(sport, xmit->buf[xmit->tail], URTX0); sport 538 drivers/tty/serial/imx.c sport->port.icount.tx++; sport 542 drivers/tty/serial/imx.c uart_write_wakeup(&sport->port); sport 545 drivers/tty/serial/imx.c imx_uart_stop_tx(&sport->port); sport 550 drivers/tty/serial/imx.c struct imx_port *sport = data; sport 551 drivers/tty/serial/imx.c struct scatterlist *sgl = &sport->tx_sgl[0]; sport 552 drivers/tty/serial/imx.c struct circ_buf *xmit = &sport->port.state->xmit; sport 556 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 558 drivers/tty/serial/imx.c dma_unmap_sg(sport->port.dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); sport 560 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 562 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 565 drivers/tty/serial/imx.c xmit->tail = (xmit->tail + sport->tx_bytes) & (UART_XMIT_SIZE - 1); sport 566 drivers/tty/serial/imx.c sport->port.icount.tx += sport->tx_bytes; sport 568 drivers/tty/serial/imx.c dev_dbg(sport->port.dev, "we finish the TX DMA.\n"); sport 570 drivers/tty/serial/imx.c sport->dma_is_txing = 0; sport 573 drivers/tty/serial/imx.c uart_write_wakeup(&sport->port); sport 575 drivers/tty/serial/imx.c if (!uart_circ_empty(xmit) && !uart_tx_stopped(&sport->port)) sport 576 drivers/tty/serial/imx.c imx_uart_dma_tx(sport); sport 577 drivers/tty/serial/imx.c else if (sport->port.rs485.flags & SER_RS485_ENABLED) { sport 578 drivers/tty/serial/imx.c u32 ucr4 = imx_uart_readl(sport, UCR4); sport 580 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4, UCR4); sport 583 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 587 drivers/tty/serial/imx.c static void imx_uart_dma_tx(struct imx_port *sport) sport 589 drivers/tty/serial/imx.c struct circ_buf *xmit = &sport->port.state->xmit; sport 590 drivers/tty/serial/imx.c struct scatterlist *sgl = sport->tx_sgl; sport 592 drivers/tty/serial/imx.c struct dma_chan *chan = sport->dma_chan_tx; sport 593 drivers/tty/serial/imx.c struct device *dev = sport->port.dev; sport 597 drivers/tty/serial/imx.c if (sport->dma_is_txing) sport 600 drivers/tty/serial/imx.c ucr4 = imx_uart_readl(sport, UCR4); sport 602 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4, UCR4); sport 604 drivers/tty/serial/imx.c sport->tx_bytes = uart_circ_chars_pending(xmit); sport 607 drivers/tty/serial/imx.c sport->dma_tx_nents = 1; sport 608 drivers/tty/serial/imx.c sg_init_one(sgl, xmit->buf + xmit->tail, sport->tx_bytes); sport 610 drivers/tty/serial/imx.c sport->dma_tx_nents = 2; sport 617 drivers/tty/serial/imx.c ret = dma_map_sg(dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); sport 625 drivers/tty/serial/imx.c dma_unmap_sg(dev, sgl, sport->dma_tx_nents, sport 631 drivers/tty/serial/imx.c desc->callback_param = sport; sport 636 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 638 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 641 drivers/tty/serial/imx.c sport->dma_is_txing = 1; sport 650 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 653 drivers/tty/serial/imx.c if (!sport->port.x_char && uart_circ_empty(&port->state->xmit)) sport 659 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 661 drivers/tty/serial/imx.c imx_uart_rts_active(sport, &ucr2); sport 663 drivers/tty/serial/imx.c imx_uart_rts_inactive(sport, &ucr2); sport 664 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 673 drivers/tty/serial/imx.c if (!sport->dma_is_enabled) { sport 674 drivers/tty/serial/imx.c u32 ucr4 = imx_uart_readl(sport, UCR4); sport 676 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4, UCR4); sport 680 drivers/tty/serial/imx.c if (!sport->dma_is_enabled) { sport 681 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 682 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1 | UCR1_TRDYEN, UCR1); sport 685 drivers/tty/serial/imx.c if (sport->dma_is_enabled) { sport 686 drivers/tty/serial/imx.c if (sport->port.x_char) { sport 689 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 692 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 698 drivers/tty/serial/imx.c imx_uart_dma_tx(sport); sport 705 drivers/tty/serial/imx.c struct imx_port *sport = dev_id; sport 708 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_RTSD, USR1); sport 709 drivers/tty/serial/imx.c usr1 = imx_uart_readl(sport, USR1) & USR1_RTSS; sport 710 drivers/tty/serial/imx.c uart_handle_cts_change(&sport->port, !!usr1); sport 711 drivers/tty/serial/imx.c wake_up_interruptible(&sport->port.state->port.delta_msr_wait); sport 718 drivers/tty/serial/imx.c struct imx_port *sport = dev_id; sport 721 drivers/tty/serial/imx.c spin_lock(&sport->port.lock); sport 725 drivers/tty/serial/imx.c spin_unlock(&sport->port.lock); sport 732 drivers/tty/serial/imx.c struct imx_port *sport = dev_id; sport 734 drivers/tty/serial/imx.c spin_lock(&sport->port.lock); sport 735 drivers/tty/serial/imx.c imx_uart_transmit_buffer(sport); sport 736 drivers/tty/serial/imx.c spin_unlock(&sport->port.lock); sport 742 drivers/tty/serial/imx.c struct imx_port *sport = dev_id; sport 744 drivers/tty/serial/imx.c struct tty_port *port = &sport->port.state->port; sport 746 drivers/tty/serial/imx.c while (imx_uart_readl(sport, USR2) & USR2_RDR) { sport 750 drivers/tty/serial/imx.c sport->port.icount.rx++; sport 752 drivers/tty/serial/imx.c rx = imx_uart_readl(sport, URXD0); sport 754 drivers/tty/serial/imx.c usr2 = imx_uart_readl(sport, USR2); sport 756 drivers/tty/serial/imx.c imx_uart_writel(sport, USR2_BRCD, USR2); sport 757 drivers/tty/serial/imx.c if (uart_handle_break(&sport->port)) sport 761 drivers/tty/serial/imx.c if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) sport 766 drivers/tty/serial/imx.c sport->port.icount.brk++; sport 768 drivers/tty/serial/imx.c sport->port.icount.parity++; sport 770 drivers/tty/serial/imx.c sport->port.icount.frame++; sport 772 drivers/tty/serial/imx.c sport->port.icount.overrun++; sport 774 drivers/tty/serial/imx.c if (rx & sport->port.ignore_status_mask) { sport 780 drivers/tty/serial/imx.c rx &= (sport->port.read_status_mask | 0xFF); sport 792 drivers/tty/serial/imx.c sport->port.sysrq = 0; sport 796 drivers/tty/serial/imx.c if (sport->port.ignore_status_mask & URXD_DUMMY_READ) sport 800 drivers/tty/serial/imx.c sport->port.icount.buf_overrun++; sport 811 drivers/tty/serial/imx.c struct imx_port *sport = dev_id; sport 814 drivers/tty/serial/imx.c spin_lock(&sport->port.lock); sport 818 drivers/tty/serial/imx.c spin_unlock(&sport->port.lock); sport 823 drivers/tty/serial/imx.c static void imx_uart_clear_rx_errors(struct imx_port *sport); sport 828 drivers/tty/serial/imx.c static unsigned int imx_uart_get_hwmctrl(struct imx_port *sport) sport 831 drivers/tty/serial/imx.c unsigned usr1 = imx_uart_readl(sport, USR1); sport 832 drivers/tty/serial/imx.c unsigned usr2 = imx_uart_readl(sport, USR2); sport 841 drivers/tty/serial/imx.c if (sport->dte_mode) sport 842 drivers/tty/serial/imx.c if (!(imx_uart_readl(sport, USR2) & USR2_RIIN)) sport 851 drivers/tty/serial/imx.c static void imx_uart_mctrl_check(struct imx_port *sport) sport 855 drivers/tty/serial/imx.c status = imx_uart_get_hwmctrl(sport); sport 856 drivers/tty/serial/imx.c changed = status ^ sport->old_status; sport 861 drivers/tty/serial/imx.c sport->old_status = status; sport 864 drivers/tty/serial/imx.c sport->port.icount.rng++; sport 866 drivers/tty/serial/imx.c sport->port.icount.dsr++; sport 868 drivers/tty/serial/imx.c uart_handle_dcd_change(&sport->port, status & TIOCM_CAR); sport 870 drivers/tty/serial/imx.c uart_handle_cts_change(&sport->port, status & TIOCM_CTS); sport 872 drivers/tty/serial/imx.c wake_up_interruptible(&sport->port.state->port.delta_msr_wait); sport 877 drivers/tty/serial/imx.c struct imx_port *sport = dev_id; sport 881 drivers/tty/serial/imx.c spin_lock(&sport->port.lock); sport 883 drivers/tty/serial/imx.c usr1 = imx_uart_readl(sport, USR1); sport 884 drivers/tty/serial/imx.c usr2 = imx_uart_readl(sport, USR2); sport 885 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 886 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 887 drivers/tty/serial/imx.c ucr3 = imx_uart_readl(sport, UCR3); sport 888 drivers/tty/serial/imx.c ucr4 = imx_uart_readl(sport, UCR4); sport 921 drivers/tty/serial/imx.c imx_uart_transmit_buffer(sport); sport 926 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_DTRD, USR1); sport 928 drivers/tty/serial/imx.c imx_uart_mctrl_check(sport); sport 939 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_AWAKE, USR1); sport 944 drivers/tty/serial/imx.c sport->port.icount.overrun++; sport 945 drivers/tty/serial/imx.c imx_uart_writel(sport, USR2_ORE, USR2); sport 949 drivers/tty/serial/imx.c spin_unlock(&sport->port.lock); sport 959 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 962 drivers/tty/serial/imx.c ret = (imx_uart_readl(sport, USR2) & USR2_TXDC) ? TIOCSER_TEMT : 0; sport 965 drivers/tty/serial/imx.c if (sport->dma_is_txing) sport 974 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 975 drivers/tty/serial/imx.c unsigned int ret = imx_uart_get_hwmctrl(sport); sport 977 drivers/tty/serial/imx.c mctrl_gpio_get(sport->gpios, &ret); sport 985 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 995 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1007 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1010 drivers/tty/serial/imx.c ucr3 = imx_uart_readl(sport, UCR3) & ~UCR3_DSR; sport 1013 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr3, UCR3); sport 1015 drivers/tty/serial/imx.c uts = imx_uart_readl(sport, imx_uart_uts_reg(sport)) & ~UTS_LOOP; sport 1018 drivers/tty/serial/imx.c imx_uart_writel(sport, uts, imx_uart_uts_reg(sport)); sport 1020 drivers/tty/serial/imx.c mctrl_gpio_set(sport->gpios, mctrl); sport 1028 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1032 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1034 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_SNDBRK; sport 1039 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1041 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1050 drivers/tty/serial/imx.c struct imx_port *sport = from_timer(sport, t, timer); sport 1053 drivers/tty/serial/imx.c if (sport->port.state) { sport 1054 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1055 drivers/tty/serial/imx.c imx_uart_mctrl_check(sport); sport 1056 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1058 drivers/tty/serial/imx.c mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); sport 1074 drivers/tty/serial/imx.c struct imx_port *sport = data; sport 1075 drivers/tty/serial/imx.c struct dma_chan *chan = sport->dma_chan_rx; sport 1076 drivers/tty/serial/imx.c struct scatterlist *sgl = &sport->rx_sgl; sport 1077 drivers/tty/serial/imx.c struct tty_port *port = &sport->port.state->port; sport 1079 drivers/tty/serial/imx.c struct circ_buf *rx_ring = &sport->rx_ring; sport 1085 drivers/tty/serial/imx.c status = dmaengine_tx_status(chan, sport->rx_cookie, &state); sport 1088 drivers/tty/serial/imx.c imx_uart_clear_rx_errors(sport); sport 1092 drivers/tty/serial/imx.c if (!(sport->port.ignore_status_mask & URXD_DUMMY_READ)) { sport 1109 drivers/tty/serial/imx.c bd_size = sg_dma_len(sgl) / sport->rx_periods; sport 1119 drivers/tty/serial/imx.c dma_sync_sg_for_cpu(sport->port.dev, sgl, 1, sport 1123 drivers/tty/serial/imx.c sport->rx_buf + rx_ring->tail, r_bytes); sport 1126 drivers/tty/serial/imx.c dma_sync_sg_for_device(sport->port.dev, sgl, 1, sport 1130 drivers/tty/serial/imx.c sport->port.icount.buf_overrun++; sport 1132 drivers/tty/serial/imx.c sport->port.icount.rx += w_bytes; sport 1141 drivers/tty/serial/imx.c dev_dbg(sport->port.dev, "We get %d bytes.\n", w_bytes); sport 1148 drivers/tty/serial/imx.c static int imx_uart_start_rx_dma(struct imx_port *sport) sport 1150 drivers/tty/serial/imx.c struct scatterlist *sgl = &sport->rx_sgl; sport 1151 drivers/tty/serial/imx.c struct dma_chan *chan = sport->dma_chan_rx; sport 1152 drivers/tty/serial/imx.c struct device *dev = sport->port.dev; sport 1156 drivers/tty/serial/imx.c sport->rx_ring.head = 0; sport 1157 drivers/tty/serial/imx.c sport->rx_ring.tail = 0; sport 1158 drivers/tty/serial/imx.c sport->rx_periods = RX_DMA_PERIODS; sport 1160 drivers/tty/serial/imx.c sg_init_one(sgl, sport->rx_buf, RX_BUF_SIZE); sport 1168 drivers/tty/serial/imx.c sg_dma_len(sgl), sg_dma_len(sgl) / sport->rx_periods, sport 1177 drivers/tty/serial/imx.c desc->callback_param = sport; sport 1180 drivers/tty/serial/imx.c sport->dma_is_rxing = 1; sport 1181 drivers/tty/serial/imx.c sport->rx_cookie = dmaengine_submit(desc); sport 1186 drivers/tty/serial/imx.c static void imx_uart_clear_rx_errors(struct imx_port *sport) sport 1188 drivers/tty/serial/imx.c struct tty_port *port = &sport->port.state->port; sport 1191 drivers/tty/serial/imx.c usr1 = imx_uart_readl(sport, USR1); sport 1192 drivers/tty/serial/imx.c usr2 = imx_uart_readl(sport, USR2); sport 1195 drivers/tty/serial/imx.c sport->port.icount.brk++; sport 1196 drivers/tty/serial/imx.c imx_uart_writel(sport, USR2_BRCD, USR2); sport 1197 drivers/tty/serial/imx.c uart_handle_break(&sport->port); sport 1199 drivers/tty/serial/imx.c sport->port.icount.buf_overrun++; sport 1203 drivers/tty/serial/imx.c sport->port.icount.frame++; sport 1204 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_FRAMERR, USR1); sport 1206 drivers/tty/serial/imx.c sport->port.icount.parity++; sport 1207 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_PARITYERR, USR1); sport 1212 drivers/tty/serial/imx.c sport->port.icount.overrun++; sport 1213 drivers/tty/serial/imx.c imx_uart_writel(sport, USR2_ORE, USR2); sport 1223 drivers/tty/serial/imx.c static void imx_uart_setup_ufcr(struct imx_port *sport, sport 1229 drivers/tty/serial/imx.c val = imx_uart_readl(sport, UFCR) & (UFCR_RFDIV | UFCR_DCEDTE); sport 1231 drivers/tty/serial/imx.c imx_uart_writel(sport, val, UFCR); sport 1234 drivers/tty/serial/imx.c static void imx_uart_dma_exit(struct imx_port *sport) sport 1236 drivers/tty/serial/imx.c if (sport->dma_chan_rx) { sport 1237 drivers/tty/serial/imx.c dmaengine_terminate_sync(sport->dma_chan_rx); sport 1238 drivers/tty/serial/imx.c dma_release_channel(sport->dma_chan_rx); sport 1239 drivers/tty/serial/imx.c sport->dma_chan_rx = NULL; sport 1240 drivers/tty/serial/imx.c sport->rx_cookie = -EINVAL; sport 1241 drivers/tty/serial/imx.c kfree(sport->rx_buf); sport 1242 drivers/tty/serial/imx.c sport->rx_buf = NULL; sport 1245 drivers/tty/serial/imx.c if (sport->dma_chan_tx) { sport 1246 drivers/tty/serial/imx.c dmaengine_terminate_sync(sport->dma_chan_tx); sport 1247 drivers/tty/serial/imx.c dma_release_channel(sport->dma_chan_tx); sport 1248 drivers/tty/serial/imx.c sport->dma_chan_tx = NULL; sport 1252 drivers/tty/serial/imx.c static int imx_uart_dma_init(struct imx_port *sport) sport 1255 drivers/tty/serial/imx.c struct device *dev = sport->port.dev; sport 1259 drivers/tty/serial/imx.c sport->dma_chan_rx = dma_request_slave_channel(dev, "rx"); sport 1260 drivers/tty/serial/imx.c if (!sport->dma_chan_rx) { sport 1267 drivers/tty/serial/imx.c slave_config.src_addr = sport->port.mapbase + URXD0; sport 1271 drivers/tty/serial/imx.c ret = dmaengine_slave_config(sport->dma_chan_rx, &slave_config); sport 1277 drivers/tty/serial/imx.c sport->rx_buf = kzalloc(RX_BUF_SIZE, GFP_KERNEL); sport 1278 drivers/tty/serial/imx.c if (!sport->rx_buf) { sport 1282 drivers/tty/serial/imx.c sport->rx_ring.buf = sport->rx_buf; sport 1285 drivers/tty/serial/imx.c sport->dma_chan_tx = dma_request_slave_channel(dev, "tx"); sport 1286 drivers/tty/serial/imx.c if (!sport->dma_chan_tx) { sport 1293 drivers/tty/serial/imx.c slave_config.dst_addr = sport->port.mapbase + URTX0; sport 1296 drivers/tty/serial/imx.c ret = dmaengine_slave_config(sport->dma_chan_tx, &slave_config); sport 1304 drivers/tty/serial/imx.c imx_uart_dma_exit(sport); sport 1308 drivers/tty/serial/imx.c static void imx_uart_enable_dma(struct imx_port *sport) sport 1312 drivers/tty/serial/imx.c imx_uart_setup_ufcr(sport, TXTL_DMA, RXTL_DMA); sport 1315 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 1317 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1319 drivers/tty/serial/imx.c sport->dma_is_enabled = 1; sport 1322 drivers/tty/serial/imx.c static void imx_uart_disable_dma(struct imx_port *sport) sport 1327 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 1329 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1331 drivers/tty/serial/imx.c imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); sport 1333 drivers/tty/serial/imx.c sport->dma_is_enabled = 0; sport 1341 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1347 drivers/tty/serial/imx.c retval = clk_prepare_enable(sport->clk_per); sport 1350 drivers/tty/serial/imx.c retval = clk_prepare_enable(sport->clk_ipg); sport 1352 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_per); sport 1356 drivers/tty/serial/imx.c imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); sport 1361 drivers/tty/serial/imx.c ucr4 = imx_uart_readl(sport, UCR4); sport 1367 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4 & ~UCR4_DREN, UCR4); sport 1370 drivers/tty/serial/imx.c if (!uart_console(port) && imx_uart_dma_init(sport) == 0) sport 1373 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1377 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1379 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1381 drivers/tty/serial/imx.c while (!(imx_uart_readl(sport, UCR2) & UCR2_SRST) && (--i > 0)) sport 1387 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_RTSD | USR1_DTRD, USR1); sport 1388 drivers/tty/serial/imx.c imx_uart_writel(sport, USR2_ORE, USR2); sport 1390 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_RRDYEN; sport 1392 drivers/tty/serial/imx.c if (sport->have_rtscts) sport 1395 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1397 drivers/tty/serial/imx.c ucr4 = imx_uart_readl(sport, UCR4) & ~UCR4_OREN; sport 1398 drivers/tty/serial/imx.c if (!sport->dma_is_enabled) sport 1400 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4, UCR4); sport 1402 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2) & ~UCR2_ATEN; sport 1404 drivers/tty/serial/imx.c if (!sport->have_rtscts) sport 1410 drivers/tty/serial/imx.c if (!imx_uart_is_imx1(sport)) sport 1412 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1414 drivers/tty/serial/imx.c if (!imx_uart_is_imx1(sport)) { sport 1417 drivers/tty/serial/imx.c ucr3 = imx_uart_readl(sport, UCR3); sport 1421 drivers/tty/serial/imx.c if (sport->dte_mode) sport 1425 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr3, UCR3); sport 1431 drivers/tty/serial/imx.c imx_uart_enable_ms(&sport->port); sport 1434 drivers/tty/serial/imx.c imx_uart_enable_dma(sport); sport 1435 drivers/tty/serial/imx.c imx_uart_start_rx_dma(sport); sport 1437 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 1439 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1441 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1443 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1446 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1453 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1457 drivers/tty/serial/imx.c if (sport->dma_is_enabled) { sport 1458 drivers/tty/serial/imx.c dmaengine_terminate_sync(sport->dma_chan_tx); sport 1459 drivers/tty/serial/imx.c if (sport->dma_is_txing) { sport 1460 drivers/tty/serial/imx.c dma_unmap_sg(sport->port.dev, &sport->tx_sgl[0], sport 1461 drivers/tty/serial/imx.c sport->dma_tx_nents, DMA_TO_DEVICE); sport 1462 drivers/tty/serial/imx.c sport->dma_is_txing = 0; sport 1464 drivers/tty/serial/imx.c dmaengine_terminate_sync(sport->dma_chan_rx); sport 1465 drivers/tty/serial/imx.c if (sport->dma_is_rxing) { sport 1466 drivers/tty/serial/imx.c dma_unmap_sg(sport->port.dev, &sport->rx_sgl, sport 1468 drivers/tty/serial/imx.c sport->dma_is_rxing = 0; sport 1471 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1474 drivers/tty/serial/imx.c imx_uart_disable_dma(sport); sport 1475 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1476 drivers/tty/serial/imx.c imx_uart_dma_exit(sport); sport 1479 drivers/tty/serial/imx.c mctrl_gpio_disable_ms(sport->gpios); sport 1481 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1482 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1484 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1486 drivers/tty/serial/imx.c ucr4 = imx_uart_readl(sport, UCR4); sport 1488 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr4, UCR4); sport 1489 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1494 drivers/tty/serial/imx.c del_timer_sync(&sport->timer); sport 1500 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1501 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 1504 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1505 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1507 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_per); sport 1508 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_ipg); sport 1514 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1515 drivers/tty/serial/imx.c struct scatterlist *sgl = &sport->tx_sgl[0]; sport 1519 drivers/tty/serial/imx.c if (!sport->dma_chan_tx) sport 1522 drivers/tty/serial/imx.c sport->tx_bytes = 0; sport 1523 drivers/tty/serial/imx.c dmaengine_terminate_all(sport->dma_chan_tx); sport 1524 drivers/tty/serial/imx.c if (sport->dma_is_txing) { sport 1527 drivers/tty/serial/imx.c dma_unmap_sg(sport->port.dev, sgl, sport->dma_tx_nents, sport 1529 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 1531 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1532 drivers/tty/serial/imx.c sport->dma_is_txing = 0; sport 1546 drivers/tty/serial/imx.c ubir = imx_uart_readl(sport, UBIR); sport 1547 drivers/tty/serial/imx.c ubmr = imx_uart_readl(sport, UBMR); sport 1548 drivers/tty/serial/imx.c uts = imx_uart_readl(sport, IMX21_UTS); sport 1550 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1552 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1554 drivers/tty/serial/imx.c while (!(imx_uart_readl(sport, UCR2) & UCR2_SRST) && (--i > 0)) sport 1558 drivers/tty/serial/imx.c imx_uart_writel(sport, ubir, UBIR); sport 1559 drivers/tty/serial/imx.c imx_uart_writel(sport, ubmr, UBMR); sport 1560 drivers/tty/serial/imx.c imx_uart_writel(sport, uts, IMX21_UTS); sport 1567 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1586 drivers/tty/serial/imx.c del_timer_sync(&sport->timer); sport 1594 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1600 drivers/tty/serial/imx.c old_ucr2 = imx_uart_readl(sport, UCR2); sport 1607 drivers/tty/serial/imx.c if (!sport->have_rtscts) sport 1617 drivers/tty/serial/imx.c imx_uart_rts_active(sport, &ucr2); sport 1619 drivers/tty/serial/imx.c imx_uart_rts_inactive(sport, &ucr2); sport 1641 drivers/tty/serial/imx.c sport->port.read_status_mask = 0; sport 1643 drivers/tty/serial/imx.c sport->port.read_status_mask |= (URXD_FRMERR | URXD_PRERR); sport 1645 drivers/tty/serial/imx.c sport->port.read_status_mask |= URXD_BRK; sport 1650 drivers/tty/serial/imx.c sport->port.ignore_status_mask = 0; sport 1652 drivers/tty/serial/imx.c sport->port.ignore_status_mask |= URXD_PRERR | URXD_FRMERR; sport 1654 drivers/tty/serial/imx.c sport->port.ignore_status_mask |= URXD_BRK; sport 1660 drivers/tty/serial/imx.c sport->port.ignore_status_mask |= URXD_OVRRUN; sport 1664 drivers/tty/serial/imx.c sport->port.ignore_status_mask |= URXD_DUMMY_READ; sport 1672 drivers/tty/serial/imx.c div = sport->port.uartclk / (baud * 16); sport 1674 drivers/tty/serial/imx.c baud = sport->port.uartclk / (quot * 16); sport 1676 drivers/tty/serial/imx.c div = sport->port.uartclk / (baud * 16); sport 1682 drivers/tty/serial/imx.c rational_best_approximation(16 * div * baud, sport->port.uartclk, sport 1685 drivers/tty/serial/imx.c tdiv64 = sport->port.uartclk; sport 1694 drivers/tty/serial/imx.c ufcr = imx_uart_readl(sport, UFCR); sport 1696 drivers/tty/serial/imx.c imx_uart_writel(sport, ufcr, UFCR); sport 1707 drivers/tty/serial/imx.c old_ubir = imx_uart_readl(sport, UBIR); sport 1708 drivers/tty/serial/imx.c old_ubmr = imx_uart_readl(sport, UBMR); sport 1710 drivers/tty/serial/imx.c imx_uart_writel(sport, num, UBIR); sport 1711 drivers/tty/serial/imx.c imx_uart_writel(sport, denom, UBMR); sport 1714 drivers/tty/serial/imx.c if (!imx_uart_is_imx1(sport)) sport 1715 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->port.uartclk / div / 1000, sport 1718 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1720 drivers/tty/serial/imx.c if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) sport 1721 drivers/tty/serial/imx.c imx_uart_enable_ms(&sport->port); sport 1723 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1728 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1730 drivers/tty/serial/imx.c return sport->port.type == PORT_IMX ? "IMX" : NULL; sport 1738 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1741 drivers/tty/serial/imx.c sport->port.type = PORT_IMX; sport 1752 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1757 drivers/tty/serial/imx.c if (sport->port.irq != ser->irq) sport 1761 drivers/tty/serial/imx.c if (sport->port.uartclk / 16 != ser->baud_base) sport 1763 drivers/tty/serial/imx.c if (sport->port.mapbase != (unsigned long)ser->iomem_base) sport 1765 drivers/tty/serial/imx.c if (sport->port.iobase != ser->port) sport 1776 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1781 drivers/tty/serial/imx.c retval = clk_prepare_enable(sport->clk_ipg); sport 1784 drivers/tty/serial/imx.c retval = clk_prepare_enable(sport->clk_per); sport 1786 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_ipg); sport 1788 drivers/tty/serial/imx.c imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); sport 1790 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1799 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 1800 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1802 drivers/tty/serial/imx.c if (imx_uart_is_imx1(sport)) sport 1811 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1812 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1815 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1 | UCR1_RRDYEN, UCR1); sport 1816 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2 | UCR2_ATEN, UCR2); sport 1818 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1825 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1826 drivers/tty/serial/imx.c if (!(imx_uart_readl(sport, USR2) & USR2_RDR)) sport 1829 drivers/tty/serial/imx.c return imx_uart_readl(sport, URXD0) & URXD_RX_DATA; sport 1834 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1839 drivers/tty/serial/imx.c status = imx_uart_readl(sport, USR1); sport 1843 drivers/tty/serial/imx.c imx_uart_writel(sport, c, URTX0); sport 1847 drivers/tty/serial/imx.c status = imx_uart_readl(sport, USR2); sport 1856 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1864 drivers/tty/serial/imx.c if (!sport->have_rtscts && !sport->have_rtsgpio) sport 1869 drivers/tty/serial/imx.c if (sport->have_rtscts && !sport->have_rtsgpio && sport 1874 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 1876 drivers/tty/serial/imx.c imx_uart_rts_active(sport, &ucr2); sport 1878 drivers/tty/serial/imx.c imx_uart_rts_inactive(sport, &ucr2); sport 1879 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr2, UCR2); sport 1920 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 1922 drivers/tty/serial/imx.c while (imx_uart_readl(sport, imx_uart_uts_reg(sport)) & UTS_TXFULL) sport 1925 drivers/tty/serial/imx.c imx_uart_writel(sport, ch, URTX0); sport 1934 drivers/tty/serial/imx.c struct imx_port *sport = imx_uart_ports[co->index]; sport 1941 drivers/tty/serial/imx.c retval = clk_enable(sport->clk_per); sport 1944 drivers/tty/serial/imx.c retval = clk_enable(sport->clk_ipg); sport 1946 drivers/tty/serial/imx.c clk_disable(sport->clk_per); sport 1950 drivers/tty/serial/imx.c if (sport->port.sysrq) sport 1953 drivers/tty/serial/imx.c locked = spin_trylock_irqsave(&sport->port.lock, flags); sport 1955 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 1960 drivers/tty/serial/imx.c imx_uart_ucrs_save(sport, &old_ucr); sport 1963 drivers/tty/serial/imx.c if (imx_uart_is_imx1(sport)) sport 1968 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 1970 drivers/tty/serial/imx.c imx_uart_writel(sport, old_ucr.ucr2 | UCR2_TXEN, UCR2); sport 1972 drivers/tty/serial/imx.c uart_console_write(&sport->port, s, count, imx_uart_console_putchar); sport 1978 drivers/tty/serial/imx.c while (!(imx_uart_readl(sport, USR2) & USR2_TXDC)); sport 1980 drivers/tty/serial/imx.c imx_uart_ucrs_restore(sport, &old_ucr); sport 1983 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 1985 drivers/tty/serial/imx.c clk_disable(sport->clk_ipg); sport 1986 drivers/tty/serial/imx.c clk_disable(sport->clk_per); sport 1994 drivers/tty/serial/imx.c imx_uart_console_get_options(struct imx_port *sport, int *baud, sport 1998 drivers/tty/serial/imx.c if (imx_uart_readl(sport, UCR1) & UCR1_UARTEN) { sport 2004 drivers/tty/serial/imx.c ucr2 = imx_uart_readl(sport, UCR2); sport 2019 drivers/tty/serial/imx.c ubir = imx_uart_readl(sport, UBIR) & 0xffff; sport 2020 drivers/tty/serial/imx.c ubmr = imx_uart_readl(sport, UBMR) & 0xffff; sport 2022 drivers/tty/serial/imx.c ucfr_rfdiv = (imx_uart_readl(sport, UFCR) & UFCR_RFDIV) >> 7; sport 2028 drivers/tty/serial/imx.c uartclk = clk_get_rate(sport->clk_per); sport 2047 drivers/tty/serial/imx.c dev_info(sport->port.dev, "Console IMX rounded baud rate from %d to %d\n", sport 2055 drivers/tty/serial/imx.c struct imx_port *sport; sport 2069 drivers/tty/serial/imx.c sport = imx_uart_ports[co->index]; sport 2070 drivers/tty/serial/imx.c if (sport == NULL) sport 2074 drivers/tty/serial/imx.c retval = clk_prepare_enable(sport->clk_ipg); sport 2081 drivers/tty/serial/imx.c imx_uart_console_get_options(sport, &baud, &parity, &bits); sport 2083 drivers/tty/serial/imx.c imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); sport 2085 drivers/tty/serial/imx.c retval = uart_set_options(&sport->port, co, baud, parity, bits, flow); sport 2087 drivers/tty/serial/imx.c clk_disable(sport->clk_ipg); sport 2089 drivers/tty/serial/imx.c clk_unprepare(sport->clk_ipg); sport 2093 drivers/tty/serial/imx.c retval = clk_prepare(sport->clk_per); sport 2095 drivers/tty/serial/imx.c clk_unprepare(sport->clk_ipg); sport 2117 drivers/tty/serial/imx.c struct imx_port *sport = (struct imx_port *)port; sport 2119 drivers/tty/serial/imx.c while (imx_uart_readl(sport, IMX21_UTS) & UTS_TXFULL) sport 2122 drivers/tty/serial/imx.c imx_uart_writel(sport, ch, URTX0); sport 2166 drivers/tty/serial/imx.c static int imx_uart_probe_dt(struct imx_port *sport, sport 2172 drivers/tty/serial/imx.c sport->devdata = of_device_get_match_data(&pdev->dev); sport 2173 drivers/tty/serial/imx.c if (!sport->devdata) sport 2182 drivers/tty/serial/imx.c sport->port.line = ret; sport 2186 drivers/tty/serial/imx.c sport->have_rtscts = 1; sport 2189 drivers/tty/serial/imx.c sport->dte_mode = 1; sport 2192 drivers/tty/serial/imx.c sport->have_rtsgpio = 1; sport 2197 drivers/tty/serial/imx.c static inline int imx_uart_probe_dt(struct imx_port *sport, sport 2204 drivers/tty/serial/imx.c static void imx_uart_probe_pdata(struct imx_port *sport, sport 2209 drivers/tty/serial/imx.c sport->port.line = pdev->id; sport 2210 drivers/tty/serial/imx.c sport->devdata = (struct imx_uart_data *) pdev->id_entry->driver_data; sport 2216 drivers/tty/serial/imx.c sport->have_rtscts = 1; sport 2221 drivers/tty/serial/imx.c struct imx_port *sport; sport 2228 drivers/tty/serial/imx.c sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL); sport 2229 drivers/tty/serial/imx.c if (!sport) sport 2232 drivers/tty/serial/imx.c ret = imx_uart_probe_dt(sport, pdev); sport 2234 drivers/tty/serial/imx.c imx_uart_probe_pdata(sport, pdev); sport 2238 drivers/tty/serial/imx.c if (sport->port.line >= ARRAY_SIZE(imx_uart_ports)) { sport 2240 drivers/tty/serial/imx.c sport->port.line); sport 2253 drivers/tty/serial/imx.c sport->port.dev = &pdev->dev; sport 2254 drivers/tty/serial/imx.c sport->port.mapbase = res->start; sport 2255 drivers/tty/serial/imx.c sport->port.membase = base; sport 2256 drivers/tty/serial/imx.c sport->port.type = PORT_IMX, sport 2257 drivers/tty/serial/imx.c sport->port.iotype = UPIO_MEM; sport 2258 drivers/tty/serial/imx.c sport->port.irq = rxirq; sport 2259 drivers/tty/serial/imx.c sport->port.fifosize = 32; sport 2260 drivers/tty/serial/imx.c sport->port.ops = &imx_uart_pops; sport 2261 drivers/tty/serial/imx.c sport->port.rs485_config = imx_uart_rs485_config; sport 2262 drivers/tty/serial/imx.c sport->port.flags = UPF_BOOT_AUTOCONF; sport 2263 drivers/tty/serial/imx.c timer_setup(&sport->timer, imx_uart_timeout, 0); sport 2265 drivers/tty/serial/imx.c sport->gpios = mctrl_gpio_init(&sport->port, 0); sport 2266 drivers/tty/serial/imx.c if (IS_ERR(sport->gpios)) sport 2267 drivers/tty/serial/imx.c return PTR_ERR(sport->gpios); sport 2269 drivers/tty/serial/imx.c sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); sport 2270 drivers/tty/serial/imx.c if (IS_ERR(sport->clk_ipg)) { sport 2271 drivers/tty/serial/imx.c ret = PTR_ERR(sport->clk_ipg); sport 2276 drivers/tty/serial/imx.c sport->clk_per = devm_clk_get(&pdev->dev, "per"); sport 2277 drivers/tty/serial/imx.c if (IS_ERR(sport->clk_per)) { sport 2278 drivers/tty/serial/imx.c ret = PTR_ERR(sport->clk_per); sport 2283 drivers/tty/serial/imx.c sport->port.uartclk = clk_get_rate(sport->clk_per); sport 2286 drivers/tty/serial/imx.c ret = clk_prepare_enable(sport->clk_ipg); sport 2293 drivers/tty/serial/imx.c sport->ucr1 = readl(sport->port.membase + UCR1); sport 2294 drivers/tty/serial/imx.c sport->ucr2 = readl(sport->port.membase + UCR2); sport 2295 drivers/tty/serial/imx.c sport->ucr3 = readl(sport->port.membase + UCR3); sport 2296 drivers/tty/serial/imx.c sport->ucr4 = readl(sport->port.membase + UCR4); sport 2297 drivers/tty/serial/imx.c sport->ufcr = readl(sport->port.membase + UFCR); sport 2299 drivers/tty/serial/imx.c uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); sport 2301 drivers/tty/serial/imx.c if (sport->port.rs485.flags & SER_RS485_ENABLED && sport 2302 drivers/tty/serial/imx.c (!sport->have_rtscts && !sport->have_rtsgpio)) sport 2310 drivers/tty/serial/imx.c if (sport->port.rs485.flags & SER_RS485_ENABLED && sport 2311 drivers/tty/serial/imx.c sport->have_rtscts && !sport->have_rtsgpio && sport 2312 drivers/tty/serial/imx.c (!(sport->port.rs485.flags & SER_RS485_RTS_ON_SEND) && sport 2313 drivers/tty/serial/imx.c !(sport->port.rs485.flags & SER_RS485_RX_DURING_TX))) sport 2317 drivers/tty/serial/imx.c imx_uart_rs485_config(&sport->port, &sport->port.rs485); sport 2320 drivers/tty/serial/imx.c ucr1 = imx_uart_readl(sport, UCR1); sport 2323 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 2325 drivers/tty/serial/imx.c if (!imx_uart_is_imx1(sport) && sport->dte_mode) { sport 2332 drivers/tty/serial/imx.c u32 ufcr = imx_uart_readl(sport, UFCR); sport 2334 drivers/tty/serial/imx.c imx_uart_writel(sport, ufcr | UFCR_DCEDTE, UFCR); sport 2341 drivers/tty/serial/imx.c imx_uart_writel(sport, sport 2347 drivers/tty/serial/imx.c u32 ufcr = imx_uart_readl(sport, UFCR); sport 2349 drivers/tty/serial/imx.c imx_uart_writel(sport, ufcr & ~UFCR_DCEDTE, UFCR); sport 2351 drivers/tty/serial/imx.c if (!imx_uart_is_imx1(sport)) sport 2353 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr3, UCR3); sport 2356 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_ipg); sport 2364 drivers/tty/serial/imx.c dev_name(&pdev->dev), sport); sport 2372 drivers/tty/serial/imx.c dev_name(&pdev->dev), sport); sport 2380 drivers/tty/serial/imx.c dev_name(&pdev->dev), sport); sport 2388 drivers/tty/serial/imx.c dev_name(&pdev->dev), sport); sport 2395 drivers/tty/serial/imx.c imx_uart_ports[sport->port.line] = sport; sport 2397 drivers/tty/serial/imx.c platform_set_drvdata(pdev, sport); sport 2399 drivers/tty/serial/imx.c return uart_add_one_port(&imx_uart_uart_driver, &sport->port); sport 2404 drivers/tty/serial/imx.c struct imx_port *sport = platform_get_drvdata(pdev); sport 2406 drivers/tty/serial/imx.c return uart_remove_one_port(&imx_uart_uart_driver, &sport->port); sport 2409 drivers/tty/serial/imx.c static void imx_uart_restore_context(struct imx_port *sport) sport 2413 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 2414 drivers/tty/serial/imx.c if (!sport->context_saved) { sport 2415 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 2419 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[4], UFCR); sport 2420 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[5], UESC); sport 2421 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[6], UTIM); sport 2422 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[7], UBIR); sport 2423 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[8], UBMR); sport 2424 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[9], IMX21_UTS); sport 2425 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[0], UCR1); sport 2426 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[1] | UCR2_SRST, UCR2); sport 2427 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[2], UCR3); sport 2428 drivers/tty/serial/imx.c imx_uart_writel(sport, sport->saved_reg[3], UCR4); sport 2429 drivers/tty/serial/imx.c sport->context_saved = false; sport 2430 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 2433 drivers/tty/serial/imx.c static void imx_uart_save_context(struct imx_port *sport) sport 2438 drivers/tty/serial/imx.c spin_lock_irqsave(&sport->port.lock, flags); sport 2439 drivers/tty/serial/imx.c sport->saved_reg[0] = imx_uart_readl(sport, UCR1); sport 2440 drivers/tty/serial/imx.c sport->saved_reg[1] = imx_uart_readl(sport, UCR2); sport 2441 drivers/tty/serial/imx.c sport->saved_reg[2] = imx_uart_readl(sport, UCR3); sport 2442 drivers/tty/serial/imx.c sport->saved_reg[3] = imx_uart_readl(sport, UCR4); sport 2443 drivers/tty/serial/imx.c sport->saved_reg[4] = imx_uart_readl(sport, UFCR); sport 2444 drivers/tty/serial/imx.c sport->saved_reg[5] = imx_uart_readl(sport, UESC); sport 2445 drivers/tty/serial/imx.c sport->saved_reg[6] = imx_uart_readl(sport, UTIM); sport 2446 drivers/tty/serial/imx.c sport->saved_reg[7] = imx_uart_readl(sport, UBIR); sport 2447 drivers/tty/serial/imx.c sport->saved_reg[8] = imx_uart_readl(sport, UBMR); sport 2448 drivers/tty/serial/imx.c sport->saved_reg[9] = imx_uart_readl(sport, IMX21_UTS); sport 2449 drivers/tty/serial/imx.c sport->context_saved = true; sport 2450 drivers/tty/serial/imx.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 2453 drivers/tty/serial/imx.c static void imx_uart_enable_wakeup(struct imx_port *sport, bool on) sport 2457 drivers/tty/serial/imx.c ucr3 = imx_uart_readl(sport, UCR3); sport 2459 drivers/tty/serial/imx.c imx_uart_writel(sport, USR1_AWAKE, USR1); sport 2464 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr3, UCR3); sport 2466 drivers/tty/serial/imx.c if (sport->have_rtscts) { sport 2467 drivers/tty/serial/imx.c u32 ucr1 = imx_uart_readl(sport, UCR1); sport 2472 drivers/tty/serial/imx.c imx_uart_writel(sport, ucr1, UCR1); sport 2478 drivers/tty/serial/imx.c struct imx_port *sport = dev_get_drvdata(dev); sport 2480 drivers/tty/serial/imx.c imx_uart_save_context(sport); sport 2482 drivers/tty/serial/imx.c clk_disable(sport->clk_ipg); sport 2491 drivers/tty/serial/imx.c struct imx_port *sport = dev_get_drvdata(dev); sport 2496 drivers/tty/serial/imx.c ret = clk_enable(sport->clk_ipg); sport 2500 drivers/tty/serial/imx.c imx_uart_restore_context(sport); sport 2507 drivers/tty/serial/imx.c struct imx_port *sport = dev_get_drvdata(dev); sport 2510 drivers/tty/serial/imx.c uart_suspend_port(&imx_uart_uart_driver, &sport->port); sport 2511 drivers/tty/serial/imx.c disable_irq(sport->port.irq); sport 2513 drivers/tty/serial/imx.c ret = clk_prepare_enable(sport->clk_ipg); sport 2518 drivers/tty/serial/imx.c imx_uart_enable_wakeup(sport, true); sport 2525 drivers/tty/serial/imx.c struct imx_port *sport = dev_get_drvdata(dev); sport 2528 drivers/tty/serial/imx.c imx_uart_enable_wakeup(sport, false); sport 2530 drivers/tty/serial/imx.c uart_resume_port(&imx_uart_uart_driver, &sport->port); sport 2531 drivers/tty/serial/imx.c enable_irq(sport->port.irq); sport 2533 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_ipg); sport 2540 drivers/tty/serial/imx.c struct imx_port *sport = dev_get_drvdata(dev); sport 2542 drivers/tty/serial/imx.c uart_suspend_port(&imx_uart_uart_driver, &sport->port); sport 2544 drivers/tty/serial/imx.c return clk_prepare_enable(sport->clk_ipg); sport 2549 drivers/tty/serial/imx.c struct imx_port *sport = dev_get_drvdata(dev); sport 2551 drivers/tty/serial/imx.c uart_resume_port(&imx_uart_uart_driver, &sport->port); sport 2553 drivers/tty/serial/imx.c clk_disable_unprepare(sport->clk_ipg); sport 38 drivers/tty/serial/pic32_uart.c static inline void pic32_wait_deplete_txbuf(struct pic32_sport *sport) sport 41 drivers/tty/serial/pic32_uart.c while (!(pic32_uart_readl(sport, PIC32_UART_STA) & PIC32_UART_STA_TRMT)) sport 45 drivers/tty/serial/pic32_uart.c static inline int pic32_enable_clock(struct pic32_sport *sport) sport 47 drivers/tty/serial/pic32_uart.c int ret = clk_prepare_enable(sport->clk); sport 52 drivers/tty/serial/pic32_uart.c sport->ref_clk++; sport 56 drivers/tty/serial/pic32_uart.c static inline void pic32_disable_clock(struct pic32_sport *sport) sport 58 drivers/tty/serial/pic32_uart.c sport->ref_clk--; sport 59 drivers/tty/serial/pic32_uart.c clk_disable_unprepare(sport->clk); sport 65 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 66 drivers/tty/serial/pic32_uart.c u32 val = pic32_uart_readl(sport, PIC32_UART_STA); sport 74 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 78 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_MODE), sport 81 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 86 drivers/tty/serial/pic32_uart.c static unsigned int get_cts_state(struct pic32_sport *sport) sport 89 drivers/tty/serial/pic32_uart.c if (gpio_is_valid(sport->cts_gpio)) sport 90 drivers/tty/serial/pic32_uart.c return !gpio_get_value(sport->cts_gpio); sport 98 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 101 drivers/tty/serial/pic32_uart.c if (!sport->hw_flow_ctrl) sport 103 drivers/tty/serial/pic32_uart.c else if (get_cts_state(sport)) sport 118 drivers/tty/serial/pic32_uart.c static inline void pic32_uart_irqtxen(struct pic32_sport *sport, u8 en) sport 120 drivers/tty/serial/pic32_uart.c if (en && !tx_irq_enabled(sport)) { sport 121 drivers/tty/serial/pic32_uart.c enable_irq(sport->irq_tx); sport 122 drivers/tty/serial/pic32_uart.c tx_irq_enabled(sport) = 1; sport 123 drivers/tty/serial/pic32_uart.c } else if (!en && tx_irq_enabled(sport)) { sport 128 drivers/tty/serial/pic32_uart.c disable_irq_nosync(sport->irq_tx); sport 129 drivers/tty/serial/pic32_uart.c tx_irq_enabled(sport) = 0; sport 136 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 138 drivers/tty/serial/pic32_uart.c if (!(pic32_uart_readl(sport, PIC32_UART_MODE) & PIC32_UART_MODE_ON)) sport 141 drivers/tty/serial/pic32_uart.c if (!(pic32_uart_readl(sport, PIC32_UART_STA) & PIC32_UART_STA_UTXEN)) sport 145 drivers/tty/serial/pic32_uart.c pic32_wait_deplete_txbuf(sport); sport 147 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 149 drivers/tty/serial/pic32_uart.c pic32_uart_irqtxen(sport, 0); sport 155 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 157 drivers/tty/serial/pic32_uart.c pic32_uart_irqtxen(sport, 1); sport 158 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_STA), sport 165 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 168 drivers/tty/serial/pic32_uart.c disable_irq(sport->irq_rx); sport 171 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 178 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 184 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_STA), sport 187 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 202 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 221 drivers/tty/serial/pic32_uart.c sta_reg = pic32_uart_readl(sport, PIC32_UART_STA); sport 225 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 237 drivers/tty/serial/pic32_uart.c c = pic32_uart_readl(sport, PIC32_UART_RX); sport 279 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 284 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_TX, port->x_char); sport 308 drivers/tty/serial/pic32_uart.c pic32_uart_readl(sport, PIC32_UART_STA))) { sport 311 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_TX, c); sport 330 drivers/tty/serial/pic32_uart.c pic32_uart_irqtxen(sport, 0); sport 366 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 368 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_STA), sport 370 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_MODE), sport 377 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 380 drivers/tty/serial/pic32_uart.c pic32_wait_deplete_txbuf(sport); sport 382 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 384 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 391 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 398 drivers/tty/serial/pic32_uart.c ret = pic32_enable_clock(sport); sport 405 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_MODE, 0); sport 406 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_STA, 0); sport 412 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_BRG, dflt_baud); sport 422 drivers/tty/serial/pic32_uart.c tx_irq_enabled(sport) = 0; sport 424 drivers/tty/serial/pic32_uart.c sport->irq_fault_name = kasprintf(GFP_KERNEL, "%s%d-fault", sport 426 drivers/tty/serial/pic32_uart.c sport->idx); sport 427 drivers/tty/serial/pic32_uart.c if (!sport->irq_fault_name) { sport 432 drivers/tty/serial/pic32_uart.c irq_set_status_flags(sport->irq_fault, IRQ_NOAUTOEN); sport 433 drivers/tty/serial/pic32_uart.c ret = request_irq(sport->irq_fault, pic32_uart_fault_interrupt, sport 434 drivers/tty/serial/pic32_uart.c sport->irqflags_fault, sport->irq_fault_name, port); sport 437 drivers/tty/serial/pic32_uart.c __func__, sport->irq_fault, ret, sport 442 drivers/tty/serial/pic32_uart.c sport->irq_rx_name = kasprintf(GFP_KERNEL, "%s%d-rx", sport 444 drivers/tty/serial/pic32_uart.c sport->idx); sport 445 drivers/tty/serial/pic32_uart.c if (!sport->irq_rx_name) { sport 450 drivers/tty/serial/pic32_uart.c irq_set_status_flags(sport->irq_rx, IRQ_NOAUTOEN); sport 451 drivers/tty/serial/pic32_uart.c ret = request_irq(sport->irq_rx, pic32_uart_rx_interrupt, sport 452 drivers/tty/serial/pic32_uart.c sport->irqflags_rx, sport->irq_rx_name, port); sport 455 drivers/tty/serial/pic32_uart.c __func__, sport->irq_rx, ret, sport 460 drivers/tty/serial/pic32_uart.c sport->irq_tx_name = kasprintf(GFP_KERNEL, "%s%d-tx", sport 462 drivers/tty/serial/pic32_uart.c sport->idx); sport 463 drivers/tty/serial/pic32_uart.c if (!sport->irq_tx_name) { sport 468 drivers/tty/serial/pic32_uart.c irq_set_status_flags(sport->irq_tx, IRQ_NOAUTOEN); sport 469 drivers/tty/serial/pic32_uart.c ret = request_irq(sport->irq_tx, pic32_uart_tx_interrupt, sport 470 drivers/tty/serial/pic32_uart.c sport->irqflags_tx, sport->irq_tx_name, port); sport 473 drivers/tty/serial/pic32_uart.c __func__, sport->irq_tx, ret, sport 481 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 485 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_STA), sport 491 drivers/tty/serial/pic32_uart.c enable_irq(sport->irq_rx); sport 496 drivers/tty/serial/pic32_uart.c kfree(sport->irq_tx_name); sport 497 drivers/tty/serial/pic32_uart.c free_irq(sport->irq_tx, port); sport 499 drivers/tty/serial/pic32_uart.c kfree(sport->irq_rx_name); sport 500 drivers/tty/serial/pic32_uart.c free_irq(sport->irq_rx, port); sport 502 drivers/tty/serial/pic32_uart.c kfree(sport->irq_fault_name); sport 503 drivers/tty/serial/pic32_uart.c free_irq(sport->irq_fault, port); sport 511 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 518 drivers/tty/serial/pic32_uart.c pic32_disable_clock(sport); sport 521 drivers/tty/serial/pic32_uart.c free_irq(sport->irq_fault, port); sport 522 drivers/tty/serial/pic32_uart.c free_irq(sport->irq_tx, port); sport 523 drivers/tty/serial/pic32_uart.c free_irq(sport->irq_rx, port); sport 531 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 543 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_MODE), sport 546 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 552 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_MODE), sport 554 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 557 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_MODE), sport 559 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 563 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 568 drivers/tty/serial/pic32_uart.c if ((new->c_cflag & CRTSCTS) && sport->hw_flow_ctrl) { sport 570 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_SET(PIC32_UART_MODE), sport 572 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 574 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 578 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 580 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 582 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_CLR(PIC32_UART_MODE), sport 595 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_BRG, quot); sport 696 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 698 drivers/tty/serial/pic32_uart.c if (!(pic32_uart_readl(sport, PIC32_UART_MODE) & PIC32_UART_MODE_ON)) sport 701 drivers/tty/serial/pic32_uart.c if (!(pic32_uart_readl(sport, PIC32_UART_STA) & PIC32_UART_STA_UTXEN)) sport 705 drivers/tty/serial/pic32_uart.c pic32_wait_deplete_txbuf(sport); sport 707 drivers/tty/serial/pic32_uart.c pic32_uart_writel(sport, PIC32_UART_TX, ch & 0xff); sport 714 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = pic32_sports[co->index]; sport 715 drivers/tty/serial/pic32_uart.c struct uart_port *port = pic32_get_port(sport); sport 726 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport; sport 737 drivers/tty/serial/pic32_uart.c sport = pic32_sports[co->index]; sport 738 drivers/tty/serial/pic32_uart.c if (!sport) sport 740 drivers/tty/serial/pic32_uart.c port = pic32_get_port(sport); sport 742 drivers/tty/serial/pic32_uart.c ret = pic32_enable_clock(sport); sport 804 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport; sport 818 drivers/tty/serial/pic32_uart.c sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL); sport 819 drivers/tty/serial/pic32_uart.c if (!sport) sport 822 drivers/tty/serial/pic32_uart.c sport->idx = uart_idx; sport 823 drivers/tty/serial/pic32_uart.c sport->irq_fault = irq_of_parse_and_map(np, 0); sport 824 drivers/tty/serial/pic32_uart.c sport->irqflags_fault = IRQF_NO_THREAD; sport 825 drivers/tty/serial/pic32_uart.c sport->irq_rx = irq_of_parse_and_map(np, 1); sport 826 drivers/tty/serial/pic32_uart.c sport->irqflags_rx = IRQF_NO_THREAD; sport 827 drivers/tty/serial/pic32_uart.c sport->irq_tx = irq_of_parse_and_map(np, 2); sport 828 drivers/tty/serial/pic32_uart.c sport->irqflags_tx = IRQF_NO_THREAD; sport 829 drivers/tty/serial/pic32_uart.c sport->clk = devm_clk_get(&pdev->dev, NULL); sport 830 drivers/tty/serial/pic32_uart.c sport->cts_gpio = -EINVAL; sport 831 drivers/tty/serial/pic32_uart.c sport->dev = &pdev->dev; sport 836 drivers/tty/serial/pic32_uart.c sport->hw_flow_ctrl = false; sport 837 drivers/tty/serial/pic32_uart.c sport->cts_gpio = of_get_named_gpio(np, "cts-gpios", 0); sport 838 drivers/tty/serial/pic32_uart.c if (gpio_is_valid(sport->cts_gpio)) { sport 839 drivers/tty/serial/pic32_uart.c sport->hw_flow_ctrl = true; sport 841 drivers/tty/serial/pic32_uart.c ret = devm_gpio_request(sport->dev, sport 842 drivers/tty/serial/pic32_uart.c sport->cts_gpio, "CTS"); sport 849 drivers/tty/serial/pic32_uart.c ret = gpio_direction_input(sport->cts_gpio); sport 856 drivers/tty/serial/pic32_uart.c pic32_sports[uart_idx] = sport; sport 857 drivers/tty/serial/pic32_uart.c port = &sport->port; sport 865 drivers/tty/serial/pic32_uart.c port->uartclk = clk_get_rate(sport->clk); sport 881 drivers/tty/serial/pic32_uart.c pic32_disable_clock(sport); sport 899 drivers/tty/serial/pic32_uart.c struct pic32_sport *sport = to_pic32_sport(port); sport 902 drivers/tty/serial/pic32_uart.c pic32_disable_clock(sport); sport 904 drivers/tty/serial/pic32_uart.c pic32_sports[sport->idx] = NULL; sport 70 drivers/tty/serial/pic32_uart.h #define pic32_get_port(sport) (&sport->port) sport 71 drivers/tty/serial/pic32_uart.h #define pic32_get_opt(sport) (&sport->opt) sport 72 drivers/tty/serial/pic32_uart.h #define tx_irq_enabled(sport) (sport->enable_tx_irq) sport 74 drivers/tty/serial/pic32_uart.h static inline void pic32_uart_writel(struct pic32_sport *sport, sport 77 drivers/tty/serial/pic32_uart.h struct uart_port *port = pic32_get_port(sport); sport 82 drivers/tty/serial/pic32_uart.h static inline u32 pic32_uart_readl(struct pic32_sport *sport, u32 reg) sport 84 drivers/tty/serial/pic32_uart.h struct uart_port *port = pic32_get_port(sport); sport 65 drivers/tty/serial/pnx8xxx_uart.c static inline int serial_in(struct pnx8xxx_port *sport, int offset) sport 67 drivers/tty/serial/pnx8xxx_uart.c return (__raw_readl(sport->port.membase + offset)); sport 70 drivers/tty/serial/pnx8xxx_uart.c static inline void serial_out(struct pnx8xxx_port *sport, int offset, int value) sport 72 drivers/tty/serial/pnx8xxx_uart.c __raw_writel(value, sport->port.membase + offset); sport 78 drivers/tty/serial/pnx8xxx_uart.c static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport) sport 82 drivers/tty/serial/pnx8xxx_uart.c status = sport->port.ops->get_mctrl(&sport->port); sport 83 drivers/tty/serial/pnx8xxx_uart.c changed = status ^ sport->old_status; sport 88 drivers/tty/serial/pnx8xxx_uart.c sport->old_status = status; sport 91 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.rng++; sport 93 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.dsr++; sport 95 drivers/tty/serial/pnx8xxx_uart.c uart_handle_dcd_change(&sport->port, status & TIOCM_CAR); sport 97 drivers/tty/serial/pnx8xxx_uart.c uart_handle_cts_change(&sport->port, status & TIOCM_CTS); sport 99 drivers/tty/serial/pnx8xxx_uart.c wake_up_interruptible(&sport->port.state->port.delta_msr_wait); sport 108 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = from_timer(sport, t, timer); sport 111 drivers/tty/serial/pnx8xxx_uart.c if (sport->port.state) { sport 112 drivers/tty/serial/pnx8xxx_uart.c spin_lock_irqsave(&sport->port.lock, flags); sport 113 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_mctrl_check(sport); sport 114 drivers/tty/serial/pnx8xxx_uart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 116 drivers/tty/serial/pnx8xxx_uart.c mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); sport 125 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 130 drivers/tty/serial/pnx8xxx_uart.c ien = serial_in(sport, PNX8XXX_IEN); sport 131 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, ien & ~PNX8XXX_UART_INT_ALLTX); sport 134 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, PNX8XXX_UART_INT_ALLTX); sport 142 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 147 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, PNX8XXX_UART_INT_ALLTX); sport 150 drivers/tty/serial/pnx8xxx_uart.c ien = serial_in(sport, PNX8XXX_IEN); sport 151 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, ien | PNX8XXX_UART_INT_ALLTX); sport 159 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 164 drivers/tty/serial/pnx8xxx_uart.c ien = serial_in(sport, PNX8XXX_IEN); sport 165 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, ien & ~PNX8XXX_UART_INT_ALLRX); sport 168 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, PNX8XXX_UART_INT_ALLRX); sport 176 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 179 drivers/tty/serial/pnx8xxx_uart.c mod_timer(&sport->timer, jiffies); sport 182 drivers/tty/serial/pnx8xxx_uart.c static void pnx8xxx_rx_chars(struct pnx8xxx_port *sport) sport 186 drivers/tty/serial/pnx8xxx_uart.c status = FIFO_TO_SM(serial_in(sport, PNX8XXX_FIFO)) | sport 187 drivers/tty/serial/pnx8xxx_uart.c ISTAT_TO_SM(serial_in(sport, PNX8XXX_ISTAT)); sport 189 drivers/tty/serial/pnx8xxx_uart.c ch = serial_in(sport, PNX8XXX_FIFO) & 0xff; sport 191 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.rx++; sport 206 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.brk++; sport 207 drivers/tty/serial/pnx8xxx_uart.c if (uart_handle_break(&sport->port)) sport 210 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.parity++; sport 212 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.frame++; sport 214 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.overrun++; sport 216 drivers/tty/serial/pnx8xxx_uart.c status &= sport->port.read_status_mask; sport 224 drivers/tty/serial/pnx8xxx_uart.c sport->port.sysrq = 0; sport 228 drivers/tty/serial/pnx8xxx_uart.c if (uart_handle_sysrq_char(&sport->port, ch)) sport 231 drivers/tty/serial/pnx8xxx_uart.c uart_insert_char(&sport->port, status, sport 235 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_LCR, serial_in(sport, PNX8XXX_LCR) | sport 237 drivers/tty/serial/pnx8xxx_uart.c status = FIFO_TO_SM(serial_in(sport, PNX8XXX_FIFO)) | sport 238 drivers/tty/serial/pnx8xxx_uart.c ISTAT_TO_SM(serial_in(sport, PNX8XXX_ISTAT)); sport 241 drivers/tty/serial/pnx8xxx_uart.c spin_unlock(&sport->port.lock); sport 242 drivers/tty/serial/pnx8xxx_uart.c tty_flip_buffer_push(&sport->port.state->port); sport 243 drivers/tty/serial/pnx8xxx_uart.c spin_lock(&sport->port.lock); sport 246 drivers/tty/serial/pnx8xxx_uart.c static void pnx8xxx_tx_chars(struct pnx8xxx_port *sport) sport 248 drivers/tty/serial/pnx8xxx_uart.c struct circ_buf *xmit = &sport->port.state->xmit; sport 250 drivers/tty/serial/pnx8xxx_uart.c if (sport->port.x_char) { sport 251 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_FIFO, sport->port.x_char); sport 252 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.tx++; sport 253 drivers/tty/serial/pnx8xxx_uart.c sport->port.x_char = 0; sport 261 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_mctrl_check(sport); sport 263 drivers/tty/serial/pnx8xxx_uart.c if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { sport 264 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_stop_tx(&sport->port); sport 271 drivers/tty/serial/pnx8xxx_uart.c while (((serial_in(sport, PNX8XXX_FIFO) & sport 273 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_FIFO, xmit->buf[xmit->tail]); sport 275 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.tx++; sport 281 drivers/tty/serial/pnx8xxx_uart.c uart_write_wakeup(&sport->port); sport 284 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_stop_tx(&sport->port); sport 289 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = dev_id; sport 292 drivers/tty/serial/pnx8xxx_uart.c spin_lock(&sport->port.lock); sport 294 drivers/tty/serial/pnx8xxx_uart.c status = serial_in(sport, PNX8XXX_ISTAT) & serial_in(sport, PNX8XXX_IEN); sport 298 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_rx_chars(sport); sport 302 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_tx_chars(sport); sport 305 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, status); sport 307 drivers/tty/serial/pnx8xxx_uart.c spin_unlock(&sport->port.lock); sport 316 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 319 drivers/tty/serial/pnx8xxx_uart.c return serial_in(sport, PNX8XXX_FIFO) & PNX8XXX_UART_FIFO_TXFIFO_STA ? 0 : TIOCSER_TEMT; sport 324 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 331 drivers/tty/serial/pnx8xxx_uart.c msr = serial_in(sport, PNX8XXX_MCR); sport 342 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = (struct pnx8xxx_port *)port; sport 352 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 357 drivers/tty/serial/pnx8xxx_uart.c spin_lock_irqsave(&sport->port.lock, flags); sport 358 drivers/tty/serial/pnx8xxx_uart.c lcr = serial_in(sport, PNX8XXX_LCR); sport 363 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_LCR, lcr); sport 364 drivers/tty/serial/pnx8xxx_uart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 369 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 376 drivers/tty/serial/pnx8xxx_uart.c retval = request_irq(sport->port.irq, pnx8xxx_int, 0, sport 377 drivers/tty/serial/pnx8xxx_uart.c "pnx8xxx-uart", sport); sport 385 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, PNX8XXX_UART_INT_ALLRX | sport 388 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, serial_in(sport, PNX8XXX_IEN) | sport 395 drivers/tty/serial/pnx8xxx_uart.c spin_lock_irq(&sport->port.lock); sport 396 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_enable_ms(&sport->port); sport 397 drivers/tty/serial/pnx8xxx_uart.c spin_unlock_irq(&sport->port.lock); sport 404 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 411 drivers/tty/serial/pnx8xxx_uart.c del_timer_sync(&sport->timer); sport 416 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, 0); sport 421 drivers/tty/serial/pnx8xxx_uart.c lcr = serial_in(sport, PNX8XXX_LCR); sport 424 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_LCR, lcr); sport 429 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, PNX8XXX_UART_INT_ALLRX | sport 435 drivers/tty/serial/pnx8xxx_uart.c free_irq(sport->port.irq, sport); sport 442 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 477 drivers/tty/serial/pnx8xxx_uart.c spin_lock_irqsave(&sport->port.lock, flags); sport 479 drivers/tty/serial/pnx8xxx_uart.c sport->port.read_status_mask = ISTAT_TO_SM(PNX8XXX_UART_INT_RXOVRN) | sport 483 drivers/tty/serial/pnx8xxx_uart.c sport->port.read_status_mask |= sport 487 drivers/tty/serial/pnx8xxx_uart.c sport->port.read_status_mask |= sport 493 drivers/tty/serial/pnx8xxx_uart.c sport->port.ignore_status_mask = 0; sport 495 drivers/tty/serial/pnx8xxx_uart.c sport->port.ignore_status_mask |= sport 499 drivers/tty/serial/pnx8xxx_uart.c sport->port.ignore_status_mask |= sport 506 drivers/tty/serial/pnx8xxx_uart.c sport->port.ignore_status_mask |= sport 514 drivers/tty/serial/pnx8xxx_uart.c sport->port.ignore_status_mask |= sport 517 drivers/tty/serial/pnx8xxx_uart.c del_timer_sync(&sport->timer); sport 527 drivers/tty/serial/pnx8xxx_uart.c old_ien = serial_in(sport, PNX8XXX_IEN); sport 528 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, old_ien & ~(PNX8XXX_UART_INT_ALLTX | sport 531 drivers/tty/serial/pnx8xxx_uart.c while (serial_in(sport, PNX8XXX_FIFO) & PNX8XXX_UART_FIFO_TXFIFO_STA) sport 535 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, 0); sport 542 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_LCR, lcr_fcr); sport 546 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_BAUD, quot); sport 548 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, -1); sport 550 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, old_ien); sport 552 drivers/tty/serial/pnx8xxx_uart.c if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) sport 553 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_enable_ms(&sport->port); sport 555 drivers/tty/serial/pnx8xxx_uart.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 560 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 563 drivers/tty/serial/pnx8xxx_uart.c return sport->port.type == PORT_PNX8XXX ? "PNX8XXX" : NULL; sport 571 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 574 drivers/tty/serial/pnx8xxx_uart.c release_mem_region(sport->port.mapbase, UART_PORT_SIZE); sport 582 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 584 drivers/tty/serial/pnx8xxx_uart.c return request_mem_region(sport->port.mapbase, UART_PORT_SIZE, sport 593 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 597 drivers/tty/serial/pnx8xxx_uart.c pnx8xxx_request_port(&sport->port) == 0) sport 598 drivers/tty/serial/pnx8xxx_uart.c sport->port.type = PORT_PNX8XXX; sport 609 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 615 drivers/tty/serial/pnx8xxx_uart.c if (sport->port.irq != ser->irq) sport 619 drivers/tty/serial/pnx8xxx_uart.c if (sport->port.uartclk / 16 != ser->baud_base) sport 621 drivers/tty/serial/pnx8xxx_uart.c if ((void *)sport->port.mapbase != ser->iomem_base) sport 623 drivers/tty/serial/pnx8xxx_uart.c if (sport->port.iobase != ser->port) sport 674 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = sport 680 drivers/tty/serial/pnx8xxx_uart.c status = serial_in(sport, PNX8XXX_FIFO); sport 682 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_FIFO, ch); sport 690 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = &pnx8xxx_ports[co->index]; sport 696 drivers/tty/serial/pnx8xxx_uart.c old_ien = serial_in(sport, PNX8XXX_IEN); sport 697 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, old_ien & ~(PNX8XXX_UART_INT_ALLTX | sport 700 drivers/tty/serial/pnx8xxx_uart.c uart_console_write(&sport->port, s, count, pnx8xxx_console_putchar); sport 708 drivers/tty/serial/pnx8xxx_uart.c status = serial_in(sport, PNX8XXX_FIFO); sport 712 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_ICLR, PNX8XXX_UART_INT_TX | sport 715 drivers/tty/serial/pnx8xxx_uart.c serial_out(sport, PNX8XXX_IEN, old_ien); sport 721 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport; sport 734 drivers/tty/serial/pnx8xxx_uart.c sport = &pnx8xxx_ports[co->index]; sport 739 drivers/tty/serial/pnx8xxx_uart.c return uart_set_options(&sport->port, co, baud, parity, bits, flow); sport 778 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = platform_get_drvdata(pdev); sport 780 drivers/tty/serial/pnx8xxx_uart.c return uart_suspend_port(&pnx8xxx_reg, &sport->port); sport 785 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = platform_get_drvdata(pdev); sport 787 drivers/tty/serial/pnx8xxx_uart.c return uart_resume_port(&pnx8xxx_reg, &sport->port); sport 815 drivers/tty/serial/pnx8xxx_uart.c struct pnx8xxx_port *sport = platform_get_drvdata(pdev); sport 817 drivers/tty/serial/pnx8xxx_uart.c if (sport) sport 818 drivers/tty/serial/pnx8xxx_uart.c uart_remove_one_port(&pnx8xxx_reg, &sport->port); sport 798 drivers/tty/serial/pxa.c struct uart_pxa_port *sport = dev_get_drvdata(dev); sport 800 drivers/tty/serial/pxa.c if (sport) sport 801 drivers/tty/serial/pxa.c uart_suspend_port(&serial_pxa_reg, &sport->port); sport 808 drivers/tty/serial/pxa.c struct uart_pxa_port *sport = dev_get_drvdata(dev); sport 810 drivers/tty/serial/pxa.c if (sport) sport 811 drivers/tty/serial/pxa.c uart_resume_port(&serial_pxa_reg, &sport->port); sport 829 drivers/tty/serial/pxa.c struct uart_pxa_port *sport) sport 842 drivers/tty/serial/pxa.c sport->port.line = ret; sport 848 drivers/tty/serial/pxa.c struct uart_pxa_port *sport; sport 857 drivers/tty/serial/pxa.c sport = kzalloc(sizeof(struct uart_pxa_port), GFP_KERNEL); sport 858 drivers/tty/serial/pxa.c if (!sport) sport 861 drivers/tty/serial/pxa.c sport->clk = clk_get(&dev->dev, NULL); sport 862 drivers/tty/serial/pxa.c if (IS_ERR(sport->clk)) { sport 863 drivers/tty/serial/pxa.c ret = PTR_ERR(sport->clk); sport 867 drivers/tty/serial/pxa.c ret = clk_prepare(sport->clk); sport 869 drivers/tty/serial/pxa.c clk_put(sport->clk); sport 873 drivers/tty/serial/pxa.c sport->port.type = PORT_PXA; sport 874 drivers/tty/serial/pxa.c sport->port.iotype = UPIO_MEM; sport 875 drivers/tty/serial/pxa.c sport->port.mapbase = mmres->start; sport 876 drivers/tty/serial/pxa.c sport->port.irq = irqres->start; sport 877 drivers/tty/serial/pxa.c sport->port.fifosize = 64; sport 878 drivers/tty/serial/pxa.c sport->port.ops = &serial_pxa_pops; sport 879 drivers/tty/serial/pxa.c sport->port.dev = &dev->dev; sport 880 drivers/tty/serial/pxa.c sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; sport 881 drivers/tty/serial/pxa.c sport->port.uartclk = clk_get_rate(sport->clk); sport 883 drivers/tty/serial/pxa.c ret = serial_pxa_probe_dt(dev, sport); sport 885 drivers/tty/serial/pxa.c sport->port.line = dev->id; sport 888 drivers/tty/serial/pxa.c if (sport->port.line >= ARRAY_SIZE(serial_pxa_ports)) { sport 889 drivers/tty/serial/pxa.c dev_err(&dev->dev, "serial%d out of range\n", sport->port.line); sport 893 drivers/tty/serial/pxa.c snprintf(sport->name, PXA_NAME_LEN - 1, "UART%d", sport->port.line + 1); sport 895 drivers/tty/serial/pxa.c sport->port.membase = ioremap(mmres->start, resource_size(mmres)); sport 896 drivers/tty/serial/pxa.c if (!sport->port.membase) { sport 901 drivers/tty/serial/pxa.c serial_pxa_ports[sport->port.line] = sport; sport 903 drivers/tty/serial/pxa.c uart_add_one_port(&serial_pxa_reg, &sport->port); sport 904 drivers/tty/serial/pxa.c platform_set_drvdata(dev, sport); sport 909 drivers/tty/serial/pxa.c clk_unprepare(sport->clk); sport 910 drivers/tty/serial/pxa.c clk_put(sport->clk); sport 912 drivers/tty/serial/pxa.c kfree(sport); sport 49 drivers/tty/serial/sa1100.c #define UART_GET_UTCR0(sport) __raw_readl((sport)->port.membase + UTCR0) sport 50 drivers/tty/serial/sa1100.c #define UART_GET_UTCR1(sport) __raw_readl((sport)->port.membase + UTCR1) sport 51 drivers/tty/serial/sa1100.c #define UART_GET_UTCR2(sport) __raw_readl((sport)->port.membase + UTCR2) sport 52 drivers/tty/serial/sa1100.c #define UART_GET_UTCR3(sport) __raw_readl((sport)->port.membase + UTCR3) sport 53 drivers/tty/serial/sa1100.c #define UART_GET_UTSR0(sport) __raw_readl((sport)->port.membase + UTSR0) sport 54 drivers/tty/serial/sa1100.c #define UART_GET_UTSR1(sport) __raw_readl((sport)->port.membase + UTSR1) sport 55 drivers/tty/serial/sa1100.c #define UART_GET_CHAR(sport) __raw_readl((sport)->port.membase + UTDR) sport 57 drivers/tty/serial/sa1100.c #define UART_PUT_UTCR0(sport,v) __raw_writel((v),(sport)->port.membase + UTCR0) sport 58 drivers/tty/serial/sa1100.c #define UART_PUT_UTCR1(sport,v) __raw_writel((v),(sport)->port.membase + UTCR1) sport 59 drivers/tty/serial/sa1100.c #define UART_PUT_UTCR2(sport,v) __raw_writel((v),(sport)->port.membase + UTCR2) sport 60 drivers/tty/serial/sa1100.c #define UART_PUT_UTCR3(sport,v) __raw_writel((v),(sport)->port.membase + UTCR3) sport 61 drivers/tty/serial/sa1100.c #define UART_PUT_UTSR0(sport,v) __raw_writel((v),(sport)->port.membase + UTSR0) sport 62 drivers/tty/serial/sa1100.c #define UART_PUT_UTSR1(sport,v) __raw_writel((v),(sport)->port.membase + UTSR1) sport 63 drivers/tty/serial/sa1100.c #define UART_PUT_CHAR(sport,v) __raw_writel((v),(sport)->port.membase + UTDR) sport 88 drivers/tty/serial/sa1100.c static void sa1100_mctrl_check(struct sa1100_port *sport) sport 92 drivers/tty/serial/sa1100.c status = sport->port.ops->get_mctrl(&sport->port); sport 93 drivers/tty/serial/sa1100.c changed = status ^ sport->old_status; sport 98 drivers/tty/serial/sa1100.c sport->old_status = status; sport 101 drivers/tty/serial/sa1100.c sport->port.icount.rng++; sport 103 drivers/tty/serial/sa1100.c sport->port.icount.dsr++; sport 105 drivers/tty/serial/sa1100.c uart_handle_dcd_change(&sport->port, status & TIOCM_CAR); sport 107 drivers/tty/serial/sa1100.c uart_handle_cts_change(&sport->port, status & TIOCM_CTS); sport 109 drivers/tty/serial/sa1100.c wake_up_interruptible(&sport->port.state->port.delta_msr_wait); sport 118 drivers/tty/serial/sa1100.c struct sa1100_port *sport = from_timer(sport, t, timer); sport 121 drivers/tty/serial/sa1100.c if (sport->port.state) { sport 122 drivers/tty/serial/sa1100.c spin_lock_irqsave(&sport->port.lock, flags); sport 123 drivers/tty/serial/sa1100.c sa1100_mctrl_check(sport); sport 124 drivers/tty/serial/sa1100.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 126 drivers/tty/serial/sa1100.c mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); sport 135 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 139 drivers/tty/serial/sa1100.c utcr3 = UART_GET_UTCR3(sport); sport 140 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_TIE); sport 141 drivers/tty/serial/sa1100.c sport->port.read_status_mask &= ~UTSR0_TO_SM(UTSR0_TFS); sport 149 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 153 drivers/tty/serial/sa1100.c utcr3 = UART_GET_UTCR3(sport); sport 154 drivers/tty/serial/sa1100.c sport->port.read_status_mask |= UTSR0_TO_SM(UTSR0_TFS); sport 155 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, utcr3 | UTCR3_TIE); sport 163 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 167 drivers/tty/serial/sa1100.c utcr3 = UART_GET_UTCR3(sport); sport 168 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_RIE); sport 176 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 179 drivers/tty/serial/sa1100.c mod_timer(&sport->timer, jiffies); sport 181 drivers/tty/serial/sa1100.c mctrl_gpio_enable_ms(sport->gpios); sport 185 drivers/tty/serial/sa1100.c sa1100_rx_chars(struct sa1100_port *sport) sport 189 drivers/tty/serial/sa1100.c status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) | sport 190 drivers/tty/serial/sa1100.c UTSR0_TO_SM(UART_GET_UTSR0(sport)); sport 192 drivers/tty/serial/sa1100.c ch = UART_GET_CHAR(sport); sport 194 drivers/tty/serial/sa1100.c sport->port.icount.rx++; sport 204 drivers/tty/serial/sa1100.c sport->port.icount.parity++; sport 206 drivers/tty/serial/sa1100.c sport->port.icount.frame++; sport 208 drivers/tty/serial/sa1100.c sport->port.icount.overrun++; sport 210 drivers/tty/serial/sa1100.c status &= sport->port.read_status_mask; sport 218 drivers/tty/serial/sa1100.c sport->port.sysrq = 0; sport 222 drivers/tty/serial/sa1100.c if (uart_handle_sysrq_char(&sport->port, ch)) sport 225 drivers/tty/serial/sa1100.c uart_insert_char(&sport->port, status, UTSR1_TO_SM(UTSR1_ROR), ch, flg); sport 228 drivers/tty/serial/sa1100.c status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) | sport 229 drivers/tty/serial/sa1100.c UTSR0_TO_SM(UART_GET_UTSR0(sport)); sport 232 drivers/tty/serial/sa1100.c spin_unlock(&sport->port.lock); sport 233 drivers/tty/serial/sa1100.c tty_flip_buffer_push(&sport->port.state->port); sport 234 drivers/tty/serial/sa1100.c spin_lock(&sport->port.lock); sport 237 drivers/tty/serial/sa1100.c static void sa1100_tx_chars(struct sa1100_port *sport) sport 239 drivers/tty/serial/sa1100.c struct circ_buf *xmit = &sport->port.state->xmit; sport 241 drivers/tty/serial/sa1100.c if (sport->port.x_char) { sport 242 drivers/tty/serial/sa1100.c UART_PUT_CHAR(sport, sport->port.x_char); sport 243 drivers/tty/serial/sa1100.c sport->port.icount.tx++; sport 244 drivers/tty/serial/sa1100.c sport->port.x_char = 0; sport 252 drivers/tty/serial/sa1100.c sa1100_mctrl_check(sport); sport 254 drivers/tty/serial/sa1100.c if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { sport 255 drivers/tty/serial/sa1100.c sa1100_stop_tx(&sport->port); sport 263 drivers/tty/serial/sa1100.c while (UART_GET_UTSR1(sport) & UTSR1_TNF) { sport 264 drivers/tty/serial/sa1100.c UART_PUT_CHAR(sport, xmit->buf[xmit->tail]); sport 266 drivers/tty/serial/sa1100.c sport->port.icount.tx++; sport 272 drivers/tty/serial/sa1100.c uart_write_wakeup(&sport->port); sport 275 drivers/tty/serial/sa1100.c sa1100_stop_tx(&sport->port); sport 280 drivers/tty/serial/sa1100.c struct sa1100_port *sport = dev_id; sport 283 drivers/tty/serial/sa1100.c spin_lock(&sport->port.lock); sport 284 drivers/tty/serial/sa1100.c status = UART_GET_UTSR0(sport); sport 285 drivers/tty/serial/sa1100.c status &= SM_TO_UTSR0(sport->port.read_status_mask) | ~UTSR0_TFS; sport 290 drivers/tty/serial/sa1100.c UART_PUT_UTSR0(sport, UTSR0_RID); sport 291 drivers/tty/serial/sa1100.c sa1100_rx_chars(sport); sport 296 drivers/tty/serial/sa1100.c UART_PUT_UTSR0(sport, status & (UTSR0_RBB | UTSR0_REB)); sport 299 drivers/tty/serial/sa1100.c sport->port.icount.brk++; sport 302 drivers/tty/serial/sa1100.c uart_handle_break(&sport->port); sport 305 drivers/tty/serial/sa1100.c sa1100_tx_chars(sport); sport 308 drivers/tty/serial/sa1100.c status = UART_GET_UTSR0(sport); sport 309 drivers/tty/serial/sa1100.c status &= SM_TO_UTSR0(sport->port.read_status_mask) | sport 312 drivers/tty/serial/sa1100.c spin_unlock(&sport->port.lock); sport 322 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 325 drivers/tty/serial/sa1100.c return UART_GET_UTSR1(sport) & UTSR1_TBY ? 0 : TIOCSER_TEMT; sport 330 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 334 drivers/tty/serial/sa1100.c mctrl_gpio_get(sport->gpios, &ret); sport 341 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 344 drivers/tty/serial/sa1100.c mctrl_gpio_set(sport->gpios, mctrl); sport 352 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 357 drivers/tty/serial/sa1100.c spin_lock_irqsave(&sport->port.lock, flags); sport 358 drivers/tty/serial/sa1100.c utcr3 = UART_GET_UTCR3(sport); sport 363 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, utcr3); sport 364 drivers/tty/serial/sa1100.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 369 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 376 drivers/tty/serial/sa1100.c retval = request_irq(sport->port.irq, sa1100_int, 0, sport 377 drivers/tty/serial/sa1100.c "sa11x0-uart", sport); sport 384 drivers/tty/serial/sa1100.c UART_PUT_UTSR0(sport, -1); sport 385 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, UTCR3_RXE | UTCR3_TXE | UTCR3_RIE); sport 390 drivers/tty/serial/sa1100.c spin_lock_irq(&sport->port.lock); sport 391 drivers/tty/serial/sa1100.c sa1100_enable_ms(&sport->port); sport 392 drivers/tty/serial/sa1100.c spin_unlock_irq(&sport->port.lock); sport 399 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 405 drivers/tty/serial/sa1100.c del_timer_sync(&sport->timer); sport 410 drivers/tty/serial/sa1100.c free_irq(sport->port.irq, sport); sport 415 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, 0); sport 422 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 457 drivers/tty/serial/sa1100.c spin_lock_irqsave(&sport->port.lock, flags); sport 459 drivers/tty/serial/sa1100.c sport->port.read_status_mask &= UTSR0_TO_SM(UTSR0_TFS); sport 460 drivers/tty/serial/sa1100.c sport->port.read_status_mask |= UTSR1_TO_SM(UTSR1_ROR); sport 462 drivers/tty/serial/sa1100.c sport->port.read_status_mask |= sport 465 drivers/tty/serial/sa1100.c sport->port.read_status_mask |= sport 471 drivers/tty/serial/sa1100.c sport->port.ignore_status_mask = 0; sport 473 drivers/tty/serial/sa1100.c sport->port.ignore_status_mask |= sport 476 drivers/tty/serial/sa1100.c sport->port.ignore_status_mask |= sport 483 drivers/tty/serial/sa1100.c sport->port.ignore_status_mask |= sport 487 drivers/tty/serial/sa1100.c del_timer_sync(&sport->timer); sport 497 drivers/tty/serial/sa1100.c old_utcr3 = UART_GET_UTCR3(sport); sport 498 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, old_utcr3 & ~(UTCR3_RIE | UTCR3_TIE)); sport 500 drivers/tty/serial/sa1100.c while (UART_GET_UTSR1(sport) & UTSR1_TBY) sport 504 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, 0); sport 507 drivers/tty/serial/sa1100.c UART_PUT_UTCR0(sport, utcr0); sport 511 drivers/tty/serial/sa1100.c UART_PUT_UTCR1(sport, ((quot & 0xf00) >> 8)); sport 512 drivers/tty/serial/sa1100.c UART_PUT_UTCR2(sport, (quot & 0xff)); sport 514 drivers/tty/serial/sa1100.c UART_PUT_UTSR0(sport, -1); sport 516 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, old_utcr3); sport 518 drivers/tty/serial/sa1100.c if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) sport 519 drivers/tty/serial/sa1100.c sa1100_enable_ms(&sport->port); sport 521 drivers/tty/serial/sa1100.c spin_unlock_irqrestore(&sport->port.lock, flags); sport 526 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 529 drivers/tty/serial/sa1100.c return sport->port.type == PORT_SA1100 ? "SA1100" : NULL; sport 537 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 540 drivers/tty/serial/sa1100.c release_mem_region(sport->port.mapbase, UART_PORT_SIZE); sport 548 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 551 drivers/tty/serial/sa1100.c return request_mem_region(sport->port.mapbase, UART_PORT_SIZE, sport 560 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 564 drivers/tty/serial/sa1100.c sa1100_request_port(&sport->port) == 0) sport 565 drivers/tty/serial/sa1100.c sport->port.type = PORT_SA1100; sport 576 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 582 drivers/tty/serial/sa1100.c if (sport->port.irq != ser->irq) sport 586 drivers/tty/serial/sa1100.c if (sport->port.uartclk / 16 != ser->baud_base) sport 588 drivers/tty/serial/sa1100.c if ((void *)sport->port.mapbase != ser->iomem_base) sport 590 drivers/tty/serial/sa1100.c if (sport->port.iobase != ser->port) sport 708 drivers/tty/serial/sa1100.c struct sa1100_port *sport = sport 711 drivers/tty/serial/sa1100.c while (!(UART_GET_UTSR1(sport) & UTSR1_TNF)) sport 713 drivers/tty/serial/sa1100.c UART_PUT_CHAR(sport, ch); sport 722 drivers/tty/serial/sa1100.c struct sa1100_port *sport = &sa1100_ports[co->index]; sport 728 drivers/tty/serial/sa1100.c old_utcr3 = UART_GET_UTCR3(sport); sport 729 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, (old_utcr3 & ~(UTCR3_RIE | UTCR3_TIE)) | sport 732 drivers/tty/serial/sa1100.c uart_console_write(&sport->port, s, count, sa1100_console_putchar); sport 739 drivers/tty/serial/sa1100.c status = UART_GET_UTSR1(sport); sport 741 drivers/tty/serial/sa1100.c UART_PUT_UTCR3(sport, old_utcr3); sport 749 drivers/tty/serial/sa1100.c sa1100_console_get_options(struct sa1100_port *sport, int *baud, sport 754 drivers/tty/serial/sa1100.c utcr3 = UART_GET_UTCR3(sport) & (UTCR3_RXE | UTCR3_TXE); sport 759 drivers/tty/serial/sa1100.c utcr0 = UART_GET_UTCR0(sport); sport 774 drivers/tty/serial/sa1100.c quot = UART_GET_UTCR2(sport) | UART_GET_UTCR1(sport) << 8; sport 776 drivers/tty/serial/sa1100.c *baud = sport->port.uartclk / (16 * (quot + 1)); sport 783 drivers/tty/serial/sa1100.c struct sa1100_port *sport; sport 796 drivers/tty/serial/sa1100.c sport = &sa1100_ports[co->index]; sport 801 drivers/tty/serial/sa1100.c sa1100_console_get_options(sport, &baud, &parity, &bits); sport 803 drivers/tty/serial/sa1100.c return uart_set_options(&sport->port, co, baud, parity, bits, flow); sport 842 drivers/tty/serial/sa1100.c struct sa1100_port *sport = platform_get_drvdata(dev); sport 844 drivers/tty/serial/sa1100.c if (sport) sport 845 drivers/tty/serial/sa1100.c uart_suspend_port(&sa1100_reg, &sport->port); sport 852 drivers/tty/serial/sa1100.c struct sa1100_port *sport = platform_get_drvdata(dev); sport 854 drivers/tty/serial/sa1100.c if (sport) sport 855 drivers/tty/serial/sa1100.c uart_resume_port(&sa1100_reg, &sport->port); sport 860 drivers/tty/serial/sa1100.c static int sa1100_serial_add_one_port(struct sa1100_port *sport, struct platform_device *dev) sport 862 drivers/tty/serial/sa1100.c sport->port.dev = &dev->dev; sport 867 drivers/tty/serial/sa1100.c sport->gpios = mctrl_gpio_init_noauto(sport->port.dev, 0); sport 868 drivers/tty/serial/sa1100.c if (IS_ERR(sport->gpios)) { sport 869 drivers/tty/serial/sa1100.c int err = PTR_ERR(sport->gpios); sport 871 drivers/tty/serial/sa1100.c dev_err(sport->port.dev, "failed to get mctrl gpios: %d\n", sport 877 drivers/tty/serial/sa1100.c sport->gpios = NULL; sport 880 drivers/tty/serial/sa1100.c platform_set_drvdata(dev, sport); sport 882 drivers/tty/serial/sa1100.c return uart_add_one_port(&sa1100_reg, &sport->port); sport 909 drivers/tty/serial/sa1100.c struct sa1100_port *sport = platform_get_drvdata(pdev); sport 911 drivers/tty/serial/sa1100.c if (sport) sport 912 drivers/tty/serial/sa1100.c uart_remove_one_port(&sa1100_reg, &sport->port); sport 100 drivers/tty/serial/sb1250-duart.c struct sbd_port sport[2]; sport 121 drivers/tty/serial/sb1250-duart.c static u64 __read_sbdchn(struct sbd_port *sport, int reg) sport 123 drivers/tty/serial/sb1250-duart.c void __iomem *csr = sport->port.membase + reg; sport 128 drivers/tty/serial/sb1250-duart.c static u64 __read_sbdshr(struct sbd_port *sport, int reg) sport 130 drivers/tty/serial/sb1250-duart.c void __iomem *csr = sport->memctrl + reg; sport 135 drivers/tty/serial/sb1250-duart.c static void __write_sbdchn(struct sbd_port *sport, int reg, u64 value) sport 137 drivers/tty/serial/sb1250-duart.c void __iomem *csr = sport->port.membase + reg; sport 142 drivers/tty/serial/sb1250-duart.c static void __write_sbdshr(struct sbd_port *sport, int reg, u64 value) sport 144 drivers/tty/serial/sb1250-duart.c void __iomem *csr = sport->memctrl + reg; sport 153 drivers/tty/serial/sb1250-duart.c static void __war_sbd1956(struct sbd_port *sport) sport 155 drivers/tty/serial/sb1250-duart.c __read_sbdchn(sport, R_DUART_MODE_REG_1); sport 156 drivers/tty/serial/sb1250-duart.c __read_sbdchn(sport, R_DUART_MODE_REG_2); sport 159 drivers/tty/serial/sb1250-duart.c static unsigned char read_sbdchn(struct sbd_port *sport, int reg) sport 163 drivers/tty/serial/sb1250-duart.c retval = __read_sbdchn(sport, reg); sport 165 drivers/tty/serial/sb1250-duart.c __war_sbd1956(sport); sport 169 drivers/tty/serial/sb1250-duart.c static unsigned char read_sbdshr(struct sbd_port *sport, int reg) sport 173 drivers/tty/serial/sb1250-duart.c retval = __read_sbdshr(sport, reg); sport 175 drivers/tty/serial/sb1250-duart.c __war_sbd1956(sport); sport 179 drivers/tty/serial/sb1250-duart.c static void write_sbdchn(struct sbd_port *sport, int reg, unsigned int value) sport 181 drivers/tty/serial/sb1250-duart.c __write_sbdchn(sport, reg, value); sport 183 drivers/tty/serial/sb1250-duart.c __war_sbd1956(sport); sport 186 drivers/tty/serial/sb1250-duart.c static void write_sbdshr(struct sbd_port *sport, int reg, unsigned int value) sport 188 drivers/tty/serial/sb1250-duart.c __write_sbdshr(sport, reg, value); sport 190 drivers/tty/serial/sb1250-duart.c __war_sbd1956(sport); sport 194 drivers/tty/serial/sb1250-duart.c static int sbd_receive_ready(struct sbd_port *sport) sport 196 drivers/tty/serial/sb1250-duart.c return read_sbdchn(sport, R_DUART_STATUS) & M_DUART_RX_RDY; sport 199 drivers/tty/serial/sb1250-duart.c static int sbd_receive_drain(struct sbd_port *sport) sport 203 drivers/tty/serial/sb1250-duart.c while (sbd_receive_ready(sport) && --loops) sport 204 drivers/tty/serial/sb1250-duart.c read_sbdchn(sport, R_DUART_RX_HOLD); sport 208 drivers/tty/serial/sb1250-duart.c static int __maybe_unused sbd_transmit_ready(struct sbd_port *sport) sport 210 drivers/tty/serial/sb1250-duart.c return read_sbdchn(sport, R_DUART_STATUS) & M_DUART_TX_RDY; sport 213 drivers/tty/serial/sb1250-duart.c static int __maybe_unused sbd_transmit_drain(struct sbd_port *sport) sport 217 drivers/tty/serial/sb1250-duart.c while (!sbd_transmit_ready(sport) && --loops) sport 222 drivers/tty/serial/sb1250-duart.c static int sbd_transmit_empty(struct sbd_port *sport) sport 224 drivers/tty/serial/sb1250-duart.c return read_sbdchn(sport, R_DUART_STATUS) & M_DUART_TX_EMT; sport 227 drivers/tty/serial/sb1250-duart.c static int sbd_line_drain(struct sbd_port *sport) sport 231 drivers/tty/serial/sb1250-duart.c while (!sbd_transmit_empty(sport) && --loops) sport 239 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 241 drivers/tty/serial/sb1250-duart.c return sbd_transmit_empty(sport) ? TIOCSER_TEMT : 0; sport 246 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 249 drivers/tty/serial/sb1250-duart.c status = read_sbdshr(sport, R_DUART_IN_PORT); sport 260 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 274 drivers/tty/serial/sb1250-duart.c mode2 = read_sbdchn(sport, R_DUART_MODE_REG_2); sport 281 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_CLEAR_OPR, clr); sport 282 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_SET_OPR, set); sport 283 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_MODE_REG_2, mode2); sport 288 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 290 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_DIS); sport 291 drivers/tty/serial/sb1250-duart.c sport->tx_stopped = 1; sport 296 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 300 drivers/tty/serial/sb1250-duart.c mask = read_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2)); sport 302 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), mask); sport 305 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_EN); sport 306 drivers/tty/serial/sb1250-duart.c sport->tx_stopped = 0; sport 311 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 313 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), 0); sport 318 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 320 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_AUXCTL_X, sport 326 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 329 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_START_BREAK); sport 331 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_STOP_BREAK); sport 335 drivers/tty/serial/sb1250-duart.c static void sbd_receive_chars(struct sbd_port *sport) sport 337 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 343 drivers/tty/serial/sb1250-duart.c status = read_sbdchn(sport, R_DUART_STATUS); sport 347 drivers/tty/serial/sb1250-duart.c ch = read_sbdchn(sport, R_DUART_RX_HOLD); sport 386 drivers/tty/serial/sb1250-duart.c static void sbd_transmit_chars(struct sbd_port *sport) sport 388 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 389 drivers/tty/serial/sb1250-duart.c struct circ_buf *xmit = &sport->port.state->xmit; sport 394 drivers/tty/serial/sb1250-duart.c if (sport->port.x_char) { sport 395 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_TX_HOLD, sport->port.x_char); sport 396 drivers/tty/serial/sb1250-duart.c sport->port.icount.tx++; sport 397 drivers/tty/serial/sb1250-duart.c sport->port.x_char = 0; sport 402 drivers/tty/serial/sb1250-duart.c stop_tx = (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)); sport 406 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_TX_HOLD, xmit->buf[xmit->tail]); sport 408 drivers/tty/serial/sb1250-duart.c sport->port.icount.tx++; sport 411 drivers/tty/serial/sb1250-duart.c uart_write_wakeup(&sport->port); sport 417 drivers/tty/serial/sb1250-duart.c mask = read_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2)); sport 419 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), mask); sport 423 drivers/tty/serial/sb1250-duart.c static void sbd_status_handle(struct sbd_port *sport) sport 425 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 428 drivers/tty/serial/sb1250-duart.c delta = read_sbdshr(sport, R_DUART_INCHREG((uport->line) % 2)); sport 444 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = dev_id; sport 445 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 451 drivers/tty/serial/sb1250-duart.c intstat = read_sbdshr(sport, sport 453 drivers/tty/serial/sb1250-duart.c intstat &= read_sbdshr(sport, sport 460 drivers/tty/serial/sb1250-duart.c sbd_receive_chars(sport); sport 462 drivers/tty/serial/sb1250-duart.c sbd_status_handle(sport); sport 464 drivers/tty/serial/sb1250-duart.c sbd_transmit_chars(sport); sport 475 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 479 drivers/tty/serial/sb1250-duart.c ret = request_irq(sport->port.irq, sbd_interrupt, sport 480 drivers/tty/serial/sb1250-duart.c IRQF_SHARED, "sb1250-duart", sport); sport 485 drivers/tty/serial/sb1250-duart.c sbd_receive_drain(sport); sport 488 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT); sport 489 drivers/tty/serial/sb1250-duart.c read_sbdshr(sport, R_DUART_INCHREG((uport->line) % 2)); sport 492 drivers/tty/serial/sb1250-duart.c mode1 = read_sbdchn(sport, R_DUART_MODE_REG_1); sport 494 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_MODE_REG_1, mode1); sport 497 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_DIS | M_DUART_RX_EN); sport 498 drivers/tty/serial/sb1250-duart.c sport->tx_stopped = 1; sport 501 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), sport 509 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 511 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_DIS | M_DUART_RX_DIS); sport 512 drivers/tty/serial/sb1250-duart.c sport->tx_stopped = 1; sport 513 drivers/tty/serial/sb1250-duart.c free_irq(sport->port.irq, sport); sport 517 drivers/tty/serial/sb1250-duart.c static void sbd_init_port(struct sbd_port *sport) sport 519 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 521 drivers/tty/serial/sb1250-duart.c if (sport->initialised) sport 525 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_RESET_TX); sport 526 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, V_DUART_MISC_CMD_RESET_RX); sport 527 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_MODE_REG_1, V_DUART_BITS_PER_CHAR_8); sport 528 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_MODE_REG_2, 0); sport 529 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_FULL_CTL, sport 531 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_OPCR_X, 0); sport 532 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_AUXCTL_X, 0); sport 533 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), 0); sport 535 drivers/tty/serial/sb1250-duart.c sport->initialised = 1; sport 541 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 620 drivers/tty/serial/sb1250-duart.c if (sport->tx_stopped) sport 625 drivers/tty/serial/sb1250-duart.c oldmode1 = read_sbdchn(sport, R_DUART_MODE_REG_1) & mode1mask; sport 626 drivers/tty/serial/sb1250-duart.c oldmode2 = read_sbdchn(sport, R_DUART_MODE_REG_2) & mode2mask; sport 627 drivers/tty/serial/sb1250-duart.c oldaux = read_sbdchn(sport, R_DUART_AUXCTL_X) & auxmask; sport 629 drivers/tty/serial/sb1250-duart.c if (!sport->tx_stopped) sport 630 drivers/tty/serial/sb1250-duart.c sbd_line_drain(sport); sport 631 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_DIS | M_DUART_RX_DIS); sport 633 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_MODE_REG_1, mode1 | oldmode1); sport 634 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_MODE_REG_2, mode2 | oldmode2); sport 635 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CLK_SEL, brg); sport 636 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_AUXCTL_X, aux | oldaux); sport 638 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, command); sport 651 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 652 drivers/tty/serial/sb1250-duart.c struct sbd_duart *duart = sport->duart; sport 654 drivers/tty/serial/sb1250-duart.c iounmap(sport->memctrl); sport 655 drivers/tty/serial/sb1250-duart.c sport->memctrl = NULL; sport 667 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 668 drivers/tty/serial/sb1250-duart.c struct sbd_duart *duart = sport->duart; sport 678 drivers/tty/serial/sb1250-duart.c if (!sport->memctrl) sport 679 drivers/tty/serial/sb1250-duart.c sport->memctrl = ioremap_nocache(duart->mapctrl, sport 681 drivers/tty/serial/sb1250-duart.c if (!sport->memctrl) { sport 728 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 736 drivers/tty/serial/sb1250-duart.c sbd_init_port(sport); sport 803 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = &sbd_duarts[chip].sport[side]; sport 804 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 806 drivers/tty/serial/sb1250-duart.c sport->duart = &sbd_duarts[chip]; sport 829 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = to_sport(uport); sport 831 drivers/tty/serial/sb1250-duart.c sbd_transmit_drain(sport); sport 832 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_TX_HOLD, ch); sport 840 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = &sbd_duarts[chip].sport[side]; sport 841 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 847 drivers/tty/serial/sb1250-duart.c mask = read_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2)); sport 848 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), sport 850 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_EN); sport 853 drivers/tty/serial/sb1250-duart.c uart_console_write(&sport->port, s, count, sbd_console_putchar); sport 857 drivers/tty/serial/sb1250-duart.c sbd_line_drain(sport); sport 858 drivers/tty/serial/sb1250-duart.c if (sport->tx_stopped) sport 859 drivers/tty/serial/sb1250-duart.c write_sbdchn(sport, R_DUART_CMD, M_DUART_TX_DIS); sport 860 drivers/tty/serial/sb1250-duart.c write_sbdshr(sport, R_DUART_IMRREG((uport->line) % 2), mask); sport 868 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = &sbd_duarts[chip].sport[side]; sport 869 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 876 drivers/tty/serial/sb1250-duart.c if (!sport->duart) sport 883 drivers/tty/serial/sb1250-duart.c sbd_init_port(sport); sport 940 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = &duart->sport[i % DUART_MAX_SIDE]; sport 941 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 943 drivers/tty/serial/sb1250-duart.c if (sport->duart) sport 957 drivers/tty/serial/sb1250-duart.c struct sbd_port *sport = &duart->sport[i % DUART_MAX_SIDE]; sport 958 drivers/tty/serial/sb1250-duart.c struct uart_port *uport = &sport->port; sport 960 drivers/tty/serial/sb1250-duart.c if (sport->duart) sport 2680 drivers/tty/serial/sh-sci.c struct sci_port *sport = to_sci_port(port); sport 2689 drivers/tty/serial/sh-sci.c port->membase = ioremap_nocache(port->mapbase, sport->reg_size); sport 2708 drivers/tty/serial/sh-sci.c struct sci_port *sport = to_sci_port(port); sport 2715 drivers/tty/serial/sh-sci.c release_mem_region(port->mapbase, sport->reg_size); sport 2721 drivers/tty/serial/sh-sci.c struct sci_port *sport = to_sci_port(port); sport 2724 drivers/tty/serial/sh-sci.c res = request_mem_region(port->mapbase, sport->reg_size, sport 2743 drivers/tty/serial/sh-sci.c struct sci_port *sport = to_sci_port(port); sport 2745 drivers/tty/serial/sh-sci.c port->type = sport->cfg->type; sport 3379 drivers/tty/serial/sh-sci.c struct sci_port *sport = dev_get_drvdata(dev); sport 3381 drivers/tty/serial/sh-sci.c if (sport) sport 3382 drivers/tty/serial/sh-sci.c uart_suspend_port(&sci_uart_driver, &sport->port); sport 3389 drivers/tty/serial/sh-sci.c struct sci_port *sport = dev_get_drvdata(dev); sport 3391 drivers/tty/serial/sh-sci.c if (sport) sport 3392 drivers/tty/serial/sh-sci.c uart_resume_port(&sci_uart_driver, &sport->port); sport 2550 fs/cifs/connect.c __be16 port, *sport; sport 2558 fs/cifs/connect.c sport = &((struct sockaddr_in *) &server->dstaddr)->sin_port; sport 2562 fs/cifs/connect.c sport = &((struct sockaddr_in6 *) &server->dstaddr)->sin6_port; sport 2572 fs/cifs/connect.c if (port == *sport) sport 2578 fs/cifs/connect.c return port == *sport; sport 3863 fs/cifs/connect.c __be16 sport; sport 3871 fs/cifs/connect.c sport = ((struct sockaddr_in6 *) saddr)->sin6_port; sport 3875 fs/cifs/connect.c sport = ((struct sockaddr_in *) saddr)->sin_port; sport 3948 fs/cifs/connect.c if (sport == htons(RFC1001_PORT)) sport 3957 fs/cifs/connect.c __be16 *sport; sport 3962 fs/cifs/connect.c sport = &addr6->sin6_port; sport 3964 fs/cifs/connect.c sport = &addr->sin_port; sport 3966 fs/cifs/connect.c if (*sport == 0) { sport 3970 fs/cifs/connect.c *sport = htons(CIFS_PORT); sport 3977 fs/cifs/connect.c *sport = htons(RFC1001_PORT); sport 584 fs/cifs/smbdirect.c __be16 *sport; sport 595 fs/cifs/smbdirect.c sport = &((struct sockaddr_in6 *)dstaddr)->sin6_port; sport 597 fs/cifs/smbdirect.c sport = &((struct sockaddr_in *)dstaddr)->sin_port; sport 599 fs/cifs/smbdirect.c *sport = htons(port); sport 301 fs/ocfs2/cluster/netdebug.c __be16 sport = 0, dport = 0; sport 311 fs/ocfs2/cluster/netdebug.c sport = (__force __be16)inet->inet_sport; sport 334 fs/ocfs2/cluster/netdebug.c &saddr, inet ? ntohs(sport) : 0, sport 32 include/linux/lsm_audit.h __be16 sport; sport 511 include/net/bluetooth/l2cap.h __le16 sport; sport 49 include/net/flow.h __be16 sport; sport 59 include/net/flow.h __le16 sport; sport 89 include/net/flow.h #define fl4_sport uli.ports.sport sport 102 include/net/flow.h __be16 dport, __be16 sport, sport 118 include/net/flow.h fl4->fl4_sport = sport; sport 148 include/net/flow.h #define fl6_sport uli.ports.sport sport 169 include/net/flow.h #define fld_sport uli.ports.sport sport 16 include/net/fou.h u8 *protocol, __be16 *sport, int type); sport 18 include/net/fou.h u8 *protocol, __be16 *sport, int type); sport 46 include/net/inet6_hashtables.h const __be16 sport, sport 55 include/net/inet6_hashtables.h const __be16 sport, sport 64 include/net/inet6_hashtables.h const __be16 sport, sport 71 include/net/inet6_hashtables.h sport, daddr, hnum, sport 77 include/net/inet6_hashtables.h return inet6_lookup_listener(net, hashinfo, skb, doff, saddr, sport, sport 83 include/net/inet6_hashtables.h const __be16 sport, sport 95 include/net/inet6_hashtables.h doff, &ipv6_hdr(skb)->saddr, sport, sport 102 include/net/inet6_hashtables.h const struct in6_addr *saddr, const __be16 sport, sport 259 include/net/inet_hashtables.h const __be32 saddr, const __be16 sport, sport 267 include/net/inet_hashtables.h __be32 saddr, __be16 sport, sport 270 include/net/inet_hashtables.h return __inet_lookup_listener(net, hashinfo, skb, doff, saddr, sport, sport 327 include/net/inet_hashtables.h const __be32 saddr, const __be16 sport, sport 333 include/net/inet_hashtables.h const __be32 saddr, const __be16 sport, sport 337 include/net/inet_hashtables.h return __inet_lookup_established(net, hashinfo, saddr, sport, daddr, sport 344 include/net/inet_hashtables.h const __be32 saddr, const __be16 sport, sport 352 include/net/inet_hashtables.h sk = __inet_lookup_established(net, hashinfo, saddr, sport, sport 359 include/net/inet_hashtables.h sport, daddr, hnum, dif, sdif); sport 365 include/net/inet_hashtables.h const __be32 saddr, const __be16 sport, sport 372 include/net/inet_hashtables.h sk = __inet_lookup(net, hashinfo, skb, doff, saddr, sport, daddr, sport 383 include/net/inet_hashtables.h const __be16 sport, sport 396 include/net/inet_hashtables.h doff, iph->saddr, sport, sport 91 include/net/ip_tunnels.h __be16 sport; sport 68 include/net/ipv6_stubs.h const struct in6_addr *saddr, __be16 sport, sport 78 include/net/netfilter/nf_tproxy.h const __be16 sport, const __be16 dport, sport 117 include/net/netfilter/nf_tproxy.h const __be16 sport, const __be16 dport, sport 43 include/net/phonet/phonet.h int pn_sock_get_port(struct sock *sk, unsigned short sport); sport 154 include/net/route.h __be16 dport, __be16 sport, sport 160 include/net/route.h daddr, saddr, dport, sport, sock_net_uid(net, sk)); sport 283 include/net/route.h __be16 sport, __be16 dport, sport 292 include/net/route.h protocol, flow_flags, dst, src, dport, sport, sport 299 include/net/route.h __be16 sport, __be16 dport, sport 306 include/net/route.h sport, dport, sk); sport 321 include/net/route.h __be16 sport, __be16 dport, sport 324 include/net/route.h if (sport != orig_sport || dport != orig_dport) { sport 326 include/net/route.h fl4->fl4_sport = sport; sport 738 include/net/sctp/structs.h __u16 sport, __u16 dport); sport 11 include/net/secure_seq.h __be16 sport, __be16 dport); sport 14 include/net/secure_seq.h __be16 sport, __be16 dport); sport 18 include/net/secure_seq.h __be16 sport, __be16 dport); sport 20 include/net/secure_seq.h __be16 sport, __be16 dport); sport 304 include/net/udp.h struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, sport 306 include/net/udp.h struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, sport 310 include/net/udp.h __be16 sport, __be16 dport); sport 312 include/net/udp.h const struct in6_addr *saddr, __be16 sport, sport 316 include/net/udp.h const struct in6_addr *saddr, __be16 sport, sport 321 include/net/udp.h __be16 sport, __be16 dport); sport 574 include/net/xfrm.h int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); sport 851 include/net/xfrm.h port = uli->ports.sport; sport 1672 include/net/xfrm.h int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); sport 253 include/rdma/ib_pack.h __be16 sport; sport 33 include/trace/events/fib.h __field( u16, sport ) sport 61 include/trace/events/fib.h __entry->sport = ntohs(flp->fl4_sport); sport 64 include/trace/events/fib.h __entry->sport = 0; sport 96 include/trace/events/fib.h __entry->src, __entry->sport, __entry->dst, __entry->dport, sport 30 include/trace/events/fib6.h __field( u16, sport ) sport 58 include/trace/events/fib6.h __entry->sport = ntohs(flp->fl6_sport); sport 61 include/trace/events/fib6.h __entry->sport = 0; sport 84 include/trace/events/fib6.h __entry->src, __entry->sport, __entry->dst, __entry->dport, sport 147 include/trace/events/sock.h __field(__u16, sport) sport 168 include/trace/events/sock.h __entry->sport = ntohs(inet->inet_sport); sport 196 include/trace/events/sock.h __entry->sport, __entry->dport, sport 60 include/trace/events/tcp.h __field(__u16, sport) sport 76 include/trace/events/tcp.h __entry->sport = ntohs(inet->inet_sport); sport 90 include/trace/events/tcp.h __entry->sport, __entry->dport, __entry->saddr, __entry->daddr, sport 126 include/trace/events/tcp.h __field(__u16, sport) sport 141 include/trace/events/tcp.h __entry->sport = ntohs(inet->inet_sport); sport 157 include/trace/events/tcp.h __entry->sport, __entry->dport, sport 193 include/trace/events/tcp.h __field(__u16, sport) sport 208 include/trace/events/tcp.h __entry->sport = ireq->ir_num; sport 222 include/trace/events/tcp.h __entry->sport, __entry->dport, sport 239 include/trace/events/tcp.h __field(__u16, sport) sport 264 include/trace/events/tcp.h __entry->sport = ntohs(inet->inet_sport); sport 3127 include/uapi/linux/bpf.h __be16 sport; sport 3133 include/uapi/linux/bpf.h __be16 sport; sport 3498 include/uapi/linux/bpf.h __be16 sport; sport 3561 include/uapi/linux/bpf.h __be16 sport; sport 44 include/uapi/linux/netfilter_bridge/ebt_ip.h __u16 sport[2]; sport 43 include/uapi/linux/netfilter_bridge/ebt_ip6.h __u16 sport[2]; sport 479 include/uapi/linux/rtnetlink.h __u16 sport; sport 54 include/uapi/linux/xfrm.h __be16 sport; sport 183 net/bluetooth/l2cap_core.c if (c->sport == psm && !bacmp(&c->src, src)) sport 202 net/bluetooth/l2cap_core.c chan->sport = psm; sport 222 net/bluetooth/l2cap_core.c chan->sport = cpu_to_le16(p); sport 7298 net/bluetooth/l2cap_core.c chan->sport = 0; sport 84 net/bridge/netfilter/ebt_ip.c src < info->sport[0] || sport 85 net/bridge/netfilter/ebt_ip.c src > info->sport[1])) sport 126 net/bridge/netfilter/ebt_ip.c if (info->bitmask & EBT_IP_SPORT && info->sport[0] > info->sport[1]) sport 91 net/bridge/netfilter/ebt_ip6.c src < info->sport[0] || sport 92 net/bridge/netfilter/ebt_ip6.c src > info->sport[1])) sport 127 net/bridge/netfilter/ebt_ip6.c if (info->bitmask & EBT_IP6_SPORT && info->sport[0] > info->sport[1]) sport 4649 net/core/filter.c fl4.fl4_sport = params->sport; sport 4771 net/core/filter.c fl6.fl6_sport = params->sport; sport 5219 net/core/filter.c src4, tuple->ipv4.sport, sport 5223 net/core/filter.c sk = __udp4_lib_lookup(net, src4, tuple->ipv4.sport, sport 5233 net/core/filter.c src6, tuple->ipv6.sport, sport 5238 net/core/filter.c src6, tuple->ipv6.sport, sport 830 net/core/flow_dissector.c key_ports->src = flow_keys->sport; sport 76 net/core/secure_seq.c __be16 sport, __be16 dport) sport 81 net/core/secure_seq.c __be16 sport; sport 86 net/core/secure_seq.c .sport = sport, sport 134 net/core/secure_seq.c __be16 sport, __be16 dport) sport 140 net/core/secure_seq.c (__force u32)sport << 16 | (__force u32)dport, sport 157 net/core/secure_seq.c __be16 sport, __be16 dport) sport 162 net/core/secure_seq.c (__force u32)sport << 16 | (__force u32)dport, sport 172 net/core/secure_seq.c __be16 sport, __be16 dport) sport 177 net/core/secure_seq.c __be16 sport; sport 182 net/core/secure_seq.c .sport = sport, sport 24 net/dccp/trace.h __field(__u16, sport) sport 49 net/dccp/trace.h __entry->sport = ntohs(inet->inet_sport); sport 233 net/ipv4/esp4.c __be16 sport, dport; sport 239 net/ipv4/esp4.c sport = encap->encap_sport; sport 249 net/ipv4/esp4.c uh->source = sport; sport 972 net/ipv4/fou.c u8 *protocol, __be16 *sport, int type) sport 980 net/ipv4/fou.c *sport = e->sport ? : udp_flow_src_port(dev_net(skb->dev), sport 988 net/ipv4/fou.c u8 *protocol, __be16 *sport, int type) sport 1010 net/ipv4/fou.c *sport = e->sport ? : udp_flow_src_port(dev_net(skb->dev), sport 1063 net/ipv4/fou.c struct flowi4 *fl4, u8 *protocol, __be16 sport) sport 1073 net/ipv4/fou.c uh->source = sport; sport 1086 net/ipv4/fou.c __be16 sport; sport 1089 net/ipv4/fou.c err = __fou_build_header(skb, e, protocol, &sport, type); sport 1093 net/ipv4/fou.c fou_build_udp(skb, e, fl4, protocol, sport); sport 1103 net/ipv4/fou.c __be16 sport; sport 1106 net/ipv4/fou.c err = __gue_build_header(skb, e, protocol, &sport, type); sport 1110 net/ipv4/fou.c fou_build_udp(skb, e, fl4, protocol, sport); sport 39 net/ipv4/inet_diag.c u16 sport; sport 567 net/ipv4/inet_diag.c yes = entry->sport == op[1].no; sport 570 net/ipv4/inet_diag.c yes = entry->sport >= op[1].no; sport 573 net/ipv4/inet_diag.c yes = entry->sport <= op[1].no; sport 595 net/ipv4/inet_diag.c entry->sport : entry->dport)) { sport 684 net/ipv4/inet_diag.c entry.sport = inet->inet_num; sport 260 net/ipv4/inet_hashtables.c const __be32 saddr, __be16 sport, sport 277 net/ipv4/inet_hashtables.c saddr, sport); sport 294 net/ipv4/inet_hashtables.c const __be32 saddr, __be16 sport, sport 306 net/ipv4/inet_hashtables.c saddr, sport, daddr, hnum, sport 316 net/ipv4/inet_hashtables.c saddr, sport, htonl(INADDR_ANY), hnum, sport 348 net/ipv4/inet_hashtables.c const __be32 saddr, const __be16 sport, sport 353 net/ipv4/inet_hashtables.c const __portpair ports = INET_COMBINED_PORTS(sport, hnum); sport 359 net/ipv4/inet_hashtables.c unsigned int hash = inet_ehashfn(net, daddr, hnum, saddr, sport); sport 1222 net/ipv4/ip_gre.c ipencap->sport = nla_get_be16(data[IFLA_GRE_ENCAP_SPORT]); sport 1492 net/ipv4/ip_gre.c t->encap.sport) || sport 474 net/ipv4/ip_tunnel.c t->encap.sport = ipencap->sport; sport 483 net/ipv4/ipip.c ipencap->sport = nla_get_be16(data[IFLA_IPTUN_ENCAP_SPORT]); sport 593 net/ipv4/ipip.c tunnel->encap.sport) || sport 342 net/ipv4/netfilter/ipt_CLUSTERIP.c u_int16_t sport = 0, dport = 0; sport 352 net/ipv4/netfilter/ipt_CLUSTERIP.c sport = ports[0]; sport 365 net/ipv4/netfilter/ipt_CLUSTERIP.c hashval = jhash_2words(ntohl(iph->saddr), sport, sport 369 net/ipv4/netfilter/ipt_CLUSTERIP.c hashval = jhash_3words(ntohl(iph->saddr), sport, dport, sport 77 net/ipv4/netfilter/nf_socket_ipv4.c const __be16 sport, const __be16 dport, sport 83 net/ipv4/netfilter/nf_socket_ipv4.c saddr, sport, daddr, dport, sport 86 net/ipv4/netfilter/nf_socket_ipv4.c return udp4_lib_lookup(net, saddr, sport, daddr, dport, sport 96 net/ipv4/netfilter/nf_socket_ipv4.c __be16 uninitialized_var(dport), uninitialized_var(sport); sport 118 net/ipv4/netfilter/nf_socket_ipv4.c sport = hp->source; sport 128 net/ipv4/netfilter/nf_socket_ipv4.c &sport, &dport)) sport 155 net/ipv4/netfilter/nf_socket_ipv4.c daddr, sport, dport, indev); sport 78 net/ipv4/netfilter/nf_tproxy_ipv4.c const __be16 sport, const __be16 dport, sport 98 net/ipv4/netfilter/nf_tproxy_ipv4.c saddr, sport, sport 112 net/ipv4/netfilter/nf_tproxy_ipv4.c saddr, sport, daddr, dport, sport 121 net/ipv4/netfilter/nf_tproxy_ipv4.c sk = udp4_lib_lookup(net, saddr, sport, daddr, dport, sport 146 net/ipv4/netfilter/nf_tproxy_ipv4.c protocol, ntohl(saddr), ntohs(sport), ntohl(daddr), ntohs(dport), lookup_type, sk); sport 2946 net/ipv4/route.c u8 ip_proto, __be16 sport, sport 2976 net/ipv4/route.c udph->source = sport; sport 2986 net/ipv4/route.c tcph->source = sport; sport 3081 net/ipv4/route.c __be16 sport = 0, dport = 0; sport 3117 net/ipv4/route.c sport = nla_get_be16(tb[RTA_SPORT]); sport 3122 net/ipv4/route.c skb = inet_rtm_getroute_build_skb(src, dst, ip_proto, sport, dport); sport 3132 net/ipv4/route.c if (sport) sport 3133 net/ipv4/route.c fl4.fl4_sport = sport; sport 48 net/ipv4/syncookies.c static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, sport 53 net/ipv4/syncookies.c (__force u32)sport << 16 | (__force u32)dport, sport 91 net/ipv4/syncookies.c static __u32 secure_tcp_syn_cookie(__be32 saddr, __be32 daddr, __be16 sport, sport 105 net/ipv4/syncookies.c return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + sport 107 net/ipv4/syncookies.c ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) sport 121 net/ipv4/syncookies.c __be16 sport, __be16 dport, __u32 sseq) sport 126 net/ipv4/syncookies.c cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; sport 134 net/ipv4/syncookies.c cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) sport 354 net/ipv4/udp.c __be32 saddr, __be16 sport, sport 380 net/ipv4/udp.c if (inet->inet_dport != sport) sport 410 net/ipv4/udp.c __be32 saddr, __be16 sport, sport 423 net/ipv4/udp.c score = compute_score(sk, net, saddr, sport, sport 429 net/ipv4/udp.c saddr, sport); sport 446 net/ipv4/udp.c __be16 sport, __be32 daddr, __be16 dport, int dif, sport 458 net/ipv4/udp.c result = udp4_lib_lookup2(net, saddr, sport, sport 466 net/ipv4/udp.c result = udp4_lib_lookup2(net, saddr, sport, sport 477 net/ipv4/udp.c __be16 sport, __be16 dport, sport 482 net/ipv4/udp.c return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport, sport 488 net/ipv4/udp.c __be16 sport, __be16 dport) sport 492 net/ipv4/udp.c return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport, sport 502 net/ipv4/udp.c struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, sport 507 net/ipv4/udp.c sk = __udp4_lib_lookup(net, saddr, sport, daddr, dport, sport 405 net/ipv4/udp_offload.c __be16 sport, __be16 dport)); sport 22 net/ipv6/fou6.c struct flowi6 *fl6, u8 *protocol, __be16 sport) sport 32 net/ipv6/fou6.c uh->source = sport; sport 43 net/ipv6/fou6.c __be16 sport; sport 48 net/ipv6/fou6.c err = __fou_build_header(skb, e, protocol, &sport, type); sport 52 net/ipv6/fou6.c fou6_build_udp(skb, e, fl6, protocol, sport); sport 60 net/ipv6/fou6.c __be16 sport; sport 65 net/ipv6/fou6.c err = __gue_build_header(skb, e, protocol, &sport, type); sport 69 net/ipv6/fou6.c fou6_build_udp(skb, e, fl6, protocol, sport); sport 52 net/ipv6/inet6_hashtables.c const __be16 sport, sport 59 net/ipv6/inet6_hashtables.c const __portpair ports = INET_COMBINED_PORTS(sport, hnum); sport 63 net/ipv6/inet6_hashtables.c unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); sport 119 net/ipv6/inet6_hashtables.c const __be16 sport, const struct in6_addr *daddr, sport 135 net/ipv6/inet6_hashtables.c saddr, sport); sport 153 net/ipv6/inet6_hashtables.c const __be16 sport, const struct in6_addr *daddr, sport 164 net/ipv6/inet6_hashtables.c saddr, sport, daddr, hnum, sport 174 net/ipv6/inet6_hashtables.c saddr, sport, &in6addr_any, hnum, sport 185 net/ipv6/inet6_hashtables.c const struct in6_addr *saddr, const __be16 sport, sport 192 net/ipv6/inet6_hashtables.c sk = __inet6_lookup(net, hashinfo, skb, doff, saddr, sport, daddr, sport 1923 net/ipv6/ip6_gre.c ipencap->sport = nla_get_be16(data[IFLA_GRE_ENCAP_SPORT]); sport 2147 net/ipv6/ip6_gre.c t->encap.sport) || sport 1762 net/ipv6/ip6_tunnel.c t->encap.sport = ipencap->sport; sport 1983 net/ipv6/ip6_tunnel.c ipencap->sport = nla_get_be16(data[IFLA_IPTUN_ENCAP_SPORT]); sport 2123 net/ipv6/ip6_tunnel.c nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) || sport 238 net/ipv6/mip6.c sel.sport = xfrm_flowi_sport(fl, &fl6->uli); sport 239 net/ipv6/mip6.c if (sel.sport) sport 81 net/ipv6/netfilter/nf_socket_ipv6.c const __be16 sport, const __be16 dport, sport 87 net/ipv6/netfilter/nf_socket_ipv6.c saddr, sport, daddr, dport, sport 90 net/ipv6/netfilter/nf_socket_ipv6.c return udp6_lib_lookup(net, saddr, sport, daddr, dport, sport 100 net/ipv6/netfilter/nf_socket_ipv6.c __be16 uninitialized_var(dport), uninitialized_var(sport); sport 123 net/ipv6/netfilter/nf_socket_ipv6.c sport = hp->source; sport 135 net/ipv6/netfilter/nf_socket_ipv6.c &sport, &dport, &ipv6_var)) sport 142 net/ipv6/netfilter/nf_socket_ipv6.c sport, dport, indev); sport 79 net/ipv6/netfilter/nf_tproxy_ipv6.c const __be16 sport, const __be16 dport, sport 98 net/ipv6/netfilter/nf_tproxy_ipv6.c saddr, sport, sport 112 net/ipv6/netfilter/nf_tproxy_ipv6.c saddr, sport, daddr, ntohs(dport), sport 121 net/ipv6/netfilter/nf_tproxy_ipv6.c sk = udp6_lib_lookup(net, saddr, sport, daddr, dport, sport 145 net/ipv6/netfilter/nf_tproxy_ipv6.c protocol, saddr, ntohs(sport), daddr, ntohs(dport), lookup_type, sk); sport 1516 net/ipv6/sit.c ipencap->sport = nla_get_be16(data[IFLA_IPTUN_ENCAP_SPORT]); sport 1731 net/ipv6/sit.c tunnel->encap.sport) || sport 42 net/ipv6/syncookies.c __be16 sport, __be16 dport, u32 count, int c) sport 48 net/ipv6/syncookies.c __be16 sport; sport 54 net/ipv6/syncookies.c .sport = sport, sport 65 net/ipv6/syncookies.c __be16 sport, __be16 dport, __u32 sseq, sport 69 net/ipv6/syncookies.c return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + sport 71 net/ipv6/syncookies.c ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) sport 76 net/ipv6/syncookies.c const struct in6_addr *daddr, __be16 sport, sport 81 net/ipv6/syncookies.c cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; sport 88 net/ipv6/syncookies.c cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) sport 102 net/ipv6/udp.c const struct in6_addr *saddr, __be16 sport, sport 122 net/ipv6/udp.c if (inet->inet_dport != sport) sport 146 net/ipv6/udp.c const struct in6_addr *saddr, __be16 sport, sport 158 net/ipv6/udp.c score = compute_score(sk, net, saddr, sport, sport 164 net/ipv6/udp.c saddr, sport); sport 180 net/ipv6/udp.c const struct in6_addr *saddr, __be16 sport, sport 194 net/ipv6/udp.c result = udp6_lib_lookup2(net, saddr, sport, sport 203 net/ipv6/udp.c result = udp6_lib_lookup2(net, saddr, sport, sport 214 net/ipv6/udp.c __be16 sport, __be16 dport, sport 219 net/ipv6/udp.c return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport, sport 225 net/ipv6/udp.c __be16 sport, __be16 dport) sport 229 net/ipv6/udp.c return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport, sport 239 net/ipv6/udp.c struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport, sport 244 net/ipv6/udp.c sk = __udp6_lib_lookup(net, saddr, sport, daddr, dport, sport 961 net/key/af_key.c pfkey_sockaddr_fill(&x->sel.saddr, x->sel.sport, sport 2084 net/key/af_key.c xp->selector.sport, sport 2271 net/key/af_key.c xp->selector.sport = ((struct sockaddr_in *)(sa+1))->sin_port; sport 2272 net/key/af_key.c if (xp->selector.sport) sport 2378 net/key/af_key.c sel.sport = ((struct sockaddr_in *)(sa+1))->sin_port; sport 2379 net/key/af_key.c if (sel.sport) sport 2586 net/key/af_key.c sel.sport = ((struct sockaddr_in *)(sa + 1))->sin_port; sport 2587 net/key/af_key.c if (sel.sport) sport 3328 net/key/af_key.c static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport) sport 3430 net/key/af_key.c n_port->sadb_x_nat_t_port_port = sport; sport 1026 net/netfilter/ipvs/ip_vs_xmit.c __be16 sport = udp_flow_src_port(net, skb, 0, 0, false); sport 1086 net/netfilter/ipvs/ip_vs_xmit.c udph->source = sport; sport 225 net/netfilter/nf_conntrack_core.c __be16 sport; sport 234 net/netfilter/nf_conntrack_core.c tuple->src.u.udp.port = inet_hdr->sport; sport 481 net/phonet/socket.c int pn_sock_get_port(struct sock *sk, unsigned short sport) sport 492 net/phonet/socket.c if (!sport) { sport 505 net/phonet/socket.c sport = port_cur; sport 512 net/phonet/socket.c pn_sockaddr_set_port(&try_sa, sport); sport 524 net/phonet/socket.c pn->sobject = pn_object(pn_addr(pn->sobject), sport); sport 187 net/rds/message.c void rds_message_populate_header(struct rds_header *hdr, __be16 sport, sport 191 net/rds/message.c hdr->h_sport = sport; sport 199 net/rds/rds.h #define RDS_HS_PROBE(sport, dport) \ sport 200 net/rds/rds.h ((sport == RDS_FLAG_PROBE_PORT && dport == 0) || \ sport 201 net/rds/rds.h (sport == 0 && dport == RDS_FLAG_PROBE_PORT)) sport 856 net/rds/rds.h void rds_message_populate_header(struct rds_header *hdr, __be16 sport, sport 820 net/rds/send.c struct rds_message *rm, __be16 sport, sport 862 net/rds/send.c rds_message_populate_header(&rm->m_inc.i_hdr, sport, dport, 0); sport 1426 net/rds/send.c rds_send_probe(struct rds_conn_path *cp, __be16 sport, sport 1455 net/rds/send.c rds_message_populate_header(&rm->m_inc.i_hdr, sport, dport, sport 1460 net/rds/send.c if (RDS_HS_PROBE(be16_to_cpu(sport), be16_to_cpu(dport)) && sport 144 net/sctp/output.c __u16 sport, __u16 dport) sport 149 net/sctp/output.c packet->source_port = sport; sport 764 net/sctp/outqueue.c const __u16 sport = asoc->base.bind_addr.port; sport 769 net/sctp/outqueue.c sctp_packet_init(&singleton, transport, sport, dport); sport 6220 net/sctp/sm_statefuns.c __u16 sport, dport; sport 6224 net/sctp/sm_statefuns.c sport = ntohs(chunk->sctp_hdr->dest); sport 6278 net/sctp/sm_statefuns.c sctp_packet_init(packet, transport, sport, dport); sport 201 net/xfrm/xfrm_policy.c !((xfrm_flowi_sport(fl, &fl4->uli) ^ sel->sport) & sel->sport_mask) && sport 214 net/xfrm/xfrm_policy.c !((xfrm_flowi_sport(fl, &fl6->uli) ^ sel->sport) & sel->sport_mask) && sport 860 net/xfrm/xfrm_state.c sel->sport = xfrm_flowi_sport(fl, &fl4->uli); sport 879 net/xfrm/xfrm_state.c sel->sport = xfrm_flowi_sport(fl, &fl6->uli); sport 2175 net/xfrm/xfrm_state.c int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport) sport 2183 net/xfrm/xfrm_state.c err = km->new_mapping(x, ipaddr, sport); sport 3293 net/xfrm/xfrm_user.c __be16 sport) sport 3309 net/xfrm/xfrm_user.c err = build_mapping(skb, x, ipaddr, sport); sport 74 samples/bpf/xdp_fwd_kern.c fib_params.sport = 0; sport 93 samples/bpf/xdp_fwd_kern.c fib_params.sport = 0; sport 64 security/lsm_audit.c ad->u.net->sport = th->source; sport 73 security/lsm_audit.c ad->u.net->sport = uh->source; sport 82 security/lsm_audit.c ad->u.net->sport = dh->dccph_sport; sport 90 security/lsm_audit.c ad->u.net->sport = sh->source; sport 140 security/lsm_audit.c ad->u.net->sport = th->source; sport 151 security/lsm_audit.c ad->u.net->sport = uh->source; sport 162 security/lsm_audit.c ad->u.net->sport = dh->dccph_sport; sport 172 security/lsm_audit.c ad->u.net->sport = sh->source; sport 373 security/lsm_audit.c a->u.net->sport, sport 381 security/lsm_audit.c a->u.net->sport, sport 4209 security/selinux/hooks.c ad->u.net->sport = th->source; sport 4225 security/selinux/hooks.c ad->u.net->sport = uh->source; sport 4241 security/selinux/hooks.c ad->u.net->sport = dh->dccph_sport; sport 4258 security/selinux/hooks.c ad->u.net->sport = sh->source; sport 4307 security/selinux/hooks.c ad->u.net->sport = th->source; sport 4319 security/selinux/hooks.c ad->u.net->sport = uh->source; sport 4331 security/selinux/hooks.c ad->u.net->sport = dh->dccph_sport; sport 4344 security/selinux/hooks.c ad->u.net->sport = sh->source; sport 4630 security/selinux/hooks.c ad.u.net->sport = htons(snum); sport 1411 sound/core/seq/seq_clientmgr.c struct snd_seq_client_port *sport, sport 1418 sound/core/seq/seq_clientmgr.c if (check_port_perm(sport, SNDRV_SEQ_PORT_CAP_NO_EXPORT)) sport 1429 sound/core/seq/seq_clientmgr.c if (! check_port_perm(sport, PERM_RD)) sport 1468 sound/core/seq/seq_clientmgr.c struct snd_seq_client_port *sport = NULL, *dport = NULL; sport 1474 sound/core/seq/seq_clientmgr.c if ((sport = snd_seq_port_use_ptr(sender, subs->sender.port)) == NULL) sport 1479 sound/core/seq/seq_clientmgr.c result = check_subscription_permission(client, sport, dport, subs); sport 1484 sound/core/seq/seq_clientmgr.c result = snd_seq_port_connect(client, sender, sport, receiver, dport, subs); sport 1489 sound/core/seq/seq_clientmgr.c if (sport) sport 1490 sound/core/seq/seq_clientmgr.c snd_seq_port_unlock(sport); sport 1510 sound/core/seq/seq_clientmgr.c struct snd_seq_client_port *sport = NULL, *dport = NULL; sport 1516 sound/core/seq/seq_clientmgr.c if ((sport = snd_seq_port_use_ptr(sender, subs->sender.port)) == NULL) sport 1521 sound/core/seq/seq_clientmgr.c result = check_subscription_permission(client, sport, dport, subs); sport 1525 sound/core/seq/seq_clientmgr.c result = snd_seq_port_disconnect(client, sender, sport, receiver, dport, subs); sport 1530 sound/core/seq/seq_clientmgr.c if (sport) sport 1531 sound/core/seq/seq_clientmgr.c snd_seq_port_unlock(sport); sport 1927 sound/core/seq/seq_clientmgr.c struct snd_seq_client_port *sport = NULL; sport 1932 sound/core/seq/seq_clientmgr.c if ((sport = snd_seq_port_use_ptr(sender, subs->sender.port)) == NULL) sport 1934 sound/core/seq/seq_clientmgr.c result = snd_seq_port_get_subscription(&sport->c_src, &subs->dest, sport 1937 sound/core/seq/seq_clientmgr.c if (sport) sport 1938 sound/core/seq/seq_clientmgr.c snd_seq_port_unlock(sport); sport 3127 tools/include/uapi/linux/bpf.h __be16 sport; sport 3133 tools/include/uapi/linux/bpf.h __be16 sport; sport 3498 tools/include/uapi/linux/bpf.h __be16 sport; sport 3561 tools/include/uapi/linux/bpf.h __be16 sport; sport 35 tools/testing/selftests/bpf/prog_tests/flow_dissector.c got.sport, expected.sport, \ sport 121 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 141 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 163 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 186 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 211 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 259 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 303 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 354 tools/testing/selftests/bpf/prog_tests/flow_dissector.c .sport = 80, sport 503 tools/testing/selftests/bpf/prog_tests/flow_dissector.c __u32 key = (__u32)(tests[i].keys.sport) << 16 | sport 77 tools/testing/selftests/bpf/progs/bpf_flow.c __u32 key = (__u32)(keys->sport) << 16 | keys->dport; sport 223 tools/testing/selftests/bpf/progs/bpf_flow.c keys->sport = tcp->source; sport 232 tools/testing/selftests/bpf/progs/bpf_flow.c keys->sport = udp->source; sport 30 tools/testing/selftests/bpf/progs/connect4_prog.c memset(&tuple.ipv4.sport, 0, sizeof(tuple.ipv4.sport)); sport 38 tools/testing/selftests/bpf/progs/connect6_prog.c memset(&tuple.ipv6.sport, 0, sizeof(tuple.ipv6.sport)); sport 79 tools/testing/selftests/bpf/progs/test_tcp_check_syncookie_kern.c tup.ipv4.sport = tcph->source; sport 111 tools/testing/selftests/bpf/progs/test_tcp_check_syncookie_kern.c tup.ipv6.sport = tcph->source; sport 188 tools/testing/selftests/net/reuseport_bpf.c static void send_from(struct test_params p, uint16_t sport, char *buf, sport 191 tools/testing/selftests/net/reuseport_bpf.c struct sockaddr * const saddr = new_any_sockaddr(p.send_family, sport); sport 219 tools/testing/selftests/net/reuseport_bpf.c int epfd, conn, i, sport, expected; sport 237 tools/testing/selftests/net/reuseport_bpf.c sport = p.send_port_min + data; sport 240 tools/testing/selftests/net/reuseport_bpf.c send_from(p, sport, send_buf, sizeof(ndata)); sport 267 tools/testing/selftests/net/reuseport_bpf.c expected = (sport % mod);