Searched refs:params (Results 1 - 200 of 1302) sorted by relevance

1234567

/linux-4.1.27/arch/tile/gxio/
H A Diorpc_mpipe.c29 struct alloc_buffer_stacks_param *params = &temp; gxio_mpipe_alloc_buffer_stacks() local
31 params->count = count; gxio_mpipe_alloc_buffer_stacks()
32 params->first = first; gxio_mpipe_alloc_buffer_stacks()
33 params->flags = flags; gxio_mpipe_alloc_buffer_stacks()
35 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_alloc_buffer_stacks()
36 sizeof(*params), gxio_mpipe_alloc_buffer_stacks()
57 struct init_buffer_stack_aux_param *params = &temp; gxio_mpipe_init_buffer_stack_aux() local
62 params->buffer.kernel.cpa = __cpa; gxio_mpipe_init_buffer_stack_aux()
63 params->buffer.kernel.size = mem_size; gxio_mpipe_init_buffer_stack_aux()
64 params->buffer.kernel.pte = __pte; gxio_mpipe_init_buffer_stack_aux()
65 params->buffer.kernel.flags = mem_flags; gxio_mpipe_init_buffer_stack_aux()
66 params->stack = stack; gxio_mpipe_init_buffer_stack_aux()
67 params->buffer_size_enum = buffer_size_enum; gxio_mpipe_init_buffer_stack_aux()
69 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_init_buffer_stack_aux()
70 sizeof(*params), gxio_mpipe_init_buffer_stack_aux()
88 struct alloc_notif_rings_param *params = &temp; gxio_mpipe_alloc_notif_rings() local
90 params->count = count; gxio_mpipe_alloc_notif_rings()
91 params->first = first; gxio_mpipe_alloc_notif_rings()
92 params->flags = flags; gxio_mpipe_alloc_notif_rings()
94 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_alloc_notif_rings()
95 sizeof(*params), GXIO_MPIPE_OP_ALLOC_NOTIF_RINGS); gxio_mpipe_alloc_notif_rings()
113 struct init_notif_ring_aux_param *params = &temp; gxio_mpipe_init_notif_ring_aux() local
118 params->buffer.kernel.cpa = __cpa; gxio_mpipe_init_notif_ring_aux()
119 params->buffer.kernel.size = mem_size; gxio_mpipe_init_notif_ring_aux()
120 params->buffer.kernel.pte = __pte; gxio_mpipe_init_notif_ring_aux()
121 params->buffer.kernel.flags = mem_flags; gxio_mpipe_init_notif_ring_aux()
122 params->ring = ring; gxio_mpipe_init_notif_ring_aux()
124 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_init_notif_ring_aux()
125 sizeof(*params), gxio_mpipe_init_notif_ring_aux()
142 struct request_notif_ring_interrupt_param *params = &temp; gxio_mpipe_request_notif_ring_interrupt() local
144 params->interrupt.kernel.x = inter_x; gxio_mpipe_request_notif_ring_interrupt()
145 params->interrupt.kernel.y = inter_y; gxio_mpipe_request_notif_ring_interrupt()
146 params->interrupt.kernel.ipi = inter_ipi; gxio_mpipe_request_notif_ring_interrupt()
147 params->interrupt.kernel.event = inter_event; gxio_mpipe_request_notif_ring_interrupt()
148 params->ring = ring; gxio_mpipe_request_notif_ring_interrupt()
150 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_request_notif_ring_interrupt()
151 sizeof(*params), gxio_mpipe_request_notif_ring_interrupt()
165 struct enable_notif_ring_interrupt_param *params = &temp; gxio_mpipe_enable_notif_ring_interrupt() local
167 params->ring = ring; gxio_mpipe_enable_notif_ring_interrupt()
169 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_enable_notif_ring_interrupt()
170 sizeof(*params), gxio_mpipe_enable_notif_ring_interrupt()
187 struct alloc_notif_groups_param *params = &temp; gxio_mpipe_alloc_notif_groups() local
189 params->count = count; gxio_mpipe_alloc_notif_groups()
190 params->first = first; gxio_mpipe_alloc_notif_groups()
191 params->flags = flags; gxio_mpipe_alloc_notif_groups()
193 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_alloc_notif_groups()
194 sizeof(*params), GXIO_MPIPE_OP_ALLOC_NOTIF_GROUPS); gxio_mpipe_alloc_notif_groups()
209 struct init_notif_group_param *params = &temp; gxio_mpipe_init_notif_group() local
211 params->group = group; gxio_mpipe_init_notif_group()
212 params->bits = bits; gxio_mpipe_init_notif_group()
214 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_init_notif_group()
215 sizeof(*params), GXIO_MPIPE_OP_INIT_NOTIF_GROUP); gxio_mpipe_init_notif_group()
230 struct alloc_buckets_param *params = &temp; gxio_mpipe_alloc_buckets() local
232 params->count = count; gxio_mpipe_alloc_buckets()
233 params->first = first; gxio_mpipe_alloc_buckets()
234 params->flags = flags; gxio_mpipe_alloc_buckets()
236 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_alloc_buckets()
237 sizeof(*params), GXIO_MPIPE_OP_ALLOC_BUCKETS); gxio_mpipe_alloc_buckets()
251 struct init_bucket_param *params = &temp; gxio_mpipe_init_bucket() local
253 params->bucket = bucket; gxio_mpipe_init_bucket()
254 params->bucket_info = bucket_info; gxio_mpipe_init_bucket()
256 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_init_bucket()
257 sizeof(*params), GXIO_MPIPE_OP_INIT_BUCKET); gxio_mpipe_init_bucket()
273 struct alloc_edma_rings_param *params = &temp; gxio_mpipe_alloc_edma_rings() local
275 params->count = count; gxio_mpipe_alloc_edma_rings()
276 params->first = first; gxio_mpipe_alloc_edma_rings()
277 params->flags = flags; gxio_mpipe_alloc_edma_rings()
279 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_alloc_edma_rings()
280 sizeof(*params), GXIO_MPIPE_OP_ALLOC_EDMA_RINGS); gxio_mpipe_alloc_edma_rings()
299 struct init_edma_ring_aux_param *params = &temp; gxio_mpipe_init_edma_ring_aux() local
304 params->buffer.kernel.cpa = __cpa; gxio_mpipe_init_edma_ring_aux()
305 params->buffer.kernel.size = mem_size; gxio_mpipe_init_edma_ring_aux()
306 params->buffer.kernel.pte = __pte; gxio_mpipe_init_edma_ring_aux()
307 params->buffer.kernel.flags = mem_flags; gxio_mpipe_init_edma_ring_aux()
308 params->ring = ring; gxio_mpipe_init_edma_ring_aux()
309 params->channel = channel; gxio_mpipe_init_edma_ring_aux()
311 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_init_edma_ring_aux()
312 sizeof(*params), GXIO_MPIPE_OP_INIT_EDMA_RING_AUX); gxio_mpipe_init_edma_ring_aux()
321 const void *params = blob; gxio_mpipe_commit_rules() local
323 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, blob_size, gxio_mpipe_commit_rules()
340 struct register_client_memory_param *params = &temp; gxio_mpipe_register_client_memory() local
342 params->iotlb = iotlb; gxio_mpipe_register_client_memory()
343 params->pte = pte; gxio_mpipe_register_client_memory()
344 params->flags = flags; gxio_mpipe_register_client_memory()
346 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_register_client_memory()
347 sizeof(*params), gxio_mpipe_register_client_memory()
362 struct link_open_aux_param *params = &temp; gxio_mpipe_link_open_aux() local
364 params->name = name; gxio_mpipe_link_open_aux()
365 params->flags = flags; gxio_mpipe_link_open_aux()
367 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_link_open_aux()
368 sizeof(*params), GXIO_MPIPE_OP_LINK_OPEN_AUX); gxio_mpipe_link_open_aux()
380 struct link_close_aux_param *params = &temp; gxio_mpipe_link_close_aux() local
382 params->mac = mac; gxio_mpipe_link_close_aux()
384 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_link_close_aux()
385 sizeof(*params), GXIO_MPIPE_OP_LINK_CLOSE_AUX); gxio_mpipe_link_close_aux()
400 struct link_set_attr_aux_param *params = &temp; gxio_mpipe_link_set_attr_aux() local
402 params->mac = mac; gxio_mpipe_link_set_attr_aux()
403 params->attr = attr; gxio_mpipe_link_set_attr_aux()
404 params->val = val; gxio_mpipe_link_set_attr_aux()
406 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_link_set_attr_aux()
407 sizeof(*params), GXIO_MPIPE_OP_LINK_SET_ATTR_AUX); gxio_mpipe_link_set_attr_aux()
423 struct get_timestamp_aux_param *params = &temp; gxio_mpipe_get_timestamp_aux() local
426 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_mpipe_get_timestamp_aux()
428 *sec = params->sec; gxio_mpipe_get_timestamp_aux()
429 *nsec = params->nsec; gxio_mpipe_get_timestamp_aux()
430 *cycles = params->cycles; gxio_mpipe_get_timestamp_aux()
447 struct set_timestamp_aux_param *params = &temp; gxio_mpipe_set_timestamp_aux() local
449 params->sec = sec; gxio_mpipe_set_timestamp_aux()
450 params->nsec = nsec; gxio_mpipe_set_timestamp_aux()
451 params->cycles = cycles; gxio_mpipe_set_timestamp_aux()
453 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_set_timestamp_aux()
454 sizeof(*params), GXIO_MPIPE_OP_SET_TIMESTAMP_AUX); gxio_mpipe_set_timestamp_aux()
466 struct adjust_timestamp_aux_param *params = &temp; gxio_mpipe_adjust_timestamp_aux() local
468 params->nsec = nsec; gxio_mpipe_adjust_timestamp_aux()
470 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_adjust_timestamp_aux()
471 sizeof(*params), gxio_mpipe_adjust_timestamp_aux()
489 struct config_edma_ring_blks_param *params = &temp; gxio_mpipe_config_edma_ring_blks() local
491 params->ering = ering; gxio_mpipe_config_edma_ring_blks()
492 params->max_blks = max_blks; gxio_mpipe_config_edma_ring_blks()
493 params->min_snf_blks = min_snf_blks; gxio_mpipe_config_edma_ring_blks()
494 params->db = db; gxio_mpipe_config_edma_ring_blks()
496 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_config_edma_ring_blks()
497 sizeof(*params), gxio_mpipe_config_edma_ring_blks()
510 struct adjust_timestamp_freq_param *params = &temp; gxio_mpipe_adjust_timestamp_freq() local
512 params->ppb = ppb; gxio_mpipe_adjust_timestamp_freq()
514 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_adjust_timestamp_freq()
515 sizeof(*params), gxio_mpipe_adjust_timestamp_freq()
528 struct arm_pollfd_param *params = &temp; gxio_mpipe_arm_pollfd() local
530 params->pollfd.kernel.cookie = pollfd_cookie; gxio_mpipe_arm_pollfd()
532 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_arm_pollfd()
533 sizeof(*params), GXIO_MPIPE_OP_ARM_POLLFD); gxio_mpipe_arm_pollfd()
545 struct close_pollfd_param *params = &temp; gxio_mpipe_close_pollfd() local
547 params->pollfd.kernel.cookie = pollfd_cookie; gxio_mpipe_close_pollfd()
549 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_close_pollfd()
550 sizeof(*params), GXIO_MPIPE_OP_CLOSE_POLLFD); gxio_mpipe_close_pollfd()
563 struct get_mmio_base_param *params = &temp; gxio_mpipe_get_mmio_base() local
566 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_mpipe_get_mmio_base()
568 *base = params->base; gxio_mpipe_get_mmio_base()
584 struct check_mmio_offset_param *params = &temp; gxio_mpipe_check_mmio_offset() local
586 params->offset = offset; gxio_mpipe_check_mmio_offset()
587 params->size = size; gxio_mpipe_check_mmio_offset()
589 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_check_mmio_offset()
590 sizeof(*params), GXIO_MPIPE_OP_CHECK_MMIO_OFFSET); gxio_mpipe_check_mmio_offset()
H A Diorpc_trio.c28 struct alloc_asids_param *params = &temp; gxio_trio_alloc_asids() local
30 params->count = count; gxio_trio_alloc_asids()
31 params->first = first; gxio_trio_alloc_asids()
32 params->flags = flags; gxio_trio_alloc_asids()
34 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_alloc_asids()
35 sizeof(*params), GXIO_TRIO_OP_ALLOC_ASIDS); gxio_trio_alloc_asids()
52 struct alloc_memory_maps_param *params = &temp; gxio_trio_alloc_memory_maps() local
54 params->count = count; gxio_trio_alloc_memory_maps()
55 params->first = first; gxio_trio_alloc_memory_maps()
56 params->flags = flags; gxio_trio_alloc_memory_maps()
58 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_alloc_memory_maps()
59 sizeof(*params), GXIO_TRIO_OP_ALLOC_MEMORY_MAPS); gxio_trio_alloc_memory_maps()
75 struct alloc_scatter_queues_param *params = &temp; gxio_trio_alloc_scatter_queues() local
77 params->count = count; gxio_trio_alloc_scatter_queues()
78 params->first = first; gxio_trio_alloc_scatter_queues()
79 params->flags = flags; gxio_trio_alloc_scatter_queues()
81 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_alloc_scatter_queues()
82 sizeof(*params), gxio_trio_alloc_scatter_queues()
99 struct alloc_pio_regions_param *params = &temp; gxio_trio_alloc_pio_regions() local
101 params->count = count; gxio_trio_alloc_pio_regions()
102 params->first = first; gxio_trio_alloc_pio_regions()
103 params->flags = flags; gxio_trio_alloc_pio_regions()
105 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_alloc_pio_regions()
106 sizeof(*params), GXIO_TRIO_OP_ALLOC_PIO_REGIONS); gxio_trio_alloc_pio_regions()
123 struct init_pio_region_aux_param *params = &temp; gxio_trio_init_pio_region_aux() local
125 params->pio_region = pio_region; gxio_trio_init_pio_region_aux()
126 params->mac = mac; gxio_trio_init_pio_region_aux()
127 params->bus_address_hi = bus_address_hi; gxio_trio_init_pio_region_aux()
128 params->flags = flags; gxio_trio_init_pio_region_aux()
130 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_init_pio_region_aux()
131 sizeof(*params), GXIO_TRIO_OP_INIT_PIO_REGION_AUX); gxio_trio_init_pio_region_aux()
156 struct init_memory_map_mmu_aux_param *params = &temp; gxio_trio_init_memory_map_mmu_aux() local
158 params->map = map; gxio_trio_init_memory_map_mmu_aux()
159 params->va = va; gxio_trio_init_memory_map_mmu_aux()
160 params->size = size; gxio_trio_init_memory_map_mmu_aux()
161 params->asid = asid; gxio_trio_init_memory_map_mmu_aux()
162 params->mac = mac; gxio_trio_init_memory_map_mmu_aux()
163 params->bus_address = bus_address; gxio_trio_init_memory_map_mmu_aux()
164 params->node = node; gxio_trio_init_memory_map_mmu_aux()
165 params->order_mode = order_mode; gxio_trio_init_memory_map_mmu_aux()
167 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_init_memory_map_mmu_aux()
168 sizeof(*params), gxio_trio_init_memory_map_mmu_aux()
183 struct get_port_property_param *params = &temp; gxio_trio_get_port_property() local
186 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_trio_get_port_property()
188 *trio_ports = params->trio_ports; gxio_trio_get_port_property()
206 struct config_legacy_intr_param *params = &temp; gxio_trio_config_legacy_intr() local
208 params->interrupt.kernel.x = inter_x; gxio_trio_config_legacy_intr()
209 params->interrupt.kernel.y = inter_y; gxio_trio_config_legacy_intr()
210 params->interrupt.kernel.ipi = inter_ipi; gxio_trio_config_legacy_intr()
211 params->interrupt.kernel.event = inter_event; gxio_trio_config_legacy_intr()
212 params->mac = mac; gxio_trio_config_legacy_intr()
213 params->intx = intx; gxio_trio_config_legacy_intr()
215 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_config_legacy_intr()
216 sizeof(*params), GXIO_TRIO_OP_CONFIG_LEGACY_INTR); gxio_trio_config_legacy_intr()
237 struct config_msi_intr_param *params = &temp; gxio_trio_config_msi_intr() local
239 params->interrupt.kernel.x = inter_x; gxio_trio_config_msi_intr()
240 params->interrupt.kernel.y = inter_y; gxio_trio_config_msi_intr()
241 params->interrupt.kernel.ipi = inter_ipi; gxio_trio_config_msi_intr()
242 params->interrupt.kernel.event = inter_event; gxio_trio_config_msi_intr()
243 params->mac = mac; gxio_trio_config_msi_intr()
244 params->mem_map = mem_map; gxio_trio_config_msi_intr()
245 params->mem_map_base = mem_map_base; gxio_trio_config_msi_intr()
246 params->mem_map_limit = mem_map_limit; gxio_trio_config_msi_intr()
247 params->asid = asid; gxio_trio_config_msi_intr()
249 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_config_msi_intr()
250 sizeof(*params), GXIO_TRIO_OP_CONFIG_MSI_INTR); gxio_trio_config_msi_intr()
266 struct set_mps_mrs_param *params = &temp; gxio_trio_set_mps_mrs() local
268 params->mps = mps; gxio_trio_set_mps_mrs()
269 params->mrs = mrs; gxio_trio_set_mps_mrs()
270 params->mac = mac; gxio_trio_set_mps_mrs()
272 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_set_mps_mrs()
273 sizeof(*params), GXIO_TRIO_OP_SET_MPS_MRS); gxio_trio_set_mps_mrs()
285 struct force_rc_link_up_param *params = &temp; gxio_trio_force_rc_link_up() local
287 params->mac = mac; gxio_trio_force_rc_link_up()
289 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_force_rc_link_up()
290 sizeof(*params), GXIO_TRIO_OP_FORCE_RC_LINK_UP); gxio_trio_force_rc_link_up()
302 struct force_ep_link_up_param *params = &temp; gxio_trio_force_ep_link_up() local
304 params->mac = mac; gxio_trio_force_ep_link_up()
306 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_force_ep_link_up()
307 sizeof(*params), GXIO_TRIO_OP_FORCE_EP_LINK_UP); gxio_trio_force_ep_link_up()
320 struct get_mmio_base_param *params = &temp; gxio_trio_get_mmio_base() local
323 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_trio_get_mmio_base()
325 *base = params->base; gxio_trio_get_mmio_base()
341 struct check_mmio_offset_param *params = &temp; gxio_trio_check_mmio_offset() local
343 params->offset = offset; gxio_trio_check_mmio_offset()
344 params->size = size; gxio_trio_check_mmio_offset()
346 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_trio_check_mmio_offset()
347 sizeof(*params), GXIO_TRIO_OP_CHECK_MMIO_OFFSET); gxio_trio_check_mmio_offset()
H A Diorpc_mpipe_info.c26 struct instance_aux_param *params = &temp; gxio_mpipe_info_instance_aux() local
28 params->name = name; gxio_mpipe_info_instance_aux()
30 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_info_instance_aux()
31 sizeof(*params), GXIO_MPIPE_INFO_OP_INSTANCE_AUX); gxio_mpipe_info_instance_aux()
48 struct enumerate_aux_param *params = &temp; gxio_mpipe_info_enumerate_aux() local
51 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_mpipe_info_enumerate_aux()
54 *name = params->name; gxio_mpipe_info_enumerate_aux()
55 *mac = params->mac; gxio_mpipe_info_enumerate_aux()
71 struct get_mmio_base_param *params = &temp; gxio_mpipe_info_get_mmio_base() local
74 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_mpipe_info_get_mmio_base()
76 *base = params->base; gxio_mpipe_info_get_mmio_base()
92 struct check_mmio_offset_param *params = &temp; gxio_mpipe_info_check_mmio_offset() local
94 params->offset = offset; gxio_mpipe_info_check_mmio_offset()
95 params->size = size; gxio_mpipe_info_check_mmio_offset()
97 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_mpipe_info_check_mmio_offset()
98 sizeof(*params), gxio_mpipe_info_check_mmio_offset()
H A Diorpc_globals.c25 struct arm_pollfd_param *params = &temp; __iorpc_arm_pollfd() local
27 params->pollfd.kernel.cookie = pollfd_cookie; __iorpc_arm_pollfd()
29 return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), __iorpc_arm_pollfd()
42 struct close_pollfd_param *params = &temp; __iorpc_close_pollfd() local
44 params->pollfd.kernel.cookie = pollfd_cookie; __iorpc_close_pollfd()
46 return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), __iorpc_close_pollfd()
60 struct get_mmio_base_param *params = &temp; __iorpc_get_mmio_base() local
63 hv_dev_pread(fd, 0, (HV_VirtAddr) params, sizeof(*params), __iorpc_get_mmio_base()
65 *base = params->base; __iorpc_get_mmio_base()
80 struct check_mmio_offset_param *params = &temp; __iorpc_check_mmio_offset() local
82 params->offset = offset; __iorpc_check_mmio_offset()
83 params->size = size; __iorpc_check_mmio_offset()
85 return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), __iorpc_check_mmio_offset()
H A Diorpc_usb_host.c26 struct cfg_interrupt_param *params = &temp; gxio_usb_host_cfg_interrupt() local
28 params->interrupt.kernel.x = inter_x; gxio_usb_host_cfg_interrupt()
29 params->interrupt.kernel.y = inter_y; gxio_usb_host_cfg_interrupt()
30 params->interrupt.kernel.ipi = inter_ipi; gxio_usb_host_cfg_interrupt()
31 params->interrupt.kernel.event = inter_event; gxio_usb_host_cfg_interrupt()
33 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_usb_host_cfg_interrupt()
34 sizeof(*params), GXIO_USB_HOST_OP_CFG_INTERRUPT); gxio_usb_host_cfg_interrupt()
48 struct register_client_memory_param *params = &temp; gxio_usb_host_register_client_memory() local
50 params->pte = pte; gxio_usb_host_register_client_memory()
51 params->flags = flags; gxio_usb_host_register_client_memory()
53 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_usb_host_register_client_memory()
54 sizeof(*params), gxio_usb_host_register_client_memory()
68 struct get_mmio_base_param *params = &temp; gxio_usb_host_get_mmio_base() local
71 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_usb_host_get_mmio_base()
73 *base = params->base; gxio_usb_host_get_mmio_base()
89 struct check_mmio_offset_param *params = &temp; gxio_usb_host_check_mmio_offset() local
91 params->offset = offset; gxio_usb_host_check_mmio_offset()
92 params->size = size; gxio_usb_host_check_mmio_offset()
94 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_usb_host_check_mmio_offset()
95 sizeof(*params), gxio_usb_host_check_mmio_offset()
H A Diorpc_uart.c26 struct cfg_interrupt_param *params = &temp; gxio_uart_cfg_interrupt() local
28 params->interrupt.kernel.x = inter_x; gxio_uart_cfg_interrupt()
29 params->interrupt.kernel.y = inter_y; gxio_uart_cfg_interrupt()
30 params->interrupt.kernel.ipi = inter_ipi; gxio_uart_cfg_interrupt()
31 params->interrupt.kernel.event = inter_event; gxio_uart_cfg_interrupt()
33 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_uart_cfg_interrupt()
34 sizeof(*params), GXIO_UART_OP_CFG_INTERRUPT); gxio_uart_cfg_interrupt()
47 struct get_mmio_base_param *params = &temp; gxio_uart_get_mmio_base() local
50 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), gxio_uart_get_mmio_base()
52 *base = params->base; gxio_uart_get_mmio_base()
68 struct check_mmio_offset_param *params = &temp; gxio_uart_check_mmio_offset() local
70 params->offset = offset; gxio_uart_check_mmio_offset()
71 params->size = size; gxio_uart_check_mmio_offset()
73 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, gxio_uart_check_mmio_offset()
74 sizeof(*params), GXIO_UART_OP_CHECK_MMIO_OFFSET); gxio_uart_check_mmio_offset()
/linux-4.1.27/tools/perf/util/
H A Dusage.c12 static void report(const char *prefix, const char *err, va_list params) report() argument
15 vsnprintf(msg, sizeof(msg), err, params); report()
25 static NORETURN void die_builtin(const char *err, va_list params) die_builtin() argument
27 report(" Fatal: ", err, params); die_builtin()
31 static void error_builtin(const char *err, va_list params) error_builtin() argument
33 report(" Error: ", err, params); error_builtin()
36 static void warn_builtin(const char *warn, va_list params) warn_builtin() argument
38 report(" Warning: ", warn, params); warn_builtin()
44 static void (*die_routine)(const char *err, va_list params) NORETURN = die_builtin;
45 static void (*error_routine)(const char *err, va_list params) = error_builtin;
46 static void (*warn_routine)(const char *err, va_list params) = warn_builtin;
48 void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN) set_die_routine()
60 va_list params; die() local
62 va_start(params, err); die()
63 die_routine(err, params); die()
64 va_end(params); die()
69 va_list params; error() local
71 va_start(params, err); error()
72 error_routine(err, params); error()
73 va_end(params); error()
79 va_list params; warning() local
81 va_start(params, warn); warning()
82 warn_routine(warn, params); warning()
83 va_end(params); warning()
/linux-4.1.27/drivers/staging/fsl-mc/bus/
H A Ddprc.c45 cmd.params[0] |= mc_enc(0, 32, container_id); dprc_open()
82 cmd.params[0] |= mc_enc(32, 16, cfg->icid); dprc_create_container()
83 cmd.params[0] |= mc_enc(0, 32, cfg->options); dprc_create_container()
84 cmd.params[1] |= mc_enc(32, 32, cfg->portal_id); dprc_create_container()
95 *child_container_id = mc_dec(cmd.params[1], 0, 32); dprc_create_container()
96 *child_portal_paddr = mc_dec(cmd.params[2], 0, 64); dprc_create_container()
110 cmd.params[0] |= mc_enc(0, 32, child_container_id); dprc_destroy_container()
125 cmd.params[0] |= mc_enc(0, 32, child_container_id); dprc_reset_container()
146 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_get_irq()
154 *irq_val = mc_dec(cmd.params[0], 0, 32); dprc_get_irq()
155 *irq_paddr = mc_dec(cmd.params[1], 0, 64); dprc_get_irq()
156 *user_irq_id = mc_dec(cmd.params[2], 0, 32); dprc_get_irq()
157 *type = mc_dec(cmd.params[2], 32, 32); dprc_get_irq()
175 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_set_irq()
176 cmd.params[0] |= mc_enc(0, 32, irq_val); dprc_set_irq()
177 cmd.params[1] |= mc_enc(0, 64, irq_paddr); dprc_set_irq()
178 cmd.params[2] |= mc_enc(0, 32, user_irq_id); dprc_set_irq()
195 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_get_irq_enable()
203 *en = mc_dec(cmd.params[0], 0, 8); dprc_get_irq_enable()
218 cmd.params[0] |= mc_enc(0, 8, en); dprc_set_irq_enable()
219 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_set_irq_enable()
236 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_get_irq_mask()
244 *mask = mc_dec(cmd.params[0], 0, 32); dprc_get_irq_mask()
259 cmd.params[0] |= mc_enc(0, 32, mask); dprc_set_irq_mask()
260 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_set_irq_mask()
277 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_get_irq_status()
285 *status = mc_dec(cmd.params[0], 0, 32); dprc_get_irq_status()
300 cmd.params[0] |= mc_enc(0, 32, status); dprc_clear_irq_status()
301 cmd.params[0] |= mc_enc(32, 8, irq_index); dprc_clear_irq_status()
325 attr->container_id = mc_dec(cmd.params[0], 0, 32); dprc_get_attributes()
326 attr->icid = mc_dec(cmd.params[0], 32, 16); dprc_get_attributes()
327 attr->options = mc_dec(cmd.params[1], 0, 32); dprc_get_attributes()
328 attr->portal_id = mc_dec(cmd.params[1], 32, 32); dprc_get_attributes()
329 attr->version.major = mc_dec(cmd.params[2], 0, 16); dprc_get_attributes()
330 attr->version.minor = mc_dec(cmd.params[2], 16, 16); dprc_get_attributes()
346 cmd.params[0] |= mc_enc(0, 32, child_container_id); dprc_set_res_quota()
347 cmd.params[0] |= mc_enc(32, 16, quota); dprc_set_res_quota()
348 cmd.params[1] |= mc_enc(0, 8, type[0]); dprc_set_res_quota()
349 cmd.params[1] |= mc_enc(8, 8, type[1]); dprc_set_res_quota()
350 cmd.params[1] |= mc_enc(16, 8, type[2]); dprc_set_res_quota()
351 cmd.params[1] |= mc_enc(24, 8, type[3]); dprc_set_res_quota()
352 cmd.params[1] |= mc_enc(32, 8, type[4]); dprc_set_res_quota()
353 cmd.params[1] |= mc_enc(40, 8, type[5]); dprc_set_res_quota()
354 cmd.params[1] |= mc_enc(48, 8, type[6]); dprc_set_res_quota()
355 cmd.params[1] |= mc_enc(56, 8, type[7]); dprc_set_res_quota()
356 cmd.params[2] |= mc_enc(0, 8, type[8]); dprc_set_res_quota()
357 cmd.params[2] |= mc_enc(8, 8, type[9]); dprc_set_res_quota()
358 cmd.params[2] |= mc_enc(16, 8, type[10]); dprc_set_res_quota()
359 cmd.params[2] |= mc_enc(24, 8, type[11]); dprc_set_res_quota()
360 cmd.params[2] |= mc_enc(32, 8, type[12]); dprc_set_res_quota()
361 cmd.params[2] |= mc_enc(40, 8, type[13]); dprc_set_res_quota()
362 cmd.params[2] |= mc_enc(48, 8, type[14]); dprc_set_res_quota()
363 cmd.params[2] |= mc_enc(56, 8, '\0'); dprc_set_res_quota()
381 cmd.params[0] |= mc_enc(0, 32, child_container_id); dprc_get_res_quota()
382 cmd.params[1] |= mc_enc(0, 8, type[0]); dprc_get_res_quota()
383 cmd.params[1] |= mc_enc(8, 8, type[1]); dprc_get_res_quota()
384 cmd.params[1] |= mc_enc(16, 8, type[2]); dprc_get_res_quota()
385 cmd.params[1] |= mc_enc(24, 8, type[3]); dprc_get_res_quota()
386 cmd.params[1] |= mc_enc(32, 8, type[4]); dprc_get_res_quota()
387 cmd.params[1] |= mc_enc(40, 8, type[5]); dprc_get_res_quota()
388 cmd.params[1] |= mc_enc(48, 8, type[6]); dprc_get_res_quota()
389 cmd.params[1] |= mc_enc(56, 8, type[7]); dprc_get_res_quota()
390 cmd.params[2] |= mc_enc(0, 8, type[8]); dprc_get_res_quota()
391 cmd.params[2] |= mc_enc(8, 8, type[9]); dprc_get_res_quota()
392 cmd.params[2] |= mc_enc(16, 8, type[10]); dprc_get_res_quota()
393 cmd.params[2] |= mc_enc(24, 8, type[11]); dprc_get_res_quota()
394 cmd.params[2] |= mc_enc(32, 8, type[12]); dprc_get_res_quota()
395 cmd.params[2] |= mc_enc(40, 8, type[13]); dprc_get_res_quota()
396 cmd.params[2] |= mc_enc(48, 8, type[14]); dprc_get_res_quota()
397 cmd.params[2] |= mc_enc(56, 8, '\0'); dprc_get_res_quota()
405 *quota = mc_dec(cmd.params[0], 32, 16); dprc_get_res_quota()
420 cmd.params[0] |= mc_enc(0, 32, container_id); dprc_assign()
421 cmd.params[0] |= mc_enc(32, 32, res_req->options); dprc_assign()
422 cmd.params[1] |= mc_enc(0, 32, res_req->num); dprc_assign()
423 cmd.params[1] |= mc_enc(32, 32, res_req->id_base_align); dprc_assign()
424 cmd.params[2] |= mc_enc(0, 8, res_req->type[0]); dprc_assign()
425 cmd.params[2] |= mc_enc(8, 8, res_req->type[1]); dprc_assign()
426 cmd.params[2] |= mc_enc(16, 8, res_req->type[2]); dprc_assign()
427 cmd.params[2] |= mc_enc(24, 8, res_req->type[3]); dprc_assign()
428 cmd.params[2] |= mc_enc(32, 8, res_req->type[4]); dprc_assign()
429 cmd.params[2] |= mc_enc(40, 8, res_req->type[5]); dprc_assign()
430 cmd.params[2] |= mc_enc(48, 8, res_req->type[6]); dprc_assign()
431 cmd.params[2] |= mc_enc(56, 8, res_req->type[7]); dprc_assign()
432 cmd.params[3] |= mc_enc(0, 8, res_req->type[8]); dprc_assign()
433 cmd.params[3] |= mc_enc(8, 8, res_req->type[9]); dprc_assign()
434 cmd.params[3] |= mc_enc(16, 8, res_req->type[10]); dprc_assign()
435 cmd.params[3] |= mc_enc(24, 8, res_req->type[11]); dprc_assign()
436 cmd.params[3] |= mc_enc(32, 8, res_req->type[12]); dprc_assign()
437 cmd.params[3] |= mc_enc(40, 8, res_req->type[13]); dprc_assign()
438 cmd.params[3] |= mc_enc(48, 8, res_req->type[14]); dprc_assign()
439 cmd.params[3] |= mc_enc(56, 8, res_req->type[15]); dprc_assign()
456 cmd.params[0] |= mc_enc(0, 32, child_container_id); dprc_unassign()
457 cmd.params[0] |= mc_enc(32, 32, res_req->options); dprc_unassign()
458 cmd.params[1] |= mc_enc(0, 32, res_req->num); dprc_unassign()
459 cmd.params[1] |= mc_enc(32, 32, res_req->id_base_align); dprc_unassign()
460 cmd.params[2] |= mc_enc(0, 8, res_req->type[0]); dprc_unassign()
461 cmd.params[2] |= mc_enc(8, 8, res_req->type[1]); dprc_unassign()
462 cmd.params[2] |= mc_enc(16, 8, res_req->type[2]); dprc_unassign()
463 cmd.params[2] |= mc_enc(24, 8, res_req->type[3]); dprc_unassign()
464 cmd.params[2] |= mc_enc(32, 8, res_req->type[4]); dprc_unassign()
465 cmd.params[2] |= mc_enc(40, 8, res_req->type[5]); dprc_unassign()
466 cmd.params[2] |= mc_enc(48, 8, res_req->type[6]); dprc_unassign()
467 cmd.params[2] |= mc_enc(56, 8, res_req->type[7]); dprc_unassign()
468 cmd.params[3] |= mc_enc(0, 8, res_req->type[8]); dprc_unassign()
469 cmd.params[3] |= mc_enc(8, 8, res_req->type[9]); dprc_unassign()
470 cmd.params[3] |= mc_enc(16, 8, res_req->type[10]); dprc_unassign()
471 cmd.params[3] |= mc_enc(24, 8, res_req->type[11]); dprc_unassign()
472 cmd.params[3] |= mc_enc(32, 8, res_req->type[12]); dprc_unassign()
473 cmd.params[3] |= mc_enc(40, 8, res_req->type[13]); dprc_unassign()
474 cmd.params[3] |= mc_enc(48, 8, res_req->type[14]); dprc_unassign()
475 cmd.params[3] |= mc_enc(56, 8, res_req->type[15]); dprc_unassign()
498 *pool_count = mc_dec(cmd.params[0], 0, 32); dprc_get_pool_count()
515 cmd.params[0] |= mc_enc(0, 32, pool_index); dprc_get_pool()
523 type[0] = mc_dec(cmd.params[1], 0, 8); dprc_get_pool()
524 type[1] = mc_dec(cmd.params[1], 8, 8); dprc_get_pool()
525 type[2] = mc_dec(cmd.params[1], 16, 8); dprc_get_pool()
526 type[3] = mc_dec(cmd.params[1], 24, 8); dprc_get_pool()
527 type[4] = mc_dec(cmd.params[1], 32, 8); dprc_get_pool()
528 type[5] = mc_dec(cmd.params[1], 40, 8); dprc_get_pool()
529 type[6] = mc_dec(cmd.params[1], 48, 8); dprc_get_pool()
530 type[7] = mc_dec(cmd.params[1], 56, 8); dprc_get_pool()
531 type[8] = mc_dec(cmd.params[2], 0, 8); dprc_get_pool()
532 type[9] = mc_dec(cmd.params[2], 8, 8); dprc_get_pool()
533 type[10] = mc_dec(cmd.params[2], 16, 8); dprc_get_pool()
534 type[11] = mc_dec(cmd.params[2], 24, 8); dprc_get_pool()
535 type[12] = mc_dec(cmd.params[2], 32, 8); dprc_get_pool()
536 type[13] = mc_dec(cmd.params[2], 40, 8); dprc_get_pool()
537 type[14] = mc_dec(cmd.params[2], 48, 8); dprc_get_pool()
558 *obj_count = mc_dec(cmd.params[0], 32, 32); dprc_get_obj_count()
576 cmd.params[0] |= mc_enc(0, 32, obj_index); dprc_get_obj()
584 obj_desc->id = mc_dec(cmd.params[0], 32, 32); dprc_get_obj()
585 obj_desc->vendor = mc_dec(cmd.params[1], 0, 16); dprc_get_obj()
586 obj_desc->irq_count = mc_dec(cmd.params[1], 16, 8); dprc_get_obj()
587 obj_desc->region_count = mc_dec(cmd.params[1], 24, 8); dprc_get_obj()
588 obj_desc->state = mc_dec(cmd.params[1], 32, 32); dprc_get_obj()
589 obj_desc->ver_major = mc_dec(cmd.params[2], 0, 16); dprc_get_obj()
590 obj_desc->ver_minor = mc_dec(cmd.params[2], 16, 16); dprc_get_obj()
591 obj_desc->type[0] = mc_dec(cmd.params[3], 0, 8); dprc_get_obj()
592 obj_desc->type[1] = mc_dec(cmd.params[3], 8, 8); dprc_get_obj()
593 obj_desc->type[2] = mc_dec(cmd.params[3], 16, 8); dprc_get_obj()
594 obj_desc->type[3] = mc_dec(cmd.params[3], 24, 8); dprc_get_obj()
595 obj_desc->type[4] = mc_dec(cmd.params[3], 32, 8); dprc_get_obj()
596 obj_desc->type[5] = mc_dec(cmd.params[3], 40, 8); dprc_get_obj()
597 obj_desc->type[6] = mc_dec(cmd.params[3], 48, 8); dprc_get_obj()
598 obj_desc->type[7] = mc_dec(cmd.params[3], 56, 8); dprc_get_obj()
599 obj_desc->type[8] = mc_dec(cmd.params[4], 0, 8); dprc_get_obj()
600 obj_desc->type[9] = mc_dec(cmd.params[4], 8, 8); dprc_get_obj()
601 obj_desc->type[10] = mc_dec(cmd.params[4], 16, 8); dprc_get_obj()
602 obj_desc->type[11] = mc_dec(cmd.params[4], 24, 8); dprc_get_obj()
603 obj_desc->type[12] = mc_dec(cmd.params[4], 32, 8); dprc_get_obj()
604 obj_desc->type[13] = mc_dec(cmd.params[4], 40, 8); dprc_get_obj()
605 obj_desc->type[14] = mc_dec(cmd.params[4], 48, 8); dprc_get_obj()
625 cmd.params[1] |= mc_enc(0, 8, type[0]); dprc_get_res_count()
626 cmd.params[1] |= mc_enc(8, 8, type[1]); dprc_get_res_count()
627 cmd.params[1] |= mc_enc(16, 8, type[2]); dprc_get_res_count()
628 cmd.params[1] |= mc_enc(24, 8, type[3]); dprc_get_res_count()
629 cmd.params[1] |= mc_enc(32, 8, type[4]); dprc_get_res_count()
630 cmd.params[1] |= mc_enc(40, 8, type[5]); dprc_get_res_count()
631 cmd.params[1] |= mc_enc(48, 8, type[6]); dprc_get_res_count()
632 cmd.params[1] |= mc_enc(56, 8, type[7]); dprc_get_res_count()
633 cmd.params[2] |= mc_enc(0, 8, type[8]); dprc_get_res_count()
634 cmd.params[2] |= mc_enc(8, 8, type[9]); dprc_get_res_count()
635 cmd.params[2] |= mc_enc(16, 8, type[10]); dprc_get_res_count()
636 cmd.params[2] |= mc_enc(24, 8, type[11]); dprc_get_res_count()
637 cmd.params[2] |= mc_enc(32, 8, type[12]); dprc_get_res_count()
638 cmd.params[2] |= mc_enc(40, 8, type[13]); dprc_get_res_count()
639 cmd.params[2] |= mc_enc(48, 8, type[14]); dprc_get_res_count()
640 cmd.params[2] |= mc_enc(56, 8, '\0'); dprc_get_res_count()
648 *res_count = mc_dec(cmd.params[0], 0, 32); dprc_get_res_count()
665 cmd.params[0] |= mc_enc(42, 7, range_desc->iter_status); dprc_get_res_ids()
666 cmd.params[1] |= mc_enc(0, 32, range_desc->base_id); dprc_get_res_ids()
667 cmd.params[1] |= mc_enc(32, 32, range_desc->last_id); dprc_get_res_ids()
668 cmd.params[2] |= mc_enc(0, 8, type[0]); dprc_get_res_ids()
669 cmd.params[2] |= mc_enc(8, 8, type[1]); dprc_get_res_ids()
670 cmd.params[2] |= mc_enc(16, 8, type[2]); dprc_get_res_ids()
671 cmd.params[2] |= mc_enc(24, 8, type[3]); dprc_get_res_ids()
672 cmd.params[2] |= mc_enc(32, 8, type[4]); dprc_get_res_ids()
673 cmd.params[2] |= mc_enc(40, 8, type[5]); dprc_get_res_ids()
674 cmd.params[2] |= mc_enc(48, 8, type[6]); dprc_get_res_ids()
675 cmd.params[2] |= mc_enc(56, 8, type[7]); dprc_get_res_ids()
676 cmd.params[3] |= mc_enc(0, 8, type[8]); dprc_get_res_ids()
677 cmd.params[3] |= mc_enc(8, 8, type[9]); dprc_get_res_ids()
678 cmd.params[3] |= mc_enc(16, 8, type[10]); dprc_get_res_ids()
679 cmd.params[3] |= mc_enc(24, 8, type[11]); dprc_get_res_ids()
680 cmd.params[3] |= mc_enc(32, 8, type[12]); dprc_get_res_ids()
681 cmd.params[3] |= mc_enc(40, 8, type[13]); dprc_get_res_ids()
682 cmd.params[3] |= mc_enc(48, 8, type[14]); dprc_get_res_ids()
683 cmd.params[3] |= mc_enc(56, 8, '\0'); dprc_get_res_ids()
691 range_desc->iter_status = mc_dec(cmd.params[0], 42, 7); dprc_get_res_ids()
692 range_desc->base_id = mc_dec(cmd.params[1], 0, 32); dprc_get_res_ids()
693 range_desc->last_id = mc_dec(cmd.params[1], 32, 32); dprc_get_res_ids()
710 cmd.params[0] |= mc_enc(0, 32, portal_id); dprc_get_portal_paddr()
718 *portal_addr = mc_dec(cmd.params[1], 0, 64); dprc_get_portal_paddr()
737 cmd.params[0] |= mc_enc(0, 32, obj_id); dprc_get_obj_region()
738 cmd.params[0] |= mc_enc(48, 8, region_index); dprc_get_obj_region()
739 cmd.params[3] |= mc_enc(0, 8, obj_type[0]); dprc_get_obj_region()
740 cmd.params[3] |= mc_enc(8, 8, obj_type[1]); dprc_get_obj_region()
741 cmd.params[3] |= mc_enc(16, 8, obj_type[2]); dprc_get_obj_region()
742 cmd.params[3] |= mc_enc(24, 8, obj_type[3]); dprc_get_obj_region()
743 cmd.params[3] |= mc_enc(32, 8, obj_type[4]); dprc_get_obj_region()
744 cmd.params[3] |= mc_enc(40, 8, obj_type[5]); dprc_get_obj_region()
745 cmd.params[3] |= mc_enc(48, 8, obj_type[6]); dprc_get_obj_region()
746 cmd.params[3] |= mc_enc(56, 8, obj_type[7]); dprc_get_obj_region()
747 cmd.params[4] |= mc_enc(0, 8, obj_type[8]); dprc_get_obj_region()
748 cmd.params[4] |= mc_enc(8, 8, obj_type[9]); dprc_get_obj_region()
749 cmd.params[4] |= mc_enc(16, 8, obj_type[10]); dprc_get_obj_region()
750 cmd.params[4] |= mc_enc(24, 8, obj_type[11]); dprc_get_obj_region()
751 cmd.params[4] |= mc_enc(32, 8, obj_type[12]); dprc_get_obj_region()
752 cmd.params[4] |= mc_enc(40, 8, obj_type[13]); dprc_get_obj_region()
753 cmd.params[4] |= mc_enc(48, 8, obj_type[14]); dprc_get_obj_region()
754 cmd.params[4] |= mc_enc(56, 8, '\0'); dprc_get_obj_region()
762 region_desc->base_paddr = mc_dec(cmd.params[1], 0, 64); dprc_get_obj_region()
763 region_desc->size = mc_dec(cmd.params[2], 0, 32); dprc_get_obj_region()
780 cmd.params[0] |= mc_enc(0, 32, endpoint1->id); dprc_connect()
781 cmd.params[0] |= mc_enc(32, 32, endpoint1->interface_id); dprc_connect()
782 cmd.params[1] |= mc_enc(0, 32, endpoint2->id); dprc_connect()
783 cmd.params[1] |= mc_enc(32, 32, endpoint2->interface_id); dprc_connect()
784 cmd.params[2] |= mc_enc(0, 8, endpoint1->type[0]); dprc_connect()
785 cmd.params[2] |= mc_enc(8, 8, endpoint1->type[1]); dprc_connect()
786 cmd.params[2] |= mc_enc(16, 8, endpoint1->type[2]); dprc_connect()
787 cmd.params[2] |= mc_enc(24, 8, endpoint1->type[3]); dprc_connect()
788 cmd.params[2] |= mc_enc(32, 8, endpoint1->type[4]); dprc_connect()
789 cmd.params[2] |= mc_enc(40, 8, endpoint1->type[5]); dprc_connect()
790 cmd.params[2] |= mc_enc(48, 8, endpoint1->type[6]); dprc_connect()
791 cmd.params[2] |= mc_enc(56, 8, endpoint1->type[7]); dprc_connect()
792 cmd.params[3] |= mc_enc(0, 8, endpoint1->type[8]); dprc_connect()
793 cmd.params[3] |= mc_enc(8, 8, endpoint1->type[9]); dprc_connect()
794 cmd.params[3] |= mc_enc(16, 8, endpoint1->type[10]); dprc_connect()
795 cmd.params[3] |= mc_enc(24, 8, endpoint1->type[11]); dprc_connect()
796 cmd.params[3] |= mc_enc(32, 8, endpoint1->type[12]); dprc_connect()
797 cmd.params[3] |= mc_enc(40, 8, endpoint1->type[13]); dprc_connect()
798 cmd.params[3] |= mc_enc(48, 8, endpoint1->type[14]); dprc_connect()
799 cmd.params[3] |= mc_enc(56, 8, endpoint1->type[15]); dprc_connect()
800 cmd.params[5] |= mc_enc(0, 8, endpoint2->type[0]); dprc_connect()
801 cmd.params[5] |= mc_enc(8, 8, endpoint2->type[1]); dprc_connect()
802 cmd.params[5] |= mc_enc(16, 8, endpoint2->type[2]); dprc_connect()
803 cmd.params[5] |= mc_enc(24, 8, endpoint2->type[3]); dprc_connect()
804 cmd.params[5] |= mc_enc(32, 8, endpoint2->type[4]); dprc_connect()
805 cmd.params[5] |= mc_enc(40, 8, endpoint2->type[5]); dprc_connect()
806 cmd.params[5] |= mc_enc(48, 8, endpoint2->type[6]); dprc_connect()
807 cmd.params[5] |= mc_enc(56, 8, endpoint2->type[7]); dprc_connect()
808 cmd.params[6] |= mc_enc(0, 8, endpoint2->type[8]); dprc_connect()
809 cmd.params[6] |= mc_enc(8, 8, endpoint2->type[9]); dprc_connect()
810 cmd.params[6] |= mc_enc(16, 8, endpoint2->type[10]); dprc_connect()
811 cmd.params[6] |= mc_enc(24, 8, endpoint2->type[11]); dprc_connect()
812 cmd.params[6] |= mc_enc(32, 8, endpoint2->type[12]); dprc_connect()
813 cmd.params[6] |= mc_enc(40, 8, endpoint2->type[13]); dprc_connect()
814 cmd.params[6] |= mc_enc(48, 8, endpoint2->type[14]); dprc_connect()
815 cmd.params[6] |= mc_enc(56, 8, endpoint2->type[15]); dprc_connect()
831 cmd.params[0] |= mc_enc(0, 32, endpoint->id); dprc_disconnect()
832 cmd.params[0] |= mc_enc(32, 32, endpoint->interface_id); dprc_disconnect()
833 cmd.params[1] |= mc_enc(0, 8, endpoint->type[0]); dprc_disconnect()
834 cmd.params[1] |= mc_enc(8, 8, endpoint->type[1]); dprc_disconnect()
835 cmd.params[1] |= mc_enc(16, 8, endpoint->type[2]); dprc_disconnect()
836 cmd.params[1] |= mc_enc(24, 8, endpoint->type[3]); dprc_disconnect()
837 cmd.params[1] |= mc_enc(32, 8, endpoint->type[4]); dprc_disconnect()
838 cmd.params[1] |= mc_enc(40, 8, endpoint->type[5]); dprc_disconnect()
839 cmd.params[1] |= mc_enc(48, 8, endpoint->type[6]); dprc_disconnect()
840 cmd.params[1] |= mc_enc(56, 8, endpoint->type[7]); dprc_disconnect()
841 cmd.params[2] |= mc_enc(0, 8, endpoint->type[8]); dprc_disconnect()
842 cmd.params[2] |= mc_enc(8, 8, endpoint->type[9]); dprc_disconnect()
843 cmd.params[2] |= mc_enc(16, 8, endpoint->type[10]); dprc_disconnect()
844 cmd.params[2] |= mc_enc(24, 8, endpoint->type[11]); dprc_disconnect()
845 cmd.params[2] |= mc_enc(32, 8, endpoint->type[12]); dprc_disconnect()
846 cmd.params[2] |= mc_enc(40, 8, endpoint->type[13]); dprc_disconnect()
847 cmd.params[2] |= mc_enc(48, 8, endpoint->type[14]); dprc_disconnect()
848 cmd.params[2] |= mc_enc(56, 8, endpoint->type[15]); dprc_disconnect()
867 cmd.params[0] |= mc_enc(0, 32, endpoint1->id); dprc_get_connection()
868 cmd.params[0] |= mc_enc(32, 32, endpoint1->interface_id); dprc_get_connection()
869 cmd.params[1] |= mc_enc(0, 8, endpoint1->type[0]); dprc_get_connection()
870 cmd.params[1] |= mc_enc(8, 8, endpoint1->type[1]); dprc_get_connection()
871 cmd.params[1] |= mc_enc(16, 8, endpoint1->type[2]); dprc_get_connection()
872 cmd.params[1] |= mc_enc(24, 8, endpoint1->type[3]); dprc_get_connection()
873 cmd.params[1] |= mc_enc(32, 8, endpoint1->type[4]); dprc_get_connection()
874 cmd.params[1] |= mc_enc(40, 8, endpoint1->type[5]); dprc_get_connection()
875 cmd.params[1] |= mc_enc(48, 8, endpoint1->type[6]); dprc_get_connection()
876 cmd.params[1] |= mc_enc(56, 8, endpoint1->type[7]); dprc_get_connection()
877 cmd.params[2] |= mc_enc(0, 8, endpoint1->type[8]); dprc_get_connection()
878 cmd.params[2] |= mc_enc(8, 8, endpoint1->type[9]); dprc_get_connection()
879 cmd.params[2] |= mc_enc(16, 8, endpoint1->type[10]); dprc_get_connection()
880 cmd.params[2] |= mc_enc(24, 8, endpoint1->type[11]); dprc_get_connection()
881 cmd.params[2] |= mc_enc(32, 8, endpoint1->type[12]); dprc_get_connection()
882 cmd.params[2] |= mc_enc(40, 8, endpoint1->type[13]); dprc_get_connection()
883 cmd.params[2] |= mc_enc(48, 8, endpoint1->type[14]); dprc_get_connection()
884 cmd.params[2] |= mc_enc(56, 8, endpoint1->type[15]); dprc_get_connection()
892 endpoint2->id = mc_dec(cmd.params[3], 0, 32); dprc_get_connection()
893 endpoint2->interface_id = mc_dec(cmd.params[3], 32, 32); dprc_get_connection()
894 endpoint2->type[0] = mc_dec(cmd.params[4], 0, 8); dprc_get_connection()
895 endpoint2->type[1] = mc_dec(cmd.params[4], 8, 8); dprc_get_connection()
896 endpoint2->type[2] = mc_dec(cmd.params[4], 16, 8); dprc_get_connection()
897 endpoint2->type[3] = mc_dec(cmd.params[4], 24, 8); dprc_get_connection()
898 endpoint2->type[4] = mc_dec(cmd.params[4], 32, 8); dprc_get_connection()
899 endpoint2->type[5] = mc_dec(cmd.params[4], 40, 8); dprc_get_connection()
900 endpoint2->type[6] = mc_dec(cmd.params[4], 48, 8); dprc_get_connection()
901 endpoint2->type[7] = mc_dec(cmd.params[4], 56, 8); dprc_get_connection()
902 endpoint2->type[8] = mc_dec(cmd.params[5], 0, 8); dprc_get_connection()
903 endpoint2->type[9] = mc_dec(cmd.params[5], 8, 8); dprc_get_connection()
904 endpoint2->type[10] = mc_dec(cmd.params[5], 16, 8); dprc_get_connection()
905 endpoint2->type[11] = mc_dec(cmd.params[5], 24, 8); dprc_get_connection()
906 endpoint2->type[12] = mc_dec(cmd.params[5], 32, 8); dprc_get_connection()
907 endpoint2->type[13] = mc_dec(cmd.params[5], 40, 8); dprc_get_connection()
908 endpoint2->type[14] = mc_dec(cmd.params[5], 48, 8); dprc_get_connection()
909 endpoint2->type[15] = mc_dec(cmd.params[5], 56, 8); dprc_get_connection()
910 *state = mc_dec(cmd.params[6], 0, 32); dprc_get_connection()
H A Ddpbp.c45 cmd.params[0] |= mc_enc(0, 32, dpbp_id); dpbp_open()
148 *en = (int)mc_dec(cmd.params[0], 0, 1); dpbp_is_enabled()
177 cmd.params[0] |= mc_enc(0, 8, irq_index); dpbp_set_irq()
178 cmd.params[0] |= mc_enc(32, 32, irq_val); dpbp_set_irq()
179 cmd.params[1] |= mc_enc(0, 64, irq_paddr); dpbp_set_irq()
180 cmd.params[2] |= mc_enc(0, 32, user_irq_id); dpbp_set_irq()
200 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_get_irq()
208 *irq_val = (uint32_t)mc_dec(cmd.params[0], 0, 32); dpbp_get_irq()
209 *irq_paddr = (uint64_t)mc_dec(cmd.params[1], 0, 64); dpbp_get_irq()
210 *user_irq_id = (int)mc_dec(cmd.params[2], 0, 32); dpbp_get_irq()
211 *type = (int)mc_dec(cmd.params[2], 32, 32); dpbp_get_irq()
225 cmd.params[0] |= mc_enc(0, 8, en); dpbp_set_irq_enable()
226 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_set_irq_enable()
243 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_get_irq_enable()
251 *en = (uint8_t)mc_dec(cmd.params[0], 0, 8); dpbp_get_irq_enable()
265 cmd.params[0] |= mc_enc(0, 32, mask); dpbp_set_irq_mask()
266 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_set_irq_mask()
283 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_get_irq_mask()
291 *mask = (uint32_t)mc_dec(cmd.params[0], 0, 32); dpbp_get_irq_mask()
306 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_get_irq_status()
314 *status = (uint32_t)mc_dec(cmd.params[0], 0, 32); dpbp_get_irq_status()
328 cmd.params[0] |= mc_enc(0, 32, status); dpbp_clear_irq_status()
329 cmd.params[0] |= mc_enc(32, 8, irq_index); dpbp_clear_irq_status()
352 attr->bpid = (uint16_t)mc_dec(cmd.params[0], 16, 16); dpbp_get_attributes()
353 attr->id = (int)mc_dec(cmd.params[0], 32, 32); dpbp_get_attributes()
354 attr->version.major = (uint16_t)mc_dec(cmd.params[1], 0, 16); dpbp_get_attributes()
355 attr->version.minor = (uint16_t)mc_dec(cmd.params[1], 16, 16); dpbp_get_attributes()
H A Ddpmcp.c45 cmd.params[0] |= mc_enc(0, 32, dpmcp_id); dpmcp_open()
80 cmd.params[0] |= mc_enc(0, 32, cfg->portal_id); dpmcp_create()
129 cmd.params[0] |= mc_enc(0, 8, irq_index); dpmcp_set_irq()
130 cmd.params[0] |= mc_enc(32, 32, irq_val); dpmcp_set_irq()
131 cmd.params[1] |= mc_enc(0, 64, irq_addr); dpmcp_set_irq()
132 cmd.params[2] |= mc_enc(0, 32, user_irq_id); dpmcp_set_irq()
152 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_get_irq()
160 *irq_val = (uint32_t)mc_dec(cmd.params[0], 0, 32); dpmcp_get_irq()
161 *irq_addr = (uint64_t)mc_dec(cmd.params[1], 0, 64); dpmcp_get_irq()
162 *user_irq_id = (int)mc_dec(cmd.params[2], 0, 32); dpmcp_get_irq()
163 *type = (int)mc_dec(cmd.params[2], 32, 32); dpmcp_get_irq()
177 cmd.params[0] |= mc_enc(0, 8, en); dpmcp_set_irq_enable()
178 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_set_irq_enable()
195 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_get_irq_enable()
203 *en = (uint8_t)mc_dec(cmd.params[0], 0, 8); dpmcp_get_irq_enable()
217 cmd.params[0] |= mc_enc(0, 32, mask); dpmcp_set_irq_mask()
218 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_set_irq_mask()
235 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_get_irq_mask()
243 *mask = (uint32_t)mc_dec(cmd.params[0], 0, 32); dpmcp_get_irq_mask()
258 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_get_irq_status()
266 *status = (uint32_t)mc_dec(cmd.params[0], 0, 32); dpmcp_get_irq_status()
280 cmd.params[0] |= mc_enc(0, 32, status); dpmcp_clear_irq_status()
281 cmd.params[0] |= mc_enc(32, 8, irq_index); dpmcp_clear_irq_status()
304 attr->id = (int)mc_dec(cmd.params[0], 32, 32); dpmcp_get_attributes()
305 attr->version.major = (uint16_t)mc_dec(cmd.params[1], 0, 16); dpmcp_get_attributes()
306 attr->version.minor = (uint16_t)mc_dec(cmd.params[1], 16, 16); dpmcp_get_attributes()
H A Ddpmng.c52 mc_ver_info->revision = mc_dec(cmd.params[0], 0, 32); mc_get_version()
53 mc_ver_info->major = mc_dec(cmd.params[0], 32, 32); mc_get_version()
54 mc_ver_info->minor = mc_dec(cmd.params[1], 0, 32); mc_get_version()
74 *container_id = mc_dec(cmd.params[0], 0, 32); dpmng_get_container_id()
/linux-4.1.27/drivers/media/usb/gspca/
H A Dcpia1.c225 #define FIRMWARE_VERSION(x, y) (sd->params.version.firmwareVersion == (x) && \
226 sd->params.version.firmwareRevision == (y))
366 struct cam_params params; /* camera settings */ member in struct:sd
489 sd->params.version.firmwareVersion = gspca_dev->usb_buf[0]; do_command()
490 sd->params.version.firmwareRevision = gspca_dev->usb_buf[1]; do_command()
491 sd->params.version.vcVersion = gspca_dev->usb_buf[2]; do_command()
492 sd->params.version.vcRevision = gspca_dev->usb_buf[3]; do_command()
495 sd->params.pnpID.vendor = do_command()
497 sd->params.pnpID.product = do_command()
499 sd->params.pnpID.deviceRevision = do_command()
503 sd->params.status.systemState = gspca_dev->usb_buf[0]; do_command()
504 sd->params.status.grabState = gspca_dev->usb_buf[1]; do_command()
505 sd->params.status.streamState = gspca_dev->usb_buf[2]; do_command()
506 sd->params.status.fatalError = gspca_dev->usb_buf[3]; do_command()
507 sd->params.status.cmdError = gspca_dev->usb_buf[4]; do_command()
508 sd->params.status.debugFlags = gspca_dev->usb_buf[5]; do_command()
509 sd->params.status.vpStatus = gspca_dev->usb_buf[6]; do_command()
510 sd->params.status.errorCode = gspca_dev->usb_buf[7]; do_command()
513 sd->params.vpVersion.vpVersion = gspca_dev->usb_buf[0]; do_command()
514 sd->params.vpVersion.vpRevision = gspca_dev->usb_buf[1]; do_command()
515 sd->params.vpVersion.cameraHeadID = do_command()
519 sd->params.colourParams.brightness = gspca_dev->usb_buf[0]; do_command()
520 sd->params.colourParams.contrast = gspca_dev->usb_buf[1]; do_command()
521 sd->params.colourParams.saturation = gspca_dev->usb_buf[2]; do_command()
524 sd->params.colourBalance.redGain = gspca_dev->usb_buf[0]; do_command()
525 sd->params.colourBalance.greenGain = gspca_dev->usb_buf[1]; do_command()
526 sd->params.colourBalance.blueGain = gspca_dev->usb_buf[2]; do_command()
529 sd->params.exposure.gain = gspca_dev->usb_buf[0]; do_command()
530 sd->params.exposure.fineExp = gspca_dev->usb_buf[1]; do_command()
531 sd->params.exposure.coarseExpLo = gspca_dev->usb_buf[2]; do_command()
532 sd->params.exposure.coarseExpHi = gspca_dev->usb_buf[3]; do_command()
533 sd->params.exposure.redComp = gspca_dev->usb_buf[4]; do_command()
534 sd->params.exposure.green1Comp = gspca_dev->usb_buf[5]; do_command()
535 sd->params.exposure.green2Comp = gspca_dev->usb_buf[6]; do_command()
536 sd->params.exposure.blueComp = gspca_dev->usb_buf[7]; do_command()
542 if (a != sd->params.qx3.button) { do_command()
547 sd->params.qx3.button = a; do_command()
549 if (sd->params.qx3.button) { do_command()
558 sd->params.qx3.cradled = ((gspca_dev->usb_buf[2] & 0x40) == 0); do_command()
627 struct cam_params *params = &sd->params; reset_camera_params() local
632 params->colourParams.brightness = BRIGHTNESS_DEF; reset_camera_params()
633 params->colourParams.contrast = CONTRAST_DEF; reset_camera_params()
634 params->colourParams.saturation = SATURATION_DEF; reset_camera_params()
635 params->exposure.gainMode = 4; reset_camera_params()
636 params->exposure.expMode = 2; /* AEC */ reset_camera_params()
637 params->exposure.compMode = 1; reset_camera_params()
638 params->exposure.centreWeight = 1; reset_camera_params()
639 params->exposure.gain = 0; reset_camera_params()
640 params->exposure.fineExp = 0; reset_camera_params()
641 params->exposure.coarseExpLo = 185; reset_camera_params()
642 params->exposure.coarseExpHi = 0; reset_camera_params()
643 params->exposure.redComp = COMP_RED; reset_camera_params()
644 params->exposure.green1Comp = COMP_GREEN1; reset_camera_params()
645 params->exposure.green2Comp = COMP_GREEN2; reset_camera_params()
646 params->exposure.blueComp = COMP_BLUE; reset_camera_params()
647 params->colourBalance.balanceMode = 2; /* ACB */ reset_camera_params()
648 params->colourBalance.redGain = 32; reset_camera_params()
649 params->colourBalance.greenGain = 6; reset_camera_params()
650 params->colourBalance.blueGain = 92; reset_camera_params()
651 params->apcor.gain1 = 0x18; reset_camera_params()
652 params->apcor.gain2 = 0x16; reset_camera_params()
653 params->apcor.gain4 = 0x24; reset_camera_params()
654 params->apcor.gain8 = 0x34; reset_camera_params()
655 params->vlOffset.gain1 = 20; reset_camera_params()
656 params->vlOffset.gain2 = 24; reset_camera_params()
657 params->vlOffset.gain4 = 26; reset_camera_params()
658 params->vlOffset.gain8 = 26; reset_camera_params()
659 params->compressionParams.hysteresis = 3; reset_camera_params()
660 params->compressionParams.threshMax = 11; reset_camera_params()
661 params->compressionParams.smallStep = 1; reset_camera_params()
662 params->compressionParams.largeStep = 3; reset_camera_params()
663 params->compressionParams.decimationHysteresis = 2; reset_camera_params()
664 params->compressionParams.frDiffStepThresh = 5; reset_camera_params()
665 params->compressionParams.qDiffStepThresh = 3; reset_camera_params()
666 params->compressionParams.decimationThreshMod = 2; reset_camera_params()
671 params->sensorFps.divisor = 1; reset_camera_params()
672 params->sensorFps.baserate = 1; reset_camera_params()
674 params->flickerControl.flickerMode = 0; reset_camera_params()
675 params->flickerControl.disabled = 1; reset_camera_params()
676 params->flickerControl.coarseJump = reset_camera_params()
678 [params->sensorFps.baserate] reset_camera_params()
679 [params->sensorFps.divisor]; reset_camera_params()
680 params->flickerControl.allowableOverExposure = reset_camera_params()
681 find_over_exposure(params->colourParams.brightness); reset_camera_params()
683 params->yuvThreshold.yThreshold = 6; /* From windows driver */ reset_camera_params()
684 params->yuvThreshold.uvThreshold = 6; /* From windows driver */ reset_camera_params()
686 params->format.subSample = SUBSAMPLE_420; reset_camera_params()
687 params->format.yuvOrder = YUVORDER_YUYV; reset_camera_params()
689 params->compression.mode = CPIA_COMPRESSION_AUTO; reset_camera_params()
690 params->compression.decimation = NO_DECIMATION; reset_camera_params()
692 params->compressionTarget.frTargeting = COMP_TARGET_DEF; reset_camera_params()
693 params->compressionTarget.targetFR = 15; /* From windows driver */ reset_camera_params()
694 params->compressionTarget.targetQ = 5; /* From windows driver */ reset_camera_params()
696 params->qx3.qx3_detected = 0; reset_camera_params()
697 params->qx3.toplight = 0; reset_camera_params()
698 params->qx3.bottomlight = 0; reset_camera_params()
699 params->qx3.button = 0; reset_camera_params()
700 params->qx3.cradled = 0; reset_camera_params()
703 static void printstatus(struct gspca_dev *gspca_dev, struct cam_params *params) printstatus() argument
706 params->status.systemState, params->status.grabState, printstatus()
707 params->status.streamState, params->status.fatalError, printstatus()
708 params->status.cmdError, params->status.debugFlags, printstatus()
709 params->status.vpStatus, params->status.errorCode); printstatus()
725 if (sd->params.status.systemState != LO_POWER_STATE) { goto_low_power()
726 if (sd->params.status.systemState != WARM_BOOT_STATE) { goto_low_power()
728 sd->params.status.systemState); goto_low_power()
729 printstatus(gspca_dev, &sd->params); goto_low_power()
756 if (sd->params.status.systemState != HI_POWER_STATE) { goto_high_power()
758 sd->params.status.systemState); goto_high_power()
759 printstatus(gspca_dev, &sd->params); goto_high_power()
797 sd->params.format.videoSize, command_setformat()
798 sd->params.format.subSample, command_setformat()
799 sd->params.format.yuvOrder, 0); command_setformat()
804 sd->params.roi.colStart, sd->params.roi.colEnd, command_setformat()
805 sd->params.roi.rowStart, sd->params.roi.rowEnd); command_setformat()
812 sd->params.colourParams.brightness, command_setcolourparams()
813 sd->params.colourParams.contrast, command_setcolourparams()
814 sd->params.colourParams.saturation, 0); command_setcolourparams()
821 sd->params.apcor.gain1, command_setapcor()
822 sd->params.apcor.gain2, command_setapcor()
823 sd->params.apcor.gain4, command_setapcor()
824 sd->params.apcor.gain8); command_setapcor()
831 sd->params.vlOffset.gain1, command_setvloffset()
832 sd->params.vlOffset.gain2, command_setvloffset()
833 sd->params.vlOffset.gain4, command_setvloffset()
834 sd->params.vlOffset.gain8); command_setvloffset()
843 sd->params.exposure.gainMode, command_setexposure()
845 sd->params.exposure.compMode, command_setexposure()
846 sd->params.exposure.centreWeight, command_setexposure()
847 sd->params.exposure.gain, command_setexposure()
848 sd->params.exposure.fineExp, command_setexposure()
849 sd->params.exposure.coarseExpLo, command_setexposure()
850 sd->params.exposure.coarseExpHi, command_setexposure()
851 sd->params.exposure.redComp, command_setexposure()
852 sd->params.exposure.green1Comp, command_setexposure()
853 sd->params.exposure.green2Comp, command_setexposure()
854 sd->params.exposure.blueComp); command_setexposure()
858 if (sd->params.exposure.expMode != 1) { command_setexposure()
861 sd->params.exposure.expMode, command_setexposure()
863 sd->params.exposure.gain, command_setexposure()
864 sd->params.exposure.fineExp, command_setexposure()
865 sd->params.exposure.coarseExpLo, command_setexposure()
866 sd->params.exposure.coarseExpHi, command_setexposure()
877 if (sd->params.colourBalance.balanceMode == 1) { command_setcolourbalance()
882 sd->params.colourBalance.redGain, command_setcolourbalance()
883 sd->params.colourBalance.greenGain, command_setcolourbalance()
884 sd->params.colourBalance.blueGain); command_setcolourbalance()
891 if (sd->params.colourBalance.balanceMode == 2) { command_setcolourbalance()
895 if (sd->params.colourBalance.balanceMode == 3) { command_setcolourbalance()
908 sd->params.compressionTarget.frTargeting, command_setcompressiontarget()
909 sd->params.compressionTarget.targetFR, command_setcompressiontarget()
910 sd->params.compressionTarget.targetQ, 0); command_setcompressiontarget()
918 sd->params.yuvThreshold.yThreshold, command_setyuvtresh()
919 sd->params.yuvThreshold.uvThreshold, 0, 0); command_setyuvtresh()
929 sd->params.compressionParams.hysteresis, command_setcompressionparams()
930 sd->params.compressionParams.threshMax, command_setcompressionparams()
931 sd->params.compressionParams.smallStep, command_setcompressionparams()
932 sd->params.compressionParams.largeStep, command_setcompressionparams()
933 sd->params.compressionParams.decimationHysteresis, command_setcompressionparams()
934 sd->params.compressionParams.frDiffStepThresh, command_setcompressionparams()
935 sd->params.compressionParams.qDiffStepThresh, command_setcompressionparams()
936 sd->params.compressionParams.decimationThreshMod); command_setcompressionparams()
944 sd->params.compression.mode, command_setcompression()
945 sd->params.compression.decimation, 0, 0); command_setcompression()
953 sd->params.sensorFps.divisor, command_setsensorfps()
954 sd->params.sensorFps.baserate, 0, 0); command_setsensorfps()
962 sd->params.flickerControl.flickerMode, command_setflickerctrl()
963 sd->params.flickerControl.coarseJump, command_setflickerctrl()
964 sd->params.flickerControl.allowableOverExposure, command_setflickerctrl()
973 sd->params.ecpTiming, 0, 0, 0); command_setecptiming()
986 0, sd->params.streamStartLine, 0, 0); command_resume()
994 p1 = (sd->params.qx3.bottomlight == 0) << 1; command_setlights()
995 p2 = (sd->params.qx3.toplight == 0) << 3; command_setlights()
1025 int currentexp = sd->params.exposure.coarseExpLo + set_flicker()
1026 sd->params.exposure.coarseExpHi * 256; set_flicker()
1030 int cj = sd->params.flickerControl.coarseJump; set_flicker()
1031 sd->params.flickerControl.flickerMode = 1; set_flicker()
1032 sd->params.flickerControl.disabled = 0; set_flicker()
1033 if (sd->params.exposure.expMode != 2) { set_flicker()
1034 sd->params.exposure.expMode = 2; set_flicker()
1037 currentexp = currentexp << sd->params.exposure.gain; set_flicker()
1038 sd->params.exposure.gain = 0; set_flicker()
1050 sd->params.exposure.coarseExpLo = startexp & 0xff; set_flicker()
1051 sd->params.exposure.coarseExpHi = startexp >> 8; set_flicker()
1055 sd->params.exposure.redComp = set_flicker()
1057 sd->params.exposure.green1Comp = set_flicker()
1059 sd->params.exposure.green2Comp = set_flicker()
1061 sd->params.exposure.blueComp = set_flicker()
1064 sd->params.exposure.redComp = COMP_RED; set_flicker()
1065 sd->params.exposure.green1Comp = COMP_GREEN1; set_flicker()
1066 sd->params.exposure.green2Comp = COMP_GREEN2; set_flicker()
1067 sd->params.exposure.blueComp = COMP_BLUE; set_flicker()
1070 sd->params.exposure.compMode = 0; set_flicker()
1072 sd->params.exposure.compMode = 1; set_flicker()
1074 sd->params.apcor.gain1 = 0x18; set_flicker()
1075 sd->params.apcor.gain2 = 0x18; set_flicker()
1076 sd->params.apcor.gain4 = 0x16; set_flicker()
1077 sd->params.apcor.gain8 = 0x14; set_flicker()
1079 sd->params.flickerControl.flickerMode = 0; set_flicker()
1080 sd->params.flickerControl.disabled = 1; set_flicker()
1083 sd->params.exposure.redComp, currentexp); set_flicker()
1085 sd->params.exposure.green1Comp, currentexp); set_flicker()
1087 sd->params.exposure.green2Comp, currentexp); set_flicker()
1089 sd->params.exposure.blueComp, currentexp); set_flicker()
1091 while (startexp > MAX_EXP && sd->params.exposure.gain < set_flicker()
1092 sd->params.exposure.gainMode - 1) { set_flicker()
1094 ++sd->params.exposure.gain; set_flicker()
1100 sd->params.exposure.coarseExpLo = startexp & 0xff; set_flicker()
1101 sd->params.exposure.coarseExpHi = startexp >> 8; set_flicker()
1102 sd->params.exposure.redComp = COMP_RED; set_flicker()
1103 sd->params.exposure.green1Comp = COMP_GREEN1; set_flicker()
1104 sd->params.exposure.green2Comp = COMP_GREEN2; set_flicker()
1105 sd->params.exposure.blueComp = COMP_BLUE; set_flicker()
1106 sd->params.exposure.compMode = 1; set_flicker()
1107 sd->params.apcor.gain1 = 0x18; set_flicker()
1108 sd->params.apcor.gain2 = 0x16; set_flicker()
1109 sd->params.apcor.gain4 = 0x24; set_flicker()
1110 sd->params.apcor.gain8 = 0x34; set_flicker()
1112 sd->params.vlOffset.gain1 = 20; set_flicker()
1113 sd->params.vlOffset.gain2 = 24; set_flicker()
1114 sd->params.vlOffset.gain4 = 26; set_flicker()
1115 sd->params.vlOffset.gain8 = 26; set_flicker()
1167 light_exp = sd->params.colourParams.brightness + monitor_exposure()
1171 dark_exp = sd->params.colourParams.brightness + monitor_exposure()
1177 old_exposure = sd->params.exposure.coarseExpHi * 256 + monitor_exposure()
1178 sd->params.exposure.coarseExpLo; monitor_exposure()
1180 if (!sd->params.flickerControl.disabled) { monitor_exposure()
1281 if (!sd->params.flickerControl.disabled) { monitor_exposure()
1286 sd->params.sensorFps.divisor < 2) { monitor_exposure()
1289 ++sd->params.sensorFps.divisor; monitor_exposure()
1292 sd->params.flickerControl.coarseJump = monitor_exposure()
1294 [sd->params.sensorFps.baserate] monitor_exposure()
1295 [sd->params.sensorFps.divisor]; monitor_exposure()
1298 new_exposure = sd->params.flickerControl.coarseJump-1; monitor_exposure()
1301 sd->params.flickerControl.coarseJump; monitor_exposure()
1302 sd->params.exposure.coarseExpLo = new_exposure & 0xff; monitor_exposure()
1303 sd->params.exposure.coarseExpHi = new_exposure >> 8; monitor_exposure()
1311 sd->params.sensorFps.divisor > 0) { monitor_exposure()
1316 --sd->params.sensorFps.divisor; monitor_exposure()
1319 sd->params.flickerControl.coarseJump = monitor_exposure()
1321 [sd->params.sensorFps.baserate] monitor_exposure()
1322 [sd->params.sensorFps.divisor]; monitor_exposure()
1325 new_exposure = sd->params.flickerControl.coarseJump-1; monitor_exposure()
1328 sd->params.flickerControl.coarseJump < max_exp) monitor_exposure()
1330 sd->params.flickerControl.coarseJump; monitor_exposure()
1331 sd->params.exposure.coarseExpLo = new_exposure & 0xff; monitor_exposure()
1332 sd->params.exposure.coarseExpHi = new_exposure >> 8; monitor_exposure()
1342 sd->params.sensorFps.divisor < 2) { monitor_exposure()
1345 ++sd->params.sensorFps.divisor; monitor_exposure()
1348 if (sd->params.exposure.gain > 0) { monitor_exposure()
1349 --sd->params.exposure.gain; monitor_exposure()
1358 sd->params.sensorFps.divisor > 0) { monitor_exposure()
1361 --sd->params.sensorFps.divisor; monitor_exposure()
1364 if (sd->params.exposure.gain < monitor_exposure()
1365 sd->params.exposure.gainMode - 1) { monitor_exposure()
1366 ++sd->params.exposure.gain; monitor_exposure()
1402 if (sd->params.flickerControl.flickerMode == 0 || restart_flicker()
1406 old_exp = sd->params.exposure.coarseExpLo + restart_flicker()
1407 sd->params.exposure.coarseExpHi*256; restart_flicker()
1412 cam_exposure %= sd->params.flickerControl.coarseJump; restart_flicker()
1413 if (!sd->params.flickerControl.disabled && restart_flicker()
1414 cam_exposure <= sd->params.flickerControl.coarseJump - 3) { restart_flicker()
1416 sd->params.flickerControl.disabled = 1; restart_flicker()
1419 if (sd->params.flickerControl.disabled && restart_flicker()
1420 old_exp > sd->params.flickerControl.coarseJump + restart_flicker()
1447 sd->params.version.firmwareVersion = 0; sd_config()
1449 if (sd->params.version.firmwareVersion != 1) { sd_config()
1451 sd->params.version.firmwareVersion); sd_config()
1456 if (sd->params.version.firmwareRevision <= 2 && sd_config()
1457 sd->params.exposure.gainMode > 2) { sd_config()
1458 sd->params.exposure.gainMode = 2; sd_config()
1462 sd->params.qx3.qx3_detected = (sd->params.pnpID.vendor == 0x0813 && sd_config()
1463 sd->params.pnpID.product == 0x0001); sd_config()
1475 if (sd->params.status.systemState != WARM_BOOT_STATE) { sd_start()
1477 sd->params.status.systemState); sd_start()
1478 printstatus(gspca_dev, &sd->params); sd_start()
1500 sd->params.version.firmwareVersion = 0; sd_start()
1523 if (sd->params.status.fatalError) { sd_start()
1525 sd->params.status.fatalError, sd->params.status.vpStatus); sd_start()
1536 sd->params.streamStartLine = 120; sd_start()
1540 sd->params.roi.colStart = 2; sd_start()
1541 sd->params.roi.rowStart = 6; sd_start()
1543 sd->params.roi.colStart = 0; sd_start()
1544 sd->params.roi.rowStart = 0; sd_start()
1548 sd->params.format.videoSize = VIDEOSIZE_QCIF; sd_start()
1549 sd->params.roi.colStart /= 2; sd_start()
1550 sd->params.roi.rowStart /= 2; sd_start()
1551 sd->params.streamStartLine /= 2; sd_start()
1553 sd->params.format.videoSize = VIDEOSIZE_CIF; sd_start()
1555 sd->params.roi.colEnd = sd->params.roi.colStart + sd_start()
1557 sd->params.roi.rowEnd = sd->params.roi.rowStart + sd_start()
1642 if (sd->params.qx3.button) { sd_stopN()
1644 the latch, so we do not reset sd->params.qx3.button now, to sd_stopN()
1667 if (sd->params.qx3.qx3_detected) sd_init()
1673 sd->params.version.firmwareVersion, sd_init()
1674 sd->params.version.firmwareRevision, sd_init()
1675 sd->params.version.vcVersion, sd_init()
1676 sd->params.version.vcRevision); sd_init()
1678 sd->params.pnpID.vendor, sd->params.pnpID.product, sd_init()
1679 sd->params.pnpID.deviceRevision); sd_init()
1681 sd->params.vpVersion.vpVersion, sd_init()
1682 sd->params.vpVersion.vpRevision, sd_init()
1683 sd->params.vpVersion.cameraHeadID); sd_init()
1697 data[16] == sd->params.format.videoSize && sd_pkt_scan()
1698 data[17] == sd->params.format.subSample && sd_pkt_scan()
1699 data[18] == sd->params.format.yuvOrder && sd_pkt_scan()
1700 data[24] == sd->params.roi.colStart && sd_pkt_scan()
1701 data[25] == sd->params.roi.colEnd && sd_pkt_scan()
1702 data[26] == sd->params.roi.rowStart && sd_pkt_scan()
1703 data[27] == sd->params.roi.rowEnd) { sd_pkt_scan()
1744 if (sd->params.exposure.expMode == 2) sd_dq_callback()
1765 sd->params.colourParams.brightness = ctrl->val; sd_s_ctrl()
1766 sd->params.flickerControl.allowableOverExposure = sd_s_ctrl()
1767 find_over_exposure(sd->params.colourParams.brightness); sd_s_ctrl()
1773 sd->params.colourParams.contrast = ctrl->val; sd_s_ctrl()
1777 sd->params.colourParams.saturation = ctrl->val; sd_s_ctrl()
1782 sd->params.flickerControl.coarseJump = sd_s_ctrl()
1784 [sd->params.sensorFps.baserate] sd_s_ctrl()
1785 [sd->params.sensorFps.divisor]; sd_s_ctrl()
1792 sd->params.qx3.bottomlight = ctrl->val; sd_s_ctrl()
1796 sd->params.qx3.toplight = ctrl->val; sd_s_ctrl()
1800 sd->params.compressionTarget.frTargeting = ctrl->val; sd_s_ctrl()
1842 if (sd->params.qx3.qx3_detected) { sd_init_controls()
/linux-4.1.27/net/mac802154/
H A Dmac_cmd.c51 struct ieee802154_llsec_params params; mac802154_mlme_start_req() local
54 params.coord_shortaddr = addr->short_addr; mac802154_mlme_start_req()
57 params.pan_id = addr->pan_id; mac802154_mlme_start_req()
60 params.hwaddr = ieee802154_devaddr_from_raw(dev->dev_addr); mac802154_mlme_start_req()
63 params.coord_hwaddr = params.hwaddr; mac802154_mlme_start_req()
66 rc = ops->llsec->set_params(dev, &params, changed); mac802154_mlme_start_req()
73 const struct ieee802154_mac_params *params) mac802154_set_mac_params()
83 wpan_dev->wpan_phy->transmit_power = params->transmit_power; mac802154_set_mac_params()
84 wpan_dev->wpan_phy->cca = params->cca; mac802154_set_mac_params()
85 wpan_dev->wpan_phy->cca_ed_level = params->cca_ed_level; mac802154_set_mac_params()
88 wpan_dev->min_be = params->min_be; mac802154_set_mac_params()
89 wpan_dev->max_be = params->max_be; mac802154_set_mac_params()
90 wpan_dev->csma_retries = params->csma_retries; mac802154_set_mac_params()
91 wpan_dev->frame_retries = params->frame_retries; mac802154_set_mac_params()
92 wpan_dev->lbt = params->lbt; mac802154_set_mac_params()
95 ret = drv_set_tx_power(local, params->transmit_power); mac802154_set_mac_params()
101 ret = drv_set_cca_mode(local, &params->cca); mac802154_set_mac_params()
107 ret = drv_set_cca_ed_level(local, params->cca_ed_level); mac802154_set_mac_params()
116 struct ieee802154_mac_params *params) mac802154_get_mac_params()
124 params->transmit_power = wpan_dev->wpan_phy->transmit_power; mac802154_get_mac_params()
125 params->cca = wpan_dev->wpan_phy->cca; mac802154_get_mac_params()
126 params->cca_ed_level = wpan_dev->wpan_phy->cca_ed_level; mac802154_get_mac_params()
129 params->min_be = wpan_dev->min_be; mac802154_get_mac_params()
130 params->max_be = wpan_dev->max_be; mac802154_get_mac_params()
131 params->csma_retries = wpan_dev->csma_retries; mac802154_get_mac_params()
132 params->frame_retries = wpan_dev->frame_retries; mac802154_get_mac_params()
133 params->lbt = wpan_dev->lbt; mac802154_get_mac_params()
72 mac802154_set_mac_params(struct net_device *dev, const struct ieee802154_mac_params *params) mac802154_set_mac_params() argument
115 mac802154_get_mac_params(struct net_device *dev, struct ieee802154_mac_params *params) mac802154_get_mac_params() argument
H A Dllsec.c36 memset(&sec->params.default_key_source, 0xFF, IEEE802154_ADDR_LEN); mac802154_llsec_init()
79 struct ieee802154_llsec_params *params) mac802154_llsec_get_params()
82 *params = sec->params; mac802154_llsec_get_params()
89 const struct ieee802154_llsec_params *params, mac802154_llsec_set_params()
95 sec->params.enabled = params->enabled; mac802154_llsec_set_params()
97 sec->params.frame_counter = params->frame_counter; mac802154_llsec_set_params()
99 sec->params.out_level = params->out_level; mac802154_llsec_set_params()
101 sec->params.out_key = params->out_key; mac802154_llsec_set_params()
103 sec->params.default_key_source = params->default_key_source; mac802154_llsec_set_params()
105 sec->params.pan_id = params->pan_id; mac802154_llsec_set_params()
107 sec->params.hwaddr = params->hwaddr; mac802154_llsec_set_params()
109 sec->params.coord_hwaddr = params->coord_hwaddr; mac802154_llsec_set_params()
111 sec->params.coord_shortaddr = params->coord_shortaddr; mac802154_llsec_set_params()
528 __le16 caddr = sec->params.coord_shortaddr; llsec_recover_addr()
530 addr->pan_id = sec->params.pan_id; llsec_recover_addr()
535 addr->extended_addr = sec->params.coord_hwaddr; llsec_recover_addr()
538 addr->short_addr = sec->params.coord_shortaddr; llsec_recover_addr()
559 devaddr.extended_addr = sec->params.coord_hwaddr; llsec_lookup_key()
627 llsec_geniv(iv, sec->params.hwaddr, &hdr->sec); llsec_do_encrypt_unauth()
656 llsec_geniv(iv, sec->params.hwaddr, &hdr->sec); llsec_do_encrypt_auth()
731 if (!sec->params.enabled) { mac802154_llsec_encrypt()
746 frame_ctr = be32_to_cpu(sec->params.frame_counter); mac802154_llsec_encrypt()
755 sec->params.frame_counter = cpu_to_be32(frame_ctr + 1); mac802154_llsec_encrypt()
1000 if (!sec->params.enabled) { mac802154_llsec_decrypt()
78 mac802154_llsec_get_params(struct mac802154_llsec *sec, struct ieee802154_llsec_params *params) mac802154_llsec_get_params() argument
88 mac802154_llsec_set_params(struct mac802154_llsec *sec, const struct ieee802154_llsec_params *params, int changed) mac802154_llsec_set_params() argument
H A Dllsec.h63 struct ieee802154_llsec_params params; member in struct:mac802154_llsec
69 /* protects params, all other fields are fine with RCU */
77 struct ieee802154_llsec_params *params);
79 const struct ieee802154_llsec_params *params,
H A Diface.c41 struct ieee802154_llsec_params params; mac802154_wpan_update_llsec() local
44 params.pan_id = wpan_dev->pan_id; mac802154_wpan_update_llsec()
47 params.hwaddr = wpan_dev->extended_addr; mac802154_wpan_update_llsec()
50 rc = ops->llsec->set_params(dev, &params, changed); mac802154_wpan_update_llsec()
329 struct ieee802154_llsec_params params; mac802154_set_header_security() local
332 mac802154_llsec_get_params(&sdata->sec, &params); mac802154_set_header_security()
334 if (!params.enabled && cb->secen_override && cb->secen) mac802154_set_header_security()
336 if (!params.enabled || mac802154_set_header_security()
338 !params.out_level) mac802154_set_header_security()
343 level = cb->seclevel_override ? cb->seclevel : params.out_level; mac802154_set_header_security()
347 hdr->sec.key_id_mode = params.out_key.mode; mac802154_set_header_security()
348 if (params.out_key.mode == IEEE802154_SCF_KEY_SHORT_INDEX) mac802154_set_header_security()
349 hdr->sec.short_src = params.out_key.short_source; mac802154_set_header_security()
350 else if (params.out_key.mode == IEEE802154_SCF_KEY_HW_INDEX) mac802154_set_header_security()
351 hdr->sec.extended_src = params.out_key.extended_source; mac802154_set_header_security()
352 hdr->sec.key_id = params.out_key.id; mac802154_set_header_security()
/linux-4.1.27/sound/soc/atmel/
H A Datmel-pcm-pdc.c152 struct atmel_pcm_dma_params *params; member in struct:atmel_runtime_data
167 struct atmel_pcm_dma_params *params = prtd->params; atmel_pcm_dma_irq() local
172 if (ssc_sr & params->mask->ssc_endbuf) { atmel_pcm_dma_irq()
176 params->name, ssc_sr, count); atmel_pcm_dma_irq()
179 ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, atmel_pcm_dma_irq()
180 params->mask->pdc_disable); atmel_pcm_dma_irq()
185 ssc_writex(params->ssc->regs, params->pdc->xpr, atmel_pcm_dma_irq()
187 ssc_writex(params->ssc->regs, params->pdc->xcr, atmel_pcm_dma_irq()
188 prtd->period_size / params->pdc_xfer_size); atmel_pcm_dma_irq()
189 ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, atmel_pcm_dma_irq()
190 params->mask->pdc_enable); atmel_pcm_dma_irq()
193 if (ssc_sr & params->mask->ssc_endx) { atmel_pcm_dma_irq()
199 ssc_writex(params->ssc->regs, params->pdc->xnpr, atmel_pcm_dma_irq()
201 ssc_writex(params->ssc->regs, params->pdc->xncr, atmel_pcm_dma_irq()
202 prtd->period_size / params->pdc_xfer_size); atmel_pcm_dma_irq()
213 struct snd_pcm_hw_params *params) atmel_pcm_hw_params()
220 * with different params */ atmel_pcm_hw_params()
223 runtime->dma_bytes = params_buffer_bytes(params); atmel_pcm_hw_params()
225 prtd->params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); atmel_pcm_hw_params()
226 prtd->params->dma_intr_handler = atmel_pcm_dma_irq; atmel_pcm_hw_params()
230 prtd->period_size = params_period_bytes(params); atmel_pcm_hw_params()
235 prtd->params->name, atmel_pcm_hw_params()
244 struct atmel_pcm_dma_params *params = prtd->params; atmel_pcm_hw_free() local
246 if (params != NULL) { atmel_pcm_hw_free()
247 ssc_writex(params->ssc->regs, SSC_PDC_PTCR, atmel_pcm_hw_free()
248 params->mask->pdc_disable); atmel_pcm_hw_free()
249 prtd->params->dma_intr_handler = NULL; atmel_pcm_hw_free()
258 struct atmel_pcm_dma_params *params = prtd->params; atmel_pcm_prepare() local
260 ssc_writex(params->ssc->regs, SSC_IDR, atmel_pcm_prepare()
261 params->mask->ssc_endx | params->mask->ssc_endbuf); atmel_pcm_prepare()
262 ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, atmel_pcm_prepare()
263 params->mask->pdc_disable); atmel_pcm_prepare()
272 struct atmel_pcm_dma_params *params = prtd->params; atmel_pcm_trigger() local
283 ssc_writex(params->ssc->regs, params->pdc->xpr, atmel_pcm_trigger()
285 ssc_writex(params->ssc->regs, params->pdc->xcr, atmel_pcm_trigger()
286 prtd->period_size / params->pdc_xfer_size); atmel_pcm_trigger()
289 ssc_writex(params->ssc->regs, params->pdc->xnpr, atmel_pcm_trigger()
291 ssc_writex(params->ssc->regs, params->pdc->xncr, atmel_pcm_trigger()
292 prtd->period_size / params->pdc_xfer_size); atmel_pcm_trigger()
298 ssc_readx(params->ssc->regs, params->pdc->xpr), atmel_pcm_trigger()
299 ssc_readx(params->ssc->regs, params->pdc->xcr), atmel_pcm_trigger()
300 ssc_readx(params->ssc->regs, params->pdc->xnpr), atmel_pcm_trigger()
301 ssc_readx(params->ssc->regs, params->pdc->xncr)); atmel_pcm_trigger()
303 ssc_writex(params->ssc->regs, SSC_IER, atmel_pcm_trigger()
304 params->mask->ssc_endx | params->mask->ssc_endbuf); atmel_pcm_trigger()
305 ssc_writex(params->ssc->regs, SSC_PDC_PTCR, atmel_pcm_trigger()
306 params->mask->pdc_enable); atmel_pcm_trigger()
309 ssc_readx(params->ssc->regs, SSC_SR), atmel_pcm_trigger()
310 ssc_readx(params->ssc->regs, SSC_IER)); atmel_pcm_trigger()
316 ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, atmel_pcm_trigger()
317 params->mask->pdc_disable); atmel_pcm_trigger()
322 ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, atmel_pcm_trigger()
323 params->mask->pdc_enable); atmel_pcm_trigger()
338 struct atmel_pcm_dma_params *params = prtd->params; atmel_pcm_pointer() local
342 ptr = (dma_addr_t) ssc_readx(params->ssc->regs, params->pdc->xpr); atmel_pcm_pointer()
212 atmel_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) atmel_pcm_hw_params() argument
/linux-4.1.27/tools/perf/
H A Dbuiltin-probe.c67 } params; variable in typeref:struct:__anon14786
72 struct perf_probe_event *pev = &params.events[params.nevents]; parse_probe_event()
75 pr_debug("probe-definition(%d): %s\n", params.nevents, str); parse_probe_event()
76 if (++params.nevents == MAX_PROBES) { parse_probe_event()
81 pev->uprobes = params.uprobes; parse_probe_event()
82 if (params.target) { parse_probe_event()
83 pev->target = strdup(params.target); parse_probe_event()
86 params.target_used = true; parse_probe_event()
108 if (!params.target && ptr && *ptr == '/') { set_target()
109 params.target = strdup(ptr); set_target()
110 if (!params.target) set_target()
112 params.target_used = false; set_target()
118 params.uprobes = true; set_target()
155 params.mod_events = true; parse_probe_event_argv()
165 params.mod_events = true; opt_add_probe_event()
175 params.mod_events = true; opt_del_probe_event()
176 if (!params.dellist) opt_del_probe_event()
177 params.dellist = strlist__new(true, NULL); opt_del_probe_event()
178 strlist__add(params.dellist, str); opt_del_probe_event()
191 params.uprobes = true; opt_set_target()
194 params.uprobes = false; opt_set_target()
200 if (params.uprobes || strchr(str, '/')) { opt_set_target()
211 free(params.target); opt_set_target()
212 params.target = tmp; opt_set_target()
213 params.target_used = false; opt_set_target()
229 if (params.show_lines) { opt_show_lines()
235 params.show_lines = true; opt_show_lines()
236 ret = parse_line_range_desc(str, &params.line_range); opt_show_lines()
244 struct perf_probe_event *pev = &params.events[params.nevents]; opt_show_vars()
255 params.show_vars = true; opt_show_vars()
268 if (params.filter) opt_set_filter()
269 strfilter__delete(params.filter); opt_set_filter()
270 params.filter = strfilter__new(str, &err); opt_set_filter()
271 if (!params.filter) { opt_set_filter()
284 return line_range__init(&params.line_range); init_params()
291 for (i = 0; i < params.nevents; i++) cleanup_params()
292 clear_perf_probe_event(params.events + i); cleanup_params()
293 if (params.dellist) cleanup_params()
294 strlist__delete(params.dellist); cleanup_params()
295 line_range__clear(&params.line_range); cleanup_params()
296 free(params.target); cleanup_params()
297 if (params.filter) cleanup_params()
298 strfilter__delete(params.filter); cleanup_params()
299 memset(&params, 0, sizeof(params)); cleanup_params()
329 OPT_BOOLEAN('q', "quiet", &params.quiet, __cmd_probe()
331 OPT_BOOLEAN('l', "list", &params.list_events, __cmd_probe()
359 OPT_BOOLEAN('f', "force", &params.force_add, "forcibly add events" __cmd_probe()
368 OPT_BOOLEAN('\0', "externs", &params.show_ext_vars, __cmd_probe()
379 OPT_INTEGER('\0', "max-probes", &params.max_probe_points, __cmd_probe()
381 OPT_BOOLEAN('F', "funcs", &params.show_funcs, __cmd_probe()
420 if (params.quiet) { __cmd_probe()
428 if (params.max_probe_points == 0) __cmd_probe()
429 params.max_probe_points = MAX_PROBES; __cmd_probe()
431 if ((!params.nevents && !params.dellist && !params.list_events && __cmd_probe()
432 !params.show_lines && !params.show_funcs)) __cmd_probe()
440 if (params.list_events) { __cmd_probe()
441 if (params.uprobes) { __cmd_probe()
450 if (params.show_funcs) { __cmd_probe()
451 if (!params.filter) __cmd_probe()
452 params.filter = strfilter__new(DEFAULT_FUNC_FILTER, __cmd_probe()
454 ret = show_available_funcs(params.target, params.filter, __cmd_probe()
455 params.uprobes); __cmd_probe()
456 strfilter__delete(params.filter); __cmd_probe()
457 params.filter = NULL; __cmd_probe()
464 if (params.show_lines) { __cmd_probe()
465 ret = show_line_range(&params.line_range, params.target, __cmd_probe()
466 params.uprobes); __cmd_probe()
471 if (params.show_vars) { __cmd_probe()
472 if (!params.filter) __cmd_probe()
473 params.filter = strfilter__new(DEFAULT_VAR_FILTER, __cmd_probe()
476 ret = show_available_vars(params.events, params.nevents, __cmd_probe()
477 params.max_probe_points, __cmd_probe()
478 params.target, __cmd_probe()
479 params.filter, __cmd_probe()
480 params.show_ext_vars); __cmd_probe()
481 strfilter__delete(params.filter); __cmd_probe()
482 params.filter = NULL; __cmd_probe()
489 if (params.dellist) { __cmd_probe()
490 ret = del_perf_probe_events(params.dellist); __cmd_probe()
497 if (params.nevents) { __cmd_probe()
499 if (params.target && !params.target_used) { __cmd_probe()
504 ret = add_perf_probe_events(params.events, params.nevents, __cmd_probe()
505 params.max_probe_points, __cmd_probe()
506 params.force_add); __cmd_probe()
/linux-4.1.27/tools/power/cpupower/utils/
H A Dcpupower-info.c40 int params; cmd_info() member in union:__anon14849
41 } params = {}; cmd_info() local
51 if (params.perf_bias) cmd_info()
53 params.perf_bias = 1; cmd_info()
60 if (!params.params) cmd_info()
61 params.params = 0x7; cmd_info()
68 if (!params.perf_bias) cmd_info()
71 if (params.perf_bias) { cmd_info()
73 params.perf_bias = 0; cmd_info()
78 params.perf_bias = 0; cmd_info()
92 if (params.perf_bias) { cmd_info()
H A Dcpupower-set.c41 int params; cmd_set() member in union:__anon14851
42 } params; cmd_set() local
49 params.params = 0; cmd_set()
55 if (params.perf_bias) cmd_set()
63 params.perf_bias = 1; cmd_set()
70 if (!params.params) cmd_set()
85 if (params.perf_bias) { cmd_set()
/linux-4.1.27/sound/pci/oxygen/
H A Dxonar_hdmi.c30 unsigned int count, const u8 *params) hdmi_write_command()
40 oxygen_write_uart(chip, params[i]); hdmi_write_command()
43 checksum += params[i]; hdmi_write_command()
57 hdmi_write_command(chip, 0x54, 5, hdmi->params); xonar_hdmi_init_commands()
62 hdmi->params[1] = IEC958_AES3_CON_FS_48000; xonar_hdmi_init()
63 hdmi->params[4] = 1; xonar_hdmi_init()
92 struct snd_pcm_hw_params *params) xonar_set_hdmi_params()
94 hdmi->params[0] = 0; /* 1 = non-audio */ xonar_set_hdmi_params()
95 switch (params_rate(params)) { xonar_set_hdmi_params()
97 hdmi->params[1] = IEC958_AES3_CON_FS_44100; xonar_set_hdmi_params()
100 hdmi->params[1] = IEC958_AES3_CON_FS_48000; xonar_set_hdmi_params()
103 hdmi->params[1] = IEC958_AES3_CON_FS_96000; xonar_set_hdmi_params()
106 hdmi->params[1] = IEC958_AES3_CON_FS_192000; xonar_set_hdmi_params()
109 hdmi->params[2] = params_channels(params) / 2 - 1; xonar_set_hdmi_params()
110 if (params_format(params) == SNDRV_PCM_FORMAT_S16_LE) xonar_set_hdmi_params()
111 hdmi->params[3] = 0; xonar_set_hdmi_params()
113 hdmi->params[3] = 0xc0; xonar_set_hdmi_params()
114 hdmi->params[4] = 1; /* ? */ xonar_set_hdmi_params()
115 hdmi_write_command(chip, 0x54, 5, hdmi->params); xonar_set_hdmi_params()
29 hdmi_write_command(struct oxygen *chip, u8 command, unsigned int count, const u8 *params) hdmi_write_command() argument
91 xonar_set_hdmi_params(struct oxygen *chip, struct xonar_hdmi *hdmi, struct snd_pcm_hw_params *params) xonar_set_hdmi_params() argument
H A Dxonar.h16 u8 params[5]; member in struct:xonar_hdmi
26 struct snd_pcm_hw_params *params);
51 struct snd_pcm_hw_params *params);
H A Dxonar_dg.h43 struct snd_pcm_hw_params *params);
45 struct snd_pcm_hw_params *params);
H A Dxonar_lib.c88 struct snd_pcm_hw_params *params) xonar_set_cs53x1_params()
92 if (params_rate(params) <= 54000) xonar_set_cs53x1_params()
94 else if (params_rate(params) <= 108000) xonar_set_cs53x1_params()
87 xonar_set_cs53x1_params(struct oxygen *chip, struct snd_pcm_hw_params *params) xonar_set_cs53x1_params() argument
/linux-4.1.27/arch/arm/kernel/
H A Datags_compat.c10 * We keep the old params compatibility cruft in one place (here)
95 static void __init build_tag_list(struct param_struct *params, void *taglist) build_tag_list() argument
99 if (params->u1.s.page_size != PAGE_SIZE) { build_tag_list()
107 if (params->u1.s.nr_pages != 0x02000 && build_tag_list()
108 params->u1.s.nr_pages != 0x04000 && build_tag_list()
109 params->u1.s.nr_pages != 0x08000 && build_tag_list()
110 params->u1.s.nr_pages != 0x10000) { build_tag_list()
113 params->u1.s.nr_pages = 0x1000; /* 16MB */ build_tag_list()
114 params->u1.s.ramdisk_size = 0; build_tag_list()
115 params->u1.s.flags = FLAG_READONLY; build_tag_list()
116 params->u1.s.initrd_start = 0; build_tag_list()
117 params->u1.s.initrd_size = 0; build_tag_list()
118 params->u1.s.rd_start = 0; build_tag_list()
124 tag->u.core.flags = params->u1.s.flags & FLAG_READONLY; build_tag_list()
125 tag->u.core.pagesize = params->u1.s.page_size; build_tag_list()
126 tag->u.core.rootdev = params->u1.s.rootdev; build_tag_list()
131 tag->u.ramdisk.flags = (params->u1.s.flags & FLAG_RDLOAD ? 1 : 0) | build_tag_list()
132 (params->u1.s.flags & FLAG_RDPROMPT ? 2 : 0); build_tag_list()
133 tag->u.ramdisk.size = params->u1.s.ramdisk_size; build_tag_list()
134 tag->u.ramdisk.start = params->u1.s.rd_start; build_tag_list()
139 tag->u.initrd.start = params->u1.s.initrd_start; build_tag_list()
140 tag->u.initrd.size = params->u1.s.initrd_size; build_tag_list()
145 tag->u.serialnr.low = params->u1.s.system_serial_low; build_tag_list()
146 tag->u.serialnr.high = params->u1.s.system_serial_high; build_tag_list()
151 tag->u.revision.rev = params->u1.s.system_rev; build_tag_list()
158 params->u1.s.pages_in_bank[i] * PAGE_SIZE); build_tag_list()
161 tag = memtag(tag, PHYS_OFFSET, params->u1.s.nr_pages * PAGE_SIZE); build_tag_list()
164 if (params->u1.s.mem_fclk_21285) { build_tag_list()
168 tag->u.memclk.fmemclk = params->u1.s.mem_fclk_21285; build_tag_list()
177 tag->u.videotext.x = params->u1.s.video_x; build_tag_list()
178 tag->u.videotext.y = params->u1.s.video_y; build_tag_list()
181 tag->u.videotext.video_cols = params->u1.s.video_num_cols; build_tag_list()
183 tag->u.videotext.video_lines = params->u1.s.video_num_rows; build_tag_list()
193 tag->u.acorn.memc_control_reg = params->u1.s.memc_control_reg; build_tag_list()
194 tag->u.acorn.vram_pages = params->u1.s.pages_in_vram; build_tag_list()
195 tag->u.acorn.sounddefault = params->u1.s.sounddefault; build_tag_list()
196 tag->u.acorn.adfsdrives = params->u1.s.adfsdrives; build_tag_list()
201 tag->hdr.size = (strlen(params->commandline) + 3 + build_tag_list()
203 strcpy(tag->u.cmdline.cmdline, params->commandline); build_tag_list()
209 memmove(params, taglist, ((int)tag) - ((int)taglist) + build_tag_list()
215 struct param_struct *params = (struct param_struct *)tags; convert_to_tag_list() local
216 build_tag_list(params, &params->u2); convert_to_tag_list()
/linux-4.1.27/drivers/media/platform/blackfin/
H A Dppi.c36 static int ppi_set_params(struct ppi_if *ppi, struct ppi_params *params);
202 static int ppi_set_params(struct ppi_if *ppi, struct ppi_params *params) ppi_set_params() argument
214 if (params->dlen > 24 || params->dlen <= 0) ppi_set_params()
218 pin_state[(params->dlen + 7) / 8 - 1]); ppi_set_params()
223 bytes_per_line = params->width * params->bpp / 8; ppi_set_params()
225 hcount = params->width * params->bpp / params->dlen; ppi_set_params()
226 hdelay = params->hdelay * params->bpp / params->dlen; ppi_set_params()
227 samples_per_line = params->line * params->bpp / params->dlen; ppi_set_params()
228 if (params->int_mask == 0xFFFFFFFF) ppi_set_params()
234 ppi->ppi_control = params->ppi_control & ~PORT_EN; ppi_set_params()
242 if (params->ppi_control & DMA32) ppi_set_params()
247 bfin_write16(&reg->frame, params->frame); ppi_set_params()
254 if ((params->ppi_control & PACK_EN) ppi_set_params()
255 || (params->ppi_control & 0x38000) > DLEN_16) ppi_set_params()
260 bfin_write16(&reg->frame, params->frame); ppi_set_params()
262 bfin_write16(&reg->vdelay, params->vdelay); ppi_set_params()
264 bfin_write16(&reg->vcount, params->height); ppi_set_params()
271 if ((params->ppi_control & PACK_EN) ppi_set_params()
272 || (params->ppi_control & 0x70000) > DLEN_16) ppi_set_params()
277 bfin_write32(&reg->frame, params->frame); ppi_set_params()
279 bfin_write32(&reg->vdly, params->vdelay); ppi_set_params()
281 bfin_write32(&reg->vcnt, params->height); ppi_set_params()
282 if (params->int_mask) ppi_set_params()
283 bfin_write32(&reg->imsk, params->int_mask & 0xFF); ppi_set_params()
287 hsync_width = params->hsync ppi_set_params()
288 * params->bpp / params->dlen; ppi_set_params()
289 vsync_width = params->vsync * samples_per_line; ppi_set_params()
290 vsync_period = samples_per_line * params->frame; ppi_set_params()
313 set_dma_y_count(info->dma_ch, params->height); ppi_set_params()
H A Dbfin_capture.c263 struct ppi_params params; bcap_start_streaming() local
274 /* set ppi params */ bcap_start_streaming()
275 params.width = bcap_dev->fmt.width; bcap_start_streaming()
276 params.height = bcap_dev->fmt.height; bcap_start_streaming()
277 params.bpp = bcap_dev->bpp; bcap_start_streaming()
278 params.dlen = bcap_dev->dlen; bcap_start_streaming()
279 params.ppi_control = bcap_dev->cfg->ppi_control; bcap_start_streaming()
280 params.int_mask = bcap_dev->cfg->int_mask; bcap_start_streaming()
285 params.hdelay = bt->hsync + bt->hbackporch; bcap_start_streaming()
286 params.vdelay = bt->vsync + bt->vbackporch; bcap_start_streaming()
287 params.line = V4L2_DV_BT_FRAME_WIDTH(bt); bcap_start_streaming()
288 params.frame = V4L2_DV_BT_FRAME_HEIGHT(bt); bcap_start_streaming()
291 params.hdelay = 0; bcap_start_streaming()
292 params.vdelay = 0; bcap_start_streaming()
294 params.line = 858; bcap_start_streaming()
295 params.frame = 525; bcap_start_streaming()
297 params.line = 864; bcap_start_streaming()
298 params.frame = 625; bcap_start_streaming()
301 params.hdelay = 0; bcap_start_streaming()
302 params.vdelay = 0; bcap_start_streaming()
303 params.line = params.width + bcap_dev->cfg->blank_pixels; bcap_start_streaming()
304 params.frame = params.height; bcap_start_streaming()
306 ret = ppi->ops->set_params(ppi, &params); bcap_start_streaming()
309 "Error in setting ppi params\n"); bcap_start_streaming()
/linux-4.1.27/arch/powerpc/perf/
H A Dhv-common.c11 struct hv_get_perf_counter_info_params params; hv_perf_caps_get() member in struct:p
16 .params = { hv_perf_caps_get()
32 caps->version = arg.params.counter_info_version_out; hv_perf_caps_get()
/linux-4.1.27/arch/x86/kernel/
H A Dkexec-bzimage64.c57 static int setup_initrd(struct boot_params *params, setup_initrd() argument
60 params->hdr.ramdisk_image = initrd_load_addr & 0xffffffffUL; setup_initrd()
61 params->hdr.ramdisk_size = initrd_len & 0xffffffffUL; setup_initrd()
63 params->ext_ramdisk_image = initrd_load_addr >> 32; setup_initrd()
64 params->ext_ramdisk_size = initrd_len >> 32; setup_initrd()
69 static int setup_cmdline(struct kimage *image, struct boot_params *params, setup_cmdline() argument
74 char *cmdline_ptr = ((char *)params) + cmdline_offset; setup_cmdline()
91 params->hdr.cmd_line_ptr = cmdline_low_32; setup_cmdline()
93 params->ext_cmd_line_ptr = cmdline_ext_32; setup_cmdline()
98 static int setup_e820_entries(struct boot_params *params) setup_e820_entries() argument
108 params->e820_entries = nr_e820_entries; setup_e820_entries()
109 memcpy(&params->e820_map, &e820_saved.map, setup_e820_entries()
116 static int setup_efi_info_memmap(struct boot_params *params, setup_efi_info_memmap() argument
121 void *efi_map = (void *)params + efi_map_offset; setup_efi_info_memmap()
123 struct efi_info *ei = &params->efi_info; setup_efi_info_memmap()
138 prepare_add_efi_setup_data(struct boot_params *params, prepare_add_efi_setup_data() argument
143 struct setup_data *sd = (void *)params + efi_setup_data_offset; prepare_add_efi_setup_data()
156 sd->next = params->hdr.setup_data; prepare_add_efi_setup_data()
157 params->hdr.setup_data = setup_data_phys; prepare_add_efi_setup_data()
163 setup_efi_state(struct boot_params *params, unsigned long params_load_addr, setup_efi_state() argument
168 struct efi_info *ei = &params->efi_info; setup_efi_state()
189 setup_efi_info_memmap(params, params_load_addr, efi_map_offset, setup_efi_state()
191 prepare_add_efi_setup_data(params, params_load_addr, setup_efi_state()
198 setup_boot_parameters(struct kimage *image, struct boot_params *params, setup_boot_parameters() argument
208 params->hdr.hardware_subarch = boot_params.hdr.hardware_subarch; setup_boot_parameters()
211 memcpy(&params->screen_info, &boot_params.screen_info, setup_boot_parameters()
215 params->screen_info.ext_mem_k = 0; setup_boot_parameters()
216 params->alt_mem_k = 0; setup_boot_parameters()
219 memset(&params->apm_bios_info, 0, sizeof(params->apm_bios_info)); setup_boot_parameters()
222 memset(&params->hd0_info, 0, sizeof(params->hd0_info)); setup_boot_parameters()
223 memset(&params->hd1_info, 0, sizeof(params->hd1_info)); setup_boot_parameters()
226 params->sys_desc_table.length = 0; setup_boot_parameters()
229 ret = crash_setup_memmap_entries(image, params); setup_boot_parameters()
233 setup_e820_entries(params); setup_boot_parameters()
235 nr_e820_entries = params->e820_entries; setup_boot_parameters()
238 if (params->e820_map[i].type != E820_RAM) setup_boot_parameters()
240 start = params->e820_map[i].addr; setup_boot_parameters()
241 end = params->e820_map[i].addr + params->e820_map[i].size - 1; setup_boot_parameters()
245 params->screen_info.ext_mem_k = mem_k; setup_boot_parameters()
246 params->alt_mem_k = mem_k; setup_boot_parameters()
248 params->screen_info.ext_mem_k = 0xfc00; /* 64M*/ setup_boot_parameters()
250 params->alt_mem_k = 0xffffffff; setup_boot_parameters()
256 setup_efi_state(params, params_load_addr, efi_map_offset, efi_map_sz, setup_boot_parameters()
261 memcpy(params->eddbuf, boot_params.eddbuf, setup_boot_parameters()
263 params->eddbuf_entries = boot_params.eddbuf_entries; setup_boot_parameters()
265 memcpy(params->edd_mbr_sig_buffer, boot_params.edd_mbr_sig_buffer, setup_boot_parameters()
338 struct boot_params *params; bzImage64_load() local
412 params = kzalloc(params_misc_sz, GFP_KERNEL); bzImage64_load()
413 if (!params) bzImage64_load()
422 memcpy(&params->hdr, (kernel + setup_hdr_offset), setup_header_size); bzImage64_load()
424 ret = kexec_add_buffer(image, (char *)params, params_misc_sz, bzImage64_load()
459 setup_initrd(params, initrd_load_addr, initrd_len); bzImage64_load()
462 setup_cmdline(image, params, bootparam_load_addr, bzImage64_load()
466 params->hdr.type_of_loader = 0x0D << 4; bzImage64_load()
467 params->hdr.loadflags = 0; bzImage64_load()
491 ret = setup_boot_parameters(image, params, bootparam_load_addr, bzImage64_load()
505 * Store pointer to params so that it could be freed after loading bzImage64_load()
506 * params segment has been loaded and contents have been copied bzImage64_load()
509 ldata->bootparams_buf = params; bzImage64_load()
513 kfree(params); bzImage64_load()
/linux-4.1.27/arch/x86/include/asm/
H A Dcrash.h7 struct boot_params *params);
/linux-4.1.27/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_link.c31 struct link_params *params,
219 static int bnx2x_check_half_open_conn(struct link_params *params,
222 struct link_params *params);
246 * @params: link parameters
250 static int bnx2x_check_lfa(struct link_params *params) bnx2x_check_lfa() argument
255 struct bnx2x *bp = params->bp; bnx2x_check_lfa()
258 REG_RD(bp, params->lfa_base + bnx2x_check_lfa()
266 REG_WR(bp, params->lfa_base + bnx2x_check_lfa()
273 link_status = REG_RD(bp, params->shmem_base + bnx2x_check_lfa()
275 port_mb[params->port].link_status)); bnx2x_check_lfa()
282 if (params->feature_config_flags & FEATURE_CONFIG_BOOT_FROM_SAN) bnx2x_check_lfa()
286 if (params->loopback_mode) bnx2x_check_lfa()
290 if (!params->lfa_base) bnx2x_check_lfa()
293 if (params->num_phys == 3) { bnx2x_check_lfa()
302 saved_val = REG_RD(bp, params->lfa_base + bnx2x_check_lfa()
304 req_val = params->req_duplex[0] | (params->req_duplex[1] << 16); bnx2x_check_lfa()
311 saved_val = REG_RD(bp, params->lfa_base + bnx2x_check_lfa()
313 req_val = params->req_flow_ctrl[0] | (params->req_flow_ctrl[1] << 16); bnx2x_check_lfa()
320 saved_val = REG_RD(bp, params->lfa_base + bnx2x_check_lfa()
322 req_val = params->req_line_speed[0] | (params->req_line_speed[1] << 16); bnx2x_check_lfa()
330 cur_speed_cap_mask = REG_RD(bp, params->lfa_base + bnx2x_check_lfa()
334 if (cur_speed_cap_mask != params->speed_cap_mask[cfg_idx]) { bnx2x_check_lfa()
337 params->speed_cap_mask[cfg_idx]); bnx2x_check_lfa()
343 REG_RD(bp, params->lfa_base + bnx2x_check_lfa()
347 if ((u16)cur_req_fc_auto_adv != params->req_fc_auto_adv) { bnx2x_check_lfa()
349 cur_req_fc_auto_adv, params->req_fc_auto_adv); bnx2x_check_lfa()
353 eee_status = REG_RD(bp, params->shmem2_base + bnx2x_check_lfa()
355 eee_status[params->port])); bnx2x_check_lfa()
358 (params->eee_mode & EEE_MODE_ENABLE_LPI)) || bnx2x_check_lfa()
360 (params->eee_mode & EEE_MODE_ADV_LPI))) { bnx2x_check_lfa()
361 DP(NETIF_MSG_LINK, "EEE mismatch %x vs. %x\n", params->eee_mode, bnx2x_check_lfa()
444 static void bnx2x_ets_e2e3a0_disabled(struct link_params *params) bnx2x_ets_e2e3a0_disabled() argument
447 struct bnx2x *bp = params->bp; bnx2x_ets_e2e3a0_disabled()
535 const struct link_params *params, bnx2x_ets_e3b0_set_credit_upper_bound_nig()
538 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_set_credit_upper_bound_nig()
539 const u8 port = params->port; bnx2x_ets_e3b0_set_credit_upper_bound_nig()
573 static void bnx2x_ets_e3b0_nig_disabled(const struct link_params *params, bnx2x_ets_e3b0_nig_disabled() argument
576 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_nig_disabled()
577 const u8 port = params->port; bnx2x_ets_e3b0_nig_disabled()
649 bnx2x_ets_e3b0_set_credit_upper_bound_nig(params, min_w_val); bnx2x_ets_e3b0_nig_disabled()
657 const struct link_params *params, bnx2x_ets_e3b0_set_credit_upper_bound_pbf()
660 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_set_credit_upper_bound_pbf()
663 const u8 port = params->port; bnx2x_ets_e3b0_set_credit_upper_bound_pbf()
690 static void bnx2x_ets_e3b0_pbf_disabled(const struct link_params *params) bnx2x_ets_e3b0_pbf_disabled() argument
692 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_pbf_disabled()
693 const u8 port = params->port; bnx2x_ets_e3b0_pbf_disabled()
741 bnx2x_ets_e3b0_set_credit_upper_bound_pbf(params, min_w_val_pbf); bnx2x_ets_e3b0_pbf_disabled()
748 static int bnx2x_ets_e3b0_disabled(const struct link_params *params, bnx2x_ets_e3b0_disabled() argument
751 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_disabled()
759 bnx2x_ets_e3b0_nig_disabled(params, vars); bnx2x_ets_e3b0_disabled()
761 bnx2x_ets_e3b0_pbf_disabled(params); bnx2x_ets_e3b0_disabled()
771 int bnx2x_ets_disabled(struct link_params *params, bnx2x_ets_disabled() argument
774 struct bnx2x *bp = params->bp; bnx2x_ets_disabled()
778 bnx2x_ets_e2e3a0_disabled(params); bnx2x_ets_disabled()
780 bnx2x_status = bnx2x_ets_e3b0_disabled(params, vars); bnx2x_ets_disabled()
794 static int bnx2x_ets_e3b0_cli_map(const struct link_params *params, bnx2x_ets_e3b0_cli_map() argument
799 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_cli_map()
800 const u8 port = params->port; bnx2x_ets_e3b0_cli_map()
901 const struct link_params *params, bnx2x_ets_e3b0_get_total_bw()
905 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_get_total_bw()
914 if (!ets_params->cos[cos_idx].params.bw_params.bw) { bnx2x_ets_e3b0_get_total_bw()
920 ets_params->cos[cos_idx].params.bw_params.bw bnx2x_ets_e3b0_get_total_bw()
924 ets_params->cos[cos_idx].params.bw_params.bw; bnx2x_ets_e3b0_get_total_bw()
961 static int bnx2x_ets_e3b0_sp_pri_to_cos_set(const struct link_params *params, bnx2x_ets_e3b0_sp_pri_to_cos_set() argument
965 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_sp_pri_to_cos_set()
966 const u8 port = params->port; bnx2x_ets_e3b0_sp_pri_to_cos_set()
1043 static int bnx2x_ets_e3b0_sp_set_pri_cli_reg(const struct link_params *params, bnx2x_ets_e3b0_sp_set_pri_cli_reg() argument
1046 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_sp_set_pri_cli_reg()
1048 const u8 port = params->port; bnx2x_ets_e3b0_sp_set_pri_cli_reg()
1136 int bnx2x_ets_e3b0_config(const struct link_params *params, bnx2x_ets_e3b0_config() argument
1140 struct bnx2x *bp = params->bp; bnx2x_ets_e3b0_config()
1142 const u8 port = params->port; bnx2x_ets_e3b0_config()
1169 bnx2x_status = bnx2x_ets_e3b0_get_total_bw(params, ets_params, bnx2x_ets_e3b0_config()
1180 bnx2x_ets_e3b0_set_credit_upper_bound_nig(params, min_w_val_nig); bnx2x_ets_e3b0_config()
1181 bnx2x_ets_e3b0_set_credit_upper_bound_pbf(params, min_w_val_pbf); bnx2x_ets_e3b0_config()
1193 ets_params->cos[cos_entry].params.bw_params.bw, bnx2x_ets_e3b0_config()
1200 params, bnx2x_ets_e3b0_config()
1202 ets_params->cos[cos_entry].params.sp_params.pri, bnx2x_ets_e3b0_config()
1218 bnx2x_status = bnx2x_ets_e3b0_sp_set_pri_cli_reg(params, bnx2x_ets_e3b0_config()
1228 bnx2x_status = bnx2x_ets_e3b0_cli_map(params, ets_params, bnx2x_ets_e3b0_config()
1238 static void bnx2x_ets_bw_limit_common(const struct link_params *params) bnx2x_ets_bw_limit_common() argument
1241 struct bnx2x *bp = params->bp; bnx2x_ets_bw_limit_common()
1282 void bnx2x_ets_bw_limit(const struct link_params *params, const u32 cos0_bw, bnx2x_ets_bw_limit() argument
1286 struct bnx2x *bp = params->bp; bnx2x_ets_bw_limit()
1305 bnx2x_ets_bw_limit_common(params); bnx2x_ets_bw_limit()
1314 int bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos) bnx2x_ets_strict() argument
1317 struct bnx2x *bp = params->bp; bnx2x_ets_strict()
1357 static void bnx2x_update_pfc_xmac(struct link_params *params, bnx2x_update_pfc_xmac() argument
1361 struct bnx2x *bp = params->bp; bnx2x_update_pfc_xmac()
1366 xmac_base = (params->port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; bnx2x_update_pfc_xmac()
1374 if (!(params->feature_config_flags & bnx2x_update_pfc_xmac()
1407 ((params->mac_addr[2] << 24) | bnx2x_update_pfc_xmac()
1408 (params->mac_addr[3] << 16) | bnx2x_update_pfc_xmac()
1409 (params->mac_addr[4] << 8) | bnx2x_update_pfc_xmac()
1410 (params->mac_addr[5]))); bnx2x_update_pfc_xmac()
1412 ((params->mac_addr[0] << 8) | bnx2x_update_pfc_xmac()
1413 (params->mac_addr[1]))); bnx2x_update_pfc_xmac()
1452 struct link_params *params) bnx2x_set_mdio_emac_per_phy()
1456 for (phy_index = INT_PHY; phy_index < params->num_phys; bnx2x_set_mdio_emac_per_phy()
1458 bnx2x_set_mdio_clk(bp, params->chip_id, bnx2x_set_mdio_emac_per_phy()
1459 params->phy[phy_index].mdio_ctrl); bnx2x_set_mdio_emac_per_phy()
1475 static void bnx2x_emac_init(struct link_params *params, bnx2x_emac_init() argument
1479 struct bnx2x *bp = params->bp; bnx2x_emac_init()
1480 u8 port = params->port; bnx2x_emac_init()
1507 bnx2x_set_mdio_emac_per_phy(bp, params); bnx2x_emac_init()
1509 val = ((params->mac_addr[0] << 8) | bnx2x_emac_init()
1510 params->mac_addr[1]); bnx2x_emac_init()
1513 val = ((params->mac_addr[2] << 24) | bnx2x_emac_init()
1514 (params->mac_addr[3] << 16) | bnx2x_emac_init()
1515 (params->mac_addr[4] << 8) | bnx2x_emac_init()
1516 params->mac_addr[5]); bnx2x_emac_init()
1520 static void bnx2x_set_xumac_nig(struct link_params *params, bnx2x_set_xumac_nig() argument
1524 struct bnx2x *bp = params->bp; bnx2x_set_xumac_nig()
1526 REG_WR(bp, params->port ? NIG_REG_P1_MAC_IN_EN : NIG_REG_P0_MAC_IN_EN, bnx2x_set_xumac_nig()
1528 REG_WR(bp, params->port ? NIG_REG_P1_MAC_OUT_EN : NIG_REG_P0_MAC_OUT_EN, bnx2x_set_xumac_nig()
1530 REG_WR(bp, params->port ? NIG_REG_P1_MAC_PAUSE_OUT_EN : bnx2x_set_xumac_nig()
1534 static void bnx2x_set_umac_rxtx(struct link_params *params, u8 en) bnx2x_set_umac_rxtx() argument
1536 u32 umac_base = params->port ? GRCBASE_UMAC1 : GRCBASE_UMAC0; bnx2x_set_umac_rxtx()
1538 struct bnx2x *bp = params->bp; bnx2x_set_umac_rxtx()
1540 (MISC_REGISTERS_RESET_REG_2_UMAC0 << params->port))) bnx2x_set_umac_rxtx()
1553 static void bnx2x_umac_enable(struct link_params *params, bnx2x_umac_enable() argument
1557 u32 umac_base = params->port ? GRCBASE_UMAC1 : GRCBASE_UMAC0; bnx2x_umac_enable()
1558 struct bnx2x *bp = params->bp; bnx2x_umac_enable()
1561 (MISC_REGISTERS_RESET_REG_2_UMAC0 << params->port)); bnx2x_umac_enable()
1565 (MISC_REGISTERS_RESET_REG_2_UMAC0 << params->port)); bnx2x_umac_enable()
1570 REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4, 1); bnx2x_umac_enable()
1618 ((params->mac_addr[2] << 24) | bnx2x_umac_enable()
1619 (params->mac_addr[3] << 16) | bnx2x_umac_enable()
1620 (params->mac_addr[4] << 8) | bnx2x_umac_enable()
1621 (params->mac_addr[5]))); bnx2x_umac_enable()
1623 ((params->mac_addr[0] << 8) | bnx2x_umac_enable()
1624 (params->mac_addr[1]))); bnx2x_umac_enable()
1645 bnx2x_set_xumac_nig(params, bnx2x_umac_enable()
1652 static void bnx2x_xmac_init(struct link_params *params, u32 max_speed) bnx2x_xmac_init() argument
1654 struct bnx2x *bp = params->bp; bnx2x_xmac_init()
1714 static void bnx2x_set_xmac_rxtx(struct link_params *params, u8 en) bnx2x_set_xmac_rxtx() argument
1716 u8 port = params->port; bnx2x_set_xmac_rxtx()
1717 struct bnx2x *bp = params->bp; bnx2x_set_xmac_rxtx()
1742 static int bnx2x_xmac_enable(struct link_params *params, bnx2x_xmac_enable() argument
1746 struct bnx2x *bp = params->bp; bnx2x_xmac_enable()
1749 xmac_base = (params->port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; bnx2x_xmac_enable()
1751 bnx2x_xmac_init(params, vars->line_speed); bnx2x_xmac_enable()
1760 REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4, 0); bnx2x_xmac_enable()
1765 if (!(params->phy[INT_PHY].flags & FLAGS_TX_ERROR_CHECK)) { bnx2x_xmac_enable()
1781 bnx2x_update_pfc_xmac(params, vars, 0); bnx2x_xmac_enable()
1796 (params->phy[INT_PHY].supported & bnx2x_xmac_enable()
1804 bnx2x_set_xumac_nig(params, bnx2x_xmac_enable()
1812 static int bnx2x_emac_enable(struct link_params *params, bnx2x_emac_enable() argument
1815 struct bnx2x *bp = params->bp; bnx2x_emac_enable()
1816 u8 port = params->port; bnx2x_emac_enable()
1831 u32 ser_lane = ((params->lane_config & bnx2x_emac_enable()
1859 if (!(params->feature_config_flags & bnx2x_emac_enable()
1887 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) { bnx2x_emac_enable()
1931 if ((params->feature_config_flags & bnx2x_emac_enable()
1945 static void bnx2x_update_pfc_bmac1(struct link_params *params, bnx2x_update_pfc_bmac1() argument
1949 struct bnx2x *bp = params->bp; bnx2x_update_pfc_bmac1()
1950 u32 bmac_addr = params->port ? NIG_REG_INGRESS_BMAC1_MEM : bnx2x_update_pfc_bmac1()
1954 if ((!(params->feature_config_flags & bnx2x_update_pfc_bmac1()
1965 if (!(params->feature_config_flags & bnx2x_update_pfc_bmac1()
1974 static void bnx2x_update_pfc_bmac2(struct link_params *params, bnx2x_update_pfc_bmac2() argument
1982 struct bnx2x *bp = params->bp; bnx2x_update_pfc_bmac2()
1983 u32 bmac_addr = params->port ? NIG_REG_INGRESS_BMAC1_MEM : bnx2x_update_pfc_bmac2()
1987 if ((!(params->feature_config_flags & bnx2x_update_pfc_bmac2()
1999 if (!(params->feature_config_flags & bnx2x_update_pfc_bmac2()
2007 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) { bnx2x_update_pfc_bmac2()
2036 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) bnx2x_update_pfc_bmac2()
2051 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) bnx2x_update_pfc_bmac2()
2107 static void bnx2x_update_mng(struct link_params *params, u32 link_status) bnx2x_update_mng() argument
2109 struct bnx2x *bp = params->bp; bnx2x_update_mng()
2111 REG_WR(bp, params->shmem_base + bnx2x_update_mng()
2113 port_mb[params->port].link_status), link_status); bnx2x_update_mng()
2116 static void bnx2x_update_link_attr(struct link_params *params, u32 link_attr) bnx2x_update_link_attr() argument
2118 struct bnx2x *bp = params->bp; bnx2x_update_link_attr()
2121 REG_WR(bp, params->shmem2_base + bnx2x_update_link_attr()
2123 link_attr_sync[params->port]), link_attr); bnx2x_update_link_attr()
2126 static void bnx2x_update_pfc_nig(struct link_params *params, bnx2x_update_pfc_nig() argument
2133 struct bnx2x *bp = params->bp; bnx2x_update_pfc_nig()
2134 u8 port = params->port; bnx2x_update_pfc_nig()
2136 int set_pfc = params->feature_config_flags & bnx2x_update_pfc_nig()
2146 /* NIG params will override non PFC params, since it's possible to bnx2x_update_pfc_nig()
2222 int bnx2x_update_pfc(struct link_params *params, bnx2x_update_pfc() argument
2231 struct bnx2x *bp = params->bp; bnx2x_update_pfc()
2232 u8 bmac_loopback = (params->loopback_mode == LOOPBACK_BMAC); bnx2x_update_pfc()
2234 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) bnx2x_update_pfc()
2239 bnx2x_update_mng(params, vars->link_status); bnx2x_update_pfc()
2241 /* Update NIG params */ bnx2x_update_pfc()
2242 bnx2x_update_pfc_nig(params, vars, pfc_params); bnx2x_update_pfc()
2251 bnx2x_update_pfc_xmac(params, vars, 0); bnx2x_update_pfc()
2255 (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << params->port)) bnx2x_update_pfc()
2258 bnx2x_emac_enable(params, vars, 0); bnx2x_update_pfc()
2262 bnx2x_update_pfc_bmac2(params, vars, bmac_loopback); bnx2x_update_pfc()
2264 bnx2x_update_pfc_bmac1(params, vars); bnx2x_update_pfc()
2267 if ((params->feature_config_flags & bnx2x_update_pfc()
2271 REG_WR(bp, NIG_REG_BMAC0_PAUSE_OUT_EN + params->port*4, val); bnx2x_update_pfc()
2276 static int bnx2x_bmac1_enable(struct link_params *params, bnx2x_bmac1_enable() argument
2280 struct bnx2x *bp = params->bp; bnx2x_bmac1_enable()
2281 u8 port = params->port; bnx2x_bmac1_enable()
2296 wb_data[0] = ((params->mac_addr[2] << 24) | bnx2x_bmac1_enable()
2297 (params->mac_addr[3] << 16) | bnx2x_bmac1_enable()
2298 (params->mac_addr[4] << 8) | bnx2x_bmac1_enable()
2299 params->mac_addr[5]); bnx2x_bmac1_enable()
2300 wb_data[1] = ((params->mac_addr[0] << 8) | bnx2x_bmac1_enable()
2301 params->mac_addr[1]); bnx2x_bmac1_enable()
2319 bnx2x_update_pfc_bmac1(params, vars); bnx2x_bmac1_enable()
2340 static int bnx2x_bmac2_enable(struct link_params *params, bnx2x_bmac2_enable() argument
2344 struct bnx2x *bp = params->bp; bnx2x_bmac2_enable()
2345 u8 port = params->port; bnx2x_bmac2_enable()
2366 wb_data[0] = ((params->mac_addr[2] << 24) | bnx2x_bmac2_enable()
2367 (params->mac_addr[3] << 16) | bnx2x_bmac2_enable()
2368 (params->mac_addr[4] << 8) | bnx2x_bmac2_enable()
2369 params->mac_addr[5]); bnx2x_bmac2_enable()
2370 wb_data[1] = ((params->mac_addr[0] << 8) | bnx2x_bmac2_enable()
2371 params->mac_addr[1]); bnx2x_bmac2_enable()
2400 bnx2x_update_pfc_bmac2(params, vars, is_lb); bnx2x_bmac2_enable()
2405 static int bnx2x_bmac_enable(struct link_params *params, bnx2x_bmac_enable() argument
2410 u8 port = params->port; bnx2x_bmac_enable()
2411 struct bnx2x *bp = params->bp; bnx2x_bmac_enable()
2428 rc = bnx2x_bmac2_enable(params, vars, is_lb); bnx2x_bmac_enable()
2430 rc = bnx2x_bmac1_enable(params, vars, is_lb); bnx2x_bmac_enable()
2435 if ((params->feature_config_flags & bnx2x_bmac_enable()
2476 static int bnx2x_pbf_update(struct link_params *params, u32 flow_ctrl, bnx2x_pbf_update() argument
2479 struct bnx2x *bp = params->bp; bnx2x_pbf_update()
2480 u8 port = params->port; bnx2x_pbf_update()
2824 static u8 bnx2x_eee_has_cap(struct link_params *params) bnx2x_eee_has_cap() argument
2826 struct bnx2x *bp = params->bp; bnx2x_eee_has_cap()
2828 if (REG_RD(bp, params->shmem2_base) <= bnx2x_eee_has_cap()
2829 offsetof(struct shmem2_region, eee_status[params->port])) bnx2x_eee_has_cap()
2875 static u32 bnx2x_eee_calc_timer(struct link_params *params) bnx2x_eee_calc_timer() argument
2878 struct bnx2x *bp = params->bp; bnx2x_eee_calc_timer()
2880 if (params->eee_mode & EEE_MODE_OVERRIDE_NVRAM) { bnx2x_eee_calc_timer()
2881 if (params->eee_mode & EEE_MODE_OUTPUT_TIME) { bnx2x_eee_calc_timer()
2883 eee_idle = params->eee_mode & EEE_MODE_TIMER_MASK; bnx2x_eee_calc_timer()
2886 if (bnx2x_eee_nvram_to_time(params->eee_mode & bnx2x_eee_calc_timer()
2893 eee_mode = ((REG_RD(bp, params->shmem_base + bnx2x_eee_calc_timer()
2895 port_feature_config[params->port]. bnx2x_eee_calc_timer()
2907 static int bnx2x_eee_set_timers(struct link_params *params, bnx2x_eee_set_timers() argument
2911 struct bnx2x *bp = params->bp; bnx2x_eee_set_timers()
2913 eee_idle = bnx2x_eee_calc_timer(params); bnx2x_eee_set_timers()
2916 REG_WR(bp, MISC_REG_CPMU_LP_IDLE_THR_P0 + (params->port << 2), bnx2x_eee_set_timers()
2918 } else if ((params->eee_mode & EEE_MODE_ENABLE_LPI) && bnx2x_eee_set_timers()
2919 (params->eee_mode & EEE_MODE_OVERRIDE_NVRAM) && bnx2x_eee_set_timers()
2920 (params->eee_mode & EEE_MODE_OUTPUT_TIME)) { bnx2x_eee_set_timers()
2926 if (params->eee_mode & EEE_MODE_OUTPUT_TIME) { bnx2x_eee_set_timers()
2940 static int bnx2x_eee_initial_config(struct link_params *params, bnx2x_eee_initial_config() argument
2945 /* Propagate params' bits --> vars (for migration exposure) */ bnx2x_eee_initial_config()
2946 if (params->eee_mode & EEE_MODE_ENABLE_LPI) bnx2x_eee_initial_config()
2951 if (params->eee_mode & EEE_MODE_ADV_LPI) bnx2x_eee_initial_config()
2956 return bnx2x_eee_set_timers(params, vars); bnx2x_eee_initial_config()
2960 struct link_params *params, bnx2x_eee_disable()
2963 struct bnx2x *bp = params->bp; bnx2x_eee_disable()
2966 REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + (params->port << 2), 0); bnx2x_eee_disable()
2976 struct link_params *params, bnx2x_eee_advertise()
2979 struct bnx2x *bp = params->bp; bnx2x_eee_advertise()
2983 REG_WR(bp, MISC_REG_CPMU_LP_MASK_EXT_P0 + (params->port << 2), 0xfc20); bnx2x_eee_advertise()
3002 static void bnx2x_update_mng_eee(struct link_params *params, u32 eee_status) bnx2x_update_mng_eee() argument
3004 struct bnx2x *bp = params->bp; bnx2x_update_mng_eee()
3006 if (bnx2x_eee_has_cap(params)) bnx2x_update_mng_eee()
3007 REG_WR(bp, params->shmem2_base + bnx2x_update_mng_eee()
3009 eee_status[params->port]), eee_status); bnx2x_update_mng_eee()
3013 struct link_params *params, bnx2x_eee_an_resolve()
3016 struct bnx2x *bp = params->bp; bnx2x_eee_an_resolve()
3062 static void bnx2x_bsc_module_sel(struct link_params *params) bnx2x_bsc_module_sel() argument
3067 struct bnx2x *bp = params->bp; bnx2x_bsc_module_sel()
3068 u8 port = params->port; bnx2x_bsc_module_sel()
3070 board_cfg = REG_RD(bp, params->shmem_base + bnx2x_bsc_module_sel()
3078 sfp_ctrl = REG_RD(bp, params->shmem_base + bnx2x_bsc_module_sel()
3088 static int bnx2x_bsc_read(struct link_params *params, bnx2x_bsc_read() argument
3104 bnx2x_bsc_module_sel(params); bnx2x_bsc_read()
3192 int bnx2x_phy_read(struct link_params *params, u8 phy_addr, bnx2x_phy_read() argument
3199 for (phy_index = 0; phy_index < params->num_phys; phy_index++) { bnx2x_phy_read()
3200 if (params->phy[phy_index].addr == phy_addr) { bnx2x_phy_read()
3201 return bnx2x_cl45_read(params->bp, bnx2x_phy_read()
3202 &params->phy[phy_index], devad, bnx2x_phy_read()
3209 int bnx2x_phy_write(struct link_params *params, u8 phy_addr, bnx2x_phy_write() argument
3216 for (phy_index = 0; phy_index < params->num_phys; phy_index++) { bnx2x_phy_write()
3217 if (params->phy[phy_index].addr == phy_addr) { bnx2x_phy_write()
3218 return bnx2x_cl45_write(params->bp, bnx2x_phy_write()
3219 &params->phy[phy_index], devad, bnx2x_phy_write()
3226 struct link_params *params) bnx2x_get_warpcore_lane()
3229 struct bnx2x *bp = params->bp; bnx2x_get_warpcore_lane()
3234 port = params->port; bnx2x_get_warpcore_lane()
3279 static void bnx2x_set_aer_mmd(struct link_params *params, bnx2x_set_aer_mmd() argument
3284 struct bnx2x *bp = params->bp; bnx2x_set_aer_mmd()
3285 ser_lane = ((params->lane_config & bnx2x_set_aer_mmd()
3293 aer_val = bnx2x_get_warpcore_lane(phy, params); bnx2x_set_aer_mmd()
3350 struct link_params *params, bnx2x_xgxs_specific_func()
3353 struct bnx2x *bp = params->bp; bnx2x_xgxs_specific_func()
3357 REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_ST + params->port*0x18, 0); bnx2x_xgxs_specific_func()
3358 REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + params->port*0x18, bnx2x_xgxs_specific_func()
3364 static void bnx2x_xgxs_deassert(struct link_params *params) bnx2x_xgxs_deassert() argument
3366 struct bnx2x *bp = params->bp; bnx2x_xgxs_deassert()
3370 port = params->port; bnx2x_xgxs_deassert()
3378 bnx2x_xgxs_specific_func(&params->phy[INT_PHY], params, bnx2x_xgxs_deassert()
3383 struct link_params *params, u16 *ieee_fc) bnx2x_calc_ieee_aneg_adv()
3385 struct bnx2x *bp = params->bp; bnx2x_calc_ieee_aneg_adv()
3393 switch (params->req_fc_auto_adv) { bnx2x_calc_ieee_aneg_adv()
3423 static void set_phy_vars(struct link_params *params, set_phy_vars() argument
3426 struct bnx2x *bp = params->bp; set_phy_vars()
3428 u8 phy_config_swapped = params->multi_phy_config & set_phy_vars()
3430 for (phy_index = INT_PHY; phy_index < params->num_phys; set_phy_vars()
3440 params->phy[actual_phy_idx].req_flow_ctrl = set_phy_vars()
3441 params->req_flow_ctrl[link_cfg_idx]; set_phy_vars()
3443 params->phy[actual_phy_idx].req_line_speed = set_phy_vars()
3444 params->req_line_speed[link_cfg_idx]; set_phy_vars()
3446 params->phy[actual_phy_idx].speed_cap_mask = set_phy_vars()
3447 params->speed_cap_mask[link_cfg_idx]; set_phy_vars()
3449 params->phy[actual_phy_idx].req_duplex = set_phy_vars()
3450 params->req_duplex[link_cfg_idx]; set_phy_vars()
3452 if (params->req_line_speed[link_cfg_idx] == set_phy_vars()
3458 params->phy[actual_phy_idx].req_flow_ctrl, set_phy_vars()
3459 params->phy[actual_phy_idx].req_line_speed, set_phy_vars()
3460 params->phy[actual_phy_idx].speed_cap_mask); set_phy_vars()
3464 static void bnx2x_ext_phy_set_pause(struct link_params *params, bnx2x_ext_phy_set_pause() argument
3469 struct bnx2x *bp = params->bp; bnx2x_ext_phy_set_pause()
3476 bnx2x_calc_ieee_aneg_adv(phy, params, &vars->ieee_fc); bnx2x_ext_phy_set_pause()
3520 struct link_params *params, bnx2x_ext_phy_update_adv_fc()
3526 struct bnx2x *bp = params->bp; bnx2x_ext_phy_update_adv_fc()
3531 SINGLE_MEDIA_DIRECT(params)) { bnx2x_ext_phy_update_adv_fc()
3532 u8 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_ext_phy_update_adv_fc()
3575 struct link_params *params, bnx2x_ext_phy_resolve_fc()
3583 bnx2x_ext_phy_update_adv_fc(phy, params, vars); bnx2x_ext_phy_resolve_fc()
3587 vars->flow_ctrl = params->req_fc_auto_adv; bnx2x_ext_phy_resolve_fc()
3590 bnx2x_ext_phy_update_adv_fc(phy, params, vars); bnx2x_ext_phy_resolve_fc()
3614 struct link_params *params, bnx2x_warpcore_enable_AN_KR2()
3617 struct bnx2x *bp = params->bp; bnx2x_warpcore_enable_AN_KR2()
3648 params->link_attr_sync |= LINK_ATTR_SYNC_KR2_ENABLE; bnx2x_warpcore_enable_AN_KR2()
3649 bnx2x_update_link_attr(params, params->link_attr_sync); bnx2x_warpcore_enable_AN_KR2()
3652 static void bnx2x_disable_kr2(struct link_params *params, bnx2x_disable_kr2() argument
3656 struct bnx2x *bp = params->bp; bnx2x_disable_kr2()
3681 params->link_attr_sync &= ~LINK_ATTR_SYNC_KR2_ENABLE; bnx2x_disable_kr2()
3682 bnx2x_update_link_attr(params, params->link_attr_sync); bnx2x_disable_kr2()
3688 struct link_params *params) bnx2x_warpcore_set_lpi_passthrough()
3690 struct bnx2x *bp = params->bp; bnx2x_warpcore_set_lpi_passthrough()
3700 struct link_params *params) bnx2x_warpcore_restart_AN_KR()
3703 struct bnx2x *bp = params->bp; bnx2x_warpcore_restart_AN_KR()
3704 u16 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_restart_AN_KR()
3711 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_restart_AN_KR()
3715 struct link_params *params, bnx2x_warpcore_enable_AN_KR()
3719 struct bnx2x *bp = params->bp; bnx2x_warpcore_enable_AN_KR()
3765 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_enable_AN_KR()
3770 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_enable_AN_KR()
3797 if (REG_RD(bp, params->shmem_base + bnx2x_warpcore_enable_AN_KR()
3799 port_hw_config[params->port].default_cfg)) & bnx2x_warpcore_enable_AN_KR()
3808 bnx2x_ext_phy_set_pause(params, phy, vars); bnx2x_warpcore_enable_AN_KR()
3830 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_enable_AN_KR()
3832 bnx2x_warpcore_enable_AN_KR2(phy, params, vars); bnx2x_warpcore_enable_AN_KR()
3837 wc_lane_config = REG_RD(bp, params->shmem_base + bnx2x_warpcore_enable_AN_KR()
3859 bnx2x_disable_kr2(params, vars, phy); bnx2x_warpcore_enable_AN_KR()
3863 bnx2x_warpcore_restart_AN_KR(phy, params); bnx2x_warpcore_enable_AN_KR()
3867 struct link_params *params, bnx2x_warpcore_set_10G_KR()
3870 struct bnx2x *bp = params->bp; bnx2x_warpcore_set_10G_KR()
3889 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_set_10G_KR()
3906 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_set_10G_KR()
3935 struct link_params *params, bnx2x_warpcore_set_10G_XFI()
3938 struct bnx2x *bp = params->bp; bnx2x_warpcore_set_10G_XFI()
3989 cfg_tap_val = REG_RD(bp, params->shmem_base + bnx2x_warpcore_set_10G_XFI()
3991 port_hw_config[params->port]. bnx2x_warpcore_set_10G_XFI()
4039 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_set_10G_XFI()
4055 bnx2x_warpcore_set_lpi_passthrough(phy, params); bnx2x_warpcore_set_10G_XFI()
4071 struct link_params *params) bnx2x_warpcore_set_20G_force_KR2()
4074 struct bnx2x *bp = params->bp; bnx2x_warpcore_set_20G_force_KR2()
4083 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_set_20G_force_KR2()
4120 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_set_20G_force_KR2()
4178 struct link_params *params, bnx2x_warpcore_set_sgmii_speed()
4182 struct bnx2x *bp = params->bp; bnx2x_warpcore_set_sgmii_speed()
4189 bnx2x_warpcore_set_lpi_passthrough(phy, params); bnx2x_warpcore_set_sgmii_speed()
4278 struct link_params *params, bnx2x_warpcore_clear_regs()
4281 struct bnx2x *bp = params->bp; bnx2x_warpcore_clear_regs()
4307 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_clear_regs()
4353 struct link_params *params) bnx2x_is_sfp_module_plugged()
4355 struct bnx2x *bp = params->bp; bnx2x_is_sfp_module_plugged()
4358 if (bnx2x_get_mod_abs_int_cfg(bp, params->chip_id, bnx2x_is_sfp_module_plugged()
4359 params->shmem_base, params->port, bnx2x_is_sfp_module_plugged()
4371 struct link_params *params) bnx2x_warpcore_get_sigdet()
4374 struct bnx2x *bp = params->bp; bnx2x_warpcore_get_sigdet()
4376 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_get_sigdet()
4385 struct link_params *params, bnx2x_warpcore_config_runtime()
4388 struct bnx2x *bp = params->bp; bnx2x_warpcore_config_runtime()
4398 u16 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_config_runtime()
4399 serdes_net_if = (REG_RD(bp, params->shmem_base + bnx2x_warpcore_config_runtime()
4401 port_hw_config[params->port].default_cfg)) & bnx2x_warpcore_config_runtime()
4434 } /*params->rx_tx_asic_rst*/ bnx2x_warpcore_config_runtime()
4438 struct link_params *params) bnx2x_warpcore_config_sfi()
4440 u16 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_config_sfi()
4441 struct bnx2x *bp = params->bp; bnx2x_warpcore_config_sfi()
4442 bnx2x_warpcore_clear_regs(phy, params, lane); bnx2x_warpcore_config_sfi()
4443 if ((params->req_line_speed[LINK_CONFIG_IDX(INT_PHY)] == bnx2x_warpcore_config_sfi()
4447 bnx2x_warpcore_set_10G_XFI(phy, params, 0); bnx2x_warpcore_config_sfi()
4450 bnx2x_warpcore_set_sgmii_speed(phy, params, 1, 0); bnx2x_warpcore_config_sfi()
4454 static void bnx2x_sfp_e3_set_transmitter(struct link_params *params, bnx2x_sfp_e3_set_transmitter() argument
4458 struct bnx2x *bp = params->bp; bnx2x_sfp_e3_set_transmitter()
4460 u8 port = params->port; bnx2x_sfp_e3_set_transmitter()
4462 cfg_pin = REG_RD(bp, params->shmem_base + bnx2x_sfp_e3_set_transmitter()
4476 struct link_params *params, bnx2x_warpcore_config_init()
4479 struct bnx2x *bp = params->bp; bnx2x_warpcore_config_init()
4482 u16 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_config_init()
4483 serdes_net_if = (REG_RD(bp, params->shmem_base + bnx2x_warpcore_config_init()
4485 port_hw_config[params->port].default_cfg)) & bnx2x_warpcore_config_init()
4490 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_config_init()
4499 bnx2x_warpcore_clear_regs(phy, params, lane); bnx2x_warpcore_config_init()
4500 bnx2x_warpcore_set_sgmii_speed(phy, params, 0, 1); bnx2x_warpcore_config_init()
4505 if (params->loopback_mode != LOOPBACK_EXT) bnx2x_warpcore_config_init()
4506 bnx2x_warpcore_enable_AN_KR(phy, params, vars); bnx2x_warpcore_config_init()
4509 bnx2x_warpcore_set_10G_KR(phy, params, vars); bnx2x_warpcore_config_init()
4514 bnx2x_warpcore_clear_regs(phy, params, lane); bnx2x_warpcore_config_init()
4517 bnx2x_warpcore_set_10G_XFI(phy, params, 1); bnx2x_warpcore_config_init()
4519 if (SINGLE_MEDIA_DIRECT(params)) { bnx2x_warpcore_config_init()
4527 params, bnx2x_warpcore_config_init()
4539 if ((params->loopback_mode == LOOPBACK_NONE) || bnx2x_warpcore_config_init()
4540 (params->loopback_mode == LOOPBACK_EXT)) { bnx2x_warpcore_config_init()
4541 if (bnx2x_is_sfp_module_plugged(phy, params)) bnx2x_warpcore_config_init()
4542 bnx2x_sfp_module_detection(phy, params); bnx2x_warpcore_config_init()
4544 bnx2x_sfp_e3_set_transmitter(params, bnx2x_warpcore_config_init()
4548 bnx2x_warpcore_config_sfi(phy, params); bnx2x_warpcore_config_init()
4560 bnx2x_sfp_module_detection(phy, params); bnx2x_warpcore_config_init()
4563 if (!params->loopback_mode) { bnx2x_warpcore_config_init()
4564 bnx2x_warpcore_enable_AN_KR(phy, params, vars); bnx2x_warpcore_config_init()
4567 bnx2x_warpcore_set_20G_force_KR2(phy, params); bnx2x_warpcore_config_init()
4584 struct link_params *params) bnx2x_warpcore_link_reset()
4586 struct bnx2x *bp = params->bp; bnx2x_warpcore_link_reset()
4588 bnx2x_sfp_e3_set_transmitter(params, phy, 0); bnx2x_warpcore_link_reset()
4589 bnx2x_set_mdio_emac_per_phy(bp, params); bnx2x_warpcore_link_reset()
4590 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_link_reset()
4612 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_link_reset()
4634 bnx2x_set_aer_mmd(params, phy); bnx2x_warpcore_link_reset()
4639 struct link_params *params) bnx2x_set_warpcore_loopback()
4641 struct bnx2x *bp = params->bp; bnx2x_set_warpcore_loopback()
4645 params->loopback_mode, phy->req_line_speed); bnx2x_set_warpcore_loopback()
4659 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_set_warpcore_loopback()
4670 bnx2x_set_aer_mmd(params, phy); bnx2x_set_warpcore_loopback()
4683 static void bnx2x_sync_link(struct link_params *params, bnx2x_sync_link() argument
4686 struct bnx2x *bp = params->bp; bnx2x_sync_link()
4789 void bnx2x_link_status_update(struct link_params *params, bnx2x_link_status_update() argument
4792 struct bnx2x *bp = params->bp; bnx2x_link_status_update()
4793 u8 port = params->port; bnx2x_link_status_update()
4796 set_phy_vars(params, vars); bnx2x_link_status_update()
4798 vars->link_status = REG_RD(bp, params->shmem_base + bnx2x_link_status_update()
4803 if (params->loopback_mode != LOOPBACK_NONE && bnx2x_link_status_update()
4804 params->loopback_mode != LOOPBACK_EXT) bnx2x_link_status_update()
4807 if (bnx2x_eee_has_cap(params)) bnx2x_link_status_update()
4808 vars->eee_status = REG_RD(bp, params->shmem2_base + bnx2x_link_status_update()
4810 eee_status[params->port])); bnx2x_link_status_update()
4813 bnx2x_sync_link(params, vars); bnx2x_link_status_update()
4815 sync_offset = params->shmem_base + bnx2x_link_status_update()
4820 params->phy[INT_PHY].media_type = bnx2x_link_status_update()
4823 params->phy[EXT_PHY1].media_type = bnx2x_link_status_update()
4826 params->phy[EXT_PHY2].media_type = bnx2x_link_status_update()
4832 sync_offset = params->shmem_base + bnx2x_link_status_update()
4840 params->feature_config_flags |= bnx2x_link_status_update()
4843 params->feature_config_flags &= bnx2x_link_status_update()
4847 params->link_attr_sync = SHMEM2_RD(bp, bnx2x_link_status_update()
4848 link_attr_sync[params->port]); bnx2x_link_status_update()
4856 static void bnx2x_set_master_ln(struct link_params *params, bnx2x_set_master_ln() argument
4859 struct bnx2x *bp = params->bp; bnx2x_set_master_ln()
4861 ser_lane = ((params->lane_config & bnx2x_set_master_ln()
4877 static int bnx2x_reset_unicore(struct link_params *params, bnx2x_reset_unicore() argument
4881 struct bnx2x *bp = params->bp; bnx2x_reset_unicore()
4895 bnx2x_set_serdes_access(bp, params->port); bnx2x_reset_unicore()
4915 params->port); bnx2x_reset_unicore()
4921 static void bnx2x_set_swap_lanes(struct link_params *params, bnx2x_set_swap_lanes() argument
4924 struct bnx2x *bp = params->bp; bnx2x_set_swap_lanes()
4930 rx_lane_swap = ((params->lane_config & bnx2x_set_swap_lanes()
4933 tx_lane_swap = ((params->lane_config & bnx2x_set_swap_lanes()
4964 struct link_params *params) bnx2x_set_parallel_detection()
4966 struct bnx2x *bp = params->bp; bnx2x_set_parallel_detection()
5017 struct link_params *params, bnx2x_set_autoneg()
5021 struct bnx2x *bp = params->bp; bnx2x_set_autoneg()
5121 struct link_params *params, bnx2x_program_serdes()
5124 struct bnx2x *bp = params->bp; bnx2x_program_serdes()
5170 struct link_params *params) bnx2x_set_brcm_cl37_advertisement()
5172 struct bnx2x *bp = params->bp; bnx2x_set_brcm_cl37_advertisement()
5190 struct link_params *params, bnx2x_set_ieee_aneg_advertisement()
5193 struct bnx2x *bp = params->bp; bnx2x_set_ieee_aneg_advertisement()
5211 struct link_params *params, bnx2x_restart_autoneg()
5214 struct bnx2x *bp = params->bp; bnx2x_restart_autoneg()
5251 struct link_params *params, bnx2x_initialize_sgmii_process()
5254 struct bnx2x *bp = params->bp; bnx2x_initialize_sgmii_process()
5316 bnx2x_restart_autoneg(phy, params, 0); bnx2x_initialize_sgmii_process()
5323 struct link_params *params) bnx2x_direct_parallel_detect_used()
5325 struct bnx2x *bp = params->bp; bnx2x_direct_parallel_detect_used()
5339 params->port); bnx2x_direct_parallel_detect_used()
5350 params->port); bnx2x_direct_parallel_detect_used()
5357 struct link_params *params, bnx2x_update_adv_fc()
5364 struct bnx2x *bp = params->bp; bnx2x_update_adv_fc()
5404 struct link_params *params, bnx2x_flow_ctrl_resolve()
5408 struct bnx2x *bp = params->bp; bnx2x_flow_ctrl_resolve()
5415 bnx2x_update_adv_fc(phy, params, vars, gp_status); bnx2x_flow_ctrl_resolve()
5419 vars->flow_ctrl = params->req_fc_auto_adv; bnx2x_flow_ctrl_resolve()
5422 if (bnx2x_direct_parallel_detect_used(phy, params)) { bnx2x_flow_ctrl_resolve()
5423 vars->flow_ctrl = params->req_fc_auto_adv; bnx2x_flow_ctrl_resolve()
5426 bnx2x_update_adv_fc(phy, params, vars, gp_status); bnx2x_flow_ctrl_resolve()
5432 struct link_params *params) bnx2x_check_fallback_to_cl37()
5434 struct bnx2x *bp = params->bp; bnx2x_check_fallback_to_cl37()
5495 bnx2x_restart_autoneg(phy, params, 0); bnx2x_check_fallback_to_cl37()
5500 struct link_params *params, bnx2x_xgxs_an_resolve()
5508 if (bnx2x_direct_parallel_detect_used(phy, params)) bnx2x_xgxs_an_resolve()
5513 struct link_params *params, bnx2x_get_link_speed_duplex()
5519 struct bnx2x *bp = params->bp; bnx2x_get_link_speed_duplex()
5604 struct link_params *params, bnx2x_link_settings_status()
5607 struct bnx2x *bp = params->bp; bnx2x_link_settings_status()
5624 rc = bnx2x_get_link_speed_duplex(phy, params, vars, link_up, speed_mask, bnx2x_link_settings_status()
5630 if (SINGLE_MEDIA_DIRECT(params)) { bnx2x_link_settings_status()
5632 bnx2x_flow_ctrl_resolve(phy, params, vars, gp_status); bnx2x_link_settings_status()
5634 bnx2x_xgxs_an_resolve(phy, params, vars, bnx2x_link_settings_status()
5639 SINGLE_MEDIA_DIRECT(params)) { bnx2x_link_settings_status()
5641 bnx2x_check_fallback_to_cl37(phy, params); bnx2x_link_settings_status()
5646 if (SINGLE_MEDIA_DIRECT(params) && bnx2x_link_settings_status()
5678 struct link_params *params, bnx2x_warpcore_read_status()
5681 struct bnx2x *bp = params->bp; bnx2x_warpcore_read_status()
5685 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_read_status()
5687 if ((params->loopback_mode) && bnx2x_warpcore_read_status()
5705 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_warpcore_read_status()
5724 if (link_up && SINGLE_MEDIA_DIRECT(params)) { bnx2x_warpcore_read_status()
5743 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_warpcore_read_status()
5749 SINGLE_MEDIA_DIRECT(params)) { bnx2x_warpcore_read_status()
5790 rc = bnx2x_get_link_speed_duplex(phy, params, vars, link_up, gp_speed, bnx2x_warpcore_read_status()
5802 static void bnx2x_set_gmii_tx_driver(struct link_params *params) bnx2x_set_gmii_tx_driver() argument
5804 struct bnx2x *bp = params->bp; bnx2x_set_gmii_tx_driver()
5805 struct bnx2x_phy *phy = &params->phy[INT_PHY]; bnx2x_set_gmii_tx_driver()
5841 static int bnx2x_emac_program(struct link_params *params, bnx2x_emac_program() argument
5844 struct bnx2x *bp = params->bp; bnx2x_emac_program()
5845 u8 port = params->port; bnx2x_emac_program()
5884 bnx2x_set_led(params, vars, LED_MODE_OPER, vars->line_speed); bnx2x_emac_program()
5889 struct link_params *params) bnx2x_set_preemphasis()
5893 struct bnx2x *bp = params->bp; bnx2x_set_preemphasis()
5913 struct link_params *params, bnx2x_xgxs_config_init()
5916 struct bnx2x *bp = params->bp; bnx2x_xgxs_config_init()
5917 u8 enable_cl73 = (SINGLE_MEDIA_DIRECT(params) || bnx2x_xgxs_config_init()
5918 (params->loopback_mode == LOOPBACK_XGXS)); bnx2x_xgxs_config_init()
5920 if (SINGLE_MEDIA_DIRECT(params) && bnx2x_xgxs_config_init()
5921 (params->feature_config_flags & bnx2x_xgxs_config_init()
5923 bnx2x_set_preemphasis(phy, params); bnx2x_xgxs_config_init()
5927 (SINGLE_MEDIA_DIRECT(params) && bnx2x_xgxs_config_init()
5928 params->loopback_mode == LOOPBACK_EXT)) { bnx2x_xgxs_config_init()
5932 bnx2x_set_autoneg(phy, params, vars, 0); bnx2x_xgxs_config_init()
5935 bnx2x_program_serdes(phy, params, vars); bnx2x_xgxs_config_init()
5941 bnx2x_set_brcm_cl37_advertisement(phy, params); bnx2x_xgxs_config_init()
5944 bnx2x_set_ieee_aneg_advertisement(phy, params, bnx2x_xgxs_config_init()
5948 bnx2x_set_autoneg(phy, params, vars, enable_cl73); bnx2x_xgxs_config_init()
5951 bnx2x_restart_autoneg(phy, params, enable_cl73); bnx2x_xgxs_config_init()
5957 bnx2x_initialize_sgmii_process(phy, params, vars); bnx2x_xgxs_config_init()
5962 struct link_params *params, bnx2x_prepare_xgxs()
5980 bnx2x_calc_ieee_aneg_adv(phy, params, &vars->ieee_fc); bnx2x_prepare_xgxs()
5981 bnx2x_set_aer_mmd(params, phy); bnx2x_prepare_xgxs()
5983 bnx2x_set_master_ln(params, phy); bnx2x_prepare_xgxs()
5985 rc = bnx2x_reset_unicore(params, phy, 0); bnx2x_prepare_xgxs()
5990 bnx2x_set_aer_mmd(params, phy); bnx2x_prepare_xgxs()
5993 bnx2x_set_master_ln(params, phy); bnx2x_prepare_xgxs()
5994 bnx2x_set_swap_lanes(params, phy); bnx2x_prepare_xgxs()
6002 struct link_params *params) bnx2x_wait_reset_complete()
6022 params->port); bnx2x_wait_reset_complete()
6027 static void bnx2x_link_int_enable(struct link_params *params) bnx2x_link_int_enable() argument
6029 u8 port = params->port; bnx2x_link_int_enable()
6031 struct bnx2x *bp = params->bp; bnx2x_link_int_enable()
6036 if (!(SINGLE_MEDIA_DIRECT(params))) bnx2x_link_int_enable()
6038 } else if (params->switch_cfg == SWITCH_CFG_10G) { bnx2x_link_int_enable()
6042 if (!(SINGLE_MEDIA_DIRECT(params)) && bnx2x_link_int_enable()
6043 params->phy[INT_PHY].type != bnx2x_link_int_enable()
6052 if (!(SINGLE_MEDIA_DIRECT(params)) && bnx2x_link_int_enable()
6053 params->phy[INT_PHY].type != bnx2x_link_int_enable()
6064 (params->switch_cfg == SWITCH_CFG_10G), bnx2x_link_int_enable()
6109 static void bnx2x_link_int_ack(struct link_params *params, bnx2x_link_int_ack() argument
6112 struct bnx2x *bp = params->bp; bnx2x_link_int_ack()
6113 u8 port = params->port; bnx2x_link_int_ack()
6128 else if (params->switch_cfg == SWITCH_CFG_10G) { bnx2x_link_int_ack()
6133 ((params->lane_config & bnx2x_link_int_ack()
6195 int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version, bnx2x_get_ext_phy_fw_version() argument
6203 if (version == NULL || params == NULL) bnx2x_get_ext_phy_fw_version()
6205 bp = params->bp; bnx2x_get_ext_phy_fw_version()
6209 spirom_ver = REG_RD(bp, params->phy[EXT_PHY1].ver_addr); bnx2x_get_ext_phy_fw_version()
6211 if (params->phy[EXT_PHY1].format_fw_ver) { bnx2x_get_ext_phy_fw_version()
6212 status |= params->phy[EXT_PHY1].format_fw_ver(spirom_ver, bnx2x_get_ext_phy_fw_version()
6217 if ((params->num_phys == MAX_PHYS) && bnx2x_get_ext_phy_fw_version()
6218 (params->phy[EXT_PHY2].ver_addr != 0)) { bnx2x_get_ext_phy_fw_version()
6219 spirom_ver = REG_RD(bp, params->phy[EXT_PHY2].ver_addr); bnx2x_get_ext_phy_fw_version()
6220 if (params->phy[EXT_PHY2].format_fw_ver) { bnx2x_get_ext_phy_fw_version()
6224 status |= params->phy[EXT_PHY2].format_fw_ver( bnx2x_get_ext_phy_fw_version()
6236 struct link_params *params) bnx2x_set_xgxs_loopback()
6238 u8 port = params->port; bnx2x_set_xgxs_loopback()
6239 struct bnx2x *bp = params->bp; bnx2x_set_xgxs_loopback()
6268 bnx2x_set_aer_mmd(params, phy); bnx2x_set_xgxs_loopback()
6290 int bnx2x_set_led(struct link_params *params, bnx2x_set_led() argument
6293 u8 port = params->port; bnx2x_set_led()
6294 u16 hw_led_mode = params->hw_led_mode; bnx2x_set_led()
6299 struct bnx2x *bp = params->bp; bnx2x_set_led()
6305 if (params->phy[phy_idx].set_link_led) { bnx2x_set_led()
6306 params->phy[phy_idx].set_link_led( bnx2x_set_led()
6307 &params->phy[phy_idx], params, mode); bnx2x_set_led()
6319 if (params->phy[EXT_PHY1].type == bnx2x_set_led()
6337 if (((params->phy[EXT_PHY1].type == bnx2x_set_led()
6339 (params->phy[EXT_PHY1].type == bnx2x_set_led()
6341 CHIP_IS_E2(bp) && params->num_phys == 2) { bnx2x_set_led()
6359 } else if (SINGLE_MEDIA_DIRECT(params)) { bnx2x_set_led()
6375 } else if ((params->phy[EXT_PHY1].type == bnx2x_set_led()
6387 u32 nig_led_mode = ((params->hw_led_mode << bnx2x_set_led()
6438 int bnx2x_test_link(struct link_params *params, struct link_vars *vars, bnx2x_test_link() argument
6441 struct bnx2x *bp = params->bp; bnx2x_test_link()
6445 struct bnx2x_phy *int_phy = &params->phy[INT_PHY]; bnx2x_test_link()
6449 if (params->req_line_speed[LINK_CONFIG_IDX(INT_PHY)] bnx2x_test_link()
6459 u8 lane = bnx2x_get_warpcore_lane(int_phy, params); bnx2x_test_link()
6479 if (params->loopback_mode == LOOPBACK_XGXS) bnx2x_test_link()
6482 switch (params->num_phys) { bnx2x_test_link()
6487 ext_phy_link_up = params->phy[EXT_PHY1].read_status( bnx2x_test_link()
6488 &params->phy[EXT_PHY1], bnx2x_test_link()
6489 params, &temp_vars); bnx2x_test_link()
6492 for (phy_index = EXT_PHY1; phy_index < params->num_phys; bnx2x_test_link()
6494 serdes_phy_type = ((params->phy[phy_index].media_type == bnx2x_test_link()
6496 (params->phy[phy_index].media_type == bnx2x_test_link()
6498 (params->phy[phy_index].media_type == bnx2x_test_link()
6500 (params->phy[phy_index].media_type == bnx2x_test_link()
6505 if (params->phy[phy_index].read_status) { bnx2x_test_link()
6507 params->phy[phy_index].read_status( bnx2x_test_link()
6508 &params->phy[phy_index], bnx2x_test_link()
6509 params, &temp_vars); bnx2x_test_link()
6519 static int bnx2x_link_initialize(struct link_params *params, bnx2x_link_initialize() argument
6523 struct bnx2x *bp = params->bp; bnx2x_link_initialize()
6529 vars->line_speed = params->phy[INT_PHY].req_line_speed; bnx2x_link_initialize()
6536 bnx2x_prepare_xgxs(&params->phy[INT_PHY], params, vars); bnx2x_link_initialize()
6538 non_ext_phy = (SINGLE_MEDIA_DIRECT(params) || bnx2x_link_initialize()
6539 (params->loopback_mode == LOOPBACK_XGXS)); bnx2x_link_initialize()
6542 (params->phy[EXT_PHY1].flags & FLAGS_INIT_XGXS_FIRST) || bnx2x_link_initialize()
6543 (params->loopback_mode == LOOPBACK_EXT_PHY)) { bnx2x_link_initialize()
6544 struct bnx2x_phy *phy = &params->phy[INT_PHY]; bnx2x_link_initialize()
6548 bnx2x_set_parallel_detection(phy, params); bnx2x_link_initialize()
6549 if (params->phy[INT_PHY].config_init) bnx2x_link_initialize()
6550 params->phy[INT_PHY].config_init(phy, params, vars); bnx2x_link_initialize()
6556 vars->line_speed = params->phy[INT_PHY].req_line_speed; bnx2x_link_initialize()
6560 if (params->phy[INT_PHY].supported & bnx2x_link_initialize()
6564 for (phy_index = EXT_PHY1; phy_index < params->num_phys; bnx2x_link_initialize()
6571 if (params->phy[phy_index].supported & bnx2x_link_initialize()
6576 (bnx2x_phy_selection(params) == bnx2x_link_initialize()
6582 params->phy[phy_index].config_init( bnx2x_link_initialize()
6583 &params->phy[phy_index], bnx2x_link_initialize()
6584 params, vars); bnx2x_link_initialize()
6589 params->port*4, bnx2x_link_initialize()
6598 struct link_params *params) bnx2x_int_link_reset()
6601 REG_WR(params->bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, bnx2x_int_link_reset()
6602 (0x1ff << (params->port*16))); bnx2x_int_link_reset()
6606 struct link_params *params) bnx2x_common_ext_link_reset()
6608 struct bnx2x *bp = params->bp; bnx2x_common_ext_link_reset()
6614 gpio_port = params->port; bnx2x_common_ext_link_reset()
6624 static int bnx2x_update_link_down(struct link_params *params, bnx2x_update_link_down() argument
6627 struct bnx2x *bp = params->bp; bnx2x_update_link_down()
6628 u8 port = params->port; bnx2x_update_link_down()
6631 bnx2x_set_led(params, vars, LED_MODE_OFF, 0); bnx2x_update_link_down()
6639 bnx2x_update_mng(params, vars->link_status); bnx2x_update_link_down()
6652 bnx2x_set_bmac_rx(bp, params->chip_id, params->port, 0); bnx2x_update_link_down()
6656 REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + (params->port << 2), bnx2x_update_link_down()
6658 REG_WR(bp, MISC_REG_CPMU_LP_MASK_ENT_P0 + (params->port << 2), bnx2x_update_link_down()
6663 bnx2x_update_mng_eee(params, vars->eee_status); bnx2x_update_link_down()
6664 bnx2x_set_xmac_rxtx(params, 0); bnx2x_update_link_down()
6665 bnx2x_set_umac_rxtx(params, 0); bnx2x_update_link_down()
6671 static int bnx2x_update_link_up(struct link_params *params, bnx2x_update_link_up() argument
6675 struct bnx2x *bp = params->bp; bnx2x_update_link_up()
6676 u8 phy_idx, port = params->port; bnx2x_update_link_up()
6692 if (bnx2x_xmac_enable(params, vars, 0) == bnx2x_update_link_up()
6700 bnx2x_umac_enable(params, vars, 0); bnx2x_update_link_up()
6701 bnx2x_set_led(params, vars, bnx2x_update_link_up()
6708 (params->port << 2), 1); bnx2x_update_link_up()
6711 (params->port << 2), 0xfc20); bnx2x_update_link_up()
6717 if (bnx2x_bmac_enable(params, vars, 0, 1) == bnx2x_update_link_up()
6725 bnx2x_set_led(params, vars, bnx2x_update_link_up()
6728 rc = bnx2x_emac_program(params, vars); bnx2x_update_link_up()
6729 bnx2x_emac_enable(params, vars, 0); bnx2x_update_link_up()
6735 SINGLE_MEDIA_DIRECT(params)) bnx2x_update_link_up()
6736 bnx2x_set_gmii_tx_driver(params); bnx2x_update_link_up()
6742 rc |= bnx2x_pbf_update(params, vars->flow_ctrl, bnx2x_update_link_up()
6749 bnx2x_update_mng(params, vars->link_status); bnx2x_update_link_up()
6750 bnx2x_update_mng_eee(params, vars->eee_status); bnx2x_update_link_up()
6753 if (params->phy[phy_idx].flags & FLAGS_TX_ERROR_CHECK) { bnx2x_update_link_up()
6754 bnx2x_check_half_open_conn(params, vars, 0); bnx2x_update_link_up()
6762 static void bnx2x_chng_link_count(struct link_params *params, bool clear) bnx2x_chng_link_count() argument
6764 struct bnx2x *bp = params->bp; bnx2x_chng_link_count()
6771 addr = params->shmem2_base + bnx2x_chng_link_count()
6772 offsetof(struct shmem2_region, link_change_count[params->port]); bnx2x_chng_link_count()
6792 int bnx2x_link_update(struct link_params *params, struct link_vars *vars) bnx2x_link_update() argument
6794 struct bnx2x *bp = params->bp; bnx2x_link_update()
6796 u8 port = params->port; bnx2x_link_update()
6806 for (phy_index = INT_PHY; phy_index < params->num_phys; bnx2x_link_update()
6820 bnx2x_set_aer_mmd(params, &params->phy[INT_PHY]); bnx2x_link_update()
6848 for (phy_index = EXT_PHY1; phy_index < params->num_phys; bnx2x_link_update()
6850 struct bnx2x_phy *phy = &params->phy[phy_index]; bnx2x_link_update()
6853 /* Read link status and params of this ext phy */ bnx2x_link_update()
6854 cur_link_up = phy->read_status(phy, params, bnx2x_link_update()
6869 switch (bnx2x_phy_selection(params)) { bnx2x_link_update()
6895 params->multi_phy_config); bnx2x_link_update()
6908 if (params->phy[INT_PHY].read_status) bnx2x_link_update()
6909 params->phy[INT_PHY].read_status( bnx2x_link_update()
6910 &params->phy[INT_PHY], bnx2x_link_update()
6911 params, vars); bnx2x_link_update()
6930 if (params->phy[EXT_PHY2].phy_specific_func) { bnx2x_link_update()
6933 params->phy[EXT_PHY2].phy_specific_func( bnx2x_link_update()
6934 &params->phy[EXT_PHY2], bnx2x_link_update()
6935 params, DISABLE_TX); bnx2x_link_update()
6941 if (params->phy[active_external_phy].supported & bnx2x_link_update()
6953 for (phy_index = EXT_PHY1; phy_index < params->num_phys; bnx2x_link_update()
6955 if (params->phy[phy_index].flags & bnx2x_link_update()
6972 if (!(SINGLE_MEDIA_DIRECT(params)) && ext_phy_link_up && bnx2x_link_update()
6980 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, bnx2x_link_update()
6989 bnx2x_link_int_ack(params, vars, link_10g_plus); bnx2x_link_update()
6998 if (!(SINGLE_MEDIA_DIRECT(params))) { bnx2x_link_update()
7002 params->phy[EXT_PHY1].flags & bnx2x_link_update()
7004 if (!(params->phy[EXT_PHY1].flags & bnx2x_link_update()
7013 if (params->phy[INT_PHY].config_init) bnx2x_link_update()
7014 params->phy[INT_PHY].config_init( bnx2x_link_update()
7015 &params->phy[INT_PHY], params, bnx2x_link_update()
7024 SINGLE_MEDIA_DIRECT(params)) && bnx2x_link_update()
7028 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) bnx2x_link_update()
7034 rc = bnx2x_update_link_up(params, vars, link_10g_plus); bnx2x_link_update()
7036 rc = bnx2x_update_link_down(params, vars); bnx2x_link_update()
7039 bnx2x_chng_link_count(params, false); bnx2x_link_update()
7042 if (params->feature_config_flags & FEATURE_CONFIG_BC_SUPPORTS_AFEX) bnx2x_link_update()
7105 struct link_params *params, bnx2x_8073_resolve_fc()
7108 struct bnx2x *bp = params->bp; bnx2x_8073_resolve_fc()
7115 if (bnx2x_ext_phy_resolve_fc(phy, params, vars) && bnx2x_8073_resolve_fc()
7313 static void bnx2x_8073_set_pause_cl37(struct link_params *params, bnx2x_8073_set_pause_cl37() argument
7318 struct bnx2x *bp = params->bp; bnx2x_8073_set_pause_cl37()
7324 bnx2x_calc_ieee_aneg_adv(phy, params, &vars->ieee_fc); bnx2x_8073_set_pause_cl37()
7349 struct link_params *params, bnx2x_8073_specific_func()
7352 struct bnx2x *bp = params->bp; bnx2x_8073_specific_func()
7365 struct link_params *params, bnx2x_8073_config_init()
7368 struct bnx2x *bp = params->bp; bnx2x_8073_config_init()
7376 gpio_port = params->port; bnx2x_8073_config_init()
7384 bnx2x_8073_specific_func(phy, params, PHY_INIT); bnx2x_8073_config_init()
7385 bnx2x_8073_set_pause_cl37(params, phy, vars); bnx2x_8073_config_init()
7396 if (params->lane_config & PORT_HW_CFG_SWAP_PHY_POLARITY_ENABLED) { bnx2x_8073_config_init()
7411 if (REG_RD(bp, params->shmem_base + bnx2x_8073_config_init()
7413 port_hw_config[params->port].default_cfg)) & bnx2x_8073_config_init()
7424 if (params->loopback_mode == LOOPBACK_EXT) { bnx2x_8073_config_init()
7502 bnx2x_ext_phy_set_pause(params, phy, vars); bnx2x_8073_config_init()
7513 struct link_params *params, bnx2x_8073_read_status()
7516 struct bnx2x *bp = params->bp; bnx2x_8073_read_status()
7597 params->port); bnx2x_8073_read_status()
7602 params->port); bnx2x_8073_read_status()
7607 params->port); bnx2x_8073_read_status()
7611 params->port); bnx2x_8073_read_status()
7616 if (params->lane_config & bnx2x_8073_read_status()
7638 bnx2x_8073_resolve_fc(phy, params, vars); bnx2x_8073_read_status()
7658 struct link_params *params) bnx2x_8073_link_reset()
7660 struct bnx2x *bp = params->bp; bnx2x_8073_link_reset()
7665 gpio_port = params->port; bnx2x_8073_link_reset()
7677 struct link_params *params, bnx2x_8705_config_init()
7680 struct bnx2x *bp = params->bp; bnx2x_8705_config_init()
7684 MISC_REGISTERS_GPIO_OUTPUT_HIGH, params->port); bnx2x_8705_config_init()
7686 bnx2x_ext_phy_hw_reset(bp, params->port); bnx2x_8705_config_init()
7688 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_8705_config_init()
7699 bnx2x_save_spirom_version(bp, params->port, params->shmem_base, 0); bnx2x_8705_config_init()
7704 struct link_params *params, bnx2x_8705_read_status()
7709 struct bnx2x *bp = params->bp; bnx2x_8705_read_status()
7731 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_8705_read_status()
7739 static void bnx2x_set_disable_pmd_transmit(struct link_params *params, bnx2x_set_disable_pmd_transmit() argument
7743 struct bnx2x *bp = params->bp; bnx2x_set_disable_pmd_transmit()
7748 if (params->feature_config_flags & bnx2x_set_disable_pmd_transmit()
7762 static u8 bnx2x_get_gpio_port(struct link_params *params) bnx2x_get_gpio_port() argument
7766 struct bnx2x *bp = params->bp; bnx2x_get_gpio_port()
7770 gpio_port = params->port; bnx2x_get_gpio_port()
7776 static void bnx2x_sfp_e1e2_set_transmitter(struct link_params *params, bnx2x_sfp_e1e2_set_transmitter() argument
7781 u8 port = params->port; bnx2x_sfp_e1e2_set_transmitter()
7782 struct bnx2x *bp = params->bp; bnx2x_sfp_e1e2_set_transmitter()
7786 tx_en_mode = REG_RD(bp, params->shmem_base + bnx2x_sfp_e1e2_set_transmitter()
7823 gpio_port = bnx2x_get_gpio_port(params); bnx2x_sfp_e1e2_set_transmitter()
7833 static void bnx2x_sfp_set_transmitter(struct link_params *params, bnx2x_sfp_set_transmitter() argument
7837 struct bnx2x *bp = params->bp; bnx2x_sfp_set_transmitter()
7840 bnx2x_sfp_e3_set_transmitter(params, phy, tx_en); bnx2x_sfp_set_transmitter()
7842 bnx2x_sfp_e1e2_set_transmitter(params, phy, tx_en); bnx2x_sfp_set_transmitter()
7846 struct link_params *params, bnx2x_8726_read_sfp_module_eeprom()
7850 struct bnx2x *bp = params->bp; bnx2x_8726_read_sfp_module_eeprom()
7912 static void bnx2x_warpcore_power_module(struct link_params *params, bnx2x_warpcore_power_module() argument
7916 struct bnx2x *bp = params->bp; bnx2x_warpcore_power_module()
7918 pin_cfg = (REG_RD(bp, params->shmem_base + bnx2x_warpcore_power_module()
7920 dev_info.port_hw_config[params->port].e3_sfp_ctrl)) & bnx2x_warpcore_power_module()
7934 struct link_params *params, bnx2x_warpcore_read_sfp_module_eeprom()
7943 struct bnx2x *bp = params->bp; bnx2x_warpcore_read_sfp_module_eeprom()
7955 bnx2x_warpcore_power_module(params, 0); bnx2x_warpcore_read_sfp_module_eeprom()
7958 bnx2x_warpcore_power_module(params, 1); bnx2x_warpcore_read_sfp_module_eeprom()
7960 rc = bnx2x_bsc_read(params, bp, dev_addr, addr32, 0, byte_cnt, bnx2x_warpcore_read_sfp_module_eeprom()
7975 struct link_params *params, bnx2x_8727_read_sfp_module_eeprom()
7979 struct bnx2x *bp = params->bp; bnx2x_8727_read_sfp_module_eeprom()
8070 struct link_params *params, u8 dev_addr, bnx2x_read_sfp_module_eeprom()
8074 struct bnx2x *bp = params->bp; bnx2x_read_sfp_module_eeprom()
8102 rc = read_func(phy, params, dev_addr, addr, xfer_size, bnx2x_read_sfp_module_eeprom()
8112 struct link_params *params, bnx2x_get_edc_mode()
8115 struct bnx2x *bp = params->bp; bnx2x_get_edc_mode()
8122 params, bnx2x_get_edc_mode()
8130 params->link_attr_sync &= ~LINK_SFP_EEPROM_COMP_CODE_MASK; bnx2x_get_edc_mode()
8131 params->link_attr_sync |= val[SFP_EEPROM_10G_COMP_CODE_ADDR] << bnx2x_get_edc_mode()
8133 bnx2x_update_link_attr(params, params->link_attr_sync); bnx2x_get_edc_mode()
8180 u8 gport = params->port; bnx2x_get_edc_mode()
8184 (params->port << 1); bnx2x_get_edc_mode()
8192 bnx2x_sfp_set_transmitter(params, phy, 0); bnx2x_get_edc_mode()
8194 bnx2x_sfp_set_transmitter(params, phy, 1); bnx2x_get_edc_mode()
8200 if (params->phy[idx].type == phy->type) { bnx2x_get_edc_mode()
8206 phy->req_line_speed = params->req_line_speed[cfg_idx]; bnx2x_get_edc_mode()
8214 sync_offset = params->shmem_base + bnx2x_get_edc_mode()
8216 dev_info.port_hw_config[params->port].media_type); bnx2x_get_edc_mode()
8220 if (&(params->phy[phy_idx]) == phy) { bnx2x_get_edc_mode()
8233 params, bnx2x_get_edc_mode()
8254 struct link_params *params) bnx2x_verify_sfp_module()
8256 struct bnx2x *bp = params->bp; bnx2x_verify_sfp_module()
8262 val = REG_RD(bp, params->shmem_base + bnx2x_verify_sfp_module()
8264 port_feature_config[params->port].config)); bnx2x_verify_sfp_module()
8271 if (params->feature_config_flags & bnx2x_verify_sfp_module()
8275 } else if (params->feature_config_flags & bnx2x_verify_sfp_module()
8278 if (DUAL_MEDIA(params)) { bnx2x_verify_sfp_module()
8300 params, bnx2x_verify_sfp_module()
8309 params, bnx2x_verify_sfp_module()
8320 params->port, vendor_name, vendor_pn); bnx2x_verify_sfp_module()
8328 struct link_params *params) bnx2x_wait_for_sfp_module_initialized()
8333 struct bnx2x *bp = params->bp; bnx2x_wait_for_sfp_module_initialized()
8342 phy, params, I2C_DEV_ADDR_A0, 1, 1, &val, bnx2x_wait_for_sfp_module_initialized()
8345 rc = bnx2x_read_sfp_module_eeprom(phy, params, bnx2x_wait_for_sfp_module_initialized()
8356 rc = bnx2x_read_sfp_module_eeprom(phy, params, I2C_DEV_ADDR_A0, bnx2x_wait_for_sfp_module_initialized()
8477 struct link_params *params, bnx2x_8727_specific_func()
8480 struct bnx2x *bp = params->bp; bnx2x_8727_specific_func()
8484 bnx2x_sfp_set_transmitter(params, phy, 0); bnx2x_8727_specific_func()
8488 bnx2x_sfp_set_transmitter(params, phy, 1); bnx2x_8727_specific_func()
8522 static void bnx2x_set_e1e2_module_fault_led(struct link_params *params, bnx2x_set_e1e2_module_fault_led() argument
8525 struct bnx2x *bp = params->bp; bnx2x_set_e1e2_module_fault_led()
8527 u32 fault_led_gpio = REG_RD(bp, params->shmem_base + bnx2x_set_e1e2_module_fault_led()
8529 dev_info.port_hw_config[params->port].sfp_ctrl)) & bnx2x_set_e1e2_module_fault_led()
8539 u8 gpio_port = bnx2x_get_gpio_port(params); bnx2x_set_e1e2_module_fault_led()
8554 static void bnx2x_set_e3_module_fault_led(struct link_params *params, bnx2x_set_e3_module_fault_led() argument
8558 u8 port = params->port; bnx2x_set_e3_module_fault_led()
8559 struct bnx2x *bp = params->bp; bnx2x_set_e3_module_fault_led()
8560 pin_cfg = (REG_RD(bp, params->shmem_base + bnx2x_set_e3_module_fault_led()
8570 static void bnx2x_set_sfp_module_fault_led(struct link_params *params, bnx2x_set_sfp_module_fault_led() argument
8573 struct bnx2x *bp = params->bp; bnx2x_set_sfp_module_fault_led()
8579 bnx2x_set_e3_module_fault_led(params, gpio_mode); bnx2x_set_sfp_module_fault_led()
8581 bnx2x_set_e1e2_module_fault_led(params, gpio_mode); bnx2x_set_sfp_module_fault_led()
8585 struct link_params *params) bnx2x_warpcore_hw_reset()
8587 struct bnx2x *bp = params->bp; bnx2x_warpcore_hw_reset()
8588 bnx2x_warpcore_power_module(params, 0); bnx2x_warpcore_hw_reset()
8598 static void bnx2x_power_sfp_module(struct link_params *params, bnx2x_power_sfp_module() argument
8602 struct bnx2x *bp = params->bp; bnx2x_power_sfp_module()
8608 bnx2x_8727_power_module(params->bp, phy, power); bnx2x_power_sfp_module()
8611 bnx2x_warpcore_power_module(params, power); bnx2x_power_sfp_module()
8617 static void bnx2x_warpcore_set_limiting_mode(struct link_params *params, bnx2x_warpcore_set_limiting_mode() argument
8623 struct bnx2x *bp = params->bp; bnx2x_warpcore_set_limiting_mode()
8625 u8 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_warpcore_set_limiting_mode()
8657 static void bnx2x_set_limiting_mode(struct link_params *params, bnx2x_set_limiting_mode() argument
8663 bnx2x_8726_set_limiting_mode(params->bp, phy, edc_mode); bnx2x_set_limiting_mode()
8667 bnx2x_8727_set_limiting_mode(params->bp, phy, edc_mode); bnx2x_set_limiting_mode()
8670 bnx2x_warpcore_set_limiting_mode(params, phy, edc_mode); bnx2x_set_limiting_mode()
8676 struct link_params *params) bnx2x_sfp_module_detection()
8678 struct bnx2x *bp = params->bp; bnx2x_sfp_module_detection()
8682 u32 val = REG_RD(bp, params->shmem_base + bnx2x_sfp_module_detection()
8684 port_feature_config[params->port].config)); bnx2x_sfp_module_detection()
8686 bnx2x_sfp_set_transmitter(params, phy, 1); bnx2x_sfp_module_detection()
8688 params->port); bnx2x_sfp_module_detection()
8690 bnx2x_power_sfp_module(params, phy, 1); bnx2x_sfp_module_detection()
8691 if (bnx2x_get_edc_mode(phy, params, &edc_mode) != 0) { bnx2x_sfp_module_detection()
8694 } else if (bnx2x_verify_sfp_module(phy, params) != 0) { bnx2x_sfp_module_detection()
8699 bnx2x_set_sfp_module_fault_led(params, bnx2x_sfp_module_detection()
8706 bnx2x_power_sfp_module(params, phy, 0); bnx2x_sfp_module_detection()
8711 bnx2x_set_sfp_module_fault_led(params, MISC_REGISTERS_GPIO_LOW); bnx2x_sfp_module_detection()
8717 bnx2x_set_limiting_mode(params, phy, edc_mode); bnx2x_sfp_module_detection()
8725 bnx2x_sfp_set_transmitter(params, phy, 0); bnx2x_sfp_module_detection()
8730 void bnx2x_handle_module_detect_int(struct link_params *params) bnx2x_handle_module_detect_int() argument
8732 struct bnx2x *bp = params->bp; bnx2x_handle_module_detect_int()
8737 phy = &params->phy[INT_PHY]; bnx2x_handle_module_detect_int()
8739 bnx2x_sfp_set_transmitter(params, phy, 1); bnx2x_handle_module_detect_int()
8741 phy = &params->phy[EXT_PHY1]; bnx2x_handle_module_detect_int()
8743 if (bnx2x_get_mod_abs_int_cfg(bp, params->chip_id, params->shmem_base, bnx2x_handle_module_detect_int()
8744 params->port, &gpio_num, &gpio_port) == bnx2x_handle_module_detect_int()
8751 bnx2x_set_sfp_module_fault_led(params, MISC_REGISTERS_GPIO_HIGH); bnx2x_handle_module_detect_int()
8758 bnx2x_set_mdio_emac_per_phy(bp, params); bnx2x_handle_module_detect_int()
8759 bnx2x_set_aer_mmd(params, phy); bnx2x_handle_module_detect_int()
8761 bnx2x_power_sfp_module(params, phy, 1); bnx2x_handle_module_detect_int()
8765 if (bnx2x_wait_for_sfp_module_initialized(phy, params) == 0) { bnx2x_handle_module_detect_int()
8766 bnx2x_sfp_module_detection(phy, params); bnx2x_handle_module_detect_int()
8778 (params->link_flags & bnx2x_handle_module_detect_int()
8781 bnx2x_warpcore_config_sfi(phy, params); bnx2x_handle_module_detect_int()
8826 struct link_params *params, bnx2x_8706_8726_read_status()
8831 struct bnx2x *bp = params->bp; bnx2x_8706_8726_read_status()
8867 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_8706_8726_read_status()
8888 struct link_params *params, bnx2x_8706_config_init()
8893 struct bnx2x *bp = params->bp; bnx2x_8706_config_init()
8896 MISC_REGISTERS_GPIO_OUTPUT_HIGH, params->port); bnx2x_8706_config_init()
8898 bnx2x_ext_phy_hw_reset(bp, params->port); bnx2x_8706_config_init()
8900 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_8706_config_init()
8911 if ((params->feature_config_flags & bnx2x_8706_config_init()
8970 bnx2x_save_bcm_spirom_ver(bp, phy, params->port); bnx2x_8706_config_init()
8976 tx_en_mode = REG_RD(bp, params->shmem_base + bnx2x_8706_config_init()
8978 dev_info.port_hw_config[params->port].sfp_ctrl)) bnx2x_8706_config_init()
8994 struct link_params *params, bnx2x_8706_read_status()
8997 return bnx2x_8706_8726_read_status(phy, params, vars); bnx2x_8706_read_status()
9004 struct link_params *params) bnx2x_8726_config_loopback()
9006 struct bnx2x *bp = params->bp; bnx2x_8726_config_loopback()
9012 struct link_params *params) bnx2x_8726_external_rom_boot()
9014 struct bnx2x *bp = params->bp; bnx2x_8726_external_rom_boot()
9046 bnx2x_save_bcm_spirom_ver(bp, phy, params->port); bnx2x_8726_external_rom_boot()
9050 struct link_params *params, bnx2x_8726_read_status()
9053 struct bnx2x *bp = params->bp; bnx2x_8726_read_status()
9055 u8 link_up = bnx2x_8706_8726_read_status(phy, params, vars); bnx2x_8726_read_status()
9071 struct link_params *params, bnx2x_8726_config_init()
9074 struct bnx2x *bp = params->bp; bnx2x_8726_config_init()
9078 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_8726_config_init()
9080 bnx2x_8726_external_rom_boot(phy, params); bnx2x_8726_config_init()
9087 bnx2x_sfp_module_detection(phy, params); bnx2x_8726_config_init()
9108 bnx2x_ext_phy_set_pause(params, phy, vars); bnx2x_8726_config_init()
9134 if ((params->feature_config_flags & bnx2x_8726_config_init()
9156 struct link_params *params) bnx2x_8726_link_reset()
9158 struct bnx2x *bp = params->bp; bnx2x_8726_link_reset()
9159 DP(NETIF_MSG_LINK, "bnx2x_8726_link_reset port %d\n", params->port); bnx2x_8726_link_reset()
9171 struct link_params *params, u8 mode) bnx2x_8727_set_link_led()
9173 struct bnx2x *bp = params->bp; bnx2x_8727_set_link_led()
9217 struct link_params *params) { bnx2x_8727_hw_reset()
9223 struct bnx2x *bp = params->bp; bnx2x_8727_hw_reset()
9232 struct link_params *params) bnx2x_8727_config_speed()
9234 struct bnx2x *bp = params->bp; bnx2x_8727_config_speed()
9250 if (DUAL_MEDIA(params)) { bnx2x_8727_config_speed()
9289 struct link_params *params, bnx2x_8727_config_init()
9294 struct bnx2x *bp = params->bp; bnx2x_8727_config_init()
9297 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_8727_config_init()
9301 bnx2x_8727_specific_func(phy, params, PHY_INIT); bnx2x_8727_config_init()
9318 bnx2x_set_disable_pmd_transmit(params, phy, 0); bnx2x_8727_config_init()
9328 bnx2x_8727_config_speed(phy, params); bnx2x_8727_config_init()
9332 if ((params->feature_config_flags & bnx2x_8727_config_init()
9349 tx_en_mode = REG_RD(bp, params->shmem_base + bnx2x_8727_config_init()
9351 dev_info.port_hw_config[params->port].sfp_ctrl)) bnx2x_8727_config_init()
9375 struct link_params *params) bnx2x_8727_handle_mod_abs()
9377 struct bnx2x *bp = params->bp; bnx2x_8727_handle_mod_abs()
9379 u32 val = REG_RD(bp, params->shmem_base + bnx2x_8727_handle_mod_abs()
9381 port_feature_config[params->port]. bnx2x_8727_handle_mod_abs()
9443 bnx2x_sfp_set_transmitter(params, phy, 0); bnx2x_8727_handle_mod_abs()
9445 if (bnx2x_wait_for_sfp_module_initialized(phy, params) == 0) bnx2x_8727_handle_mod_abs()
9446 bnx2x_sfp_module_detection(phy, params); bnx2x_8727_handle_mod_abs()
9451 bnx2x_8727_config_speed(phy, params); bnx2x_8727_handle_mod_abs()
9460 struct link_params *params, bnx2x_8727_read_status()
9464 struct bnx2x *bp = params->bp; bnx2x_8727_read_status()
9465 u8 link_up = 0, oc_port = params->port; bnx2x_8727_read_status()
9506 oc_port = BP_PATH(bp) + (params->port << 1); bnx2x_8727_read_status()
9535 bnx2x_8727_power_module(params->bp, phy, 0); bnx2x_8727_read_status()
9542 bnx2x_8727_handle_mod_abs(phy, params); bnx2x_8727_read_status()
9551 bnx2x_sfp_set_transmitter(params, phy, 1); bnx2x_8727_read_status()
9568 params->port); bnx2x_8727_read_status()
9573 params->port); bnx2x_8727_read_status()
9577 params->port); bnx2x_8727_read_status()
9594 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_8727_read_status()
9599 if ((DUAL_MEDIA(params)) && bnx2x_8727_read_status()
9619 struct link_params *params) bnx2x_8727_link_reset()
9621 struct bnx2x *bp = params->bp; bnx2x_8727_link_reset()
9624 bnx2x_set_disable_pmd_transmit(params, phy, 1); bnx2x_8727_link_reset()
9627 bnx2x_sfp_set_transmitter(params, phy, 0); bnx2x_8727_link_reset()
9746 struct link_params *params, bnx2x_848xx_specific_func()
9749 struct bnx2x *bp = params->bp; bnx2x_848xx_specific_func()
9755 bnx2x_save_848xx_spirom_version(phy, bp, params->port); bnx2x_848xx_specific_func()
9761 bnx2x_bits_en(bp, NIG_REG_LATCH_BC_0 + params->port*4, bnx2x_848xx_specific_func()
9770 struct link_params *params, bnx2x_848xx_cmn_config_init()
9773 struct bnx2x *bp = params->bp; bnx2x_848xx_cmn_config_init()
9776 bnx2x_848xx_specific_func(phy, params, PHY_INIT); bnx2x_848xx_cmn_config_init()
9785 bnx2x_ext_phy_set_pause(params, phy, vars); bnx2x_848xx_cmn_config_init()
9917 struct link_params *params, bnx2x_8481_config_init()
9920 struct bnx2x *bp = params->bp; bnx2x_8481_config_init()
9923 MISC_REGISTERS_GPIO_OUTPUT_HIGH, params->port); bnx2x_8481_config_init()
9926 bnx2x_ext_phy_hw_reset(bp, params->port); bnx2x_8481_config_init()
9927 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_8481_config_init()
9930 return bnx2x_848xx_cmn_config_init(phy, params, vars); bnx2x_8481_config_init()
9936 struct link_params *params, u16 fw_cmd, bnx2x_84833_cmd_hdlr()
9941 struct bnx2x *bp = params->bp; bnx2x_84833_cmd_hdlr()
9992 struct link_params *params, bnx2x_84833_pair_swap_cfg()
9998 struct bnx2x *bp = params->bp; bnx2x_84833_pair_swap_cfg()
10001 pair_swap = REG_RD(bp, params->shmem_base + bnx2x_84833_pair_swap_cfg()
10003 dev_info.port_hw_config[params->port].xgbt_phy_cfg)) & bnx2x_84833_pair_swap_cfg()
10012 status = bnx2x_84833_cmd_hdlr(phy, params, bnx2x_84833_pair_swap_cfg()
10059 struct link_params *params) bnx2x_84833_hw_reset_phy()
10061 struct bnx2x *bp = params->bp; bnx2x_84833_hw_reset_phy()
10063 u32 other_shmem_base_addr = REG_RD(bp, params->shmem2_base + bnx2x_84833_hw_reset_phy()
10077 shmem_base_path[0] = params->shmem_base; bnx2x_84833_hw_reset_phy()
10081 params->chip_id); bnx2x_84833_hw_reset_phy()
10092 struct link_params *params, bnx2x_8483x_disable_eee()
10096 struct bnx2x *bp = params->bp; bnx2x_8483x_disable_eee()
10102 rc = bnx2x_84833_cmd_hdlr(phy, params, bnx2x_8483x_disable_eee()
10109 return bnx2x_eee_disable(phy, params, vars); bnx2x_8483x_disable_eee()
10113 struct link_params *params, bnx2x_8483x_enable_eee()
10117 struct bnx2x *bp = params->bp; bnx2x_8483x_enable_eee()
10120 rc = bnx2x_84833_cmd_hdlr(phy, params, bnx2x_8483x_enable_eee()
10127 return bnx2x_eee_advertise(phy, params, vars, SHMEM_EEE_10G_ADV); bnx2x_8483x_enable_eee()
10132 struct link_params *params, bnx2x_848x3_config_init()
10135 struct bnx2x *bp = params->bp; bnx2x_848x3_config_init()
10147 port = params->port; bnx2x_848x3_config_init()
10160 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_848x3_config_init()
10172 bnx2x_set_autoneg(&params->phy[INT_PHY], params, vars, 0); bnx2x_848x3_config_init()
10173 bnx2x_program_serdes(&params->phy[INT_PHY], params, vars); bnx2x_848x3_config_init()
10193 actual_phy_selection = bnx2x_phy_selection(params); bnx2x_848x3_config_init()
10213 if (params->phy[EXT_PHY2].req_line_speed == SPEED_1000) bnx2x_848x3_config_init()
10219 params->multi_phy_config, val); bnx2x_848x3_config_init()
10223 bnx2x_84833_pair_swap_cfg(phy, params, vars); bnx2x_848x3_config_init()
10230 rc = bnx2x_84833_cmd_hdlr(phy, params, bnx2x_848x3_config_init()
10237 rc = bnx2x_848xx_cmn_config_init(phy, params, vars); bnx2x_848x3_config_init()
10239 bnx2x_save_848xx_spirom_version(phy, bp, params->port); bnx2x_848x3_config_init()
10242 u32 cms_enable = REG_RD(bp, params->shmem_base + bnx2x_848x3_config_init()
10244 dev_info.port_hw_config[params->port].default_cfg)) & bnx2x_848x3_config_init()
10263 bnx2x_eee_has_cap(params)) { bnx2x_848x3_config_init()
10264 rc = bnx2x_eee_initial_config(params, vars, SHMEM_EEE_10G_ADV); bnx2x_848x3_config_init()
10267 bnx2x_8483x_disable_eee(phy, params, vars); bnx2x_848x3_config_init()
10272 (params->eee_mode & EEE_MODE_ADV_LPI) && bnx2x_848x3_config_init()
10273 (bnx2x_eee_calc_timer(params) || bnx2x_848x3_config_init()
10274 !(params->eee_mode & EEE_MODE_ENABLE_LPI))) bnx2x_848x3_config_init()
10275 rc = bnx2x_8483x_enable_eee(phy, params, vars); bnx2x_848x3_config_init()
10277 rc = bnx2x_8483x_disable_eee(phy, params, vars); bnx2x_848x3_config_init()
10298 struct link_params *params, bnx2x_848xx_read_status()
10301 struct bnx2x *bp = params->bp; bnx2x_848xx_read_status()
10380 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_848xx_read_status()
10421 bnx2x_eee_an_resolve(phy, params, vars); bnx2x_848xx_read_status()
10437 struct link_params *params) bnx2x_8481_hw_reset()
10439 bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_1, bnx2x_8481_hw_reset()
10441 bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_1, bnx2x_8481_hw_reset()
10446 struct link_params *params) bnx2x_8481_link_reset()
10448 bnx2x_cl45_write(params->bp, phy, bnx2x_8481_link_reset()
10450 bnx2x_cl45_write(params->bp, phy, bnx2x_8481_link_reset()
10455 struct link_params *params) bnx2x_848x3_link_reset()
10457 struct bnx2x *bp = params->bp; bnx2x_848x3_link_reset()
10464 port = params->port; bnx2x_848x3_link_reset()
10482 struct link_params *params, u8 mode) bnx2x_848xx_set_link_led()
10484 struct bnx2x *bp = params->bp; bnx2x_848xx_set_link_led()
10491 port = params->port; bnx2x_848xx_set_link_led()
10498 if ((params->hw_led_mode << SHARED_HW_CFG_LED_MODE_SHIFT) == bnx2x_848xx_set_link_led()
10534 if ((params->hw_led_mode << SHARED_HW_CFG_LED_MODE_SHIFT) == bnx2x_848xx_set_link_led()
10569 params->port*4) & bnx2x_848xx_set_link_led()
10571 params->link_flags |= bnx2x_848xx_set_link_led()
10577 params->port*4, bnx2x_848xx_set_link_led()
10591 if ((params->hw_led_mode << SHARED_HW_CFG_LED_MODE_SHIFT) == bnx2x_848xx_set_link_led()
10637 params->port*4) & bnx2x_848xx_set_link_led()
10639 params->link_flags |= bnx2x_848xx_set_link_led()
10645 params->port*4, bnx2x_848xx_set_link_led()
10660 if ((params->hw_led_mode << SHARED_HW_CFG_LED_MODE_SHIFT) == bnx2x_848xx_set_link_led()
10705 val = ((params->hw_led_mode << bnx2x_848xx_set_link_led()
10734 if (params->link_flags & bnx2x_848xx_set_link_led()
10736 bnx2x_link_int_enable(params); bnx2x_848xx_set_link_led()
10737 params->link_flags &= bnx2x_848xx_set_link_led()
10758 struct link_params *params, bnx2x_54618se_specific_func()
10761 struct bnx2x *bp = params->bp; bnx2x_54618se_specific_func()
10787 struct link_params *params, bnx2x_54618se_config_init()
10790 struct bnx2x *bp = params->bp; bnx2x_54618se_config_init()
10801 port = params->port; bnx2x_54618se_config_init()
10803 cfg_pin = (REG_RD(bp, params->shmem_base + bnx2x_54618se_config_init()
10818 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_54618se_config_init()
10824 bnx2x_54618se_specific_func(phy, params, PHY_INIT); bnx2x_54618se_config_init()
10839 bnx2x_calc_ieee_aneg_adv(phy, params, &vars->ieee_fc); bnx2x_54618se_config_init()
10931 if ((phy->flags & FLAGS_EEE) && bnx2x_eee_has_cap(params)) { bnx2x_54618se_config_init()
10941 rc = bnx2x_eee_initial_config(params, vars, SHMEM_EEE_1G_ADV); bnx2x_54618se_config_init()
10944 bnx2x_eee_disable(phy, params, vars); bnx2x_54618se_config_init()
10945 } else if ((params->eee_mode & EEE_MODE_ADV_LPI) && bnx2x_54618se_config_init()
10947 (bnx2x_eee_calc_timer(params) || bnx2x_54618se_config_init()
10948 !(params->eee_mode & EEE_MODE_ENABLE_LPI))) { bnx2x_54618se_config_init()
10954 bnx2x_eee_advertise(phy, params, vars, bnx2x_54618se_config_init()
10958 bnx2x_eee_disable(phy, params, vars); bnx2x_54618se_config_init()
10966 if (params->feature_config_flags & bnx2x_54618se_config_init()
10994 struct link_params *params, u8 mode) bnx2x_5461x_set_link_led()
10996 struct bnx2x *bp = params->bp; bnx2x_5461x_set_link_led()
11030 struct link_params *params) bnx2x_54618se_link_reset()
11032 struct bnx2x *bp = params->bp; bnx2x_54618se_link_reset()
11043 port = params->port; bnx2x_54618se_link_reset()
11044 cfg_pin = (REG_RD(bp, params->shmem_base + bnx2x_54618se_link_reset()
11055 struct link_params *params, bnx2x_54618se_read_status()
11058 struct bnx2x *bp = params->bp; bnx2x_54618se_read_status()
11123 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_54618se_read_status()
11154 bnx2x_eee_has_cap(params)) bnx2x_54618se_read_status()
11155 bnx2x_eee_an_resolve(phy, params, vars); bnx2x_54618se_read_status()
11162 struct link_params *params) bnx2x_54618se_config_loopback()
11164 struct bnx2x *bp = params->bp; bnx2x_54618se_config_loopback()
11166 u32 umac_base = params->port ? GRCBASE_UMAC1 : GRCBASE_UMAC0; bnx2x_54618se_config_loopback()
11193 REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4, 1); bnx2x_54618se_config_loopback()
11205 struct link_params *params) bnx2x_7101_config_loopback()
11207 struct bnx2x *bp = params->bp; bnx2x_7101_config_loopback()
11214 struct link_params *params, bnx2x_7101_config_init()
11218 struct bnx2x *bp = params->bp; bnx2x_7101_config_init()
11223 MISC_REGISTERS_GPIO_OUTPUT_HIGH, params->port); bnx2x_7101_config_init()
11225 bnx2x_ext_phy_hw_reset(bp, params->port); bnx2x_7101_config_init()
11226 bnx2x_wait_reset_complete(bp, phy, params); bnx2x_7101_config_init()
11234 bnx2x_ext_phy_set_pause(params, phy, vars); bnx2x_7101_config_init()
11248 bnx2x_save_spirom_version(bp, params->port, bnx2x_7101_config_init()
11254 struct link_params *params, bnx2x_7101_read_status()
11257 struct bnx2x *bp = params->bp; bnx2x_7101_read_status()
11283 bnx2x_ext_phy_resolve_fc(phy, params, vars); bnx2x_7101_read_status()
11332 struct link_params *params) { bnx2x_7101_hw_reset()
11334 bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_2, bnx2x_7101_hw_reset()
11335 MISC_REGISTERS_GPIO_OUTPUT_LOW, params->port); bnx2x_7101_hw_reset()
11337 bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_1, bnx2x_7101_hw_reset()
11338 MISC_REGISTERS_GPIO_OUTPUT_LOW, params->port); bnx2x_7101_hw_reset()
11342 struct link_params *params, u8 mode) bnx2x_7101_set_link_led()
11345 struct bnx2x *bp = params->bp; bnx2x_7101_set_link_led()
12198 static void bnx2x_phy_def_cfg(struct link_params *params, bnx2x_phy_def_cfg() argument
12202 struct bnx2x *bp = params->bp; bnx2x_phy_def_cfg()
12206 link_config = REG_RD(bp, params->shmem_base + bnx2x_phy_def_cfg()
12208 port_feature_config[params->port].link_config2)); bnx2x_phy_def_cfg()
12209 phy->speed_cap_mask = REG_RD(bp, params->shmem_base + bnx2x_phy_def_cfg()
12212 port_hw_config[params->port].speed_capability_mask2)); bnx2x_phy_def_cfg()
12214 link_config = REG_RD(bp, params->shmem_base + bnx2x_phy_def_cfg()
12216 port_feature_config[params->port].link_config)); bnx2x_phy_def_cfg()
12217 phy->speed_cap_mask = REG_RD(bp, params->shmem_base + bnx2x_phy_def_cfg()
12220 port_hw_config[params->port].speed_capability_mask)); bnx2x_phy_def_cfg()
12271 u32 bnx2x_phy_selection(struct link_params *params) bnx2x_phy_selection() argument
12276 phy_config_swapped = params->multi_phy_config & bnx2x_phy_selection()
12279 prio_cfg = params->multi_phy_config & bnx2x_phy_selection()
12303 int bnx2x_phy_probe(struct link_params *params) bnx2x_phy_probe() argument
12307 struct bnx2x *bp = params->bp; bnx2x_phy_probe()
12309 params->num_phys = 0; bnx2x_phy_probe()
12311 phy_config_swapped = params->multi_phy_config & bnx2x_phy_probe()
12326 phy = &params->phy[actual_phy_idx]; bnx2x_phy_probe()
12327 if (bnx2x_populate_phy(bp, phy_index, params->shmem_base, bnx2x_phy_probe()
12328 params->shmem2_base, params->port, bnx2x_phy_probe()
12330 params->num_phys = 0; bnx2x_phy_probe()
12342 if (params->feature_config_flags & bnx2x_phy_probe()
12346 if (!(params->feature_config_flags & bnx2x_phy_probe()
12350 sync_offset = params->shmem_base + bnx2x_phy_probe()
12352 dev_info.port_hw_config[params->port].media_type); bnx2x_phy_probe()
12369 bnx2x_phy_def_cfg(params, phy, phy_index); bnx2x_phy_probe()
12370 params->num_phys++; bnx2x_phy_probe()
12373 DP(NETIF_MSG_LINK, "End phy probe. #phys found %x\n", params->num_phys); bnx2x_phy_probe()
12377 static void bnx2x_init_bmac_loopback(struct link_params *params, bnx2x_init_bmac_loopback() argument
12380 struct bnx2x *bp = params->bp; bnx2x_init_bmac_loopback()
12389 bnx2x_xgxs_deassert(params); bnx2x_init_bmac_loopback()
12392 bnx2x_bmac_enable(params, vars, 1, 1); bnx2x_init_bmac_loopback()
12394 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_init_bmac_loopback()
12397 static void bnx2x_init_emac_loopback(struct link_params *params, bnx2x_init_emac_loopback() argument
12400 struct bnx2x *bp = params->bp; bnx2x_init_emac_loopback()
12409 bnx2x_xgxs_deassert(params); bnx2x_init_emac_loopback()
12411 bnx2x_emac_enable(params, vars, 1); bnx2x_init_emac_loopback()
12412 bnx2x_emac_program(params, vars); bnx2x_init_emac_loopback()
12413 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_init_emac_loopback()
12416 static void bnx2x_init_xmac_loopback(struct link_params *params, bnx2x_init_xmac_loopback() argument
12419 struct bnx2x *bp = params->bp; bnx2x_init_xmac_loopback()
12421 if (!params->req_line_speed[0]) bnx2x_init_xmac_loopback()
12424 vars->line_speed = params->req_line_speed[0]; bnx2x_init_xmac_loopback()
12432 bnx2x_set_aer_mmd(params, &params->phy[0]); bnx2x_init_xmac_loopback()
12433 bnx2x_warpcore_reset_lane(bp, &params->phy[0], 0); bnx2x_init_xmac_loopback()
12434 params->phy[INT_PHY].config_loopback( bnx2x_init_xmac_loopback()
12435 &params->phy[INT_PHY], bnx2x_init_xmac_loopback()
12436 params); bnx2x_init_xmac_loopback()
12438 bnx2x_xmac_enable(params, vars, 1); bnx2x_init_xmac_loopback()
12439 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_init_xmac_loopback()
12442 static void bnx2x_init_umac_loopback(struct link_params *params, bnx2x_init_umac_loopback() argument
12445 struct bnx2x *bp = params->bp; bnx2x_init_umac_loopback()
12452 bnx2x_umac_enable(params, vars, 1); bnx2x_init_umac_loopback()
12454 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_init_umac_loopback()
12457 static void bnx2x_init_xgxs_loopback(struct link_params *params, bnx2x_init_xgxs_loopback() argument
12460 struct bnx2x *bp = params->bp; bnx2x_init_xgxs_loopback()
12461 struct bnx2x_phy *int_phy = &params->phy[INT_PHY]; bnx2x_init_xgxs_loopback()
12465 if (params->req_line_speed[0] == SPEED_1000) bnx2x_init_xgxs_loopback()
12467 else if ((params->req_line_speed[0] == SPEED_20000) || bnx2x_init_xgxs_loopback()
12474 bnx2x_xgxs_deassert(params); bnx2x_init_xgxs_loopback()
12475 bnx2x_link_initialize(params, vars); bnx2x_init_xgxs_loopback()
12477 if (params->req_line_speed[0] == SPEED_1000) { bnx2x_init_xgxs_loopback()
12479 bnx2x_umac_enable(params, vars, 0); bnx2x_init_xgxs_loopback()
12481 bnx2x_emac_program(params, vars); bnx2x_init_xgxs_loopback()
12482 bnx2x_emac_enable(params, vars, 0); bnx2x_init_xgxs_loopback()
12486 bnx2x_xmac_enable(params, vars, 0); bnx2x_init_xgxs_loopback()
12488 bnx2x_bmac_enable(params, vars, 0, 1); bnx2x_init_xgxs_loopback()
12491 if (params->loopback_mode == LOOPBACK_XGXS) { bnx2x_init_xgxs_loopback()
12493 int_phy->config_loopback(int_phy, params); bnx2x_init_xgxs_loopback()
12498 phy_index < params->num_phys; phy_index++) bnx2x_init_xgxs_loopback()
12499 if (params->phy[phy_index].config_loopback) bnx2x_init_xgxs_loopback()
12500 params->phy[phy_index].config_loopback( bnx2x_init_xgxs_loopback()
12501 &params->phy[phy_index], bnx2x_init_xgxs_loopback()
12502 params); bnx2x_init_xgxs_loopback()
12504 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_init_xgxs_loopback()
12506 bnx2x_set_led(params, vars, LED_MODE_OPER, vars->line_speed); bnx2x_init_xgxs_loopback()
12509 void bnx2x_set_rx_filter(struct link_params *params, u8 en) bnx2x_set_rx_filter() argument
12511 struct bnx2x *bp = params->bp; bnx2x_set_rx_filter()
12517 REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK + params->port*4, val); bnx2x_set_rx_filter()
12520 REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK_MF + params->port*4, bnx2x_set_rx_filter()
12524 REG_WR(bp, (params->port ? NIG_REG_LLH1_BRB1_NOT_MCP : bnx2x_set_rx_filter()
12527 static int bnx2x_avoid_link_flap(struct link_params *params, bnx2x_avoid_link_flap() argument
12532 struct bnx2x *bp = params->bp; bnx2x_avoid_link_flap()
12534 bnx2x_set_mdio_emac_per_phy(bp, params); bnx2x_avoid_link_flap()
12536 bnx2x_link_status_update(params, vars); bnx2x_avoid_link_flap()
12543 for (phy_idx = INT_PHY; phy_idx < params->num_phys; phy_idx++) { bnx2x_avoid_link_flap()
12544 struct bnx2x_phy *phy = &params->phy[phy_idx]; bnx2x_avoid_link_flap()
12547 phy->phy_specific_func(phy, params, PHY_INIT); bnx2x_avoid_link_flap()
12552 bnx2x_verify_sfp_module(phy, params); bnx2x_avoid_link_flap()
12554 lfa_sts = REG_RD(bp, params->lfa_base + bnx2x_avoid_link_flap()
12566 params->port)); bnx2x_avoid_link_flap()
12570 params->port)); bnx2x_avoid_link_flap()
12573 bnx2x_umac_enable(params, vars, 0); bnx2x_avoid_link_flap()
12575 bnx2x_xmac_enable(params, vars, 0); bnx2x_avoid_link_flap()
12578 bnx2x_emac_enable(params, vars, 0); bnx2x_avoid_link_flap()
12580 bnx2x_bmac_enable(params, vars, 0, !dont_clear_stat); bnx2x_avoid_link_flap()
12591 REG_WR(bp, params->lfa_base + bnx2x_avoid_link_flap()
12595 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_avoid_link_flap()
12598 bnx2x_link_int_enable(params); bnx2x_avoid_link_flap()
12602 static void bnx2x_cannot_avoid_link_flap(struct link_params *params, bnx2x_cannot_avoid_link_flap() argument
12607 struct bnx2x *bp = params->bp; bnx2x_cannot_avoid_link_flap()
12609 bnx2x_link_reset(params, vars, 1); bnx2x_cannot_avoid_link_flap()
12611 if (!params->lfa_base) bnx2x_cannot_avoid_link_flap()
12614 REG_WR(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12616 params->req_duplex[0] | (params->req_duplex[1] << 16)); bnx2x_cannot_avoid_link_flap()
12618 REG_WR(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12620 params->req_flow_ctrl[0] | (params->req_flow_ctrl[1] << 16)); bnx2x_cannot_avoid_link_flap()
12622 REG_WR(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12624 params->req_line_speed[0] | (params->req_line_speed[1] << 16)); bnx2x_cannot_avoid_link_flap()
12627 REG_WR(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12630 params->speed_cap_mask[cfg_idx]); bnx2x_cannot_avoid_link_flap()
12633 tmp_val = REG_RD(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12636 tmp_val |= params->req_fc_auto_adv; bnx2x_cannot_avoid_link_flap()
12638 REG_WR(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12641 lfa_sts = REG_RD(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12657 REG_WR(bp, params->lfa_base + bnx2x_cannot_avoid_link_flap()
12662 int bnx2x_phy_init(struct link_params *params, struct link_vars *vars) bnx2x_phy_init() argument
12665 struct bnx2x *bp = params->bp; bnx2x_phy_init()
12668 params->req_line_speed[0], params->req_flow_ctrl[0]); bnx2x_phy_init()
12670 params->req_line_speed[1], params->req_flow_ctrl[1]); bnx2x_phy_init()
12671 DP(NETIF_MSG_LINK, "req_adv_flow_ctrl 0x%x\n", params->req_fc_auto_adv); bnx2x_phy_init()
12681 params->link_flags = PHY_INITIALIZED; bnx2x_phy_init()
12683 bnx2x_set_rx_filter(params, 1); bnx2x_phy_init()
12684 bnx2x_chng_link_count(params, true); bnx2x_phy_init()
12686 lfa_status = bnx2x_check_lfa(params); bnx2x_phy_init()
12690 return bnx2x_avoid_link_flap(params, vars); bnx2x_phy_init()
12695 bnx2x_cannot_avoid_link_flap(params, vars, lfa_status); bnx2x_phy_init()
12698 bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + params->port*4, bnx2x_phy_init()
12704 bnx2x_emac_init(params, vars); bnx2x_phy_init()
12706 if (params->feature_config_flags & FEATURE_CONFIG_PFC_ENABLED) bnx2x_phy_init()
12709 if (params->num_phys == 0) { bnx2x_phy_init()
12713 set_phy_vars(params, vars); bnx2x_phy_init()
12715 DP(NETIF_MSG_LINK, "Num of phys on board: %d\n", params->num_phys); bnx2x_phy_init()
12716 switch (params->loopback_mode) { bnx2x_phy_init()
12718 bnx2x_init_bmac_loopback(params, vars); bnx2x_phy_init()
12721 bnx2x_init_emac_loopback(params, vars); bnx2x_phy_init()
12724 bnx2x_init_xmac_loopback(params, vars); bnx2x_phy_init()
12727 bnx2x_init_umac_loopback(params, vars); bnx2x_phy_init()
12731 bnx2x_init_xgxs_loopback(params, vars); bnx2x_phy_init()
12735 if (params->switch_cfg == SWITCH_CFG_10G) bnx2x_phy_init()
12736 bnx2x_xgxs_deassert(params); bnx2x_phy_init()
12738 bnx2x_serdes_deassert(bp, params->port); bnx2x_phy_init()
12740 bnx2x_link_initialize(params, vars); bnx2x_phy_init()
12742 bnx2x_link_int_enable(params); bnx2x_phy_init()
12745 bnx2x_update_mng(params, vars->link_status); bnx2x_phy_init()
12747 bnx2x_update_mng_eee(params, vars->eee_status); bnx2x_phy_init()
12751 int bnx2x_link_reset(struct link_params *params, struct link_vars *vars, bnx2x_link_reset() argument
12754 struct bnx2x *bp = params->bp; bnx2x_link_reset()
12755 u8 phy_index, port = params->port, clear_latch_ind = 0; bnx2x_link_reset()
12759 bnx2x_chng_link_count(params, true); bnx2x_link_reset()
12760 bnx2x_update_mng(params, vars->link_status); bnx2x_link_reset()
12763 bnx2x_update_mng_eee(params, vars->eee_status); bnx2x_link_reset()
12780 bnx2x_set_bmac_rx(bp, params->chip_id, port, 0); bnx2x_link_reset()
12782 bnx2x_set_xmac_rxtx(params, 0); bnx2x_link_reset()
12783 bnx2x_set_umac_rxtx(params, 0); bnx2x_link_reset()
12794 bnx2x_set_mdio_emac_per_phy(bp, params); bnx2x_link_reset()
12795 bnx2x_set_led(params, vars, LED_MODE_OFF, 0); bnx2x_link_reset()
12798 for (phy_index = EXT_PHY1; phy_index < params->num_phys; bnx2x_link_reset()
12800 if (params->phy[phy_index].link_reset) { bnx2x_link_reset()
12801 bnx2x_set_aer_mmd(params, bnx2x_link_reset()
12802 &params->phy[phy_index]); bnx2x_link_reset()
12803 params->phy[phy_index].link_reset( bnx2x_link_reset()
12804 &params->phy[phy_index], bnx2x_link_reset()
12805 params); bnx2x_link_reset()
12807 if (params->phy[phy_index].flags & bnx2x_link_reset()
12819 if (params->phy[INT_PHY].link_reset) bnx2x_link_reset()
12820 params->phy[INT_PHY].link_reset( bnx2x_link_reset()
12821 &params->phy[INT_PHY], params); bnx2x_link_reset()
12831 u32 xmac_base = (params->port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; bnx2x_link_reset()
12832 bnx2x_set_xumac_nig(params, 0, 0); bnx2x_link_reset()
12842 int bnx2x_lfa_reset(struct link_params *params, bnx2x_lfa_reset() argument
12845 struct bnx2x *bp = params->bp; bnx2x_lfa_reset()
12848 params->link_flags &= ~PHY_INITIALIZED; bnx2x_lfa_reset()
12849 if (!params->lfa_base) bnx2x_lfa_reset()
12850 return bnx2x_link_reset(params, vars, 1); bnx2x_lfa_reset()
12855 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 1); bnx2x_lfa_reset()
12862 bnx2x_set_bmac_rx(bp, params->chip_id, params->port, 0); bnx2x_lfa_reset()
12865 bnx2x_set_xmac_rxtx(params, 0); bnx2x_lfa_reset()
12866 bnx2x_set_umac_rxtx(params, 0); bnx2x_lfa_reset()
12874 bnx2x_set_rx_filter(params, 0); bnx2x_lfa_reset()
12883 bnx2x_set_bmac_rx(bp, params->chip_id, params->port, 1); bnx2x_lfa_reset()
12886 bnx2x_set_xmac_rxtx(params, 1); bnx2x_lfa_reset()
12887 bnx2x_set_umac_rxtx(params, 1); bnx2x_lfa_reset()
12890 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_lfa_reset()
13328 static void bnx2x_check_over_curr(struct link_params *params, bnx2x_check_over_curr() argument
13331 struct bnx2x *bp = params->bp; bnx2x_check_over_curr()
13333 u8 port = params->port; bnx2x_check_over_curr()
13336 cfg_pin = (REG_RD(bp, params->shmem_base + bnx2x_check_over_curr()
13355 params->port); bnx2x_check_over_curr()
13357 bnx2x_warpcore_power_module(params, 0); bnx2x_check_over_curr()
13364 static u8 bnx2x_analyze_link_error(struct link_params *params, bnx2x_analyze_link_error() argument
13368 struct bnx2x *bp = params->bp; bnx2x_analyze_link_error()
13404 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 1); bnx2x_analyze_link_error()
13417 REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bnx2x_analyze_link_error()
13419 bnx2x_sync_link(params, vars); bnx2x_analyze_link_error()
13421 bnx2x_set_led(params, vars, led_mode, SPEED_10000); bnx2x_analyze_link_error()
13424 bnx2x_update_mng(params, vars->link_status); bnx2x_analyze_link_error()
13443 static int bnx2x_check_half_open_conn(struct link_params *params, bnx2x_check_half_open_conn() argument
13447 struct bnx2x *bp = params->bp; bnx2x_check_half_open_conn()
13452 (REG_RD(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4))) bnx2x_check_half_open_conn()
13463 mac_base = (params->port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; bnx2x_check_half_open_conn()
13473 bnx2x_analyze_link_error(params, vars, lss_status, bnx2x_check_half_open_conn()
13477 (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << params->port)) { bnx2x_check_half_open_conn()
13481 mac_base = params->port ? NIG_REG_INGRESS_BMAC1_MEM : bnx2x_check_half_open_conn()
13492 bnx2x_analyze_link_error(params, vars, lss_status, bnx2x_check_half_open_conn()
13499 struct link_params *params, bnx2x_sfp_tx_fault_detection()
13502 struct bnx2x *bp = params->bp; bnx2x_sfp_tx_fault_detection()
13504 u8 led_change, port = params->port; bnx2x_sfp_tx_fault_detection()
13507 cfg_pin = (REG_RD(bp, params->shmem_base + offsetof(struct shmem_region, bnx2x_sfp_tx_fault_detection()
13517 led_change = bnx2x_analyze_link_error(params, vars, value, bnx2x_sfp_tx_fault_detection()
13537 bnx2x_set_e3_module_fault_led(params, led_mode); bnx2x_sfp_tx_fault_detection()
13541 static void bnx2x_kr2_recovery(struct link_params *params, bnx2x_kr2_recovery() argument
13545 struct bnx2x *bp = params->bp; bnx2x_kr2_recovery()
13547 bnx2x_warpcore_enable_AN_KR2(phy, params, vars); bnx2x_kr2_recovery()
13548 bnx2x_warpcore_restart_AN_KR(phy, params); bnx2x_kr2_recovery()
13551 static void bnx2x_check_kr2_wa(struct link_params *params, bnx2x_check_kr2_wa() argument
13555 struct bnx2x *bp = params->bp; bnx2x_check_kr2_wa()
13569 sigdet = bnx2x_warpcore_get_sigdet(phy, params); bnx2x_check_kr2_wa()
13571 if (!(params->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) { bnx2x_check_kr2_wa()
13572 bnx2x_kr2_recovery(params, vars, phy); bnx2x_check_kr2_wa()
13578 lane = bnx2x_get_warpcore_lane(phy, params); bnx2x_check_kr2_wa()
13585 bnx2x_set_aer_mmd(params, phy); bnx2x_check_kr2_wa()
13589 if (!(params->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) { bnx2x_check_kr2_wa()
13590 bnx2x_kr2_recovery(params, vars, phy); bnx2x_check_kr2_wa()
13605 if (!(params->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) { bnx2x_check_kr2_wa()
13609 bnx2x_kr2_recovery(params, vars, phy); bnx2x_check_kr2_wa()
13617 bnx2x_disable_kr2(params, vars, phy); bnx2x_check_kr2_wa()
13619 bnx2x_warpcore_restart_AN_KR(phy, params); bnx2x_check_kr2_wa()
13624 void bnx2x_period_func(struct link_params *params, struct link_vars *vars) bnx2x_period_func() argument
13627 struct bnx2x *bp = params->bp; bnx2x_period_func()
13629 if (params->phy[phy_idx].flags & FLAGS_TX_ERROR_CHECK) { bnx2x_period_func()
13630 bnx2x_set_aer_mmd(params, &params->phy[phy_idx]); bnx2x_period_func()
13631 if (bnx2x_check_half_open_conn(params, vars, 1) != bnx2x_period_func()
13639 struct bnx2x_phy *phy = &params->phy[INT_PHY]; bnx2x_period_func()
13640 bnx2x_set_aer_mmd(params, phy); bnx2x_period_func()
13643 bnx2x_check_kr2_wa(params, vars, phy); bnx2x_period_func()
13644 bnx2x_check_over_curr(params, vars); bnx2x_period_func()
13646 bnx2x_warpcore_config_runtime(phy, params, vars); bnx2x_period_func()
13648 if ((REG_RD(bp, params->shmem_base + bnx2x_period_func()
13650 port_hw_config[params->port].default_cfg)) bnx2x_period_func()
13653 if (bnx2x_is_sfp_module_plugged(phy, params)) { bnx2x_period_func()
13654 bnx2x_sfp_tx_fault_detection(phy, params, vars); bnx2x_period_func()
13661 bnx2x_update_mng(params, vars->link_status); bnx2x_period_func()
13688 void bnx2x_hw_reset_phy(struct link_params *params) bnx2x_hw_reset_phy() argument
13691 struct bnx2x *bp = params->bp; bnx2x_hw_reset_phy()
13692 bnx2x_update_mng(params, 0); bnx2x_hw_reset_phy()
13693 bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + params->port*4, bnx2x_hw_reset_phy()
13701 if (params->phy[phy_index].hw_reset) { bnx2x_hw_reset_phy()
13702 params->phy[phy_index].hw_reset( bnx2x_hw_reset_phy()
13703 &params->phy[phy_index], bnx2x_hw_reset_phy()
13704 params); bnx2x_hw_reset_phy()
13705 params->phy[phy_index] = phy_null; bnx2x_hw_reset_phy()
534 bnx2x_ets_e3b0_set_credit_upper_bound_nig( const struct link_params *params, const u32 min_w_val) bnx2x_ets_e3b0_set_credit_upper_bound_nig() argument
656 bnx2x_ets_e3b0_set_credit_upper_bound_pbf( const struct link_params *params, const u32 min_w_val) bnx2x_ets_e3b0_set_credit_upper_bound_pbf() argument
900 bnx2x_ets_e3b0_get_total_bw( const struct link_params *params, struct bnx2x_ets_params *ets_params, u16 *total_bw) bnx2x_ets_e3b0_get_total_bw() argument
1451 bnx2x_set_mdio_emac_per_phy(struct bnx2x *bp, struct link_params *params) bnx2x_set_mdio_emac_per_phy() argument
2959 bnx2x_eee_disable(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_eee_disable() argument
2975 bnx2x_eee_advertise(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars, u8 modes) bnx2x_eee_advertise() argument
3012 bnx2x_eee_an_resolve(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_eee_an_resolve() argument
3225 bnx2x_get_warpcore_lane(struct bnx2x_phy *phy, struct link_params *params) bnx2x_get_warpcore_lane() argument
3349 bnx2x_xgxs_specific_func(struct bnx2x_phy *phy, struct link_params *params, u32 action) bnx2x_xgxs_specific_func() argument
3382 bnx2x_calc_ieee_aneg_adv(struct bnx2x_phy *phy, struct link_params *params, u16 *ieee_fc) bnx2x_calc_ieee_aneg_adv() argument
3519 bnx2x_ext_phy_update_adv_fc(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_ext_phy_update_adv_fc() argument
3574 bnx2x_ext_phy_resolve_fc(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_ext_phy_resolve_fc() argument
3613 bnx2x_warpcore_enable_AN_KR2(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_warpcore_enable_AN_KR2() argument
3687 bnx2x_warpcore_set_lpi_passthrough(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_set_lpi_passthrough() argument
3699 bnx2x_warpcore_restart_AN_KR(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_restart_AN_KR() argument
3714 bnx2x_warpcore_enable_AN_KR(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_warpcore_enable_AN_KR() argument
3866 bnx2x_warpcore_set_10G_KR(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_warpcore_set_10G_KR() argument
3934 bnx2x_warpcore_set_10G_XFI(struct bnx2x_phy *phy, struct link_params *params, u8 is_xfi) bnx2x_warpcore_set_10G_XFI() argument
4070 bnx2x_warpcore_set_20G_force_KR2(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_set_20G_force_KR2() argument
4177 bnx2x_warpcore_set_sgmii_speed(struct bnx2x_phy *phy, struct link_params *params, u8 fiber_mode, u8 always_autoneg) bnx2x_warpcore_set_sgmii_speed() argument
4277 bnx2x_warpcore_clear_regs(struct bnx2x_phy *phy, struct link_params *params, u16 lane) bnx2x_warpcore_clear_regs() argument
4352 bnx2x_is_sfp_module_plugged(struct bnx2x_phy *phy, struct link_params *params) bnx2x_is_sfp_module_plugged() argument
4370 bnx2x_warpcore_get_sigdet(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_get_sigdet() argument
4384 bnx2x_warpcore_config_runtime(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_warpcore_config_runtime() argument
4437 bnx2x_warpcore_config_sfi(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_config_sfi() argument
4475 bnx2x_warpcore_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_warpcore_config_init() argument
4583 bnx2x_warpcore_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_link_reset() argument
4638 bnx2x_set_warpcore_loopback(struct bnx2x_phy *phy, struct link_params *params) bnx2x_set_warpcore_loopback() argument
4963 bnx2x_set_parallel_detection(struct bnx2x_phy *phy, struct link_params *params) bnx2x_set_parallel_detection() argument
5016 bnx2x_set_autoneg(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars, u8 enable_cl73) bnx2x_set_autoneg() argument
5120 bnx2x_program_serdes(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_program_serdes() argument
5169 bnx2x_set_brcm_cl37_advertisement(struct bnx2x_phy *phy, struct link_params *params) bnx2x_set_brcm_cl37_advertisement() argument
5189 bnx2x_set_ieee_aneg_advertisement(struct bnx2x_phy *phy, struct link_params *params, u16 ieee_fc) bnx2x_set_ieee_aneg_advertisement() argument
5210 bnx2x_restart_autoneg(struct bnx2x_phy *phy, struct link_params *params, u8 enable_cl73) bnx2x_restart_autoneg() argument
5250 bnx2x_initialize_sgmii_process(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_initialize_sgmii_process() argument
5322 bnx2x_direct_parallel_detect_used(struct bnx2x_phy *phy, struct link_params *params) bnx2x_direct_parallel_detect_used() argument
5356 bnx2x_update_adv_fc(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars, u32 gp_status) bnx2x_update_adv_fc() argument
5403 bnx2x_flow_ctrl_resolve(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars, u32 gp_status) bnx2x_flow_ctrl_resolve() argument
5431 bnx2x_check_fallback_to_cl37(struct bnx2x_phy *phy, struct link_params *params) bnx2x_check_fallback_to_cl37() argument
5499 bnx2x_xgxs_an_resolve(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars, u32 gp_status) bnx2x_xgxs_an_resolve() argument
5512 bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars, u16 is_link_up, u16 speed_mask, u16 is_duplex) bnx2x_get_link_speed_duplex() argument
5603 bnx2x_link_settings_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_link_settings_status() argument
5677 bnx2x_warpcore_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_warpcore_read_status() argument
5888 bnx2x_set_preemphasis(struct bnx2x_phy *phy, struct link_params *params) bnx2x_set_preemphasis() argument
5912 bnx2x_xgxs_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_xgxs_config_init() argument
5961 bnx2x_prepare_xgxs(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_prepare_xgxs() argument
6000 bnx2x_wait_reset_complete(struct bnx2x *bp, struct bnx2x_phy *phy, struct link_params *params) bnx2x_wait_reset_complete() argument
6235 bnx2x_set_xgxs_loopback(struct bnx2x_phy *phy, struct link_params *params) bnx2x_set_xgxs_loopback() argument
6597 bnx2x_int_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_int_link_reset() argument
6605 bnx2x_common_ext_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_common_ext_link_reset() argument
7104 bnx2x_8073_resolve_fc(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8073_resolve_fc() argument
7348 bnx2x_8073_specific_func(struct bnx2x_phy *phy, struct link_params *params, u32 action) bnx2x_8073_specific_func() argument
7364 bnx2x_8073_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8073_config_init() argument
7512 bnx2x_8073_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8073_read_status() argument
7657 bnx2x_8073_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8073_link_reset() argument
7676 bnx2x_8705_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8705_config_init() argument
7703 bnx2x_8705_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8705_read_status() argument
7845 bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy, struct link_params *params, u8 dev_addr, u16 addr, u8 byte_cnt, u8 *o_buf, u8 is_init) bnx2x_8726_read_sfp_module_eeprom() argument
7933 bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, struct link_params *params, u8 dev_addr, u16 addr, u8 byte_cnt, u8 *o_buf, u8 is_init) bnx2x_warpcore_read_sfp_module_eeprom() argument
7974 bnx2x_8727_read_sfp_module_eeprom(struct bnx2x_phy *phy, struct link_params *params, u8 dev_addr, u16 addr, u8 byte_cnt, u8 *o_buf, u8 is_init) bnx2x_8727_read_sfp_module_eeprom() argument
8069 bnx2x_read_sfp_module_eeprom(struct bnx2x_phy *phy, struct link_params *params, u8 dev_addr, u16 addr, u16 byte_cnt, u8 *o_buf) bnx2x_read_sfp_module_eeprom() argument
8111 bnx2x_get_edc_mode(struct bnx2x_phy *phy, struct link_params *params, u16 *edc_mode) bnx2x_get_edc_mode() argument
8253 bnx2x_verify_sfp_module(struct bnx2x_phy *phy, struct link_params *params) bnx2x_verify_sfp_module() argument
8327 bnx2x_wait_for_sfp_module_initialized(struct bnx2x_phy *phy, struct link_params *params) bnx2x_wait_for_sfp_module_initialized() argument
8476 bnx2x_8727_specific_func(struct bnx2x_phy *phy, struct link_params *params, u32 action) bnx2x_8727_specific_func() argument
8584 bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_warpcore_hw_reset() argument
8675 bnx2x_sfp_module_detection(struct bnx2x_phy *phy, struct link_params *params) bnx2x_sfp_module_detection() argument
8825 bnx2x_8706_8726_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8706_8726_read_status() argument
8887 bnx2x_8706_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8706_config_init() argument
8993 bnx2x_8706_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8706_read_status() argument
9003 bnx2x_8726_config_loopback(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8726_config_loopback() argument
9011 bnx2x_8726_external_rom_boot(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8726_external_rom_boot() argument
9049 bnx2x_8726_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8726_read_status() argument
9070 bnx2x_8726_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8726_config_init() argument
9155 bnx2x_8726_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8726_link_reset() argument
9170 bnx2x_8727_set_link_led(struct bnx2x_phy *phy, struct link_params *params, u8 mode) bnx2x_8727_set_link_led() argument
9216 bnx2x_8727_hw_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8727_hw_reset() argument
9231 bnx2x_8727_config_speed(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8727_config_speed() argument
9288 bnx2x_8727_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8727_config_init() argument
9374 bnx2x_8727_handle_mod_abs(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8727_handle_mod_abs() argument
9459 bnx2x_8727_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8727_read_status() argument
9618 bnx2x_8727_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8727_link_reset() argument
9745 bnx2x_848xx_specific_func(struct bnx2x_phy *phy, struct link_params *params, u32 action) bnx2x_848xx_specific_func() argument
9769 bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_848xx_cmn_config_init() argument
9916 bnx2x_8481_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8481_config_init() argument
9935 bnx2x_84833_cmd_hdlr(struct bnx2x_phy *phy, struct link_params *params, u16 fw_cmd, u16 cmd_args[], int argc) bnx2x_84833_cmd_hdlr() argument
9991 bnx2x_84833_pair_swap_cfg(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_84833_pair_swap_cfg() argument
10058 bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy, struct link_params *params) bnx2x_84833_hw_reset_phy() argument
10091 bnx2x_8483x_disable_eee(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8483x_disable_eee() argument
10112 bnx2x_8483x_enable_eee(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_8483x_enable_eee() argument
10131 bnx2x_848x3_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_848x3_config_init() argument
10297 bnx2x_848xx_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_848xx_read_status() argument
10436 bnx2x_8481_hw_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8481_hw_reset() argument
10445 bnx2x_8481_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_8481_link_reset() argument
10454 bnx2x_848x3_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_848x3_link_reset() argument
10481 bnx2x_848xx_set_link_led(struct bnx2x_phy *phy, struct link_params *params, u8 mode) bnx2x_848xx_set_link_led() argument
10757 bnx2x_54618se_specific_func(struct bnx2x_phy *phy, struct link_params *params, u32 action) bnx2x_54618se_specific_func() argument
10786 bnx2x_54618se_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_54618se_config_init() argument
10993 bnx2x_5461x_set_link_led(struct bnx2x_phy *phy, struct link_params *params, u8 mode) bnx2x_5461x_set_link_led() argument
11029 bnx2x_54618se_link_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_54618se_link_reset() argument
11054 bnx2x_54618se_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_54618se_read_status() argument
11161 bnx2x_54618se_config_loopback(struct bnx2x_phy *phy, struct link_params *params) bnx2x_54618se_config_loopback() argument
11204 bnx2x_7101_config_loopback(struct bnx2x_phy *phy, struct link_params *params) bnx2x_7101_config_loopback() argument
11213 bnx2x_7101_config_init(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_7101_config_init() argument
11253 bnx2x_7101_read_status(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_7101_read_status() argument
11331 bnx2x_7101_hw_reset(struct bnx2x_phy *phy, struct link_params *params) bnx2x_7101_hw_reset() argument
11341 bnx2x_7101_set_link_led(struct bnx2x_phy *phy, struct link_params *params, u8 mode) bnx2x_7101_set_link_led() argument
13498 bnx2x_sfp_tx_fault_detection(struct bnx2x_phy *phy, struct link_params *params, struct link_vars *vars) bnx2x_sfp_tx_fault_detection() argument
H A Dbnx2x_link.h80 #define SINGLE_MEDIA_DIRECT(params) (params->num_phys == 1)
82 #define SINGLE_MEDIA(params) (params->num_phys == 2)
84 #define DUAL_MEDIA(params) (params->num_phys == 3)
127 typedef u8 (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params,
129 typedef u8 (*read_status_t)(struct bnx2x_phy *phy, struct link_params *params,
132 struct link_params *params);
134 struct link_params *params);
136 typedef void (*hw_reset_t)(struct bnx2x_phy *phy, struct link_params *params);
138 struct link_params *params, u8 mode);
140 struct link_params *params, u32 action);
375 int bnx2x_phy_init(struct link_params *params, struct link_vars *vars);
380 int bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
382 int bnx2x_lfa_reset(struct link_params *params, struct link_vars *vars);
384 int bnx2x_link_update(struct link_params *params, struct link_vars *vars);
390 int bnx2x_phy_read(struct link_params *params, u8 phy_addr,
393 int bnx2x_phy_write(struct link_params *params, u8 phy_addr,
401 int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
408 int bnx2x_set_led(struct link_params *params,
417 void bnx2x_handle_module_detect_int(struct link_params *params);
421 int bnx2x_test_link(struct link_params *params, struct link_vars *vars,
436 struct link_params *params, u8 dev_addr,
439 void bnx2x_hw_reset_phy(struct link_params *params);
442 u32 bnx2x_phy_selection(struct link_params *params);
444 /* Probe the phys on board, and populate them in "params" */
445 int bnx2x_phy_probe(struct link_params *params);
452 void bnx2x_set_rx_filter(struct link_params *params, u8 en);
468 /* PFC port configuration params */
482 /* ETS port configuration params */
505 } params; member in struct:bnx2x_ets_cos_params
516 int bnx2x_update_pfc(struct link_params *params,
522 int bnx2x_ets_disabled(struct link_params *params,
526 void bnx2x_ets_bw_limit(const struct link_params *params, const u32 cos0_bw,
530 int bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos);
534 int bnx2x_ets_e3b0_config(const struct link_params *params,
542 void bnx2x_period_func(struct link_params *params, struct link_vars *vars);
H A Dbnx2x_sp.c4167 * @params: parameters to perform the transition
4172 * not set in params->ramrod_flags for asynchronous commands).
4176 struct bnx2x_queue_state_params *params) bnx2x_queue_state_change()
4178 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_queue_state_change()
4183 rc = o->check_transition(bp, o, params); bnx2x_queue_state_change()
4191 pending_bit = o->set_pending(o, params); bnx2x_queue_state_change()
4195 if (test_bit(RAMROD_DRV_CLR_ONLY, &params->ramrod_flags)) bnx2x_queue_state_change()
4199 rc = o->send_cmd(bp, params); bnx2x_queue_state_change()
4207 if (test_bit(RAMROD_COMP_WAIT, &params->ramrod_flags)) { bnx2x_queue_state_change()
4220 struct bnx2x_queue_state_params *params) bnx2x_queue_set_pending()
4222 enum bnx2x_queue_cmd cmd = params->cmd, bit; bnx2x_queue_set_pending()
4300 struct bnx2x_queue_setup_params *params = &cmd_params->params.setup; bnx2x_q_fill_setup_data_e2() local
4305 data->rx.tpa_en |= test_bit(BNX2X_Q_FLG_TPA_IPV6, &params->flags) * bnx2x_q_fill_setup_data_e2()
4311 struct bnx2x_general_setup_params *params, bnx2x_q_fill_init_general_data()
4319 params->stat_id; bnx2x_q_fill_init_general_data()
4329 gen_data->sp_client_id = params->spcl_id; bnx2x_q_fill_init_general_data()
4330 gen_data->mtu = cpu_to_le16(params->mtu); bnx2x_q_fill_init_general_data()
4333 gen_data->cos = params->cos; bnx2x_q_fill_init_general_data()
4339 gen_data->fp_hsi_ver = params->fp_hsi; bnx2x_q_fill_init_general_data()
4346 struct bnx2x_txq_setup_params *params, bnx2x_q_fill_init_tx_data()
4353 cpu_to_le16(params->default_vlan); bnx2x_q_fill_init_tx_data()
4370 tx_data->tx_status_block_id = params->fw_sb_id; bnx2x_q_fill_init_tx_data()
4371 tx_data->tx_sb_index_number = params->sb_cq_index; bnx2x_q_fill_init_tx_data()
4372 tx_data->tss_leading_client_id = params->tss_leading_cl_id; bnx2x_q_fill_init_tx_data()
4375 cpu_to_le32(U64_LO(params->dscr_map)); bnx2x_q_fill_init_tx_data()
4377 cpu_to_le32(U64_HI(params->dscr_map)); bnx2x_q_fill_init_tx_data()
4384 struct rxq_pause_params *params, bnx2x_q_fill_init_pause_data()
4388 rx_data->cqe_pause_thr_low = cpu_to_le16(params->rcq_th_lo); bnx2x_q_fill_init_pause_data()
4389 rx_data->cqe_pause_thr_high = cpu_to_le16(params->rcq_th_hi); bnx2x_q_fill_init_pause_data()
4390 rx_data->bd_pause_thr_low = cpu_to_le16(params->bd_th_lo); bnx2x_q_fill_init_pause_data()
4391 rx_data->bd_pause_thr_high = cpu_to_le16(params->bd_th_hi); bnx2x_q_fill_init_pause_data()
4392 rx_data->sge_pause_thr_low = cpu_to_le16(params->sge_th_lo); bnx2x_q_fill_init_pause_data()
4393 rx_data->sge_pause_thr_high = cpu_to_le16(params->sge_th_hi); bnx2x_q_fill_init_pause_data()
4394 rx_data->rx_cos_mask = cpu_to_le16(params->pri_map); bnx2x_q_fill_init_pause_data()
4398 struct bnx2x_rxq_setup_params *params, bnx2x_q_fill_init_rx_data()
4409 params->cache_line_log; bnx2x_q_fill_init_rx_data()
4412 rx_data->max_sges_for_packet = params->max_sges_pkt; bnx2x_q_fill_init_rx_data()
4413 rx_data->client_qzone_id = params->cl_qzone_id; bnx2x_q_fill_init_rx_data()
4414 rx_data->max_agg_size = cpu_to_le16(params->tpa_agg_sz); bnx2x_q_fill_init_rx_data()
4429 rx_data->status_block_id = params->fw_sb_id; bnx2x_q_fill_init_rx_data()
4430 rx_data->rx_sb_index_number = params->sb_cq_index; bnx2x_q_fill_init_rx_data()
4431 rx_data->max_tpa_queues = params->max_tpa_queues; bnx2x_q_fill_init_rx_data()
4432 rx_data->max_bytes_on_bd = cpu_to_le16(params->buf_sz); bnx2x_q_fill_init_rx_data()
4433 rx_data->sge_buff_size = cpu_to_le16(params->sge_buf_sz); bnx2x_q_fill_init_rx_data()
4435 cpu_to_le32(U64_LO(params->dscr_map)); bnx2x_q_fill_init_rx_data()
4437 cpu_to_le32(U64_HI(params->dscr_map)); bnx2x_q_fill_init_rx_data()
4439 cpu_to_le32(U64_LO(params->sge_map)); bnx2x_q_fill_init_rx_data()
4441 cpu_to_le32(U64_HI(params->sge_map)); bnx2x_q_fill_init_rx_data()
4443 cpu_to_le32(U64_LO(params->rcq_map)); bnx2x_q_fill_init_rx_data()
4445 cpu_to_le32(U64_HI(params->rcq_map)); bnx2x_q_fill_init_rx_data()
4449 rx_data->approx_mcast_engine_id = params->mcast_engine_id; bnx2x_q_fill_init_rx_data()
4453 rx_data->rss_engine_id = params->rss_engine_id; bnx2x_q_fill_init_rx_data()
4459 cpu_to_le16(params->silent_removal_value); bnx2x_q_fill_init_rx_data()
4461 cpu_to_le16(params->silent_removal_mask); bnx2x_q_fill_init_rx_data()
4470 &cmd_params->params.setup.gen_params, bnx2x_q_fill_setup_data_cmn()
4472 &cmd_params->params.setup.flags); bnx2x_q_fill_setup_data_cmn()
4475 &cmd_params->params.setup.txq_params, bnx2x_q_fill_setup_data_cmn()
4477 &cmd_params->params.setup.flags); bnx2x_q_fill_setup_data_cmn()
4480 &cmd_params->params.setup.rxq_params, bnx2x_q_fill_setup_data_cmn()
4482 &cmd_params->params.setup.flags); bnx2x_q_fill_setup_data_cmn()
4485 &cmd_params->params.setup.pause_params, bnx2x_q_fill_setup_data_cmn()
4495 &cmd_params->params.tx_only.gen_params, bnx2x_q_fill_setup_tx_only()
4497 &cmd_params->params.tx_only.flags); bnx2x_q_fill_setup_tx_only()
4500 &cmd_params->params.tx_only.txq_params, bnx2x_q_fill_setup_tx_only()
4502 &cmd_params->params.tx_only.flags); bnx2x_q_fill_setup_tx_only()
4514 * @params:
4522 struct bnx2x_queue_state_params *params) bnx2x_q_init()
4524 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_init()
4525 struct bnx2x_queue_init_params *init = &params->params.init; bnx2x_q_init()
4569 struct bnx2x_queue_state_params *params) bnx2x_q_send_setup_e1x()
4571 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_setup_e1x()
4581 bnx2x_q_fill_setup_data_cmn(bp, params, rdata); bnx2x_q_send_setup_e1x()
4595 struct bnx2x_queue_state_params *params) bnx2x_q_send_setup_e2()
4597 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_setup_e2()
4607 bnx2x_q_fill_setup_data_cmn(bp, params, rdata); bnx2x_q_send_setup_e2()
4608 bnx2x_q_fill_setup_data_e2(bp, params, rdata); bnx2x_q_send_setup_e2()
4622 struct bnx2x_queue_state_params *params) bnx2x_q_send_setup_tx_only()
4624 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_setup_tx_only()
4630 &params->params.tx_only; bnx2x_q_send_setup_tx_only()
4647 bnx2x_q_fill_setup_tx_only(bp, params, rdata); bnx2x_q_send_setup_tx_only()
4666 struct bnx2x_queue_update_params *params, bnx2x_q_fill_update_data()
4676 data->default_vlan = cpu_to_le16(params->def_vlan); bnx2x_q_fill_update_data()
4680 test_bit(BNX2X_Q_UPDATE_IN_VLAN_REM, &params->update_flags); bnx2x_q_fill_update_data()
4683 &params->update_flags); bnx2x_q_fill_update_data()
4687 test_bit(BNX2X_Q_UPDATE_OUT_VLAN_REM, &params->update_flags); bnx2x_q_fill_update_data()
4690 &params->update_flags); bnx2x_q_fill_update_data()
4696 test_bit(BNX2X_Q_UPDATE_ANTI_SPOOF, &params->update_flags); bnx2x_q_fill_update_data()
4698 test_bit(BNX2X_Q_UPDATE_ANTI_SPOOF_CHNG, &params->update_flags); bnx2x_q_fill_update_data()
4702 test_bit(BNX2X_Q_UPDATE_ACTIVATE, &params->update_flags); bnx2x_q_fill_update_data()
4704 test_bit(BNX2X_Q_UPDATE_ACTIVATE_CHNG, &params->update_flags); bnx2x_q_fill_update_data()
4708 test_bit(BNX2X_Q_UPDATE_DEF_VLAN_EN, &params->update_flags); bnx2x_q_fill_update_data()
4711 &params->update_flags); bnx2x_q_fill_update_data()
4716 &params->update_flags); bnx2x_q_fill_update_data()
4718 test_bit(BNX2X_Q_UPDATE_SILENT_VLAN_REM, &params->update_flags); bnx2x_q_fill_update_data()
4719 data->silent_vlan_value = cpu_to_le16(params->silent_removal_value); bnx2x_q_fill_update_data()
4720 data->silent_vlan_mask = cpu_to_le16(params->silent_removal_mask); bnx2x_q_fill_update_data()
4724 test_bit(BNX2X_Q_UPDATE_TX_SWITCHING, &params->update_flags); bnx2x_q_fill_update_data()
4727 &params->update_flags); bnx2x_q_fill_update_data()
4731 test_bit(BNX2X_Q_UPDATE_PTP_PKTS, &params->update_flags); bnx2x_q_fill_update_data()
4733 test_bit(BNX2X_Q_UPDATE_PTP_PKTS_CHNG, &params->update_flags); bnx2x_q_fill_update_data()
4737 struct bnx2x_queue_state_params *params) bnx2x_q_send_update()
4739 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_update()
4744 &params->params.update; bnx2x_q_send_update()
4774 * @params:
4779 struct bnx2x_queue_state_params *params) bnx2x_q_send_deactivate()
4781 struct bnx2x_queue_update_params *update = &params->params.update; bnx2x_q_send_deactivate()
4787 return bnx2x_q_send_update(bp, params); bnx2x_q_send_deactivate()
4794 * @params:
4799 struct bnx2x_queue_state_params *params) bnx2x_q_send_activate()
4801 struct bnx2x_queue_update_params *update = &params->params.update; bnx2x_q_send_activate()
4808 return bnx2x_q_send_update(bp, params); bnx2x_q_send_activate()
4813 struct bnx2x_queue_update_tpa_params *params, bnx2x_q_fill_update_tpa_data()
4817 data->complete_on_both_clients = params->complete_on_both_clients; bnx2x_q_fill_update_tpa_data()
4819 params->dont_verify_thr; bnx2x_q_fill_update_tpa_data()
4820 data->max_agg_size = cpu_to_le16(params->max_agg_sz); bnx2x_q_fill_update_tpa_data()
4821 data->max_sges_for_packet = params->max_sges_pkt; bnx2x_q_fill_update_tpa_data()
4822 data->max_tpa_queues = params->max_tpa_queues; bnx2x_q_fill_update_tpa_data()
4823 data->sge_buff_size = cpu_to_le16(params->sge_buff_sz); bnx2x_q_fill_update_tpa_data()
4824 data->sge_page_base_hi = cpu_to_le32(U64_HI(params->sge_map)); bnx2x_q_fill_update_tpa_data()
4825 data->sge_page_base_lo = cpu_to_le32(U64_LO(params->sge_map)); bnx2x_q_fill_update_tpa_data()
4826 data->sge_pause_thr_high = cpu_to_le16(params->sge_pause_thr_high); bnx2x_q_fill_update_tpa_data()
4827 data->sge_pause_thr_low = cpu_to_le16(params->sge_pause_thr_low); bnx2x_q_fill_update_tpa_data()
4828 data->tpa_mode = params->tpa_mode; bnx2x_q_fill_update_tpa_data()
4829 data->update_ipv4 = params->update_ipv4; bnx2x_q_fill_update_tpa_data()
4830 data->update_ipv6 = params->update_ipv6; bnx2x_q_fill_update_tpa_data()
4834 struct bnx2x_queue_state_params *params) bnx2x_q_send_update_tpa()
4836 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_update_tpa()
4841 &params->params.update_tpa; bnx2x_q_send_update_tpa()
4870 struct bnx2x_queue_state_params *params) bnx2x_q_send_halt()
4872 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_halt()
4880 struct bnx2x_queue_state_params *params) bnx2x_q_send_cfc_del()
4882 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_cfc_del()
4883 u8 cid_idx = params->params.cfc_del.cid_index; bnx2x_q_send_cfc_del()
4896 struct bnx2x_queue_state_params *params) bnx2x_q_send_terminate()
4898 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_terminate()
4899 u8 cid_index = params->params.terminate.cid_index; bnx2x_q_send_terminate()
4912 struct bnx2x_queue_state_params *params) bnx2x_q_send_empty()
4914 struct bnx2x_queue_sp_obj *o = params->q_obj; bnx2x_q_send_empty()
4922 struct bnx2x_queue_state_params *params) bnx2x_queue_send_cmd_cmn()
4924 switch (params->cmd) { bnx2x_queue_send_cmd_cmn()
4926 return bnx2x_q_init(bp, params); bnx2x_queue_send_cmd_cmn()
4928 return bnx2x_q_send_setup_tx_only(bp, params); bnx2x_queue_send_cmd_cmn()
4930 return bnx2x_q_send_deactivate(bp, params); bnx2x_queue_send_cmd_cmn()
4932 return bnx2x_q_send_activate(bp, params); bnx2x_queue_send_cmd_cmn()
4934 return bnx2x_q_send_update(bp, params); bnx2x_queue_send_cmd_cmn()
4936 return bnx2x_q_send_update_tpa(bp, params); bnx2x_queue_send_cmd_cmn()
4938 return bnx2x_q_send_halt(bp, params); bnx2x_queue_send_cmd_cmn()
4940 return bnx2x_q_send_cfc_del(bp, params); bnx2x_queue_send_cmd_cmn()
4942 return bnx2x_q_send_terminate(bp, params); bnx2x_queue_send_cmd_cmn()
4944 return bnx2x_q_send_empty(bp, params); bnx2x_queue_send_cmd_cmn()
4946 BNX2X_ERR("Unknown command: %d\n", params->cmd); bnx2x_queue_send_cmd_cmn()
4952 struct bnx2x_queue_state_params *params) bnx2x_queue_send_cmd_e1x()
4954 switch (params->cmd) { bnx2x_queue_send_cmd_e1x()
4956 return bnx2x_q_send_setup_e1x(bp, params); bnx2x_queue_send_cmd_e1x()
4967 return bnx2x_queue_send_cmd_cmn(bp, params); bnx2x_queue_send_cmd_e1x()
4969 BNX2X_ERR("Unknown command: %d\n", params->cmd); bnx2x_queue_send_cmd_e1x()
4975 struct bnx2x_queue_state_params *params) bnx2x_queue_send_cmd_e2()
4977 switch (params->cmd) { bnx2x_queue_send_cmd_e2()
4979 return bnx2x_q_send_setup_e2(bp, params); bnx2x_queue_send_cmd_e2()
4990 return bnx2x_queue_send_cmd_cmn(bp, params); bnx2x_queue_send_cmd_e2()
4992 BNX2X_ERR("Unknown command: %d\n", params->cmd); bnx2x_queue_send_cmd_e2()
5002 * @params:
5015 struct bnx2x_queue_state_params *params) bnx2x_queue_chk_transition()
5018 enum bnx2x_queue_cmd cmd = params->cmd; bnx2x_queue_chk_transition()
5020 &params->params.update; bnx2x_queue_chk_transition()
5026 if (test_bit(RAMROD_DRV_CLR_ONLY, &params->ramrod_flags)) { bnx2x_queue_chk_transition()
5049 &params->params.setup.flags)) bnx2x_queue_chk_transition()
5321 * @params:
5333 struct bnx2x_func_state_params *params) bnx2x_func_chk_transition()
5336 enum bnx2x_func_cmd cmd = params->cmd; bnx2x_func_chk_transition()
5341 if (test_bit(RAMROD_DRV_CLR_ONLY, &params->ramrod_flags)) { bnx2x_func_chk_transition()
5505 struct bnx2x_func_state_params *params) bnx2x_func_hw_init()
5507 u32 load_code = params->params.hw_init.load_phase; bnx2x_func_hw_init()
5508 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_hw_init()
5625 struct bnx2x_func_state_params *params) bnx2x_func_hw_reset()
5627 u32 reset_phase = params->params.hw_reset.reset_phase; bnx2x_func_hw_reset()
5628 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_hw_reset()
5657 struct bnx2x_func_state_params *params) bnx2x_func_send_start()
5659 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_send_start()
5663 struct bnx2x_func_start_params *start_params = &params->params.start; bnx2x_func_send_start()
5706 struct bnx2x_func_state_params *params) bnx2x_func_send_switch_update()
5708 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_send_switch_update()
5713 &params->params.switch_update; bnx2x_func_send_switch_update()
5778 struct bnx2x_func_state_params *params) bnx2x_func_send_afex_update()
5780 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_send_afex_update()
5785 &params->params.afex_update; bnx2x_func_send_afex_update()
5817 struct bnx2x_func_state_params *params) bnx2x_func_send_afex_viflists()
5819 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_send_afex_viflists()
5823 &params->params.afex_viflists; bnx2x_func_send_afex_viflists()
5855 struct bnx2x_func_state_params *params) bnx2x_func_send_stop()
5862 struct bnx2x_func_state_params *params) bnx2x_func_send_tx_stop()
5868 struct bnx2x_func_state_params *params) bnx2x_func_send_tx_start()
5870 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_send_tx_start()
5875 &params->params.tx_start; bnx2x_func_send_tx_start()
5901 struct bnx2x_func_state_params *params) bnx2x_func_send_set_timesync()
5903 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_send_set_timesync()
5908 &params->params.set_timesync; bnx2x_func_send_set_timesync()
5924 DP(BNX2X_MSG_SP, "Set timesync command params: drift_cmd = %d, offset_cmd = %d, add_sub_drift = %d, drift_val = %d, drift_period = %d, offset_lo = %d, offset_hi = %d\n", bnx2x_func_send_set_timesync()
5936 struct bnx2x_func_state_params *params) bnx2x_func_send_cmd()
5938 switch (params->cmd) { bnx2x_func_send_cmd()
5940 return bnx2x_func_hw_init(bp, params); bnx2x_func_send_cmd()
5942 return bnx2x_func_send_start(bp, params); bnx2x_func_send_cmd()
5944 return bnx2x_func_send_stop(bp, params); bnx2x_func_send_cmd()
5946 return bnx2x_func_hw_reset(bp, params); bnx2x_func_send_cmd()
5948 return bnx2x_func_send_afex_update(bp, params); bnx2x_func_send_cmd()
5950 return bnx2x_func_send_afex_viflists(bp, params); bnx2x_func_send_cmd()
5952 return bnx2x_func_send_tx_stop(bp, params); bnx2x_func_send_cmd()
5954 return bnx2x_func_send_tx_start(bp, params); bnx2x_func_send_cmd()
5956 return bnx2x_func_send_switch_update(bp, params); bnx2x_func_send_cmd()
5958 return bnx2x_func_send_set_timesync(bp, params); bnx2x_func_send_cmd()
5960 BNX2X_ERR("Unknown command: %d\n", params->cmd); bnx2x_func_send_cmd()
5991 * @params: parameters to perform the transaction
5997 * not set in params->ramrod_flags for asynchronous
6001 struct bnx2x_func_state_params *params) bnx2x_func_state_change()
6003 struct bnx2x_func_sp_obj *o = params->f_obj; bnx2x_func_state_change()
6005 enum bnx2x_func_cmd cmd = params->cmd; bnx2x_func_state_change()
6011 rc = o->check_transition(bp, o, params); bnx2x_func_state_change()
6013 (test_bit(RAMROD_RETRY, &params->ramrod_flags))) { bnx2x_func_state_change()
6018 rc = o->check_transition(bp, o, params); bnx2x_func_state_change()
6034 if (test_bit(RAMROD_DRV_CLR_ONLY, &params->ramrod_flags)) { bnx2x_func_state_change()
6039 rc = o->send_cmd(bp, params); bnx2x_func_state_change()
6050 if (test_bit(RAMROD_COMP_WAIT, &params->ramrod_flags)) { bnx2x_func_state_change()
4175 bnx2x_queue_state_change(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_queue_state_change() argument
4219 bnx2x_queue_set_pending(struct bnx2x_queue_sp_obj *obj, struct bnx2x_queue_state_params *params) bnx2x_queue_set_pending() argument
4309 bnx2x_q_fill_init_general_data(struct bnx2x *bp, struct bnx2x_queue_sp_obj *o, struct bnx2x_general_setup_params *params, struct client_init_general_data *gen_data, unsigned long *flags) bnx2x_q_fill_init_general_data() argument
4345 bnx2x_q_fill_init_tx_data(struct bnx2x_queue_sp_obj *o, struct bnx2x_txq_setup_params *params, struct client_init_tx_data *tx_data, unsigned long *flags) bnx2x_q_fill_init_tx_data() argument
4383 bnx2x_q_fill_init_pause_data(struct bnx2x_queue_sp_obj *o, struct rxq_pause_params *params, struct client_init_rx_data *rx_data) bnx2x_q_fill_init_pause_data() argument
4397 bnx2x_q_fill_init_rx_data(struct bnx2x_queue_sp_obj *o, struct bnx2x_rxq_setup_params *params, struct client_init_rx_data *rx_data, unsigned long *flags) bnx2x_q_fill_init_rx_data() argument
4521 bnx2x_q_init(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_init() argument
4568 bnx2x_q_send_setup_e1x(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_setup_e1x() argument
4594 bnx2x_q_send_setup_e2(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_setup_e2() argument
4621 bnx2x_q_send_setup_tx_only(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_setup_tx_only() argument
4664 bnx2x_q_fill_update_data(struct bnx2x *bp, struct bnx2x_queue_sp_obj *obj, struct bnx2x_queue_update_params *params, struct client_update_ramrod_data *data) bnx2x_q_fill_update_data() argument
4736 bnx2x_q_send_update(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_update() argument
4778 bnx2x_q_send_deactivate(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_deactivate() argument
4798 bnx2x_q_send_activate(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_activate() argument
4811 bnx2x_q_fill_update_tpa_data(struct bnx2x *bp, struct bnx2x_queue_sp_obj *obj, struct bnx2x_queue_update_tpa_params *params, struct tpa_update_ramrod_data *data) bnx2x_q_fill_update_tpa_data() argument
4833 bnx2x_q_send_update_tpa(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_update_tpa() argument
4869 bnx2x_q_send_halt(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_halt() argument
4879 bnx2x_q_send_cfc_del(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_cfc_del() argument
4895 bnx2x_q_send_terminate(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_terminate() argument
4911 bnx2x_q_send_empty(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_q_send_empty() argument
4921 bnx2x_queue_send_cmd_cmn(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_queue_send_cmd_cmn() argument
4951 bnx2x_queue_send_cmd_e1x(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_queue_send_cmd_e1x() argument
4974 bnx2x_queue_send_cmd_e2(struct bnx2x *bp, struct bnx2x_queue_state_params *params) bnx2x_queue_send_cmd_e2() argument
5013 bnx2x_queue_chk_transition(struct bnx2x *bp, struct bnx2x_queue_sp_obj *o, struct bnx2x_queue_state_params *params) bnx2x_queue_chk_transition() argument
5331 bnx2x_func_chk_transition(struct bnx2x *bp, struct bnx2x_func_sp_obj *o, struct bnx2x_func_state_params *params) bnx2x_func_chk_transition() argument
5504 bnx2x_func_hw_init(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_hw_init() argument
5624 bnx2x_func_hw_reset(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_hw_reset() argument
5656 bnx2x_func_send_start(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_start() argument
5705 bnx2x_func_send_switch_update(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_switch_update() argument
5777 bnx2x_func_send_afex_update(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_afex_update() argument
5816 bnx2x_func_send_afex_viflists(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_afex_viflists() argument
5854 bnx2x_func_send_stop(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_stop() argument
5861 bnx2x_func_send_tx_stop(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_tx_stop() argument
5867 bnx2x_func_send_tx_start(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_tx_start() argument
5900 bnx2x_func_send_set_timesync(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_set_timesync() argument
5935 bnx2x_func_send_cmd(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_send_cmd() argument
6000 bnx2x_func_state_change(struct bnx2x *bp, struct bnx2x_func_state_params *params) bnx2x_func_state_change() argument
/linux-4.1.27/drivers/media/common/
H A Dcx2341x.c278 static int cx2341x_get_ctrl(const struct cx2341x_mpeg_params *params, cx2341x_get_ctrl() argument
283 ctrl->value = params->audio_sampling_freq; cx2341x_get_ctrl()
286 ctrl->value = params->audio_encoding; cx2341x_get_ctrl()
289 ctrl->value = params->audio_l2_bitrate; cx2341x_get_ctrl()
292 ctrl->value = params->audio_ac3_bitrate; cx2341x_get_ctrl()
295 ctrl->value = params->audio_mode; cx2341x_get_ctrl()
298 ctrl->value = params->audio_mode_extension; cx2341x_get_ctrl()
301 ctrl->value = params->audio_emphasis; cx2341x_get_ctrl()
304 ctrl->value = params->audio_crc; cx2341x_get_ctrl()
307 ctrl->value = params->audio_mute; cx2341x_get_ctrl()
310 ctrl->value = params->video_encoding; cx2341x_get_ctrl()
313 ctrl->value = params->video_aspect; cx2341x_get_ctrl()
316 ctrl->value = params->video_b_frames; cx2341x_get_ctrl()
319 ctrl->value = params->video_gop_size; cx2341x_get_ctrl()
322 ctrl->value = params->video_gop_closure; cx2341x_get_ctrl()
325 ctrl->value = params->video_bitrate_mode; cx2341x_get_ctrl()
328 ctrl->value = params->video_bitrate; cx2341x_get_ctrl()
331 ctrl->value = params->video_bitrate_peak; cx2341x_get_ctrl()
334 ctrl->value = params->video_temporal_decimation; cx2341x_get_ctrl()
337 ctrl->value = params->video_mute; cx2341x_get_ctrl()
340 ctrl->value = params->video_mute_yuv; cx2341x_get_ctrl()
343 ctrl->value = params->stream_type; cx2341x_get_ctrl()
346 ctrl->value = params->stream_vbi_fmt; cx2341x_get_ctrl()
349 ctrl->value = params->video_spatial_filter_mode; cx2341x_get_ctrl()
352 ctrl->value = params->video_spatial_filter; cx2341x_get_ctrl()
355 ctrl->value = params->video_luma_spatial_filter_type; cx2341x_get_ctrl()
358 ctrl->value = params->video_chroma_spatial_filter_type; cx2341x_get_ctrl()
361 ctrl->value = params->video_temporal_filter_mode; cx2341x_get_ctrl()
364 ctrl->value = params->video_temporal_filter; cx2341x_get_ctrl()
367 ctrl->value = params->video_median_filter_type; cx2341x_get_ctrl()
370 ctrl->value = params->video_luma_median_filter_top; cx2341x_get_ctrl()
373 ctrl->value = params->video_luma_median_filter_bottom; cx2341x_get_ctrl()
376 ctrl->value = params->video_chroma_median_filter_top; cx2341x_get_ctrl()
379 ctrl->value = params->video_chroma_median_filter_bottom; cx2341x_get_ctrl()
382 ctrl->value = params->stream_insert_nav_packets; cx2341x_get_ctrl()
392 static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params, int busy, cx2341x_set_ctrl() argument
399 params->audio_sampling_freq = ctrl->value; cx2341x_set_ctrl()
404 if (params->capabilities & CX2341X_CAP_HAS_AC3) cx2341x_set_ctrl()
408 params->audio_encoding = ctrl->value; cx2341x_set_ctrl()
413 params->audio_l2_bitrate = ctrl->value; cx2341x_set_ctrl()
418 if (!(params->capabilities & CX2341X_CAP_HAS_AC3)) cx2341x_set_ctrl()
420 params->audio_ac3_bitrate = ctrl->value; cx2341x_set_ctrl()
423 params->audio_mode = ctrl->value; cx2341x_set_ctrl()
426 params->audio_mode_extension = ctrl->value; cx2341x_set_ctrl()
429 params->audio_emphasis = ctrl->value; cx2341x_set_ctrl()
432 params->audio_crc = ctrl->value; cx2341x_set_ctrl()
435 params->audio_mute = ctrl->value; cx2341x_set_ctrl()
438 params->video_aspect = ctrl->value; cx2341x_set_ctrl()
442 int gop = params->video_gop_size; cx2341x_set_ctrl()
443 params->video_b_frames = ctrl->value; cx2341x_set_ctrl()
444 params->video_gop_size = b * ((gop + b - 1) / b); cx2341x_set_ctrl()
446 while (params->video_gop_size > 34) cx2341x_set_ctrl()
447 params->video_gop_size -= b; cx2341x_set_ctrl()
451 int b = params->video_b_frames + 1; cx2341x_set_ctrl()
453 params->video_gop_size = b * ((gop + b - 1) / b); cx2341x_set_ctrl()
455 while (params->video_gop_size > 34) cx2341x_set_ctrl()
456 params->video_gop_size -= b; cx2341x_set_ctrl()
457 ctrl->value = params->video_gop_size; cx2341x_set_ctrl()
461 params->video_gop_closure = ctrl->value; cx2341x_set_ctrl()
467 if (params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1 && cx2341x_set_ctrl()
470 params->video_bitrate_mode = ctrl->value; cx2341x_set_ctrl()
475 params->video_bitrate = ctrl->value; cx2341x_set_ctrl()
480 params->video_bitrate_peak = ctrl->value; cx2341x_set_ctrl()
483 params->video_temporal_decimation = ctrl->value; cx2341x_set_ctrl()
486 params->video_mute = (ctrl->value != 0); cx2341x_set_ctrl()
489 params->video_mute_yuv = ctrl->value; cx2341x_set_ctrl()
494 params->stream_type = ctrl->value; cx2341x_set_ctrl()
495 params->video_encoding = cx2341x_set_ctrl()
496 (params->stream_type == V4L2_MPEG_STREAM_TYPE_MPEG1_SS || cx2341x_set_ctrl()
497 params->stream_type == V4L2_MPEG_STREAM_TYPE_MPEG1_VCD) ? cx2341x_set_ctrl()
500 if (params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) cx2341x_set_ctrl()
502 params->video_bitrate_mode = cx2341x_set_ctrl()
506 params->stream_vbi_fmt = ctrl->value; cx2341x_set_ctrl()
509 params->video_spatial_filter_mode = ctrl->value; cx2341x_set_ctrl()
512 params->video_spatial_filter = ctrl->value; cx2341x_set_ctrl()
515 params->video_luma_spatial_filter_type = ctrl->value; cx2341x_set_ctrl()
518 params->video_chroma_spatial_filter_type = ctrl->value; cx2341x_set_ctrl()
521 params->video_temporal_filter_mode = ctrl->value; cx2341x_set_ctrl()
524 params->video_temporal_filter = ctrl->value; cx2341x_set_ctrl()
527 params->video_median_filter_type = ctrl->value; cx2341x_set_ctrl()
530 params->video_luma_median_filter_top = ctrl->value; cx2341x_set_ctrl()
533 params->video_luma_median_filter_bottom = ctrl->value; cx2341x_set_ctrl()
536 params->video_chroma_median_filter_top = ctrl->value; cx2341x_set_ctrl()
539 params->video_chroma_median_filter_bottom = ctrl->value; cx2341x_set_ctrl()
542 params->stream_insert_nav_packets = ctrl->value; cx2341x_set_ctrl()
584 int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params, cx2341x_ctrl_query() argument
599 if (params->capabilities & CX2341X_CAP_HAS_SLICED_VBI) cx2341x_ctrl_query()
616 if (params->capabilities & CX2341X_CAP_HAS_AC3) { cx2341x_ctrl_query()
641 if (params->capabilities & CX2341X_CAP_HAS_AC3 && cx2341x_ctrl_query()
642 params->audio_encoding != V4L2_MPEG_AUDIO_ENCODING_LAYER_2) cx2341x_ctrl_query()
658 params->audio_mode != V4L2_MPEG_AUDIO_MODE_JOINT_STEREO) cx2341x_ctrl_query()
684 if (params->capabilities & CX2341X_CAP_HAS_AC3) { cx2341x_ctrl_query()
685 if (params->audio_encoding != cx2341x_ctrl_query()
715 params->is_50hz ? 12 : 15); cx2341x_ctrl_query()
726 params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) cx2341x_ctrl_query()
736 params->video_bitrate_mode == cx2341x_ctrl_query()
761 if (params->video_spatial_filter_mode == cx2341x_ctrl_query()
772 if (params->video_spatial_filter_mode == cx2341x_ctrl_query()
783 if (params->video_spatial_filter_mode == cx2341x_ctrl_query()
798 if (params->video_temporal_filter_mode == cx2341x_ctrl_query()
813 if (params->video_median_filter_type == cx2341x_ctrl_query()
822 if (params->video_median_filter_type == cx2341x_ctrl_query()
831 if (params->video_median_filter_type == cx2341x_ctrl_query()
840 if (params->video_median_filter_type == cx2341x_ctrl_query()
909 static void cx2341x_calc_audio_properties(struct cx2341x_mpeg_params *params) cx2341x_calc_audio_properties() argument
911 params->audio_properties = cx2341x_calc_audio_properties()
912 (params->audio_sampling_freq << 0) | cx2341x_calc_audio_properties()
913 (params->audio_mode << 8) | cx2341x_calc_audio_properties()
914 (params->audio_mode_extension << 10) | cx2341x_calc_audio_properties()
915 (((params->audio_emphasis == V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17) cx2341x_calc_audio_properties()
916 ? 3 : params->audio_emphasis) << 12) | cx2341x_calc_audio_properties()
917 (params->audio_crc << 14); cx2341x_calc_audio_properties()
919 if ((params->capabilities & CX2341X_CAP_HAS_AC3) && cx2341x_calc_audio_properties()
920 params->audio_encoding == V4L2_MPEG_AUDIO_ENCODING_AC3) { cx2341x_calc_audio_properties()
921 params->audio_properties |= cx2341x_calc_audio_properties()
924 (params->audio_ac3_bitrate << 4) | cx2341x_calc_audio_properties()
928 params->audio_properties |= cx2341x_calc_audio_properties()
929 ((3 - params->audio_encoding) << 2) | cx2341x_calc_audio_properties()
930 ((1 + params->audio_l2_bitrate) << 4); cx2341x_calc_audio_properties()
963 int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, int busy, cx2341x_ext_ctrls() argument
973 err = cx2341x_get_ctrl(params, ctrl); cx2341x_ext_ctrls()
987 err = cx2341x_ctrl_query(params, &qctrl); cx2341x_ext_ctrls()
991 menu_items = cx2341x_ctrl_get_menu(params, qctrl.id); cx2341x_ext_ctrls()
995 err = cx2341x_set_ctrl(params, busy, ctrl); cx2341x_ext_ctrls()
1000 params->video_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR && cx2341x_ext_ctrls()
1001 params->video_bitrate_peak < params->video_bitrate) { cx2341x_ext_ctrls()
1008 cx2341x_calc_audio_properties(params); cx2341x_ext_ctrls()
/linux-4.1.27/drivers/media/pci/cx23885/
H A Dcx23885-input.c74 struct v4l2_subdev_ir_parameters params; cx23885_input_rx_work_handler() local
114 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); cx23885_input_rx_work_handler()
115 params.enable = false; cx23885_input_rx_work_handler()
117 params.shutdown = atomic_read(&dev->ir_input_stopping); cx23885_input_rx_work_handler()
118 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); cx23885_input_rx_work_handler()
126 params.enable = true; cx23885_input_rx_work_handler()
128 params.shutdown = atomic_read(&dev->ir_input_stopping); cx23885_input_rx_work_handler()
129 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); cx23885_input_rx_work_handler()
135 struct v4l2_subdev_ir_parameters params; cx23885_input_ir_start() local
142 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); cx23885_input_ir_start()
160 params.mode = V4L2_SUBDEV_IR_MODE_PULSE_WIDTH; cx23885_input_ir_start()
161 params.enable = true; cx23885_input_ir_start()
162 params.interrupt_enable = true; cx23885_input_ir_start()
163 params.shutdown = false; cx23885_input_ir_start()
166 params.modulation = false; cx23885_input_ir_start()
169 params.max_pulse_width = 3333333; /* ns */ cx23885_input_ir_start()
172 params.noise_filter_min_width = 333333; /* ns */ cx23885_input_ir_start()
178 params.invert_level = true; cx23885_input_ir_start()
188 params.mode = V4L2_SUBDEV_IR_MODE_PULSE_WIDTH; cx23885_input_ir_start()
189 params.enable = true; cx23885_input_ir_start()
190 params.interrupt_enable = true; cx23885_input_ir_start()
191 params.shutdown = false; cx23885_input_ir_start()
194 params.carrier_freq = 37917; /* Hz, 455 kHz/12 for NEC */ cx23885_input_ir_start()
195 params.carrier_range_lower = 33000; /* Hz */ cx23885_input_ir_start()
196 params.carrier_range_upper = 43000; /* Hz */ cx23885_input_ir_start()
197 params.duty_cycle = 33; /* percent, 33 percent for NEC */ cx23885_input_ir_start()
203 params.max_pulse_width = 12378022; /* ns */ cx23885_input_ir_start()
209 params.noise_filter_min_width = 351648; /* ns */ cx23885_input_ir_start()
211 params.modulation = false; cx23885_input_ir_start()
212 params.invert_level = true; cx23885_input_ir_start()
215 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); cx23885_input_ir_start()
231 struct v4l2_subdev_ir_parameters params; cx23885_input_ir_stop() local
244 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); cx23885_input_ir_stop()
245 while (params.shutdown == false) { cx23885_input_ir_stop()
246 params.enable = false; cx23885_input_ir_stop()
247 params.interrupt_enable = false; cx23885_input_ir_stop()
248 params.shutdown = true; cx23885_input_ir_stop()
249 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); cx23885_input_ir_stop()
250 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); cx23885_input_ir_stop()
/linux-4.1.27/drivers/media/platform/omap3isp/
H A Disppreview.c153 const struct prev_params *params) preview_config_luma_enhancement()
156 const struct omap3isp_prev_luma *yt = &params->luma; preview_config_luma_enhancement()
202 const struct prev_params *params) preview_config_hmed()
205 const struct omap3isp_prev_hmed *hmed = &params->hmed; preview_config_hmed()
237 const struct prev_params *params) preview_config_cfa()
245 const unsigned int *order = cfa_coef_order[prev->params.cfa_order]; preview_config_cfa()
246 const struct omap3isp_prev_cfa *cfa = &params->cfa; preview_config_cfa()
273 const struct prev_params *params) preview_config_chroma_suppression()
276 const struct omap3isp_prev_csup *cs = &params->csup; preview_config_chroma_suppression()
307 const struct prev_params *params) preview_config_whitebalance()
310 const struct omap3isp_prev_wbal *wbal = &params->wbal; preview_config_whitebalance()
346 const struct prev_params *params) preview_config_blkadj()
349 const struct omap3isp_prev_blkadj *blkadj = &params->blkadj; preview_config_blkadj()
362 const struct prev_params *params) preview_config_rgb_blending()
365 const struct omap3isp_prev_rgbtorgb *rgbrgb = &params->rgb2rgb; preview_config_rgb_blending()
400 const struct prev_params *params) preview_config_csc()
403 const struct omap3isp_prev_csc *csc = &params->csc; preview_config_csc()
432 const struct prev_params *params) preview_config_yc_range()
435 const struct omap3isp_prev_yclimit *yc = &params->yclimit; preview_config_yc_range()
450 const struct prev_params *params) preview_config_dcor()
453 const struct omap3isp_prev_dcor *dcor = &params->dcor; preview_config_dcor()
519 const struct prev_params *params) preview_config_noisefilter()
522 const struct omap3isp_prev_nf *nf = &params->nf; preview_config_noisefilter()
555 const struct prev_params *params) preview_config_gammacorrn()
558 const struct omap3isp_prev_gtables *gt = &params->gamma; preview_config_gammacorrn()
606 const struct prev_params *params) preview_config_contrast()
612 params->contrast << ISPPRV_CNT_BRT_CNT_SHIFT); preview_config_contrast()
620 const struct prev_params *params) preview_config_brightness()
626 params->brightness << ISPPRV_CNT_BRT_BRT_SHIFT); preview_config_brightness()
638 struct prev_params *params; preview_update_contrast() local
641 spin_lock_irqsave(&prev->params.lock, flags); preview_update_contrast()
642 params = (prev->params.active & OMAP3ISP_PREV_CONTRAST) preview_update_contrast()
643 ? &prev->params.params[0] : &prev->params.params[1]; preview_update_contrast()
645 if (params->contrast != (contrast * ISPPRV_CONTRAST_UNITS)) { preview_update_contrast()
646 params->contrast = contrast * ISPPRV_CONTRAST_UNITS; preview_update_contrast()
647 params->update |= OMAP3ISP_PREV_CONTRAST; preview_update_contrast()
649 spin_unlock_irqrestore(&prev->params.lock, flags); preview_update_contrast()
660 struct prev_params *params; preview_update_brightness() local
663 spin_lock_irqsave(&prev->params.lock, flags); preview_update_brightness()
664 params = (prev->params.active & OMAP3ISP_PREV_BRIGHTNESS) preview_update_brightness()
665 ? &prev->params.params[0] : &prev->params.params[1]; preview_update_brightness()
667 if (params->brightness != (brightness * ISPPRV_BRIGHT_UNITS)) { preview_update_brightness()
668 params->brightness = brightness * ISPPRV_BRIGHT_UNITS; preview_update_brightness()
669 params->update |= OMAP3ISP_PREV_BRIGHTNESS; preview_update_brightness()
671 spin_unlock_irqrestore(&prev->params.lock, flags); preview_update_brightness()
677 u32 active = prev->params.active; preview_params_lock()
681 prev->params.params[0].busy |= ~active & update; preview_params_lock()
682 prev->params.params[1].busy |= active & update; preview_params_lock()
685 update = (prev->params.params[0].update & active) preview_params_lock()
686 | (prev->params.params[1].update & ~active); preview_params_lock()
688 prev->params.params[0].busy |= active & update; preview_params_lock()
689 prev->params.params[1].busy |= ~active & update; preview_params_lock()
698 u32 active = prev->params.active; preview_params_unlock()
704 prev->params.params[0].update |= (~active & update); preview_params_unlock()
705 prev->params.params[1].update |= (active & update); preview_params_unlock()
706 prev->params.params[0].busy &= active; preview_params_unlock()
707 prev->params.params[1].busy &= ~active; preview_params_unlock()
712 prev->params.params[0].update &= ~(active & update); preview_params_unlock()
713 prev->params.params[1].update &= ~(~active & update); preview_params_unlock()
714 prev->params.params[0].busy &= ~active; preview_params_unlock()
715 prev->params.params[1].busy &= active; preview_params_unlock()
727 to_switch = (prev->params.params[0].update & ~prev->params.active) preview_params_switch()
728 | (prev->params.params[1].update & prev->params.active); preview_params_switch()
729 to_switch &= ~(prev->params.params[0].busy | preview_params_switch()
730 prev->params.params[1].busy); preview_params_switch()
734 prev->params.active ^= to_switch; preview_params_switch()
739 prev->params.params[0].update &= ~(~prev->params.active & to_switch); preview_params_switch()
740 prev->params.params[1].update &= ~(prev->params.active & to_switch); preview_params_switch()
875 spin_lock_irqsave(&prev->params.lock, flags); preview_config()
877 active = prev->params.active; preview_config()
878 spin_unlock_irqrestore(&prev->params.lock, flags); preview_config()
884 struct prev_params *params; preview_config() local
890 params = &prev->params.params[!!(active & bit)]; preview_config()
895 void *to = (void *)params + attr->param_offset; preview_config()
904 params->features |= bit; preview_config()
906 params->features &= ~bit; preview_config()
912 spin_lock_irqsave(&prev->params.lock, flags); preview_config()
915 spin_unlock_irqrestore(&prev->params.lock, flags); preview_config()
937 features = (prev->params.params[0].features & active) preview_setup_hw()
938 | (prev->params.params[1].features & ~active); preview_setup_hw()
942 struct prev_params *params; preview_setup_hw() local
948 params = &prev->params.params[!(active & bit)]; preview_setup_hw()
950 if (params->features & bit) { preview_setup_hw()
952 attr->config(prev, params); preview_setup_hw()
1019 struct prev_params *params; preview_config_input_format() local
1030 prev->params.cfa_order = 0; preview_config_input_format()
1033 prev->params.cfa_order = 1; preview_config_input_format()
1036 prev->params.cfa_order = 2; preview_config_input_format()
1039 prev->params.cfa_order = 3; preview_config_input_format()
1052 params = (prev->params.active & OMAP3ISP_PREV_CFA) preview_config_input_format()
1053 ? &prev->params.params[0] : &prev->params.params[1]; preview_config_input_format()
1055 preview_config_cfa(prev, params); preview_config_input_format()
1087 features = (prev->params.params[0].features & active) preview_config_input_size()
1088 | (prev->params.params[1].features & ~active); preview_config_input_size()
1238 prev->params.params[0].update = prev->params.active & update; omap3isp_preview_restore_context()
1239 prev->params.params[1].update = ~prev->params.active & update; omap3isp_preview_restore_context()
1241 preview_setup_hw(prev, update, prev->params.active); omap3isp_preview_restore_context()
1243 prev->params.params[0].update = 0; omap3isp_preview_restore_context()
1244 prev->params.params[1].update = 0; omap3isp_preview_restore_context()
1306 struct prev_params *params; preview_init_params() local
1309 spin_lock_init(&prev->params.lock); preview_init_params()
1311 prev->params.active = ~0; preview_init_params()
1312 prev->params.params[0].busy = 0; preview_init_params()
1313 prev->params.params[0].update = OMAP3ISP_PREV_FEATURES_END - 1; preview_init_params()
1314 prev->params.params[1].busy = 0; preview_init_params()
1315 prev->params.params[1].update = 0; preview_init_params()
1317 params = &prev->params.params[0]; preview_init_params()
1320 params->contrast = ISPPRV_CONTRAST_DEF * ISPPRV_CONTRAST_UNITS; preview_init_params()
1321 params->brightness = ISPPRV_BRIGHT_DEF * ISPPRV_BRIGHT_UNITS; preview_init_params()
1322 params->cfa.format = OMAP3ISP_CFAFMT_BAYER; preview_init_params()
1323 memcpy(params->cfa.table, cfa_coef_table, preview_init_params()
1324 sizeof(params->cfa.table)); preview_init_params()
1325 params->cfa.gradthrs_horz = FLR_CFA_GRADTHRS_HORZ; preview_init_params()
1326 params->cfa.gradthrs_vert = FLR_CFA_GRADTHRS_VERT; preview_init_params()
1327 params->csup.gain = FLR_CSUP_GAIN; preview_init_params()
1328 params->csup.thres = FLR_CSUP_THRES; preview_init_params()
1329 params->csup.hypf_en = 0; preview_init_params()
1330 memcpy(params->luma.table, luma_enhance_table, preview_init_params()
1331 sizeof(params->luma.table)); preview_init_params()
1332 params->nf.spread = FLR_NF_STRGTH; preview_init_params()
1333 memcpy(params->nf.table, noise_filter_table, sizeof(params->nf.table)); preview_init_params()
1334 params->dcor.couplet_mode_en = 1; preview_init_params()
1336 params->dcor.detect_correct[i] = DEF_DETECT_CORRECT_VAL; preview_init_params()
1337 memcpy(params->gamma.blue, gamma_table, sizeof(params->gamma.blue)); preview_init_params()
1338 memcpy(params->gamma.green, gamma_table, sizeof(params->gamma.green)); preview_init_params()
1339 memcpy(params->gamma.red, gamma_table, sizeof(params->gamma.red)); preview_init_params()
1340 params->wbal.dgain = FLR_WBAL_DGAIN; preview_init_params()
1341 params->wbal.coef0 = FLR_WBAL_COEF; preview_init_params()
1342 params->wbal.coef1 = FLR_WBAL_COEF; preview_init_params()
1343 params->wbal.coef2 = FLR_WBAL_COEF; preview_init_params()
1344 params->wbal.coef3 = FLR_WBAL_COEF; preview_init_params()
1345 params->blkadj.red = FLR_BLKADJ_RED; preview_init_params()
1346 params->blkadj.green = FLR_BLKADJ_GREEN; preview_init_params()
1347 params->blkadj.blue = FLR_BLKADJ_BLUE; preview_init_params()
1348 params->rgb2rgb = flr_rgb2rgb; preview_init_params()
1349 params->csc = flr_prev_csc; preview_init_params()
1350 params->yclimit.minC = ISPPRV_YC_MIN; preview_init_params()
1351 params->yclimit.maxC = ISPPRV_YC_MAX; preview_init_params()
1352 params->yclimit.minY = ISPPRV_YC_MIN; preview_init_params()
1353 params->yclimit.maxY = ISPPRV_YC_MAX; preview_init_params()
1355 params->features = OMAP3ISP_PREV_CFA | OMAP3ISP_PREV_DEFECT_COR preview_init_params()
1394 spin_lock_irqsave(&prev->params.lock, flags); preview_configure()
1397 active = prev->params.active; preview_configure()
1398 spin_unlock_irqrestore(&prev->params.lock, flags); preview_configure()
1441 spin_lock_irqsave(&prev->params.lock, flags); preview_configure()
1443 spin_unlock_irqrestore(&prev->params.lock, flags); preview_configure()
1538 spin_lock_irqsave(&prev->params.lock, flags); omap3isp_preview_isr()
1541 active = prev->params.active; omap3isp_preview_isr()
1542 spin_unlock_irqrestore(&prev->params.lock, flags); omap3isp_preview_isr()
1553 spin_lock_irqsave(&prev->params.lock, flags); omap3isp_preview_isr()
1555 spin_unlock_irqrestore(&prev->params.lock, flags); omap3isp_preview_isr()
152 preview_config_luma_enhancement(struct isp_prev_device *prev, const struct prev_params *params) preview_config_luma_enhancement() argument
201 preview_config_hmed(struct isp_prev_device *prev, const struct prev_params *params) preview_config_hmed() argument
236 preview_config_cfa(struct isp_prev_device *prev, const struct prev_params *params) preview_config_cfa() argument
272 preview_config_chroma_suppression(struct isp_prev_device *prev, const struct prev_params *params) preview_config_chroma_suppression() argument
306 preview_config_whitebalance(struct isp_prev_device *prev, const struct prev_params *params) preview_config_whitebalance() argument
345 preview_config_blkadj(struct isp_prev_device *prev, const struct prev_params *params) preview_config_blkadj() argument
361 preview_config_rgb_blending(struct isp_prev_device *prev, const struct prev_params *params) preview_config_rgb_blending() argument
399 preview_config_csc(struct isp_prev_device *prev, const struct prev_params *params) preview_config_csc() argument
431 preview_config_yc_range(struct isp_prev_device *prev, const struct prev_params *params) preview_config_yc_range() argument
449 preview_config_dcor(struct isp_prev_device *prev, const struct prev_params *params) preview_config_dcor() argument
518 preview_config_noisefilter(struct isp_prev_device *prev, const struct prev_params *params) preview_config_noisefilter() argument
554 preview_config_gammacorrn(struct isp_prev_device *prev, const struct prev_params *params) preview_config_gammacorrn() argument
605 preview_config_contrast(struct isp_prev_device *prev, const struct prev_params *params) preview_config_contrast() argument
619 preview_config_brightness(struct isp_prev_device *prev, const struct prev_params *params) preview_config_brightness() argument
H A Disppreview.h115 * @params.params : Active and shadow parameters sets
116 * @params.active: Bitmask of parameters active in set 0
117 * @params.lock: Parameters lock, protects params.active and params.shadow
138 struct prev_params params[2]; member in struct:isp_prev_device::__anon5671
141 } params; member in struct:isp_prev_device
/linux-4.1.27/drivers/firmware/
H A Dedd.c143 if (isprint(info->params.host_bus_type[i])) { edd_show_host_bus()
144 p += scnprintf(p, left, "%c", info->params.host_bus_type[i]); edd_show_host_bus()
150 if (!strncmp(info->params.host_bus_type, "ISA", 3)) { edd_show_host_bus()
152 info->params.interface_path.isa.base_address); edd_show_host_bus()
153 } else if (!strncmp(info->params.host_bus_type, "PCIX", 4) || edd_show_host_bus()
154 !strncmp(info->params.host_bus_type, "PCI", 3) || edd_show_host_bus()
155 !strncmp(info->params.host_bus_type, "XPRS", 4)) { edd_show_host_bus()
158 info->params.interface_path.pci.bus, edd_show_host_bus()
159 info->params.interface_path.pci.slot, edd_show_host_bus()
160 info->params.interface_path.pci.function, edd_show_host_bus()
161 info->params.interface_path.pci.channel); edd_show_host_bus()
162 } else if (!strncmp(info->params.host_bus_type, "IBND", 4) || edd_show_host_bus()
163 !strncmp(info->params.host_bus_type, "HTPT", 4)) { edd_show_host_bus()
166 info->params.interface_path.ibnd.reserved); edd_show_host_bus()
170 info->params.interface_path.unknown.reserved); edd_show_host_bus()
189 if (isprint(info->params.interface_type[i])) { edd_show_interface()
190 p += scnprintf(p, left, "%c", info->params.interface_type[i]); edd_show_interface()
195 if (!strncmp(info->params.interface_type, "ATAPI", 5)) { edd_show_interface()
197 info->params.device_path.atapi.device, edd_show_interface()
198 info->params.device_path.atapi.lun); edd_show_interface()
199 } else if (!strncmp(info->params.interface_type, "ATA", 3)) { edd_show_interface()
201 info->params.device_path.ata.device); edd_show_interface()
202 } else if (!strncmp(info->params.interface_type, "SCSI", 4)) { edd_show_interface()
204 info->params.device_path.scsi.id, edd_show_interface()
205 info->params.device_path.scsi.lun); edd_show_interface()
206 } else if (!strncmp(info->params.interface_type, "USB", 3)) { edd_show_interface()
208 info->params.device_path.usb.serial_number); edd_show_interface()
209 } else if (!strncmp(info->params.interface_type, "1394", 4)) { edd_show_interface()
211 info->params.device_path.i1394.eui); edd_show_interface()
212 } else if (!strncmp(info->params.interface_type, "FIBRE", 5)) { edd_show_interface()
214 info->params.device_path.fibre.wwid, edd_show_interface()
215 info->params.device_path.fibre.lun); edd_show_interface()
216 } else if (!strncmp(info->params.interface_type, "I2O", 3)) { edd_show_interface()
218 info->params.device_path.i2o.identity_tag); edd_show_interface()
219 } else if (!strncmp(info->params.interface_type, "RAID", 4)) { edd_show_interface()
221 info->params.device_path.raid.array_number); edd_show_interface()
222 } else if (!strncmp(info->params.interface_type, "SATA", 4)) { edd_show_interface()
224 info->params.device_path.sata.device); edd_show_interface()
227 info->params.device_path.unknown.reserved1, edd_show_interface()
228 info->params.device_path.unknown.reserved2); edd_show_interface()
245 ssize_t len = sizeof (info->params); edd_show_raw_data()
252 if (!(info->params.key == 0xBEDD || info->params.key == 0xDDBE)) edd_show_raw_data()
253 len = info->params.length; edd_show_raw_data()
256 if (len > (sizeof(info->params))) edd_show_raw_data()
257 len = sizeof(info->params); edd_show_raw_data()
259 memcpy(buf, &info->params, len); edd_show_raw_data()
323 if (info->params.info_flags & EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT) edd_show_info_flags()
325 if (info->params.info_flags & EDD_INFO_GEOMETRY_VALID) edd_show_info_flags()
327 if (info->params.info_flags & EDD_INFO_REMOVABLE) edd_show_info_flags()
329 if (info->params.info_flags & EDD_INFO_WRITE_VERIFY) edd_show_info_flags()
331 if (info->params.info_flags & EDD_INFO_MEDIA_CHANGE_NOTIFICATION) edd_show_info_flags()
333 if (info->params.info_flags & EDD_INFO_LOCKABLE) edd_show_info_flags()
335 if (info->params.info_flags & EDD_INFO_NO_MEDIA_PRESENT) edd_show_info_flags()
337 if (info->params.info_flags & EDD_INFO_USE_INT13_FN50) edd_show_info_flags()
398 p += scnprintf(p, left, "%u\n", info->params.num_default_cylinders); edd_show_default_cylinders()
413 p += scnprintf(p, left, "%u\n", info->params.num_default_heads); edd_show_default_heads()
428 p += scnprintf(p, left, "%u\n", info->params.sectors_per_track); edd_show_default_sectors_per_track()
443 p += scnprintf(p, left, "%llu\n", info->params.number_of_sectors); edd_show_sectors()
503 return info->params.num_default_cylinders > 0; edd_has_default_cylinders()
515 return info->params.num_default_heads > 0; edd_has_default_heads()
527 return info->params.sectors_per_track > 0; edd_has_default_sectors_per_track()
543 if (!(info->params.key == 0xBEDD || info->params.key == 0xDDBE)) { edd_has_edd30()
549 if (info->params.device_path_info_length != 44) edd_has_edd30()
552 for (i = 30; i < info->params.device_path_info_length + 30; i++) edd_has_edd30()
553 csum += *(((u8 *)&info->params) + i); edd_has_edd30()
653 if (!strncmp(info->params.host_bus_type, type, strlen(type)) || edd_dev_is_type()
654 !strncmp(info->params.interface_type, type, strlen(type))) edd_dev_is_type()
672 return pci_get_bus_and_slot(info->params.interface_path.pci.bus, edd_get_pci_dev()
673 PCI_DEVFN(info->params.interface_path.pci.slot, edd_get_pci_dev()
674 info->params.interface_path.pci. edd_get_pci_dev()
/linux-4.1.27/drivers/usb/gadget/function/
H A Df_mass_storage.h20 #define _FSG_MODULE_PARAM_ARRAY(prefix, params, name, type, desc) \
21 module_param_array_named(prefix ## name, params.name, type, \
22 &prefix ## params.name ## _count, \
26 #define _FSG_MODULE_PARAM(prefix, params, name, type, desc) \
27 module_param_named(prefix ## name, params.name, type, \
31 #define __FSG_MODULE_PARAMETERS(prefix, params) \
32 _FSG_MODULE_PARAM_ARRAY(prefix, params, file, charp, \
34 _FSG_MODULE_PARAM_ARRAY(prefix, params, ro, bool, \
36 _FSG_MODULE_PARAM_ARRAY(prefix, params, removable, bool, \
38 _FSG_MODULE_PARAM_ARRAY(prefix, params, cdrom, bool, \
40 _FSG_MODULE_PARAM_ARRAY(prefix, params, nofua, bool, \
42 _FSG_MODULE_PARAM(prefix, params, luns, uint, \
44 _FSG_MODULE_PARAM(prefix, params, stall, bool, \
49 #define FSG_MODULE_PARAMETERS(prefix, params) \
50 __FSG_MODULE_PARAMETERS(prefix, params); \
55 #define FSG_MODULE_PARAMETERS(prefix, params) \
56 __FSG_MODULE_PARAMETERS(prefix, params)
157 const struct fsg_module_parameters *params,
H A Du_uac1.c42 static int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_set() argument
48 struct snd_mask *m = hw_param_mask(params, var); _snd_pcm_hw_param_set()
58 hw_param_mask(params, var), val); _snd_pcm_hw_param_set()
61 struct snd_interval *i = hw_param_interval(params, var); _snd_pcm_hw_param_set()
85 params->cmask |= 1 << var; _snd_pcm_hw_param_set()
86 params->rmask |= 1 << var; _snd_pcm_hw_param_set()
93 * Set default hardware params
98 struct snd_pcm_hw_params *params; playback_default_hw_params() local
112 params = kzalloc(sizeof(*params), GFP_KERNEL); playback_default_hw_params()
113 if (!params) playback_default_hw_params()
116 _snd_pcm_hw_params_any(params); playback_default_hw_params()
117 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_ACCESS, playback_default_hw_params()
119 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_FORMAT, playback_default_hw_params()
121 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_CHANNELS, playback_default_hw_params()
123 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_RATE, playback_default_hw_params()
127 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_HW_PARAMS, params); playback_default_hw_params()
133 kfree(params); playback_default_hw_params()
138 snd->access = params_access(params); playback_default_hw_params()
139 snd->format = params_format(params); playback_default_hw_params()
140 snd->channels = params_channels(params); playback_default_hw_params()
141 snd->rate = params_rate(params); playback_default_hw_params()
143 kfree(params); playback_default_hw_params()
146 "Hardware params: access %x, format %x, channels %d, rate %d\n", playback_default_hw_params()
H A Drndis.c498 struct rndis_params *params; gen_ndis_set_resp() local
517 params = &rndis_per_dev_params[configNr]; gen_ndis_set_resp()
527 *params->filter = (u16)get_unaligned_le32(buf); gen_ndis_set_resp()
529 __func__, *params->filter); gen_ndis_set_resp()
536 if (*params->filter) { gen_ndis_set_resp()
537 params->state = RNDIS_DATA_INITIALIZED; gen_ndis_set_resp()
538 netif_carrier_on(params->dev); gen_ndis_set_resp()
539 if (netif_running(params->dev)) gen_ndis_set_resp()
540 netif_wake_queue(params->dev); gen_ndis_set_resp()
542 params->state = RNDIS_INITIALIZED; gen_ndis_set_resp()
543 netif_carrier_off(params->dev); gen_ndis_set_resp()
544 netif_stop_queue(params->dev); gen_ndis_set_resp()
570 struct rndis_params *params = rndis_per_dev_params + configNr; rndis_init_response() local
572 if (!params->dev) rndis_init_response()
590 params->dev->mtu rndis_init_response()
598 params->resp_avail(params->v); rndis_init_response()
606 struct rndis_params *params = rndis_per_dev_params + configNr; rndis_query_response() local
609 if (!params->dev) rndis_query_response()
640 params->resp_avail(params->v); rndis_query_response()
649 struct rndis_params *params = rndis_per_dev_params + configNr; rndis_set_response() local
680 params->resp_avail(params->v); rndis_set_response()
688 struct rndis_params *params = rndis_per_dev_params + configNr; rndis_reset_response() local
701 params->resp_avail(params->v); rndis_reset_response()
710 struct rndis_params *params = rndis_per_dev_params + configNr; rndis_keepalive_response() local
724 params->resp_avail(params->v); rndis_keepalive_response()
736 struct rndis_params *params = rndis_per_dev_params + configNr; rndis_indicate_status_msg() local
738 if (params->state == RNDIS_UNINITIALIZED) rndis_indicate_status_msg()
753 params->resp_avail(params->v); rndis_indicate_status_msg()
803 struct rndis_params *params; rndis_msg_parser() local
814 params = &rndis_per_dev_params[configNr]; rndis_msg_parser()
826 params->state = RNDIS_INITIALIZED; rndis_msg_parser()
833 params->state = RNDIS_UNINITIALIZED; rndis_msg_parser()
834 if (params->dev) { rndis_msg_parser()
835 netif_carrier_off(params->dev); rndis_msg_parser()
836 netif_stop_queue(params->dev); rndis_msg_parser()
/linux-4.1.27/fs/afs/
H A Dsuper.c143 static int afs_parse_options(struct afs_mount_params *params, afs_parse_options() argument
167 afs_put_cell(params->cell); afs_parse_options()
168 params->cell = cell; afs_parse_options()
172 params->rwpath = 1; afs_parse_options()
180 params->autocell = 1; afs_parse_options()
206 static int afs_parse_device_name(struct afs_mount_params *params, afs_parse_device_name() argument
226 params->type = AFSVL_ROVOL; afs_parse_device_name()
227 params->force = false; afs_parse_device_name()
228 if (params->rwpath || name[0] == '%') { afs_parse_device_name()
229 params->type = AFSVL_RWVOL; afs_parse_device_name()
230 params->force = true; afs_parse_device_name()
235 params->volname = strchr(name, ':'); afs_parse_device_name()
236 if (params->volname) { afs_parse_device_name()
238 cellnamesz = params->volname - name; afs_parse_device_name()
239 params->volname++; afs_parse_device_name()
241 params->volname = name; afs_parse_device_name()
247 suffix = strrchr(params->volname, '.'); afs_parse_device_name()
250 params->type = AFSVL_ROVOL; afs_parse_device_name()
251 params->force = true; afs_parse_device_name()
253 params->type = AFSVL_BACKVOL; afs_parse_device_name()
254 params->force = true; afs_parse_device_name()
261 params->volnamesz = suffix ? afs_parse_device_name()
262 suffix - params->volname : strlen(params->volname); afs_parse_device_name()
265 cellnamesz, cellnamesz, cellname ?: "", params->cell); afs_parse_device_name()
268 if (cellname || !params->cell) { afs_parse_device_name()
275 afs_put_cell(params->cell); afs_parse_device_name()
276 params->cell = cell; afs_parse_device_name()
280 params->cell->name, params->cell, afs_parse_device_name()
281 params->volnamesz, params->volnamesz, params->volname, afs_parse_device_name()
282 suffix ?: "-", params->type, params->force ? " FORCE" : ""); afs_parse_device_name()
308 struct afs_mount_params *params) afs_fill_super()
329 inode = afs_iget(sb, params->key, &fid, NULL, NULL); afs_fill_super()
333 if (params->autocell) afs_fill_super()
357 struct afs_mount_params params; afs_mount() local
367 memset(&params, 0, sizeof(params)); afs_mount()
375 ret = afs_parse_options(&params, options, &dev_name); afs_mount()
380 ret = afs_parse_device_name(&params, dev_name); afs_mount()
385 key = afs_request_key(params.cell); afs_mount()
391 params.key = key; afs_mount()
394 vol = afs_volume_lookup(&params); afs_mount()
421 ret = afs_fill_super(sb, &params); afs_mount()
435 afs_put_cell(params.cell); afs_mount()
441 afs_put_cell(params.cell); afs_mount()
442 key_put(params.key); afs_mount()
307 afs_fill_super(struct super_block *sb, struct afs_mount_params *params) afs_fill_super() argument
H A Dvolume.c45 struct afs_volume *afs_volume_lookup(struct afs_mount_params *params) afs_volume_lookup() argument
54 params->volnamesz, params->volnamesz, params->volname, params->rwpath); afs_volume_lookup()
57 vlocation = afs_vlocation_lookup(params->cell, params->key, afs_volume_lookup()
58 params->volname, params->volnamesz); afs_volume_lookup()
67 if (params->force && !(vlocation->vldb.vidmask & (1 << params->type))) afs_volume_lookup()
74 if (params->force) { afs_volume_lookup()
75 if (!(srvtmask & (1 << params->type))) afs_volume_lookup()
78 params->type = AFSVL_ROVOL; afs_volume_lookup()
80 params->type = AFSVL_RWVOL; afs_volume_lookup()
85 down_write(&params->cell->vl_sem); afs_volume_lookup()
88 if (vlocation->vols[params->type]) { afs_volume_lookup()
90 volume = vlocation->vols[params->type]; afs_volume_lookup()
104 volume->type = params->type; afs_volume_lookup()
105 volume->type_force = params->force; afs_volume_lookup()
106 volume->cell = params->cell; afs_volume_lookup()
107 volume->vid = vlocation->vldb.vid[params->type]; afs_volume_lookup()
144 up_write(&params->cell->vl_sem); afs_volume_lookup()
151 up_write(&params->cell->vl_sem); afs_volume_lookup()
160 up_write(&params->cell->vl_sem); afs_volume_lookup()
/linux-4.1.27/arch/arm/mach-rpc/include/mach/
H A Duncompress.h65 extern __attribute__((pure)) struct param_struct *params(void);
66 #define params (params()) macro
118 struct tag *t = (struct tag *)params; arch_decomp_setup()
144 nr_pages = params->nr_pages; arch_decomp_setup()
145 page_size = params->page_size; arch_decomp_setup()
146 video_num_rows = params->video_num_rows; arch_decomp_setup()
147 video_num_cols = params->video_num_cols; arch_decomp_setup()
148 video_x = params->video_x; arch_decomp_setup()
149 video_y = params->video_y; arch_decomp_setup()
150 bytes_per_char_h = params->bytes_per_char_h; arch_decomp_setup()
151 bytes_per_char_v = params->bytes_per_char_v; arch_decomp_setup()
/linux-4.1.27/arch/arm/mach-versatile/include/mach/
H A Dclkdev.h9 const struct icst_params *params; member in struct:clk
/linux-4.1.27/drivers/clk/versatile/
H A Dclk-icst.h5 * @params: ICST parameters
11 const struct icst_params *params; member in struct:clk_icst_desc
H A Dclk-icst.c29 * @params: parameters for this ICST instance
36 struct icst_params *params; member in struct:clk_icst
88 icst->params->ref = parent_rate; icst_recalc_rate()
90 icst->rate = icst_hz(icst->params, vco); icst_recalc_rate()
100 vco = icst_hz_to_vco(icst->params, rate); icst_round_rate()
101 return icst_hz(icst->params, vco); icst_round_rate()
111 icst->params->ref = parent_rate; icst_set_rate()
112 vco = icst_hz_to_vco(icst->params, rate); icst_set_rate()
113 icst->rate = icst_hz(icst->params, vco); icst_set_rate()
141 pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL); icst_clk_register()
144 pr_err("could not clone ICST params\n"); icst_clk_register()
154 icst->params = pclone; icst_clk_register()
/linux-4.1.27/arch/blackfin/mach-common/
H A Dclock.h20 const struct params *params; member in struct:clk
/linux-4.1.27/drivers/dma/ipu/
H A Dipu_idmac.c276 static void ipu_ch_param_set_plane_offset(union chan_param_mem *params, ipu_ch_param_set_plane_offset() argument
279 params->pp.ubo_l = u_offset & 0x7ff; ipu_ch_param_set_plane_offset()
280 params->pp.ubo_h = u_offset >> 11; ipu_ch_param_set_plane_offset()
281 params->pp.vbo_l = v_offset & 0x1ffff; ipu_ch_param_set_plane_offset()
282 params->pp.vbo_h = v_offset >> 17; ipu_ch_param_set_plane_offset()
285 static void ipu_ch_param_set_size(union chan_param_mem *params, ipu_ch_param_set_size() argument
292 params->pp.fw = width - 1; ipu_ch_param_set_size()
293 params->pp.fh_l = height - 1; ipu_ch_param_set_size()
294 params->pp.fh_h = (height - 1) >> 8; ipu_ch_param_set_size()
295 params->pp.sl = stride - 1; ipu_ch_param_set_size()
300 params->pp.bpp = 3; ipu_ch_param_set_size()
301 params->pp.pfs = 7; ipu_ch_param_set_size()
302 params->pp.npb = 31; ipu_ch_param_set_size()
303 params->pp.sat = 2; /* SAT = use 32-bit access */ ipu_ch_param_set_size()
307 params->pp.bpp = 0; ipu_ch_param_set_size()
308 params->pp.pfs = 7; ipu_ch_param_set_size()
309 params->pp.npb = 7; ipu_ch_param_set_size()
310 params->pp.sat = 2; /* SAT = use 32-bit access */ ipu_ch_param_set_size()
313 params->ip.bpp = 2; ipu_ch_param_set_size()
314 params->ip.pfs = 4; ipu_ch_param_set_size()
315 params->ip.npb = 15; ipu_ch_param_set_size()
316 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
317 params->ip.ofs0 = 0; /* Red bit offset */ ipu_ch_param_set_size()
318 params->ip.ofs1 = 5; /* Green bit offset */ ipu_ch_param_set_size()
319 params->ip.ofs2 = 11; /* Blue bit offset */ ipu_ch_param_set_size()
320 params->ip.ofs3 = 16; /* Alpha bit offset */ ipu_ch_param_set_size()
321 params->ip.wid0 = 4; /* Red bit width - 1 */ ipu_ch_param_set_size()
322 params->ip.wid1 = 5; /* Green bit width - 1 */ ipu_ch_param_set_size()
323 params->ip.wid2 = 4; /* Blue bit width - 1 */ ipu_ch_param_set_size()
326 params->ip.bpp = 1; /* 24 BPP & RGB PFS */ ipu_ch_param_set_size()
327 params->ip.pfs = 4; ipu_ch_param_set_size()
328 params->ip.npb = 7; ipu_ch_param_set_size()
329 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
330 params->ip.ofs0 = 0; /* Red bit offset */ ipu_ch_param_set_size()
331 params->ip.ofs1 = 8; /* Green bit offset */ ipu_ch_param_set_size()
332 params->ip.ofs2 = 16; /* Blue bit offset */ ipu_ch_param_set_size()
333 params->ip.ofs3 = 24; /* Alpha bit offset */ ipu_ch_param_set_size()
334 params->ip.wid0 = 7; /* Red bit width - 1 */ ipu_ch_param_set_size()
335 params->ip.wid1 = 7; /* Green bit width - 1 */ ipu_ch_param_set_size()
336 params->ip.wid2 = 7; /* Blue bit width - 1 */ ipu_ch_param_set_size()
339 params->ip.bpp = 1; /* 24 BPP & RGB PFS */ ipu_ch_param_set_size()
340 params->ip.pfs = 4; ipu_ch_param_set_size()
341 params->ip.npb = 7; ipu_ch_param_set_size()
342 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
343 params->ip.ofs0 = 16; /* Red bit offset */ ipu_ch_param_set_size()
344 params->ip.ofs1 = 8; /* Green bit offset */ ipu_ch_param_set_size()
345 params->ip.ofs2 = 0; /* Blue bit offset */ ipu_ch_param_set_size()
346 params->ip.ofs3 = 24; /* Alpha bit offset */ ipu_ch_param_set_size()
347 params->ip.wid0 = 7; /* Red bit width - 1 */ ipu_ch_param_set_size()
348 params->ip.wid1 = 7; /* Green bit width - 1 */ ipu_ch_param_set_size()
349 params->ip.wid2 = 7; /* Blue bit width - 1 */ ipu_ch_param_set_size()
354 params->ip.bpp = 0; ipu_ch_param_set_size()
355 params->ip.pfs = 4; ipu_ch_param_set_size()
356 params->ip.npb = 7; ipu_ch_param_set_size()
357 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
358 params->ip.ofs0 = 8; /* Red bit offset */ ipu_ch_param_set_size()
359 params->ip.ofs1 = 16; /* Green bit offset */ ipu_ch_param_set_size()
360 params->ip.ofs2 = 24; /* Blue bit offset */ ipu_ch_param_set_size()
361 params->ip.ofs3 = 0; /* Alpha bit offset */ ipu_ch_param_set_size()
362 params->ip.wid0 = 7; /* Red bit width - 1 */ ipu_ch_param_set_size()
363 params->ip.wid1 = 7; /* Green bit width - 1 */ ipu_ch_param_set_size()
364 params->ip.wid2 = 7; /* Blue bit width - 1 */ ipu_ch_param_set_size()
365 params->ip.wid3 = 7; /* Alpha bit width - 1 */ ipu_ch_param_set_size()
369 params->ip.bpp = 0; ipu_ch_param_set_size()
370 params->ip.pfs = 4; ipu_ch_param_set_size()
371 params->ip.npb = 7; ipu_ch_param_set_size()
372 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
373 params->ip.ofs0 = 24; /* Red bit offset */ ipu_ch_param_set_size()
374 params->ip.ofs1 = 16; /* Green bit offset */ ipu_ch_param_set_size()
375 params->ip.ofs2 = 8; /* Blue bit offset */ ipu_ch_param_set_size()
376 params->ip.ofs3 = 0; /* Alpha bit offset */ ipu_ch_param_set_size()
377 params->ip.wid0 = 7; /* Red bit width - 1 */ ipu_ch_param_set_size()
378 params->ip.wid1 = 7; /* Green bit width - 1 */ ipu_ch_param_set_size()
379 params->ip.wid2 = 7; /* Blue bit width - 1 */ ipu_ch_param_set_size()
380 params->ip.wid3 = 7; /* Alpha bit width - 1 */ ipu_ch_param_set_size()
383 params->ip.bpp = 2; ipu_ch_param_set_size()
384 params->ip.pfs = 6; ipu_ch_param_set_size()
385 params->ip.npb = 7; ipu_ch_param_set_size()
386 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
390 params->ip.bpp = 3; ipu_ch_param_set_size()
391 params->ip.pfs = 3; ipu_ch_param_set_size()
392 params->ip.npb = 7; ipu_ch_param_set_size()
393 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
396 ipu_ch_param_set_plane_offset(params, u_offset, v_offset); ipu_ch_param_set_size()
399 params->ip.bpp = 3; ipu_ch_param_set_size()
400 params->ip.pfs = 2; ipu_ch_param_set_size()
401 params->ip.npb = 7; ipu_ch_param_set_size()
402 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
405 ipu_ch_param_set_plane_offset(params, u_offset, v_offset); ipu_ch_param_set_size()
408 params->ip.bpp = 3; ipu_ch_param_set_size()
409 params->ip.pfs = 2; ipu_ch_param_set_size()
410 params->ip.npb = 7; ipu_ch_param_set_size()
411 params->ip.sat = 2; /* SAT = 32-bit access */ ipu_ch_param_set_size()
414 ipu_ch_param_set_plane_offset(params, u_offset, v_offset); ipu_ch_param_set_size()
422 params->pp.nsb = 1; ipu_ch_param_set_size()
425 static void ipu_ch_param_set_buffer(union chan_param_mem *params, ipu_ch_param_set_buffer() argument
428 params->pp.eba0 = buf0; ipu_ch_param_set_buffer()
429 params->pp.eba1 = buf1; ipu_ch_param_set_buffer()
432 static void ipu_ch_param_set_rotation(union chan_param_mem *params, ipu_ch_param_set_rotation() argument
435 params->pp.bam = rotate; ipu_ch_param_set_rotation()
512 union ipu_channel_param *params, bool src_is_csi) ipu_ic_init_prpenc()
519 calc_resize_coeffs(params->video.in_height, ipu_ic_init_prpenc()
520 params->video.out_height, ipu_ic_init_prpenc()
525 calc_resize_coeffs(params->video.in_width, ipu_ic_init_prpenc()
526 params->video.out_width, ipu_ic_init_prpenc()
531 in_fmt = format_to_colorspace(params->video.in_pixel_fmt); ipu_ic_init_prpenc()
532 out_fmt = format_to_colorspace(params->video.out_pixel_fmt); ipu_ic_init_prpenc()
663 union chan_param_mem params = {}; ipu_init_channel_buffer() local
684 ipu_ch_param_set_size(&params, pixel_fmt, width, height, stride_bytes); ipu_init_channel_buffer()
685 ipu_ch_param_set_buffer(&params, phyaddr_0, phyaddr_1); ipu_init_channel_buffer()
686 ipu_ch_param_set_rotation(&params, rot_mode); ipu_init_channel_buffer()
690 ipu_write_param_mem(dma_param_addr(channel), (uint32_t *)&params, 10); ipu_init_channel_buffer()
845 struct idmac_video_param *video = &ichan->params.video; idmac_tx_submit()
952 union ipu_channel_param *params = &ichan->params; ipu_init_channel() local
978 ret = ipu_ic_init_prpenc(ipu, params, true); ipu_init_channel()
511 ipu_ic_init_prpenc(struct ipu *ipu, union ipu_channel_param *params, bool src_is_csi) ipu_ic_init_prpenc() argument
/linux-4.1.27/net/sched/
H A Dsch_pie.c73 struct pie_params params; member in struct:pie_sched_data
79 static void pie_params_init(struct pie_params *params) pie_params_init() argument
81 params->alpha = 2; pie_params_init()
82 params->beta = 20; pie_params_init()
83 params->tupdate = usecs_to_jiffies(30 * USEC_PER_MSEC); /* 30 ms */ pie_params_init()
84 params->limit = 1000; /* default of 1000 packets */ pie_params_init()
85 params->target = PSCHED_NS2TICKS(20 * NSEC_PER_MSEC); /* 20 ms */ pie_params_init()
86 params->ecn = false; pie_params_init()
87 params->bytemode = false; pie_params_init()
112 if ((q->vars.qdelay < q->params.target / 2) drop_early()
125 if (q->params.bytemode && packet_size <= mtu) drop_early()
149 } else if (q->params.ecn && (q->vars.prob <= MAX_PROB / 10) && pie_qdisc_enqueue()
204 q->params.target = PSCHED_NS2TICKS((u64)target * NSEC_PER_USEC); pie_change()
209 q->params.tupdate = usecs_to_jiffies(nla_get_u32(tb[TCA_PIE_TUPDATE])); pie_change()
214 q->params.limit = limit; pie_change()
219 q->params.alpha = nla_get_u32(tb[TCA_PIE_ALPHA]); pie_change()
222 q->params.beta = nla_get_u32(tb[TCA_PIE_BETA]); pie_change()
225 q->params.ecn = nla_get_u32(tb[TCA_PIE_ECN]); pie_change()
228 q->params.bytemode = nla_get_u32(tb[TCA_PIE_BYTEMODE]); pie_change()
347 (q->params.alpha * (MAX_PROB / PSCHED_TICKS_PER_SEC)) >> 7; calculate_probability()
349 (q->params.beta * (MAX_PROB / PSCHED_TICKS_PER_SEC)) >> 7; calculate_probability()
352 (q->params.alpha * (MAX_PROB / PSCHED_TICKS_PER_SEC)) >> 5; calculate_probability()
354 (q->params.beta * (MAX_PROB / PSCHED_TICKS_PER_SEC)) >> 5; calculate_probability()
357 (q->params.alpha * (MAX_PROB / PSCHED_TICKS_PER_SEC)) >> 4; calculate_probability()
359 (q->params.beta * (MAX_PROB / PSCHED_TICKS_PER_SEC)) >> 4; calculate_probability()
363 delta += alpha * ((qdelay - q->params.target)); calculate_probability()
416 if ((q->vars.qdelay < q->params.target / 2) && calculate_probability()
417 (q->vars.qdelay_old < q->params.target / 2) && calculate_probability()
433 if (q->params.tupdate) pie_timer()
434 mod_timer(&q->adapt_timer, jiffies + q->params.tupdate); pie_timer()
443 pie_params_init(&q->params); pie_init()
445 sch->limit = q->params.limit; pie_init()
471 ((u32) PSCHED_TICKS2NS(q->params.target)) / pie_dump()
474 nla_put_u32(skb, TCA_PIE_TUPDATE, jiffies_to_usecs(q->params.tupdate)) || pie_dump()
475 nla_put_u32(skb, TCA_PIE_ALPHA, q->params.alpha) || pie_dump()
476 nla_put_u32(skb, TCA_PIE_BETA, q->params.beta) || pie_dump()
477 nla_put_u32(skb, TCA_PIE_ECN, q->params.ecn) || pie_dump()
478 nla_put_u32(skb, TCA_PIE_BYTEMODE, q->params.bytemode)) pie_dump()
531 q->params.tupdate = 0; pie_destroy()
H A Dsch_codel.c57 struct codel_params params; member in struct:codel_sched_data
80 skb = codel_dequeue(sch, &q->params, &q->vars, &q->stats, dequeue); codel_qdisc_dequeue()
133 q->params.target = ((u64)target * NSEC_PER_USEC) >> CODEL_SHIFT; codel_change()
139 q->params.interval = ((u64)interval * NSEC_PER_USEC) >> CODEL_SHIFT; codel_change()
146 q->params.ecn = !!nla_get_u32(tb[TCA_CODEL_ECN]); codel_change()
167 codel_params_init(&q->params, sch); codel_init()
196 codel_time_to_us(q->params.target)) || codel_dump()
200 codel_time_to_us(q->params.interval)) || codel_dump()
202 q->params.ecn)) codel_dump()
/linux-4.1.27/drivers/video/fbdev/
H A Dsimplefb.c98 struct simplefb_params *params) simplefb_parse_dt()
105 ret = of_property_read_u32(np, "width", &params->width); simplefb_parse_dt()
111 ret = of_property_read_u32(np, "height", &params->height); simplefb_parse_dt()
117 ret = of_property_read_u32(np, "stride", &params->stride); simplefb_parse_dt()
128 params->format = NULL; simplefb_parse_dt()
132 params->format = &simplefb_formats[i]; simplefb_parse_dt()
135 if (!params->format) { simplefb_parse_dt()
144 struct simplefb_params *params) simplefb_parse_pd()
149 params->width = pd->width; simplefb_parse_pd()
150 params->height = pd->height; simplefb_parse_pd()
151 params->stride = pd->stride; simplefb_parse_pd()
153 params->format = NULL; simplefb_parse_pd()
158 params->format = &simplefb_formats[i]; simplefb_parse_pd()
162 if (!params->format) { simplefb_parse_pd()
274 struct simplefb_params params; simplefb_probe() local
284 ret = simplefb_parse_pd(pdev, &params); simplefb_probe()
286 ret = simplefb_parse_dt(pdev, &params); simplefb_probe()
307 info->fix.line_length = params.stride; simplefb_probe()
310 info->var.xres = params.width; simplefb_probe()
311 info->var.yres = params.height; simplefb_probe()
312 info->var.xres_virtual = params.width; simplefb_probe()
313 info->var.yres_virtual = params.height; simplefb_probe()
314 info->var.bits_per_pixel = params.format->bits_per_pixel; simplefb_probe()
315 info->var.red = params.format->red; simplefb_probe()
316 info->var.green = params.format->green; simplefb_probe()
317 info->var.blue = params.format->blue; simplefb_probe()
318 info->var.transp = params.format->transp; simplefb_probe()
346 params.format->name, simplefb_probe()
97 simplefb_parse_dt(struct platform_device *pdev, struct simplefb_params *params) simplefb_parse_dt() argument
143 simplefb_parse_pd(struct platform_device *pdev, struct simplefb_params *params) simplefb_parse_pd() argument
/linux-4.1.27/drivers/char/tpm/
H A Dtpm2-cmd.c99 union tpm2_cmd_params params; member in struct:tpm2_cmd
254 cmd.params.pcrread_in.pcr_selects_cnt = cpu_to_be32(1); tpm2_pcr_read()
255 cmd.params.pcrread_in.hash_alg = cpu_to_be16(TPM2_ALG_SHA1); tpm2_pcr_read()
256 cmd.params.pcrread_in.pcr_select_size = TPM2_PCR_SELECT_MIN; tpm2_pcr_read()
258 memset(cmd.params.pcrread_in.pcr_select, 0, tpm2_pcr_read()
259 sizeof(cmd.params.pcrread_in.pcr_select)); tpm2_pcr_read()
260 cmd.params.pcrread_in.pcr_select[pcr_idx >> 3] = 1 << (pcr_idx & 0x7); tpm2_pcr_read()
265 buf = cmd.params.pcrread_out.digest; tpm2_pcr_read()
298 cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); tpm2_pcr_extend()
299 cmd.params.pcrextend_in.auth_area_size = tpm2_pcr_extend()
301 cmd.params.pcrextend_in.auth_area.handle = tpm2_pcr_extend()
303 cmd.params.pcrextend_in.auth_area.nonce_size = 0; tpm2_pcr_extend()
304 cmd.params.pcrextend_in.auth_area.attributes = 0; tpm2_pcr_extend()
305 cmd.params.pcrextend_in.auth_area.auth_size = 0; tpm2_pcr_extend()
306 cmd.params.pcrextend_in.digest_cnt = cpu_to_be32(1); tpm2_pcr_extend()
307 cmd.params.pcrextend_in.hash_alg = cpu_to_be16(TPM2_ALG_SHA1); tpm2_pcr_extend()
308 memcpy(cmd.params.pcrextend_in.digest, hash, TPM_DIGEST_SIZE); tpm2_pcr_extend()
346 num_bytes = min_t(u32, max, sizeof(cmd.params.getrandom_out.buffer)); tpm2_get_random()
349 max > sizeof(cmd.params.getrandom_out.buffer)) tpm2_get_random()
354 cmd.params.getrandom_in.size = cpu_to_be16(num_bytes); tpm2_get_random()
361 recd = min_t(u32, be16_to_cpu(cmd.params.getrandom_out.size), tpm2_get_random()
363 memcpy(dest, cmd.params.getrandom_out.buffer, recd); tpm2_get_random()
401 cmd.params.get_tpm_pt_in.cap_id = cpu_to_be32(TPM2_CAP_TPM_PROPERTIES); tpm2_get_tpm_pt()
402 cmd.params.get_tpm_pt_in.property_id = cpu_to_be32(property_id); tpm2_get_tpm_pt()
403 cmd.params.get_tpm_pt_in.property_cnt = cpu_to_be32(1); tpm2_get_tpm_pt()
407 *value = cmd.params.get_tpm_pt_out.value; tpm2_get_tpm_pt()
438 cmd.params.startup_in.startup_type = cpu_to_be16(startup_type); tpm2_startup()
466 cmd.params.startup_in.startup_type = cpu_to_be16(shutdown_type); tpm2_shutdown()
532 cmd.params.selftest_in.full_test = full; tpm2_start_selftest()
579 cmd.params.pcrread_in.pcr_selects_cnt = cpu_to_be32(1); tpm2_do_selftest()
580 cmd.params.pcrread_in.hash_alg = cpu_to_be16(TPM2_ALG_SHA1); tpm2_do_selftest()
581 cmd.params.pcrread_in.pcr_select_size = TPM2_PCR_SELECT_MIN; tpm2_do_selftest()
582 cmd.params.pcrread_in.pcr_select[0] = 0x01; tpm2_do_selftest()
583 cmd.params.pcrread_in.pcr_select[1] = 0x00; tpm2_do_selftest()
584 cmd.params.pcrread_in.pcr_select[2] = 0x00; tpm2_do_selftest()
631 cmd.params.get_tpm_pt_in.cap_id = cpu_to_be32(TPM2_CAP_TPM_PROPERTIES); tpm2_probe()
632 cmd.params.get_tpm_pt_in.property_id = cpu_to_be32(0x100); tpm2_probe()
633 cmd.params.get_tpm_pt_in.property_cnt = cpu_to_be32(1); tpm2_probe()
H A Dtpm-interface.c442 tpm_cmd.params.getcap_in.cap = subcap_id; tpm_getcap()
444 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(0); tpm_getcap()
449 tpm_cmd.params.getcap_in.cap = TPM_CAP_FLAG; tpm_getcap()
451 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_getcap()
452 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_getcap()
453 tpm_cmd.params.getcap_in.subcap = subcap_id; tpm_getcap()
457 *cap = tpm_cmd.params.getcap_out.cap; tpm_getcap()
467 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_gen_interrupt()
468 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_gen_interrupt()
469 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; tpm_gen_interrupt()
491 start_cmd.params.startup_in.startup_type = startup_type; tpm_startup()
505 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_get_timeouts()
506 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_get_timeouts()
507 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; tpm_get_timeouts()
518 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_get_timeouts()
519 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_get_timeouts()
520 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; tpm_get_timeouts()
536 old_timeout[0] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.a); tpm_get_timeouts()
537 old_timeout[1] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.b); tpm_get_timeouts()
538 old_timeout[2] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.c); tpm_get_timeouts()
539 old_timeout[3] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.d); tpm_get_timeouts()
579 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_get_timeouts()
580 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_get_timeouts()
581 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_DURATION; tpm_get_timeouts()
593 duration_cap = &tpm_cmd.params.getcap_out.cap.duration; tpm_get_timeouts()
658 cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); tpm_pcr_read_dev()
663 memcpy(res_buf, cmd.params.pcrread_out.pcr_result, tpm_pcr_read_dev()
731 cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); tpm_pcr_extend()
732 memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE); tpm_pcr_extend()
771 cmd.params.pcrread_in.pcr_idx = cpu_to_be32(0); tpm_do_selftest()
912 cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(tpm_suspend_pcr); tpm_pm_suspend()
913 memcpy(cmd.params.pcrextend_in.hash, dummy_hash, tpm_pm_suspend()
1003 tpm_cmd.params.getrandom_in.num_bytes = cpu_to_be32(num_bytes); tpm_get_random()
1011 recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len); tpm_get_random()
1012 memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd); tpm_get_random()
/linux-4.1.27/drivers/staging/unisys/include/
H A Duisutils.h194 struct vmcall_io_controlvm_addr_params params; issue_vmcall_io_controlvm_addr() local
198 physaddr = virt_to_phys(&params); issue_vmcall_io_controlvm_addr()
201 *control_addr = params.address; issue_vmcall_io_controlvm_addr()
202 *control_bytes = params.channel_bytes; issue_vmcall_io_controlvm_addr()
209 struct vmcall_io_diag_addr_params params; issue_vmcall_io_diag_addr() local
213 physaddr = virt_to_phys(&params); issue_vmcall_io_diag_addr()
216 *diag_channel_addr = params.address; issue_vmcall_io_diag_addr()
222 struct vmcall_io_visorserial_addr_params params; issue_vmcall_io_visorserial_addr() local
226 physaddr = virt_to_phys(&params); issue_vmcall_io_visorserial_addr()
229 *channel_addr = params.address; issue_vmcall_io_visorserial_addr()
263 struct vmcall_channel_version_mismatch_params params; issue_vmcall_channel_mismatch() local
268 strlcpy(params.chname, chname, sizeof(params.chname)); issue_vmcall_channel_mismatch()
269 strlcpy(params.item_name, item_name, sizeof(params.item_name)); issue_vmcall_channel_mismatch()
270 params.line_no = line_no; issue_vmcall_channel_mismatch()
275 strlcpy(params.file_name, last_slash, sizeof(params.file_name)); issue_vmcall_channel_mismatch()
277 strlcpy(params.file_name, issue_vmcall_channel_mismatch()
279 sizeof(params.file_name)); issue_vmcall_channel_mismatch()
281 physaddr = virt_to_phys(&params); issue_vmcall_channel_mismatch()
/linux-4.1.27/drivers/media/usb/cpia2/
H A Dcpia2_core.c145 unsigned int device = cam->params.pnp_id.device_type; cpia2_do_command()
425 cam->params.version.firmware_revision_hi = cpia2_do_command()
427 cam->params.version.firmware_revision_lo = cpia2_do_command()
431 cam->params.pnp_id.vendor = (cmd.buffer.block_data[0] << 8) | cpia2_do_command()
433 cam->params.pnp_id.product = (cmd.buffer.block_data[2] << 8) | cpia2_do_command()
435 cam->params.pnp_id.device_revision = cpia2_do_command()
438 if (cam->params.pnp_id.vendor == 0x553) { cpia2_do_command()
439 if (cam->params.pnp_id.product == 0x100) { cpia2_do_command()
440 cam->params.pnp_id.device_type = DEVICE_STV_672; cpia2_do_command()
441 } else if (cam->params.pnp_id.product == 0x140 || cpia2_do_command()
442 cam->params.pnp_id.product == 0x151) { cpia2_do_command()
443 cam->params.pnp_id.device_type = DEVICE_STV_676; cpia2_do_command()
448 cam->params.version.asic_id = cmd.buffer.block_data[0]; cpia2_do_command()
449 cam->params.version.asic_rev = cmd.buffer.block_data[1]; cpia2_do_command()
452 cam->params.version.sensor_flags = cmd.buffer.block_data[0]; cpia2_do_command()
453 cam->params.version.sensor_rev = cmd.buffer.block_data[1]; cpia2_do_command()
456 cam->params.version.vp_device_hi = cmd.buffer.block_data[0]; cpia2_do_command()
457 cam->params.version.vp_device_lo = cmd.buffer.block_data[1]; cpia2_do_command()
460 cam->params.vp_params.gpio_data = cmd.buffer.block_data[0]; cpia2_do_command()
463 cam->params.vp_params.gpio_direction = cmd.buffer.block_data[0]; cpia2_do_command()
466 cam->params.vc_params.vc_mp_direction =cmd.buffer.block_data[0]; cpia2_do_command()
469 cam->params.vc_params.vc_mp_data = cmd.buffer.block_data[0]; cpia2_do_command()
472 cam->params.flicker_control.cam_register = cpia2_do_command()
476 cam->params.vc_params.wakeup = cmd.buffer.block_data[0]; cpia2_do_command()
479 cam->params.vc_params.pw_control = cmd.buffer.block_data[0]; cpia2_do_command()
482 cam->params.camera_state.system_ctrl = cmd.buffer.block_data[0]; cpia2_do_command()
485 cam->params.vp_params.system_state = cmd.buffer.block_data[0]; cpia2_do_command()
488 cam->params.vp_params.system_ctrl = cmd.buffer.block_data[0]; cpia2_do_command()
491 cam->params.vp_params.exposure_modes = cmd.buffer.block_data[0]; cpia2_do_command()
494 cam->params.vp_params.device_config = cmd.buffer.block_data[0]; cpia2_do_command()
497 cam->params.vc_params.vc_control = cmd.buffer.block_data[0]; cpia2_do_command()
500 cam->params.vp_params.video_mode = cmd.buffer.block_data[0]; cpia2_do_command()
503 cam->params.vp_params.user_effects = cmd.buffer.block_data[0]; cpia2_do_command()
608 * Called at least during the open process, sets up initial params.
622 cam->params.roi.width, cpia2_reset_camera()
623 cam->params.roi.height); cpia2_reset_camera()
645 if (cam->params.pnp_id.device_type == DEVICE_STV_672) { cpia2_reset_camera()
657 if (cam->params.pnp_id.device_type == DEVICE_STV_672) cpia2_reset_camera()
666 if (cam->params.pnp_id.device_type == DEVICE_STV_676) { cpia2_reset_camera()
716 cam->params.vp_params.video_mode); cpia2_reset_camera()
725 tmp_reg = cam->params.vp_params.system_ctrl; cpia2_reset_camera()
730 cmd.buffer.registers[1].value = cam->params.vp_params.device_config | cpia2_reset_camera()
752 if (cam->params.pnp_id.device_type == DEVICE_STV_672) cpia2_reset_camera()
764 if (cam->params.pnp_id.device_type == DEVICE_STV_676) cpia2_reset_camera()
772 cmd.buffer.registers[0].value = cam->params.vp_params.device_config & cpia2_reset_camera()
777 cam->params.vp_params.system_ctrl | CPIA2_VP_SYSTEMCTRL_HK_CONTROL; cpia2_reset_camera()
789 if (cam->params.compression.inhibit_htables) { cpia2_reset_camera()
790 tmp_reg = cam->params.vc_params.vc_control | cpia2_reset_camera()
793 tmp_reg = cam->params.vc_params.vc_control & cpia2_reset_camera()
803 cam->params.vc_params.quality / 100; cpia2_reset_camera()
818 tmp_reg = cam->params.vc_params.pw_control; cpia2_reset_camera()
830 cam->params.vp_params.video_mode); cpia2_reset_camera()
848 if(cam->params.camera_state.system_ctrl & cpia2_set_high_power()
860 if (cam->params.vp_params.system_state & cpia2_set_high_power()
864 cam->params.camera_state.power_mode = LO_POWER_MODE; cpia2_set_high_power()
871 cam->params.camera_state.power_mode = HI_POWER_MODE; cpia2_set_high_power()
882 cam->params.camera_state.power_mode = LO_POWER_MODE; cpia2_set_low_power()
951 int width = cam->params.roi.width; set_default_user_mode()
952 int height = cam->params.roi.height; set_default_user_mode()
954 switch (cam->params.version.sensor_flags) { set_default_user_mode()
974 if (cam->params.pnp_id.device_type == DEVICE_STV_672) set_default_user_mode()
981 cam->params.version.sensor_flags); set_default_user_mode()
986 cam->params.version.sensor_flags, user_mode, frame_rate); set_default_user_mode()
989 if(cam->params.vp_params.frame_rate > 0 && set_default_user_mode()
990 frame_rate > cam->params.vp_params.frame_rate) set_default_user_mode()
991 frame_rate = cam->params.vp_params.frame_rate; set_default_user_mode()
995 // if (cam->params.pnp_id.device_type == DEVICE_STV_676) set_default_user_mode()
1050 cam->params.vp_params.video_size = size; set_vw_size()
1055 cam->params.roi.width = STV_IMAGE_VGA_COLS; set_vw_size()
1056 cam->params.roi.height = STV_IMAGE_VGA_ROWS; set_vw_size()
1062 cam->params.roi.width = STV_IMAGE_CIF_COLS; set_vw_size()
1063 cam->params.roi.height = STV_IMAGE_CIF_ROWS; set_vw_size()
1069 cam->params.roi.width = STV_IMAGE_QVGA_COLS; set_vw_size()
1070 cam->params.roi.height = STV_IMAGE_QVGA_ROWS; set_vw_size()
1075 cam->params.roi.width = 288; set_vw_size()
1076 cam->params.roi.height = 216; set_vw_size()
1083 cam->params.roi.width = 256; set_vw_size()
1084 cam->params.roi.height = 192; set_vw_size()
1089 cam->params.roi.width = 224; set_vw_size()
1090 cam->params.roi.height = 168; set_vw_size()
1095 cam->params.roi.width = 192; set_vw_size()
1096 cam->params.roi.height = 144; set_vw_size()
1100 cam->params.roi.width = STV_IMAGE_QCIF_COLS; set_vw_size()
1101 cam->params.roi.height = STV_IMAGE_QCIF_ROWS; set_vw_size()
1121 switch (cam->params.version.sensor_flags) { configure_sensor()
1167 width = cam->params.roi.width; config_sensor_410()
1168 height = cam->params.roi.height; config_sensor_410()
1206 if (cam->params.pnp_id.device_type == DEVICE_STV_672) { config_sensor_410()
1219 if (cam->params.pnp_id.device_type == DEVICE_STV_672) { config_sensor_410()
1269 cmd.buffer.registers[i++].value = cam->params.roi.width / 4; config_sensor_410()
1272 cmd.buffer.registers[i++].value = cam->params.roi.height / 4; config_sensor_410()
1338 unsigned int device = cam->params.pnp_id.device_type; config_sensor_500()
1353 width = cam->params.roi.width; config_sensor_500()
1354 height = cam->params.roi.height; config_sensor_500()
1534 * This sets all user changeable properties to the values in cam->params.
1544 cam->params.camera_state.stream_mode); set_all_properties()
1548 TRANSFER_WRITE, cam->params.vp_params.gpio_direction); set_all_properties()
1550 cam->params.vp_params.gpio_data); set_all_properties()
1586 if(cam->params.pnp_id.device_type != DEVICE_STV_672) cpia2_set_flicker_mode()
1593 cam_reg = cam->params.flicker_control.cam_register; cpia2_set_flicker_mode()
1620 cam_reg = cam->params.vp_params.exposure_modes; cpia2_set_flicker_mode()
1640 cam->params.flicker_control.flicker_mode_req = mode; cpia2_set_flicker_mode()
1659 cam_reg = cam->params.vp_params.user_effects; cpia2_set_property_flip()
1669 cam->params.vp_params.user_effects = cam_reg; cpia2_set_property_flip()
1684 cam_reg = cam->params.vp_params.user_effects; cpia2_set_property_mirror()
1694 cam->params.vp_params.user_effects = cam_reg; cpia2_set_property_mirror()
1719 cam->params.vp_params.gpio_direction = 255; cpia2_set_gpio()
1727 cam->params.vp_params.gpio_data = setting; cpia2_set_gpio()
1744 if(cam->params.pnp_id.device_type == DEVICE_STV_672 && cpia2_set_fps()
1745 cam->params.version.sensor_flags == cpia2_set_fps()
1759 if (cam->params.pnp_id.device_type == DEVICE_STV_672 && cpia2_set_fps()
1769 cam->params.vp_params.frame_rate = framerate; cpia2_set_fps()
1785 if (cam->params.pnp_id.device_type == DEVICE_STV_672 && value == 0) cpia2_set_brightness()
1833 if (cam->params.pnp_id.device_type != DEVICE_STV_672 || set_lowlight_boost()
1834 cam->params.version.sensor_flags != CPIA2_VP_SENSOR_FLAGS_500) set_lowlight_boost()
1848 if (cam->params.vp_params.lowlight_boost) { set_lowlight_boost()
2036 if (cam->params.pnp_id.device_type == DEVICE_STV_672) { cpia2_dbg_dump_registers()
2111 cam->params.vp_params.lowlight_boost = 0; reset_camera_struct()
2114 cam->params.flicker_control.flicker_mode_req = NEVER_FLICKER; reset_camera_struct()
2116 /* jpeg params */ reset_camera_struct()
2117 cam->params.compression.jpeg_options = CPIA2_VC_VC_JPEG_OPT_DEFAULT; reset_camera_struct()
2118 cam->params.compression.creep_period = 2; reset_camera_struct()
2119 cam->params.compression.user_squeeze = 20; reset_camera_struct()
2120 cam->params.compression.inhibit_htables = false; reset_camera_struct()
2122 /* gpio params */ reset_camera_struct()
2123 cam->params.vp_params.gpio_direction = 0; /* write, the default safe mode */ reset_camera_struct()
2124 cam->params.vp_params.gpio_data = 0; reset_camera_struct()
2126 /* Target kb params */ reset_camera_struct()
2127 cam->params.vc_params.quality = 100; reset_camera_struct()
2132 if(cam->params.pnp_id.device_type == DEVICE_STV_672) { reset_camera_struct()
2133 if(cam->params.version.sensor_flags == CPIA2_VP_SENSOR_FLAGS_500) reset_camera_struct()
2134 cam->params.vp_params.frame_rate = CPIA2_VP_FRAMERATE_15; reset_camera_struct()
2136 cam->params.vp_params.frame_rate = CPIA2_VP_FRAMERATE_30; reset_camera_struct()
2138 cam->params.vp_params.frame_rate = CPIA2_VP_FRAMERATE_30; reset_camera_struct()
2145 if (cam->params.version.sensor_flags == CPIA2_VP_SENSOR_FLAGS_500) { reset_camera_struct()
2148 cam->params.roi.width = STV_IMAGE_VGA_COLS; reset_camera_struct()
2149 cam->params.roi.height = STV_IMAGE_VGA_ROWS; reset_camera_struct()
2153 cam->params.roi.width = STV_IMAGE_CIF_COLS; reset_camera_struct()
2154 cam->params.roi.height = STV_IMAGE_CIF_ROWS; reset_camera_struct()
2157 cam->width = cam->params.roi.width; reset_camera_struct()
2158 cam->height = cam->params.roi.height; reset_camera_struct()
2206 if (cam->params.version.asic_id != CPIA2_ASIC_672) { cpia2_init_camera()
2208 cam->params.version.asic_id); cpia2_init_camera()
2320 cam->params.camera_state.stream_mode); cpia2_read()
2368 cam->params.camera_state.stream_mode); cpia2_poll()
H A Dcpia2_usb.c464 if(alt == cam->params.camera_state.stream_mode) cpia2_usb_change_streaming_alternate()
471 cam->params.camera_state.stream_mode = alt; cpia2_usb_change_streaming_alternate()
728 old_alt = cam->params.camera_state.stream_mode; cpia2_usb_stream_start()
729 cam->params.camera_state.stream_mode = 0; cpia2_usb_stream_start()
734 cam->params.camera_state.stream_mode = old_alt; cpia2_usb_stream_start()
775 ret = set_alternate(cam, cam->params.camera_state.stream_mode); cpia2_usb_stream_resume()
780 cam->params.vp_params.user_effects); cpia2_usb_stream_resume()
845 cam->params.version.firmware_revision_hi, cpia2_usb_probe()
846 cam->params.version.firmware_revision_lo, cpia2_usb_probe()
847 cam->params.version.asic_id, cpia2_usb_probe()
848 cam->params.version.asic_rev); cpia2_usb_probe()
850 cam->params.pnp_id.vendor, cpia2_usb_probe()
851 cam->params.pnp_id.product, cpia2_usb_probe()
852 cam->params.pnp_id.device_revision); cpia2_usb_probe()
854 cam->params.version.sensor_flags, cpia2_usb_probe()
855 cam->params.version.sensor_rev); cpia2_usb_probe()
928 cam->params.camera_state.stream_mode); cpia2_usb_resume()
H A Dcpia2_v4l.c228 if (cam->params.pnp_id.product == 0x151) cpia2_querycap()
232 switch (cam->params.pnp_id.device_type) { cpia2_querycap()
243 switch (cam->params.version.sensor_flags) { cpia2_querycap()
424 cam->params.compression.inhibit_htables = 0; cpia2_s_fmt_vid_cap()
436 cam->params.roi.width = f->fmt.pix.width; cpia2_s_fmt_vid_cap()
437 cam->params.roi.height = f->fmt.pix.height; cpia2_s_fmt_vid_cap()
533 if (cam->params.vp_params.frame_rate == framerate_controls[i].value) { cpia2_g_parm()
554 if (cam->params.pnp_id.device_type == DEVICE_STV_672 && cpia2_s_parm()
555 cam->params.version.sensor_flags == CPIA2_VP_SENSOR_FLAGS_500) cpia2_s_parm()
614 if (cam->params.pnp_id.device_type == DEVICE_STV_672 && cpia2_enum_frameintervals()
615 cam->params.version.sensor_flags == CPIA2_VP_SENSOR_FLAGS_500) cpia2_enum_frameintervals()
672 cam->params.compression.inhibit_htables = cpia2_s_ctrl()
676 cam->params.vc_params.quality = ctrl->val; cpia2_s_ctrl()
679 cam->params.camera_state.stream_mode = ctrl->val; cpia2_s_ctrl()
705 if(!cam->params.compression.inhibit_htables) { cpia2_g_jpegcomp()
745 cam->params.compression.inhibit_htables = cpia2_s_jpegcomp()
976 cam->params.camera_state.stream_mode); cpia2_streamon()
1028 cam->width = cam->params.roi.width; reset_camera_struct_v4l()
1029 cam->height = cam->params.roi.height; reset_camera_struct_v4l()
1035 cam->params.flicker_control.flicker_mode_req = flicker_mode; reset_camera_struct_v4l()
1038 cam->params.camera_state.stream_mode = alternate; reset_camera_struct_v4l()
1126 cam->params.pnp_id.device_type == DEVICE_STV_672 ? 1 : 0, cpia2_register_camera()
1144 if (cam->params.pnp_id.device_type != DEVICE_STV_672) cpia2_register_camera()
1148 if (cam->params.pnp_id.device_type == DEVICE_STV_672) cpia2_register_camera()
1153 if (cam->params.pnp_id.product == 0x151) { cpia2_register_camera()
/linux-4.1.27/drivers/media/tuners/
H A Dtuner-types.c1442 .params = tuner_temic_pal_params,
1447 .params = tuner_philips_pal_i_params,
1452 .params = tuner_philips_ntsc_params,
1457 .params = tuner_philips_secam_params,
1465 .params = tuner_philips_pal_params,
1470 .params = tuner_temic_ntsc_params,
1475 .params = tuner_temic_pal_i_params,
1480 .params = tuner_temic_4036fy5_ntsc_params,
1485 .params = tuner_alps_tsbh1_ntsc_params,
1492 .params = tuner_alps_tsb_1_params,
1497 .params = tuner_alps_tsbb5_params,
1502 .params = tuner_alps_tsbe5_params,
1507 .params = tuner_alps_tsbc5_params,
1512 .params = tuner_temic_4006fh5_params,
1517 .params = tuner_alps_tshc6_params,
1522 .params = tuner_temic_pal_dk_params,
1527 .params = tuner_philips_ntsc_m_params,
1532 .params = tuner_temic_4066fy5_pal_i_params,
1537 .params = tuner_temic_4006fn5_multi_params,
1544 .params = tuner_temic_4009f_5_params,
1549 .params = tuner_temic_4039fr5_params,
1554 .params = tuner_temic_4046fm5_params,
1559 .params = tuner_philips_pal_dk_params,
1564 .params = tuner_philips_fq1216me_params,
1569 .params = tuner_lg_pal_i_fm_params,
1574 .params = tuner_lg_pal_i_params,
1579 .params = tuner_lg_ntsc_fm_params,
1584 .params = tuner_lg_pal_fm_params,
1589 .params = tuner_lg_pal_params,
1596 .params = tuner_temic_4009_fn5_multi_pal_fm_params,
1601 .params = tuner_sharp_2u5jf5540_params,
1606 .params = tuner_samsung_pal_tcpm9091pd27_params,
1614 .params = tuner_temic_4106fh5_params,
1619 .params = tuner_temic_4012fy5_params,
1624 .params = tuner_temic_4136_fy5_params,
1629 .params = tuner_lg_pal_new_tapc_params,
1634 .params = tuner_fm1216me_mk3_params,
1639 .params = tuner_lg_ntsc_new_tapc_params,
1646 .params = tuner_hitachi_ntsc_params,
1651 .params = tuner_philips_pal_mk_params,
1656 .params = tuner_philips_fcv1236d_params,
1664 .params = tuner_fm1236_mk3_params,
1669 .params = tuner_philips_4in1_params,
1674 .params = tuner_microtune_4049_fm5_params,
1679 .params = tuner_panasonic_vp27_params,
1684 .params = tuner_fm1236_mk3_params,
1689 .params = tuner_tnf_8831bgff_params,
1694 .params = tuner_microtune_4042fi5_params,
1704 .params = tuner_tcl_2002n_params,
1709 .params = tuner_philips_fm1256_ih3_params,
1714 .params = tuner_thomson_dtt7610_params,
1722 .params = tuner_philips_fq1286_params,
1730 .params = tuner_tcl_2002mb_params,
1735 .params = tuner_philips_fq1216ame_mk4_params,
1740 .params = tuner_philips_fq1236a_mk4_params,
1745 .params = tuner_ymec_tvf_8531mf_params,
1750 .params = tuner_ymec_tvf_5533mf_params,
1758 .params = tuner_thomson_dtt761x_params,
1767 .params = tuner_tena_9533_di_params,
1776 .params = tuner_philips_fmd1216me_mk3_params,
1786 .params = tuner_lg_tdvs_h06xf_params,
1795 .params = tuner_ymec_tvf66t5_b_dff_params,
1800 .params = tuner_lg_taln_params,
1805 .params = tuner_philips_td1316_params,
1813 .params = tuner_tuv1236d_params,
1821 .params = tuner_tnf_5335mf_params,
1828 .params = tuner_samsung_tcpn_2121p30a_params,
1837 .params = tuner_thomson_fe6600_params,
1845 .params = tuner_samsung_tcpg_6121p30a_params,
1867 .params = tuner_tcl_mf02gip_5n_params,
1872 .params = tuner_philips_fmd1216mex_mk3_params,
1882 .params = tuner_fm1216mk5_params,
1889 .params = tuner_fq1216lme_mk3_params,
1895 .params = tuner_partsnic_pti_5nf05_params,
1900 .params = tuner_philips_cu1216l_params,
1910 .params = tuner_sony_btf_pxn01z_params,
1915 .params = tuner_philips_fq1236_mk5_params,
1920 .params = tuner_tena_tnf_5337_params,
1929 .params = tuner_sony_btf_pg472z_params,
1936 .params = tuner_sony_btf_pg467z_params,
1941 .params = tuner_sony_btf_pg463z_params,
H A Dmt20xx.c301 struct analog_parameters *params) mt2032_set_tv_freq()
306 if (params->std & V4L2_STD_525_60) { mt2032_set_tv_freq()
318 mt2032_set_if_freq(fe, params->frequency*62500, mt2032_set_tv_freq()
325 struct analog_parameters *params) mt2032_set_radio_freq()
330 if (params->std & V4L2_STD_525_60) { mt2032_set_radio_freq()
339 mt2032_set_if_freq(fe, params->frequency * 125 / 2, mt2032_set_radio_freq()
346 struct analog_parameters *params) mt2032_set_params()
351 switch (params->mode) { mt2032_set_params()
353 ret = mt2032_set_radio_freq(fe, params); mt2032_set_params()
354 priv->frequency = params->frequency * 125 / 2; mt2032_set_params()
358 ret = mt2032_set_tv_freq(fe, params); mt2032_set_params()
359 priv->frequency = params->frequency * 62500; mt2032_set_params()
504 struct analog_parameters *params) mt2050_set_tv_freq()
508 if (params->std & V4L2_STD_525_60) { mt2050_set_tv_freq()
515 if (V4L2_TUNER_DIGITAL_TV == params->mode) { mt2050_set_tv_freq()
519 mt2050_set_if_freq(fe, params->frequency*62500, if2); mt2050_set_tv_freq()
526 struct analog_parameters *params) mt2050_set_radio_freq()
531 if (params->std & V4L2_STD_525_60) { mt2050_set_radio_freq()
539 mt2050_set_if_freq(fe, params->frequency * 125 / 2, if2); mt2050_set_radio_freq()
546 struct analog_parameters *params) mt2050_set_params()
551 switch (params->mode) { mt2050_set_params()
553 ret = mt2050_set_radio_freq(fe, params); mt2050_set_params()
554 priv->frequency = params->frequency * 125 / 2; mt2050_set_params()
558 ret = mt2050_set_tv_freq(fe, params); mt2050_set_params()
559 priv->frequency = params->frequency * 62500; mt2050_set_params()
300 mt2032_set_tv_freq(struct dvb_frontend *fe, struct analog_parameters *params) mt2032_set_tv_freq() argument
324 mt2032_set_radio_freq(struct dvb_frontend *fe, struct analog_parameters *params) mt2032_set_radio_freq() argument
345 mt2032_set_params(struct dvb_frontend *fe, struct analog_parameters *params) mt2032_set_params() argument
503 mt2050_set_tv_freq(struct dvb_frontend *fe, struct analog_parameters *params) mt2050_set_tv_freq() argument
525 mt2050_set_radio_freq(struct dvb_frontend *fe, struct analog_parameters *params) mt2050_set_radio_freq() argument
545 mt2050_set_params(struct dvb_frontend *fe, struct analog_parameters *params) mt2050_set_params() argument
H A Dtuner-simple.c242 if (desired_type == tun->params[i].type) simple_tuner_params()
245 /* use default tuner params if desired_type not available */ simple_tuner_params()
247 tuner_dbg("desired params (%s) undefined for tuner %d\n", simple_tuner_params()
252 tuner_dbg("using tuner params #%d (%s)\n", i, simple_tuner_params()
253 tuner_param_name(tun->params[i].type)); simple_tuner_params()
255 return &tun->params[i]; simple_tuner_params()
320 struct analog_parameters *params, simple_std_setup()
333 if (params->std & V4L2_STD_SECAM_L) simple_std_setup()
336 else if (params->std & V4L2_STD_SECAM_LC) simple_std_setup()
345 if (params->std & V4L2_STD_PAL_BG) { simple_std_setup()
348 } else if (params->std & V4L2_STD_PAL_I) { simple_std_setup()
351 } else if (params->std & V4L2_STD_PAL_DK) { simple_std_setup()
354 } else if (params->std & V4L2_STD_SECAM_L) { simple_std_setup()
363 if (params->std & (V4L2_STD_PAL_BG|V4L2_STD_PAL_DK)) { simple_std_setup()
366 } else if (params->std & V4L2_STD_PAL_I) { simple_std_setup()
369 } else if (params->std & V4L2_STD_SECAM_L) { simple_std_setup()
381 if (!(params->std & V4L2_STD_ATSC)) simple_std_setup()
399 if (params->std & V4L2_STD_ATSC) { simple_std_setup()
545 struct analog_parameters *params) simple_set_tv_freq()
567 if (params->std == V4L2_STD_NTSC_M_JP) { simple_set_tv_freq()
570 } else if ((params->std & V4L2_STD_MN) && simple_set_tv_freq()
571 !(params->std & ~V4L2_STD_MN)) { simple_set_tv_freq()
574 } else if (params->std == V4L2_STD_SECAM_LC) { simple_set_tv_freq()
584 i = simple_config_lookup(fe, t_params, &params->frequency, simple_set_tv_freq()
587 div = params->frequency + IFPCoff + offset; simple_set_tv_freq()
591 params->frequency / 16, params->frequency % 16 * 100 / 16, simple_set_tv_freq()
596 simple_std_setup(fe, params, &config, &cb); simple_set_tv_freq()
613 int is_secam_l = (params->std & (V4L2_STD_SECAM_L | simple_set_tv_freq()
615 !(params->std & ~(V4L2_STD_SECAM_L | simple_set_tv_freq()
621 if (params->std == V4L2_STD_SECAM_LC) { simple_set_tv_freq()
667 struct analog_parameters *params) simple_set_radio_freq()
675 unsigned int freq = params->frequency; simple_set_radio_freq()
680 if (tun->params[j].type == TUNER_PARAM_TYPE_RADIO) simple_set_radio_freq()
683 t_params = &tun->params[j]; simple_set_radio_freq()
770 struct analog_parameters *params) simple_set_params()
778 switch (params->mode) { simple_set_params()
781 ret = simple_set_radio_freq(fe, params); simple_set_params()
782 priv->frequency = params->frequency * 125 / 2; simple_set_params()
787 ret = simple_set_tv_freq(fe, params); simple_set_params()
788 priv->frequency = params->frequency * 62500; simple_set_params()
319 simple_std_setup(struct dvb_frontend *fe, struct analog_parameters *params, u8 *config, u8 *cb) simple_std_setup() argument
544 simple_set_tv_freq(struct dvb_frontend *fe, struct analog_parameters *params) simple_set_tv_freq() argument
666 simple_set_radio_freq(struct dvb_frontend *fe, struct analog_parameters *params) simple_set_radio_freq() argument
769 simple_set_params(struct dvb_frontend *fe, struct analog_parameters *params) simple_set_params() argument
H A Dtda827x.c51 struct analog_parameters *params) tda827x_set_std()
57 if (params->std & V4L2_STD_MN) { tda827x_set_std()
61 } else if (params->std & V4L2_STD_B) { tda827x_set_std()
64 } else if (params->std & V4L2_STD_GH) { tda827x_set_std()
67 } else if (params->std & V4L2_STD_PAL_I) { tda827x_set_std()
70 } else if (params->std & V4L2_STD_DK) { tda827x_set_std()
73 } else if (params->std & V4L2_STD_SECAM_L) { tda827x_set_std()
76 } else if (params->std & V4L2_STD_SECAM_LC) { tda827x_set_std()
84 if (params->mode == V4L2_TUNER_RADIO) { tda827x_set_std()
251 struct analog_parameters *params) tda827xo_set_analog_params()
259 unsigned int freq = params->frequency; tda827xo_set_analog_params()
261 tda827x_set_std(fe, params); tda827xo_set_analog_params()
263 if (params->mode == V4L2_TUNER_RADIO) tda827xo_set_analog_params()
329 priv->frequency = params->frequency; tda827xo_set_analog_params()
462 struct analog_parameters *params) tda827xa_lna_gain()
486 if (params == NULL) { tda827xa_lna_gain()
492 if (params->std & V4L2_STD_MN) tda827xa_lna_gain()
662 struct analog_parameters *params) tda827xa_set_analog_params()
670 unsigned int freq = params->frequency; tda827xa_set_analog_params()
672 tda827x_set_std(fe, params); tda827xa_set_analog_params()
674 tda827xa_lna_gain(fe, 1, params); tda827xa_set_analog_params()
677 if (params->mode == V4L2_TUNER_RADIO) tda827xa_set_analog_params()
730 tda827xa_lna_gain(fe, 0, params); tda827xa_set_analog_params()
754 priv->frequency = params->frequency; tda827xa_set_analog_params()
50 tda827x_set_std(struct dvb_frontend *fe, struct analog_parameters *params) tda827x_set_std() argument
250 tda827xo_set_analog_params(struct dvb_frontend *fe, struct analog_parameters *params) tda827xo_set_analog_params() argument
461 tda827xa_lna_gain(struct dvb_frontend *fe, int high, struct analog_parameters *params) tda827xa_lna_gain() argument
661 tda827xa_set_analog_params(struct dvb_frontend *fe, struct analog_parameters *params) tda827xa_set_analog_params() argument
H A Dxc4000.c1277 struct analog_parameters *params) xc4000_set_analog_params()
1283 if (params->mode == V4L2_TUNER_RADIO) { xc4000_set_analog_params()
1285 __func__, params->frequency); xc4000_set_analog_params()
1289 params->std = 0; xc4000_set_analog_params()
1290 priv->freq_hz = params->frequency * 125L / 2; xc4000_set_analog_params()
1304 __func__, params->frequency); xc4000_set_analog_params()
1308 /* params->frequency is in units of 62.5khz */ xc4000_set_analog_params()
1309 priv->freq_hz = params->frequency * 62500; xc4000_set_analog_params()
1311 params->std &= V4L2_STD_ALL; xc4000_set_analog_params()
1313 if (!params->std) xc4000_set_analog_params()
1314 params->std = V4L2_STD_PAL_BG; xc4000_set_analog_params()
1319 if (params->std & V4L2_STD_MN) { xc4000_set_analog_params()
1320 params->std = V4L2_STD_MN; xc4000_set_analog_params()
1324 params->std |= V4L2_STD_A2; xc4000_set_analog_params()
1327 params->std |= V4L2_STD_BTSC; xc4000_set_analog_params()
1333 if (params->std & V4L2_STD_PAL_BG) { xc4000_set_analog_params()
1334 params->std = V4L2_STD_PAL_BG; xc4000_set_analog_params()
1339 params->std |= V4L2_STD_NICAM_A; xc4000_set_analog_params()
1342 params->std |= V4L2_STD_NICAM_B; xc4000_set_analog_params()
1347 params->std |= V4L2_STD_A2_A; xc4000_set_analog_params()
1350 params->std |= V4L2_STD_A2_B; xc4000_set_analog_params()
1357 if (params->std & V4L2_STD_PAL_I) { xc4000_set_analog_params()
1359 params->std = V4L2_STD_PAL_I | V4L2_STD_NICAM; xc4000_set_analog_params()
1367 if (params->std & V4L2_STD_PAL_DK) { xc4000_set_analog_params()
1368 params->std = V4L2_STD_PAL_DK; xc4000_set_analog_params()
1372 params->std |= V4L2_STD_A2; xc4000_set_analog_params()
1375 params->std |= V4L2_STD_NICAM; xc4000_set_analog_params()
1381 if (params->std & V4L2_STD_SECAM_DK) { xc4000_set_analog_params()
1383 params->std = V4L2_STD_SECAM_DK | V4L2_STD_A2; xc4000_set_analog_params()
1390 params->std |= V4L2_STD_SECAM_K3; xc4000_set_analog_params()
1398 if (params->std & V4L2_STD_SECAM_L) { xc4000_set_analog_params()
1401 params->std = V4L2_STD_SECAM_L | V4L2_STD_NICAM; xc4000_set_analog_params()
1406 if (params->std & V4L2_STD_SECAM_LC) { xc4000_set_analog_params()
1409 params->std = V4L2_STD_SECAM_LC | V4L2_STD_NICAM; xc4000_set_analog_params()
1418 if (check_firmware(fe, type, params->std, xc4000_set_analog_params()
1276 xc4000_set_analog_params(struct dvb_frontend *fe, struct analog_parameters *params) xc4000_set_analog_params() argument
H A Dtda8290.c116 struct analog_parameters *params) set_audio()
121 if (params->std & V4L2_STD_MN) { set_audio()
124 } else if (params->std & V4L2_STD_B) { set_audio()
127 } else if (params->std & V4L2_STD_GH) { set_audio()
130 } else if (params->std & V4L2_STD_PAL_I) { set_audio()
133 } else if (params->std & V4L2_STD_DK) { set_audio()
136 } else if (params->std & V4L2_STD_SECAM_L) { set_audio()
139 } else if (params->std & V4L2_STD_SECAM_LC) { set_audio()
147 if (params->mode == V4L2_TUNER_RADIO) { set_audio()
177 struct analog_parameters *params) tda8290_set_params()
203 set_audio(fe, params); tda8290_set_params()
212 if (params->mode == V4L2_TUNER_RADIO) { tda8290_set_params()
241 fe->ops.tuner_ops.set_analog_params(fe, params); tda8290_set_params()
409 struct analog_parameters *params) tda8295_set_params()
415 set_audio(fe, params); tda8295_set_params()
417 tuner_dbg("%s: freq = %d\n", __func__, params->frequency); tda8295_set_params()
435 fe->ops.tuner_ops.set_analog_params(fe, params); tda8295_set_params()
115 set_audio(struct dvb_frontend *fe, struct analog_parameters *params) set_audio() argument
176 tda8290_set_params(struct dvb_frontend *fe, struct analog_parameters *params) tda8290_set_params() argument
408 tda8295_set_params(struct dvb_frontend *fe, struct analog_parameters *params) tda8295_set_params() argument
/linux-4.1.27/drivers/media/pci/mantis/
H A Dmantis_uart.c110 struct mantis_uart_params *params) mantis_uart_setup()
114 mmwrite((mmread(MANTIS_UART_CTL) | (params->parity & 0x3)), MANTIS_UART_CTL); mantis_uart_setup()
118 switch (params->baud_rate) { mantis_uart_setup()
146 struct mantis_uart_params params; mantis_uart_init() local
149 params.baud_rate = config->baud_rate; mantis_uart_init()
150 params.parity = config->parity; mantis_uart_init()
152 rates[params.baud_rate].string, mantis_uart_init()
153 parity[params.parity].string); mantis_uart_init()
163 mantis_uart_setup(mantis, &params); mantis_uart_init()
109 mantis_uart_setup(struct mantis_pci *mantis, struct mantis_uart_params *params) mantis_uart_setup() argument
/linux-4.1.27/net/mac80211/
H A Dcfg.c30 struct vif_params *params) ieee80211_add_iface()
37 err = ieee80211_if_add(local, name, name_assign_type, &wdev, type, params); ieee80211_add_iface()
59 struct vif_params *params) ieee80211_change_iface()
69 params && params->use_4addr == 0) ieee80211_change_iface()
72 params && params->use_4addr >= 0) ieee80211_change_iface()
73 sdata->u.mgd.use_4addr = params->use_4addr; ieee80211_change_iface()
145 struct key_params *params) ieee80211_add_key()
158 switch (params->cipher) { ieee80211_add_key()
175 cs = ieee80211_cs_get(local, params->cipher, sdata->vif.type); ieee80211_add_key()
179 key = ieee80211_key_alloc(params->cipher, key_idx, params->key_len, ieee80211_add_key()
180 params->key, params->seq_len, params->seq, ieee80211_add_key()
301 struct key_params *params)) ieee80211_get_key()
306 struct key_params params; ieee80211_get_key() local
333 memset(&params, 0, sizeof(params)); ieee80211_get_key()
335 params.cipher = key->conf.cipher; ieee80211_get_key()
353 params.seq = seq; ieee80211_get_key()
354 params.seq_len = 6; ieee80211_get_key()
365 params.seq = seq; ieee80211_get_key()
366 params.seq_len = 6; ieee80211_get_key()
377 params.seq = seq; ieee80211_get_key()
378 params.seq_len = 6; ieee80211_get_key()
389 params.seq = seq; ieee80211_get_key()
390 params.seq_len = 6; ieee80211_get_key()
401 params.seq = seq; ieee80211_get_key()
402 params.seq_len = 6; ieee80211_get_key()
406 params.key = key->conf.key; ieee80211_get_key()
407 params.key_len = key->conf.keylen; ieee80211_get_key()
409 callback(cookie, &params); ieee80211_get_key()
629 struct cfg80211_beacon_data *params, ieee80211_assign_beacon()
641 if (!params->head && !old) ieee80211_assign_beacon()
645 if (params->head) ieee80211_assign_beacon()
646 new_head_len = params->head_len; ieee80211_assign_beacon()
651 if (params->tail || !old) ieee80211_assign_beacon()
652 /* params->tail_len will be zero for !params->tail */ ieee80211_assign_beacon()
653 new_tail_len = params->tail_len; ieee80211_assign_beacon()
682 if (params->head) ieee80211_assign_beacon()
683 memcpy(new->head, params->head, new_head_len); ieee80211_assign_beacon()
688 if (params->tail) ieee80211_assign_beacon()
689 memcpy(new->tail, params->tail, new_tail_len); ieee80211_assign_beacon()
694 err = ieee80211_set_probe_resp(sdata, params->probe_resp, ieee80211_assign_beacon()
695 params->probe_resp_len, csa); ieee80211_assign_beacon()
710 struct cfg80211_ap_settings *params) ieee80211_start_ap()
728 switch (params->smps_mode) { ieee80211_start_ap()
744 err = ieee80211_vif_use_channel(sdata, &params->chandef, ieee80211_start_ap()
756 sdata->control_port_protocol = params->crypto.control_port_ethertype; ieee80211_start_ap()
757 sdata->control_port_no_encrypt = params->crypto.control_port_no_encrypt; ieee80211_start_ap()
759 &params->crypto, ieee80211_start_ap()
764 params->crypto.control_port_ethertype; ieee80211_start_ap()
766 params->crypto.control_port_no_encrypt; ieee80211_start_ap()
769 &params->crypto, ieee80211_start_ap()
773 sdata->vif.bss_conf.beacon_int = params->beacon_interval; ieee80211_start_ap()
774 sdata->vif.bss_conf.dtim_period = params->dtim_period; ieee80211_start_ap()
777 sdata->vif.bss_conf.ssid_len = params->ssid_len; ieee80211_start_ap()
778 if (params->ssid_len) ieee80211_start_ap()
779 memcpy(sdata->vif.bss_conf.ssid, params->ssid, ieee80211_start_ap()
780 params->ssid_len); ieee80211_start_ap()
782 (params->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE); ieee80211_start_ap()
787 params->p2p_ctwindow & IEEE80211_P2P_OPPPS_CTWINDOW_MASK; ieee80211_start_ap()
788 if (params->p2p_opp_ps) ieee80211_start_ap()
792 err = ieee80211_assign_beacon(sdata, &params->beacon, NULL); ieee80211_start_ap()
821 struct cfg80211_beacon_data *params) ieee80211_change_beacon()
840 err = ieee80211_assign_beacon(sdata, params, NULL); ieee80211_change_beacon()
1026 struct station_parameters *params) sta_apply_parameters()
1036 mask = params->sta_flags_mask; sta_apply_parameters()
1037 set = params->sta_flags_set; sta_apply_parameters()
1098 params->ext_capab_len >= 4 && sta_apply_parameters()
1099 params->ext_capab[3] & WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH) sta_apply_parameters()
1102 if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) { sta_apply_parameters()
1103 sta->sta.uapsd_queues = params->uapsd_queues; sta_apply_parameters()
1104 sta->sta.max_sp = params->max_sp; sta_apply_parameters()
1111 if (params->aid) sta_apply_parameters()
1112 sta->sta.aid = params->aid; sta_apply_parameters()
1122 if (params->listen_interval >= 0) sta_apply_parameters()
1123 sta->listen_interval = params->listen_interval; sta_apply_parameters()
1125 if (params->supported_rates) { sta_apply_parameters()
1127 sband, params->supported_rates, sta_apply_parameters()
1128 params->supported_rates_len, sta_apply_parameters()
1132 if (params->ht_capa) sta_apply_parameters()
1134 params->ht_capa, sta); sta_apply_parameters()
1136 if (params->vht_capa) sta_apply_parameters()
1138 params->vht_capa, sta); sta_apply_parameters()
1140 if (params->opmode_notif_used) { sta_apply_parameters()
1145 params->opmode_notif, sta_apply_parameters()
1153 if (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE) { sta_apply_parameters()
1154 switch (params->plink_state) { sta_apply_parameters()
1159 sta->plink_state = params->plink_state; sta_apply_parameters()
1174 sta->plink_state = params->plink_state; sta_apply_parameters()
1186 switch (params->plink_action) { sta_apply_parameters()
1198 if (params->local_pm) sta_apply_parameters()
1201 params->local_pm); sta_apply_parameters()
1218 struct station_parameters *params) ieee80211_add_station()
1226 if (params->vlan) { ieee80211_add_station()
1227 sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); ieee80211_add_station()
1249 if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) { ieee80211_add_station()
1256 err = sta_apply_parameters(local, sta, params); ieee80211_add_station()
1287 struct station_del_parameters *params) ieee80211_del_station()
1293 if (params->mac) ieee80211_del_station()
1294 return sta_info_destroy_addr_bss(sdata, params->mac); ieee80211_del_station()
1302 struct station_parameters *params) ieee80211_change_station()
1348 err = cfg80211_check_station_change(wiphy, params, statype); ieee80211_change_station()
1352 if (params->vlan && params->vlan != sta->sdata->dev) { ieee80211_change_station()
1356 vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); ieee80211_change_station()
1358 if (params->vlan->ieee80211_ptr->use_4addr) { ieee80211_change_station()
1387 err = sta_apply_parameters(local, sta, params); ieee80211_change_station()
1408 params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED)) { ieee80211_change_station()
1840 struct bss_parameters *params) ieee80211_change_bss()
1851 if (params->use_cts_prot >= 0) { ieee80211_change_bss()
1852 sdata->vif.bss_conf.use_cts_prot = params->use_cts_prot; ieee80211_change_bss()
1855 if (params->use_short_preamble >= 0) { ieee80211_change_bss()
1857 params->use_short_preamble; ieee80211_change_bss()
1867 if (params->use_short_slot_time >= 0) { ieee80211_change_bss()
1869 params->use_short_slot_time; ieee80211_change_bss()
1873 if (params->basic_rates) { ieee80211_change_bss()
1876 params->basic_rates, ieee80211_change_bss()
1877 params->basic_rates_len, ieee80211_change_bss()
1882 if (params->ap_isolate >= 0) { ieee80211_change_bss()
1883 if (params->ap_isolate) ieee80211_change_bss()
1889 if (params->ht_opmode >= 0) { ieee80211_change_bss()
1891 (u16) params->ht_opmode; ieee80211_change_bss()
1895 if (params->p2p_ctwindow >= 0) { ieee80211_change_bss()
1899 params->p2p_ctwindow & IEEE80211_P2P_OPPPS_CTWINDOW_MASK; ieee80211_change_bss()
1903 if (params->p2p_opp_ps > 0) { ieee80211_change_bss()
1907 } else if (params->p2p_opp_ps == 0) { ieee80211_change_bss()
1920 struct ieee80211_txq_params *params) ieee80211_set_txq_params()
1933 p.aifs = params->aifs; ieee80211_set_txq_params()
1934 p.cw_max = params->cwmax; ieee80211_set_txq_params()
1935 p.cw_min = params->cwmin; ieee80211_set_txq_params()
1936 p.txop = params->txop; ieee80211_set_txq_params()
1939 * Setting tx queue params disables u-apsd because it's only ieee80211_set_txq_params()
1944 sdata->tx_conf[params->ac] = p; ieee80211_set_txq_params()
1945 if (drv_conf_tx(local, sdata, params->ac, &p)) { ieee80211_set_txq_params()
1948 params->ac); ieee80211_set_txq_params()
2064 struct cfg80211_ibss_params *params) ieee80211_join_ibss()
2066 return ieee80211_ibss_join(IEEE80211_DEV_TO_SUB_IF(dev), params); ieee80211_join_ibss()
3005 struct cfg80211_csa_settings *params, ieee80211_set_csa_beacon()
3014 cfg80211_beacon_dup(&params->beacon_after); ieee80211_set_csa_beacon()
3034 if (params->count <= 1) ieee80211_set_csa_beacon()
3037 if ((params->n_counter_offsets_beacon > ieee80211_set_csa_beacon()
3039 (params->n_counter_offsets_presp > ieee80211_set_csa_beacon()
3043 csa.counter_offsets_beacon = params->counter_offsets_beacon; ieee80211_set_csa_beacon()
3044 csa.counter_offsets_presp = params->counter_offsets_presp; ieee80211_set_csa_beacon()
3045 csa.n_counter_offsets_beacon = params->n_counter_offsets_beacon; ieee80211_set_csa_beacon()
3046 csa.n_counter_offsets_presp = params->n_counter_offsets_presp; ieee80211_set_csa_beacon()
3047 csa.count = params->count; ieee80211_set_csa_beacon()
3049 err = ieee80211_assign_beacon(sdata, &params->beacon_csa, &csa); ieee80211_set_csa_beacon()
3061 if (params->chandef.width != sdata->u.ibss.chandef.width) ieee80211_set_csa_beacon()
3064 switch (params->chandef.width) { ieee80211_set_csa_beacon()
3066 if (cfg80211_get_chandef_type(&params->chandef) != ieee80211_set_csa_beacon()
3080 params->chandef.chan->band) ieee80211_set_csa_beacon()
3084 if (params->count > 1) { ieee80211_set_csa_beacon()
3085 err = ieee80211_ibss_csa_beacon(sdata, params); ieee80211_set_csa_beacon()
3091 ieee80211_send_action_csa(sdata, params); ieee80211_set_csa_beacon()
3098 if (params->chandef.width != sdata->vif.bss_conf.chandef.width) ieee80211_set_csa_beacon()
3103 params->chandef.chan->band) ieee80211_set_csa_beacon()
3115 if (params->count > 1) { ieee80211_set_csa_beacon()
3116 err = ieee80211_mesh_csa_beacon(sdata, params); ieee80211_set_csa_beacon()
3125 ieee80211_send_action_csa(sdata, params); ieee80211_set_csa_beacon()
3139 struct cfg80211_csa_settings *params) __ieee80211_channel_switch()
3158 if (cfg80211_chandef_identical(&params->chandef, __ieee80211_channel_switch()
3182 ch_switch.block_tx = params->block_tx; __ieee80211_channel_switch()
3183 ch_switch.chandef = params->chandef; __ieee80211_channel_switch()
3184 ch_switch.count = params->count; __ieee80211_channel_switch()
3190 err = ieee80211_vif_reserve_chanctx(sdata, &params->chandef, __ieee80211_channel_switch()
3192 params->radar_required); __ieee80211_channel_switch()
3203 err = ieee80211_set_csa_beacon(sdata, params, &changed); __ieee80211_channel_switch()
3209 sdata->csa_chandef = params->chandef; __ieee80211_channel_switch()
3210 sdata->csa_block_tx = params->block_tx; __ieee80211_channel_switch()
3218 params->count); __ieee80211_channel_switch()
3222 drv_channel_switch_beacon(sdata, &params->chandef); __ieee80211_channel_switch()
3234 struct cfg80211_csa_settings *params) ieee80211_channel_switch()
3241 err = __ieee80211_channel_switch(wiphy, dev, params); ieee80211_channel_switch()
3248 struct cfg80211_mgmt_tx_params *params, ieee80211_mgmt_tx()
3255 const struct ieee80211_mgmt *mgmt = (void *)params->buf; ieee80211_mgmt_tx()
3261 if (params->dont_wait_for_ack) ieee80211_mgmt_tx()
3267 if (params->no_cck) ieee80211_mgmt_tx()
3315 if (need_offchan && !params->chan) ieee80211_mgmt_tx()
3328 need_offchan = params->chan && ieee80211_mgmt_tx()
3329 (params->chan != ieee80211_mgmt_tx()
3331 } else if (!params->chan) { ieee80211_mgmt_tx()
3341 if (need_offchan && !params->offchan) { ieee80211_mgmt_tx()
3346 skb = dev_alloc_skb(local->hw.extra_tx_headroom + params->len); ieee80211_mgmt_tx()
3353 data = skb_put(skb, params->len); ieee80211_mgmt_tx()
3354 memcpy(data, params->buf, params->len); ieee80211_mgmt_tx()
3361 params->n_csa_offsets) { ieee80211_mgmt_tx()
3375 for (i = 0; i < params->n_csa_offsets; i++) ieee80211_mgmt_tx()
3376 data[params->csa_offsets[i]] = ieee80211_mgmt_tx()
3400 ret = ieee80211_start_roc_work(local, sdata, params->chan, ieee80211_mgmt_tx()
3401 params->wait, cookie, skb, ieee80211_mgmt_tx()
3676 * restore the QoS params on packets that are still on the ieee80211_del_tx_ts()
25 ieee80211_add_iface(struct wiphy *wiphy, const char *name, unsigned char name_assign_type, enum nl80211_iftype type, u32 *flags, struct vif_params *params) ieee80211_add_iface() argument
56 ieee80211_change_iface(struct wiphy *wiphy, struct net_device *dev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) ieee80211_change_iface() argument
143 ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, u8 key_idx, bool pairwise, const u8 *mac_addr, struct key_params *params) ieee80211_add_key() argument
297 ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params *params)) ieee80211_get_key() argument
628 ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata, struct cfg80211_beacon_data *params, const struct ieee80211_csa_settings *csa) ieee80211_assign_beacon() argument
709 ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) ieee80211_start_ap() argument
820 ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_beacon_data *params) ieee80211_change_beacon() argument
1024 sta_apply_parameters(struct ieee80211_local *local, struct sta_info *sta, struct station_parameters *params) sta_apply_parameters() argument
1216 ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) ieee80211_add_station() argument
1286 ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev, struct station_del_parameters *params) ieee80211_del_station() argument
1300 ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) ieee80211_change_station() argument
1838 ieee80211_change_bss(struct wiphy *wiphy, struct net_device *dev, struct bss_parameters *params) ieee80211_change_bss() argument
1918 ieee80211_set_txq_params(struct wiphy *wiphy, struct net_device *dev, struct ieee80211_txq_params *params) ieee80211_set_txq_params() argument
2063 ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params) ieee80211_join_ibss() argument
3004 ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata, struct cfg80211_csa_settings *params, u32 *changed) ieee80211_set_csa_beacon() argument
3138 __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params) __ieee80211_channel_switch() argument
3233 ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params) ieee80211_channel_switch() argument
3247 ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) ieee80211_mgmt_tx() argument
H A Dibss.c62 3 /* max DS params */ + ieee80211_ibss_build_presp()
63 4 /* IBSS params */ + ieee80211_ibss_build_presp()
782 struct cfg80211_csa_settings params; ieee80211_ibss_process_chanswitch() local
805 memset(&params, 0, sizeof(params)); ieee80211_ibss_process_chanswitch()
822 params.count = csa_ie.count; ieee80211_ibss_process_chanswitch()
823 params.chandef = csa_ie.chandef; ieee80211_ibss_process_chanswitch()
835 cfg80211_chandef_create(&params.chandef, params.chandef.chan, ieee80211_ibss_process_chanswitch()
840 if (params.chandef.width != ifibss->chandef.width) { ieee80211_ibss_process_chanswitch()
844 params.chandef.chan->center_freq, ieee80211_ibss_process_chanswitch()
845 params.chandef.width, ieee80211_ibss_process_chanswitch()
846 params.chandef.center_freq1, ieee80211_ibss_process_chanswitch()
847 params.chandef.center_freq2); ieee80211_ibss_process_chanswitch()
857 if (!cfg80211_reg_can_beacon(sdata->local->hw.wiphy, &params.chandef, ieee80211_ibss_process_chanswitch()
862 params.chandef.chan->center_freq, ieee80211_ibss_process_chanswitch()
863 params.chandef.width, ieee80211_ibss_process_chanswitch()
864 params.chandef.center_freq1, ieee80211_ibss_process_chanswitch()
865 params.chandef.center_freq2); ieee80211_ibss_process_chanswitch()
870 &params.chandef, ieee80211_ibss_process_chanswitch()
879 params.radar_required = err; ieee80211_ibss_process_chanswitch()
881 if (cfg80211_chandef_identical(&params.chandef, ieee80211_ibss_process_chanswitch()
891 params.chandef.chan->center_freq); ieee80211_ibss_process_chanswitch()
893 params.block_tx = !!csa_ie.mode; ieee80211_ibss_process_chanswitch()
896 &params)) ieee80211_ibss_process_chanswitch()
1735 struct cfg80211_ibss_params *params) ieee80211_ibss_join()
1747 &params->chandef, ieee80211_ibss_join()
1753 if (!params->userspace_handles_dfs) ieee80211_ibss_join()
1755 radar_detect_width = BIT(params->chandef.width); ieee80211_ibss_join()
1758 chanmode = (params->channel_fixed && !ret) ? ieee80211_ibss_join()
1762 ret = ieee80211_check_combinations(sdata, &params->chandef, chanmode, ieee80211_ibss_join()
1768 if (params->bssid) { ieee80211_ibss_join()
1769 memcpy(sdata->u.ibss.bssid, params->bssid, ETH_ALEN); ieee80211_ibss_join()
1774 sdata->u.ibss.privacy = params->privacy; ieee80211_ibss_join()
1775 sdata->u.ibss.control_port = params->control_port; ieee80211_ibss_join()
1776 sdata->u.ibss.userspace_handles_dfs = params->userspace_handles_dfs; ieee80211_ibss_join()
1777 sdata->u.ibss.basic_rates = params->basic_rates; ieee80211_ibss_join()
1781 rate_flags = ieee80211_chandef_rate_flags(&params->chandef); ieee80211_ibss_join()
1782 sband = local->hw.wiphy->bands[params->chandef.chan->band]; ieee80211_ibss_join()
1787 memcpy(sdata->vif.bss_conf.mcast_rate, params->mcast_rate, ieee80211_ibss_join()
1788 sizeof(params->mcast_rate)); ieee80211_ibss_join()
1790 sdata->vif.bss_conf.beacon_int = params->beacon_interval; ieee80211_ibss_join()
1792 sdata->u.ibss.chandef = params->chandef; ieee80211_ibss_join()
1793 sdata->u.ibss.fixed_channel = params->channel_fixed; ieee80211_ibss_join()
1795 if (params->ie) { ieee80211_ibss_join()
1796 sdata->u.ibss.ie = kmemdup(params->ie, params->ie_len, ieee80211_ibss_join()
1799 sdata->u.ibss.ie_len = params->ie_len; ieee80211_ibss_join()
1805 memcpy(sdata->u.ibss.ssid, params->ssid, params->ssid_len); ieee80211_ibss_join()
1806 sdata->u.ibss.ssid_len = params->ssid_len; ieee80211_ibss_join()
1808 memcpy(&sdata->u.ibss.ht_capa, &params->ht_capa, ieee80211_ibss_join()
1810 memcpy(&sdata->u.ibss.ht_capa_mask, &params->ht_capa_mask, ieee80211_ibss_join()
1734 ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, struct cfg80211_ibss_params *params) ieee80211_ibss_join() argument
/linux-4.1.27/drivers/net/bonding/
H A Dbond_options.c523 struct bond_params *params = &bond->params; bond_opt_check_deps() local
525 if (test_bit(params->mode, &opt->unsuppmodes)) bond_opt_check_deps()
539 struct bond_params *params; bond_opt_dep_print() local
541 params = &bond->params; bond_opt_dep_print()
542 modeval = bond_opt_get_val(BOND_OPT_MODE, params->mode); bond_opt_dep_print()
543 if (test_bit(params->mode, &opt->unsuppmodes)) bond_opt_dep_print()
674 if (!bond_mode_uses_arp(newval->value) && bond->params.arp_interval) { bond_option_mode_set()
678 bond->params.arp_interval = 0; bond_option_mode_set()
680 bond->params.miimon = BOND_DEFAULT_MIIMON; bond_option_mode_set()
682 bond->params.miimon); bond_option_mode_set()
686 bond->params.arp_validate = BOND_ARP_VALIDATE_NONE; bond_option_mode_set()
687 bond->params.mode = newval->value; bond_option_mode_set()
779 bond->params.miimon = newval->value; bond_option_miimon_set()
780 if (bond->params.updelay) bond_option_miimon_set()
782 bond->params.updelay * bond->params.miimon); bond_option_miimon_set()
783 if (bond->params.downdelay) bond_option_miimon_set()
785 bond->params.downdelay * bond->params.miimon); bond_option_miimon_set()
786 if (newval->value && bond->params.arp_interval) { bond_option_miimon_set()
788 bond->params.arp_interval = 0; bond_option_miimon_set()
789 if (bond->params.arp_validate) bond_option_miimon_set()
790 bond->params.arp_validate = BOND_ARP_VALIDATE_NONE; bond_option_miimon_set()
818 if (!bond->params.miimon) { bond_option_updelay_set()
822 if ((value % bond->params.miimon) != 0) { bond_option_updelay_set()
824 value, bond->params.miimon, bond_option_updelay_set()
825 (value / bond->params.miimon) * bond_option_updelay_set()
826 bond->params.miimon); bond_option_updelay_set()
828 bond->params.updelay = value / bond->params.miimon; bond_option_updelay_set()
830 bond->params.updelay * bond->params.miimon); bond_option_updelay_set()
840 if (!bond->params.miimon) { bond_option_downdelay_set()
844 if ((value % bond->params.miimon) != 0) { bond_option_downdelay_set()
846 value, bond->params.miimon, bond_option_downdelay_set()
847 (value / bond->params.miimon) * bond_option_downdelay_set()
848 bond->params.miimon); bond_option_downdelay_set()
850 bond->params.downdelay = value / bond->params.miimon; bond_option_downdelay_set()
852 bond->params.downdelay * bond->params.miimon); bond_option_downdelay_set()
862 bond->params.use_carrier = newval->value; bond_option_use_carrier_set()
876 bond->params.arp_interval = newval->value; bond_option_arp_interval_set()
878 if (bond->params.miimon) { bond_option_arp_interval_set()
880 bond->params.miimon = 0; bond_option_arp_interval_set()
882 if (!bond->params.arp_targets[0]) bond_option_arp_interval_set()
892 if (bond->params.arp_validate) bond_option_arp_interval_set()
910 __be32 *targets = bond->params.arp_targets; _bond_options_arp_ip_target_set()
923 __be32 *targets = bond->params.arp_targets; _bond_option_arp_ip_target_add()
958 __be32 *targets = bond->params.arp_targets; bond_option_arp_ip_target_rem()
977 if (ind == 0 && !targets[1] && bond->params.arp_interval) bond_option_arp_ip_target_rem()
1038 else if (bond->params.arp_interval) bond_option_arp_validate_set()
1041 bond->params.arp_validate = newval->value; bond_option_arp_validate_set()
1051 bond->params.arp_all_targets = newval->value; bond_option_arp_all_targets_set()
1072 memset(bond->params.primary, 0, sizeof(bond->params.primary)); bond_option_primary_set()
1082 strcpy(bond->params.primary, slave->dev->name); bond_for_each_slave()
1093 strncpy(bond->params.primary, primary, IFNAMSIZ);
1094 bond->params.primary[IFNAMSIZ - 1] = 0;
1110 bond->params.primary_reselect = newval->value; bond_option_primary_reselect_set()
1124 bond->params.fail_over_mac = newval->value; bond_option_fail_over_mac_set()
1134 bond->params.xmit_policy = newval->value; bond_option_xmit_hash_policy_set()
1144 bond->params.resend_igmp = newval->value; bond_option_resend_igmp_set()
1152 bond->params.num_peer_notif = newval->value; bond_option_num_peer_notif_set()
1163 if (newval->value == bond->params.all_slaves_active) bond_option_all_slaves_active_set()
1165 bond->params.all_slaves_active = newval->value; bond_for_each_slave()
1183 bond->params.min_links = newval->value; bond_option_min_links_set()
1192 bond->params.lp_interval = newval->value; bond_option_lp_interval_set()
1200 bond->params.packets_per_slave = newval->value; bond_option_pps_set()
1202 bond->params.reciprocal_packets_per_slave = bond_option_pps_set()
1208 bond->params.reciprocal_packets_per_slave = bond_option_pps_set()
1220 bond->params.lacp_fast = newval->value; bond_option_lacp_rate_set()
1231 bond->params.ad_select = newval->value; bond_option_ad_select_set()
1348 bond->params.tlb_dynamic_lb = newval->value; bond_option_tlb_dynamic_lb_set()
H A Dbond_procfs.c69 bond->params.fail_over_mac) { bond_info_show_master()
71 bond->params.fail_over_mac); bond_info_show_master()
79 bond->params.xmit_policy); bond_info_show_master()
81 optval->string, bond->params.xmit_policy); bond_info_show_master()
90 bond->params.primary_reselect); bond_info_show_master()
101 seq_printf(seq, "MII Polling Interval (ms): %d\n", bond->params.miimon); bond_info_show_master()
103 bond->params.updelay * bond->params.miimon); bond_info_show_master()
105 bond->params.downdelay * bond->params.miimon); bond_info_show_master()
109 if (bond->params.arp_interval > 0) { bond_info_show_master()
112 bond->params.arp_interval); bond_info_show_master()
117 if (!bond->params.arp_targets[i]) bond_info_show_master()
121 seq_printf(seq, " %pI4", &bond->params.arp_targets[i]); bond_info_show_master()
132 (bond->params.lacp_fast) ? "fast" : "slow"); bond_info_show_master()
133 seq_printf(seq, "Min links: %d\n", bond->params.min_links); bond_info_show_master()
135 bond->params.ad_select); bond_info_show_master()
H A Dbond_netlink.c242 if (i == 0 && bond->params.arp_interval)
460 if (nla_put_u32(skb, IFLA_BOND_MIIMON, bond->params.miimon)) bond_fill_info()
464 bond->params.updelay * bond->params.miimon)) bond_fill_info()
468 bond->params.downdelay * bond->params.miimon)) bond_fill_info()
471 if (nla_put_u8(skb, IFLA_BOND_USE_CARRIER, bond->params.use_carrier)) bond_fill_info()
474 if (nla_put_u32(skb, IFLA_BOND_ARP_INTERVAL, bond->params.arp_interval)) bond_fill_info()
483 if (bond->params.arp_targets[i]) { bond_fill_info()
484 nla_put_be32(skb, i, bond->params.arp_targets[i]); bond_fill_info()
494 if (nla_put_u32(skb, IFLA_BOND_ARP_VALIDATE, bond->params.arp_validate)) bond_fill_info()
498 bond->params.arp_all_targets)) bond_fill_info()
507 bond->params.primary_reselect)) bond_fill_info()
511 bond->params.fail_over_mac)) bond_fill_info()
515 bond->params.xmit_policy)) bond_fill_info()
519 bond->params.resend_igmp)) bond_fill_info()
523 bond->params.num_peer_notif)) bond_fill_info()
527 bond->params.all_slaves_active)) bond_fill_info()
531 bond->params.min_links)) bond_fill_info()
535 bond->params.lp_interval)) bond_fill_info()
538 packets_per_slave = bond->params.packets_per_slave; bond_fill_info()
544 bond->params.lacp_fast)) bond_fill_info()
548 bond->params.ad_select)) bond_fill_info()
H A Dbond_sysfs.c231 val = bond_opt_get_val(BOND_OPT_XMIT_HASH, bond->params.xmit_policy); bonding_show_xmit_hash()
233 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy); bonding_show_xmit_hash()
247 bond->params.arp_validate); bonding_show_arp_validate()
249 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate); bonding_show_arp_validate()
263 bond->params.arp_all_targets); bonding_show_arp_all_targets()
265 val->string, bond->params.arp_all_targets); bonding_show_arp_all_targets()
279 bond->params.fail_over_mac); bonding_show_fail_over_mac()
281 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac); bonding_show_fail_over_mac()
293 return sprintf(buf, "%d\n", bond->params.arp_interval); bonding_show_arp_interval()
307 if (bond->params.arp_targets[i]) bonding_show_arp_targets()
309 &bond->params.arp_targets[i]); bonding_show_arp_targets()
326 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon); bonding_show_downdelay()
337 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon); bonding_show_updelay()
351 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast); bonding_show_lacp()
353 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast); bonding_show_lacp()
364 return sprintf(buf, "%u\n", bond->params.min_links); bonding_show_min_links()
376 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select); bonding_show_ad_select()
378 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select); bonding_show_ad_select()
389 return sprintf(buf, "%d\n", bond->params.num_peer_notif); bonding_show_num_peer_notif()
417 return sprintf(buf, "%d\n", bond->params.miimon); bonding_show_miimon()
451 bond->params.primary_reselect); bonding_show_primary_reselect()
454 val->string, bond->params.primary_reselect); bonding_show_primary_reselect()
466 return sprintf(buf, "%d\n", bond->params.use_carrier); bonding_show_carrier()
644 return sprintf(buf, "%d\n", bond->params.all_slaves_active); bonding_show_slaves_active()
656 return sprintf(buf, "%d\n", bond->params.resend_igmp); bonding_show_resend_igmp()
668 return sprintf(buf, "%d\n", bond->params.lp_interval); bonding_show_lp_interval()
678 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); bonding_show_tlb_dynamic_lb()
688 unsigned int packets_per_slave = bond->params.packets_per_slave; bonding_show_packets_per_slave()
/linux-4.1.27/include/sound/
H A Dpcm_params.h5 * PCM params helpers
28 struct snd_pcm_hw_params *params,
31 struct snd_pcm_hw_params *params,
33 int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,
304 * params_access - get the access type from the hw params
305 * @p: hw params
314 * params_format - get the sample format from the hw params
315 * @p: hw params
324 * params_subformat - get the sample subformat from the hw params
325 * @p: hw params
335 * params_period_bytes - get the period size (in bytes) from the hw params
336 * @p: hw params
345 * params_width - get the number of bits of the sample format from the hw params
346 * @p: hw params
349 * format of the hw params has.
357 * params_physical_width - get the storage size of the sample format from the hw params
358 * @p: hw params
361 * format of the hw params takes up in memory. This will be equal or larger than
/linux-4.1.27/arch/openrisc/kernel/
H A Dprom.c28 void __init early_init_devtree(void *params) early_init_devtree() argument
30 early_init_dt_scan(params); early_init_devtree()
/linux-4.1.27/sound/soc/pxa/
H A Dbrownstone.c72 struct snd_pcm_hw_params *params) brownstone_wm8994_hw_params()
80 if (params_rate(params) > 11025) { brownstone_wm8994_hw_params()
81 freq_out = params_rate(params) * 512; brownstone_wm8994_hw_params()
82 sysclk = params_rate(params) * 256; brownstone_wm8994_hw_params()
83 sspa_mclk = params_rate(params) * 64; brownstone_wm8994_hw_params()
85 freq_out = params_rate(params) * 1024; brownstone_wm8994_hw_params()
86 sysclk = params_rate(params) * 512; brownstone_wm8994_hw_params()
87 sspa_mclk = params_rate(params) * 64; brownstone_wm8994_hw_params()
71 brownstone_wm8994_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) brownstone_wm8994_hw_params() argument
H A Dpxa2xx-pcm.c28 struct snd_pcm_hw_params *params) pxa2xx_pcm_hw_params()
44 * with different params */ pxa2xx_pcm_hw_params()
45 if (prtd->params == NULL) { pxa2xx_pcm_hw_params()
46 prtd->params = dma; pxa2xx_pcm_hw_params()
52 } else if (prtd->params != dma) { pxa2xx_pcm_hw_params()
54 prtd->params = dma; pxa2xx_pcm_hw_params()
62 return __pxa2xx_pcm_hw_params(substream, params); pxa2xx_pcm_hw_params()
74 prtd->params = NULL; pxa2xx_pcm_hw_free()
27 pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) pxa2xx_pcm_hw_params() argument
H A Dimote2.c11 struct snd_pcm_hw_params *params) imote2_asoc_hw_params()
19 switch (params_rate(params)) { imote2_asoc_hw_params()
10 imote2_asoc_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) imote2_asoc_hw_params() argument
/linux-4.1.27/drivers/gpu/drm/i915/
H A Dintel_overlay.c570 struct put_image_params *params) update_scaling_factors()
577 int uv_hscale = uv_hsubsampling(params->format); update_scaling_factors()
578 int uv_vscale = uv_vsubsampling(params->format); update_scaling_factors()
580 if (params->dst_w > 1) update_scaling_factors()
581 xscale = ((params->src_scan_w - 1) << FP_SHIFT) update_scaling_factors()
582 /(params->dst_w); update_scaling_factors()
586 if (params->dst_h > 1) update_scaling_factors()
587 yscale = ((params->src_scan_h - 1) << FP_SHIFT) update_scaling_factors()
588 /(params->dst_h); update_scaling_factors()
592 /*if (params->format & I915_OVERLAY_YUV_PLANAR) {*/ update_scaling_factors()
659 static u32 overlay_cmd_reg(struct put_image_params *params) overlay_cmd_reg() argument
663 if (params->format & I915_OVERLAY_YUV_PLANAR) { overlay_cmd_reg()
664 switch (params->format & I915_OVERLAY_DEPTH_MASK) { overlay_cmd_reg()
677 switch (params->format & I915_OVERLAY_DEPTH_MASK) { overlay_cmd_reg()
686 switch (params->format & I915_OVERLAY_SWAP_MASK) { overlay_cmd_reg()
706 struct put_image_params *params) intel_overlay_do_put_image()
758 iowrite32((params->dst_y << 16) | params->dst_x, &regs->DWINPOS); intel_overlay_do_put_image()
759 iowrite32((params->dst_h << 16) | params->dst_w, &regs->DWINSZ); intel_overlay_do_put_image()
761 if (params->format & I915_OVERLAY_YUV_PACKED) intel_overlay_do_put_image()
762 tmp_width = packed_width_bytes(params->format, params->src_w); intel_overlay_do_put_image()
764 tmp_width = params->src_w; intel_overlay_do_put_image()
766 swidth = params->src_w; intel_overlay_do_put_image()
767 swidthsw = calc_swidthsw(overlay->dev, params->offset_Y, tmp_width); intel_overlay_do_put_image()
768 sheight = params->src_h; intel_overlay_do_put_image()
769 iowrite32(i915_gem_obj_ggtt_offset(new_bo) + params->offset_Y, &regs->OBUF_0Y); intel_overlay_do_put_image()
770 ostride = params->stride_Y; intel_overlay_do_put_image()
772 if (params->format & I915_OVERLAY_YUV_PLANAR) { intel_overlay_do_put_image()
773 int uv_hscale = uv_hsubsampling(params->format); intel_overlay_do_put_image()
774 int uv_vscale = uv_vsubsampling(params->format); intel_overlay_do_put_image()
776 swidth |= (params->src_w/uv_hscale) << 16; intel_overlay_do_put_image()
777 tmp_U = calc_swidthsw(overlay->dev, params->offset_U, intel_overlay_do_put_image()
778 params->src_w/uv_hscale); intel_overlay_do_put_image()
779 tmp_V = calc_swidthsw(overlay->dev, params->offset_V, intel_overlay_do_put_image()
780 params->src_w/uv_hscale); intel_overlay_do_put_image()
782 sheight |= (params->src_h/uv_vscale) << 16; intel_overlay_do_put_image()
783 iowrite32(i915_gem_obj_ggtt_offset(new_bo) + params->offset_U, &regs->OBUF_0U); intel_overlay_do_put_image()
784 iowrite32(i915_gem_obj_ggtt_offset(new_bo) + params->offset_V, &regs->OBUF_0V); intel_overlay_do_put_image()
785 ostride |= params->stride_UV << 16; intel_overlay_do_put_image()
793 scale_changed = update_scaling_factors(overlay, regs, params); intel_overlay_do_put_image()
797 iowrite32(overlay_cmd_reg(params), &regs->OCMD); intel_overlay_do_put_image()
1066 struct put_image_params *params; intel_overlay_put_image() local
1087 params = kmalloc(sizeof(*params), GFP_KERNEL); intel_overlay_put_image()
1088 if (!params) intel_overlay_put_image()
1145 params->dst_y = ((((u32)put_image_rec->dst_y) << 12) / intel_overlay_put_image()
1148 params->dst_h = ((((u32)put_image_rec->dst_height) << 12) / intel_overlay_put_image()
1151 params->dst_y = put_image_rec->dst_y; intel_overlay_put_image()
1152 params->dst_h = put_image_rec->dst_height; intel_overlay_put_image()
1154 params->dst_x = put_image_rec->dst_x; intel_overlay_put_image()
1155 params->dst_w = put_image_rec->dst_width; intel_overlay_put_image()
1157 params->src_w = put_image_rec->src_width; intel_overlay_put_image()
1158 params->src_h = put_image_rec->src_height; intel_overlay_put_image()
1159 params->src_scan_w = put_image_rec->src_scan_width; intel_overlay_put_image()
1160 params->src_scan_h = put_image_rec->src_scan_height; intel_overlay_put_image()
1161 if (params->src_scan_h > params->src_h || intel_overlay_put_image()
1162 params->src_scan_w > params->src_w) { intel_overlay_put_image()
1170 params->format = put_image_rec->flags & ~I915_OVERLAY_FLAGS_MASK; intel_overlay_put_image()
1171 params->stride_Y = put_image_rec->stride_Y; intel_overlay_put_image()
1172 params->stride_UV = put_image_rec->stride_UV; intel_overlay_put_image()
1173 params->offset_Y = put_image_rec->offset_Y; intel_overlay_put_image()
1174 params->offset_U = put_image_rec->offset_U; intel_overlay_put_image()
1175 params->offset_V = put_image_rec->offset_V; intel_overlay_put_image()
1178 ret = check_overlay_scaling(params); intel_overlay_put_image()
1182 ret = intel_overlay_do_put_image(overlay, new_bo, params); intel_overlay_put_image()
1189 kfree(params); intel_overlay_put_image()
1198 kfree(params); intel_overlay_put_image()
568 update_scaling_factors(struct intel_overlay *overlay, struct overlay_registers __iomem *regs, struct put_image_params *params) update_scaling_factors() argument
704 intel_overlay_do_put_image(struct intel_overlay *overlay, struct drm_i915_gem_object *new_bo, struct put_image_params *params) intel_overlay_do_put_image() argument
/linux-4.1.27/sound/firewire/bebob/
H A Dbebob_maudio.c172 struct special_params *params = bebob->maudio_special_quirk; avc_maudio_set_special_clk() local
210 params->clk_src = buf[6]; avc_maudio_set_special_clk()
211 params->dig_in_fmt = buf[7]; avc_maudio_set_special_clk()
212 params->dig_out_fmt = buf[8]; avc_maudio_set_special_clk()
213 params->clk_lock = buf[9]; avc_maudio_set_special_clk()
215 if (params->ctl_id_sync) avc_maudio_set_special_clk()
217 params->ctl_id_sync); avc_maudio_set_special_clk()
235 struct special_params *params = bebob->maudio_special_quirk; special_stream_formation_set() local
239 if (!params->is1814) special_stream_formation_set()
244 ch_table[AMDTP_IN_STREAM][params->dig_in_fmt][i / 2]; special_stream_formation_set()
248 ch_table[AMDTP_OUT_STREAM][params->dig_out_fmt][i / 2]; special_stream_formation_set()
257 struct special_params *params; snd_bebob_maudio_special_discover() local
260 params = kzalloc(sizeof(struct special_params), GFP_KERNEL); snd_bebob_maudio_special_discover()
261 if (params == NULL) snd_bebob_maudio_special_discover()
266 bebob->maudio_special_quirk = (void *)params; snd_bebob_maudio_special_discover()
267 params->is1814 = is1814; snd_bebob_maudio_special_discover()
275 "fail to initialize clock params: %d\n", err); snd_bebob_maudio_special_discover()
285 if (params->is1814) { snd_bebob_maudio_special_discover()
294 kfree(params); snd_bebob_maudio_special_discover()
316 struct special_params *params = bebob->maudio_special_quirk; special_set_rate() local
335 if (params->ctl_id_sync) special_set_rate()
337 params->ctl_id_sync); special_set_rate()
348 struct special_params *params = bebob->maudio_special_quirk; special_clk_get() local
349 *id = params->clk_src; special_clk_get()
362 struct special_params *params = bebob->maudio_special_quirk; special_clk_ctl_get() local
363 uval->value.enumerated.item[0] = params->clk_src; special_clk_ctl_get()
370 struct special_params *params = bebob->maudio_special_quirk; special_clk_ctl_put() local
380 params->dig_in_fmt, special_clk_ctl_put()
381 params->dig_out_fmt, special_clk_ctl_put()
382 params->clk_lock); special_clk_ctl_put()
446 struct special_params *params = bebob->maudio_special_quirk; special_dig_in_iface_ctl_get() local
461 val = (params->dig_in_fmt << 1) | (dig_in_iface & 0x01); special_dig_in_iface_ctl_get()
476 struct special_params *params = bebob->maudio_special_quirk; special_dig_in_iface_ctl_set() local
491 params->clk_src, special_dig_in_iface_ctl_set()
493 params->dig_out_fmt, special_dig_in_iface_ctl_set()
494 params->clk_lock); special_dig_in_iface_ctl_set()
499 if (params->dig_in_fmt > 0) { special_dig_in_iface_ctl_set()
539 struct special_params *params = bebob->maudio_special_quirk; special_dig_out_iface_ctl_get() local
541 uval->value.enumerated.item[0] = params->dig_out_fmt; special_dig_out_iface_ctl_get()
549 struct special_params *params = bebob->maudio_special_quirk; special_dig_out_iface_ctl_set() local
560 params->clk_src, special_dig_out_iface_ctl_set()
561 params->dig_in_fmt, special_dig_out_iface_ctl_set()
562 id, params->clk_lock); special_dig_out_iface_ctl_set()
583 struct special_params *params = bebob->maudio_special_quirk; add_special_controls() local
595 params->ctl_id_sync = &kctl->id; add_special_controls()
/linux-4.1.27/drivers/media/i2c/
H A Dsaa6752hs.c103 struct saa6752hs_mpeg_params params; member in struct:saa6752hs_state
323 struct saa6752hs_mpeg_params *params = &h->params; saa6752hs_set_bitrate() local
329 params->vi_bitrate_mode != V4L2_MPEG_VIDEO_BITRATE_MODE_VBR); saa6752hs_set_bitrate()
332 if (params->vi_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) { saa6752hs_set_bitrate()
334 set_reg16(client, 0x80, params->vi_bitrate); saa6752hs_set_bitrate()
337 set_reg16(client, 0x81, params->vi_bitrate_peak); saa6752hs_set_bitrate()
338 tot_bitrate = params->vi_bitrate_peak; saa6752hs_set_bitrate()
341 set_reg16(client, 0x81, params->vi_bitrate); saa6752hs_set_bitrate()
342 tot_bitrate = params->vi_bitrate; saa6752hs_set_bitrate()
347 params->au_encoding == V4L2_MPEG_AUDIO_ENCODING_AC3); saa6752hs_set_bitrate()
350 if (params->au_encoding == V4L2_MPEG_AUDIO_ENCODING_AC3) saa6752hs_set_bitrate()
351 is_384k = V4L2_MPEG_AUDIO_AC3_BITRATE_384K == params->au_ac3_bitrate; saa6752hs_set_bitrate()
353 is_384k = V4L2_MPEG_AUDIO_L2_BITRATE_384K == params->au_l2_bitrate; saa6752hs_set_bitrate()
390 struct saa6752hs_mpeg_params *params = &h->params; saa6752hs_s_ctrl() local
396 params->ts_pid_pmt = ctrl->val; saa6752hs_s_ctrl()
399 params->ts_pid_audio = ctrl->val; saa6752hs_s_ctrl()
402 params->ts_pid_video = ctrl->val; saa6752hs_s_ctrl()
405 params->ts_pid_pcr = ctrl->val; saa6752hs_s_ctrl()
408 params->au_encoding = ctrl->val; saa6752hs_s_ctrl()
411 params->au_l2_bitrate = ctrl->val; saa6752hs_s_ctrl()
414 params->au_ac3_bitrate = ctrl->val; saa6752hs_s_ctrl()
421 params->vi_aspect = ctrl->val; saa6752hs_s_ctrl()
424 params->vi_bitrate_mode = ctrl->val; saa6752hs_s_ctrl()
425 params->vi_bitrate = h->video_bitrate->val / 1000; saa6752hs_s_ctrl()
426 params->vi_bitrate_peak = h->video_bitrate_peak->val / 1000; saa6752hs_s_ctrl()
475 localPAT[17] = 0xe0 | ((h->params.ts_pid_pmt >> 8) & 0x0f); saa6752hs_init()
476 localPAT[18] = h->params.ts_pid_pmt & 0xff; saa6752hs_init()
484 if (h->params.au_encoding == V4L2_MPEG_AUDIO_ENCODING_AC3) { saa6752hs_init()
491 localPMT[3] = 0x40 | ((h->params.ts_pid_pmt >> 8) & 0x0f); saa6752hs_init()
492 localPMT[4] = h->params.ts_pid_pmt & 0xff; saa6752hs_init()
493 localPMT[15] = 0xE0 | ((h->params.ts_pid_pcr >> 8) & 0x0F); saa6752hs_init()
494 localPMT[16] = h->params.ts_pid_pcr & 0xFF; saa6752hs_init()
495 localPMT[20] = 0xE0 | ((h->params.ts_pid_video >> 8) & 0x0F); saa6752hs_init()
496 localPMT[21] = h->params.ts_pid_video & 0xFF; saa6752hs_init()
497 localPMT[25] = 0xE0 | ((h->params.ts_pid_audio >> 8) & 0x0F); saa6752hs_init()
498 localPMT[26] = h->params.ts_pid_audio & 0xFF; saa6752hs_init()
506 set_reg16(client, 0xc1, h->params.ts_pid_audio); saa6752hs_init()
509 set_reg16(client, 0xc0, h->params.ts_pid_video); saa6752hs_init()
512 set_reg16(client, 0xc4, h->params.ts_pid_pcr); saa6752hs_init()
541 switch (h->params.vi_aspect) { saa6752hs_init()
686 h->params = param_defaults; saa6752hs_probe()
/linux-4.1.27/drivers/clk/
H A Dclk-si5351.c49 struct si5351_parameters params; member in struct:si5351_hw_data
134 u8 reg, struct si5351_parameters *params) si5351_read_parameters()
142 params->p1 = buf[0]; si5351_read_parameters()
143 params->p2 = 0; si5351_read_parameters()
144 params->p3 = 1; si5351_read_parameters()
148 params->p1 = ((buf[2] & 0x03) << 16) | (buf[3] << 8) | buf[4]; si5351_read_parameters()
149 params->p2 = ((buf[5] & 0x0f) << 16) | (buf[6] << 8) | buf[7]; si5351_read_parameters()
150 params->p3 = ((buf[5] & 0xf0) << 12) | (buf[0] << 8) | buf[1]; si5351_read_parameters()
152 params->valid = 1; si5351_read_parameters()
156 u8 reg, struct si5351_parameters *params) si5351_write_parameters()
163 buf[0] = params->p1 & 0xff; si5351_write_parameters()
167 buf[0] = ((params->p3 & 0x0ff00) >> 8) & 0xff; si5351_write_parameters()
168 buf[1] = params->p3 & 0xff; si5351_write_parameters()
171 buf[2] |= ((params->p1 & 0x30000) >> 16) & 0x03; si5351_write_parameters()
172 buf[3] = ((params->p1 & 0x0ff00) >> 8) & 0xff; si5351_write_parameters()
173 buf[4] = params->p1 & 0xff; si5351_write_parameters()
174 buf[5] = ((params->p3 & 0xf0000) >> 12) | si5351_write_parameters()
175 ((params->p2 & 0xf0000) >> 16); si5351_write_parameters()
176 buf[6] = ((params->p2 & 0x0ff00) >> 8) & 0xff; si5351_write_parameters()
177 buf[7] = params->p2 & 0xff; si5351_write_parameters()
427 if (!hwdata->params.valid) si5351_pll_recalc_rate()
428 si5351_read_parameters(hwdata->drvdata, reg, &hwdata->params); si5351_pll_recalc_rate()
430 if (hwdata->params.p3 == 0) si5351_pll_recalc_rate()
434 rate = hwdata->params.p1 * hwdata->params.p3; si5351_pll_recalc_rate()
435 rate += 512 * hwdata->params.p3; si5351_pll_recalc_rate()
436 rate += hwdata->params.p2; si5351_pll_recalc_rate()
438 do_div(rate, 128 * hwdata->params.p3); si5351_pll_recalc_rate()
443 hwdata->params.p1, hwdata->params.p2, hwdata->params.p3, si5351_pll_recalc_rate()
484 hwdata->params.p3 = c; si5351_pll_round_rate()
485 hwdata->params.p2 = (128 * b) % c; si5351_pll_round_rate()
486 hwdata->params.p1 = 128 * a; si5351_pll_round_rate()
487 hwdata->params.p1 += (128 * b / c); si5351_pll_round_rate()
488 hwdata->params.p1 -= 512; si5351_pll_round_rate()
515 si5351_write_parameters(hwdata->drvdata, reg, &hwdata->params); si5351_pll_set_rate()
520 (hwdata->params.p2 == 0) ? SI5351_CLK_INTEGER_MODE : 0); si5351_pll_set_rate()
525 hwdata->params.p1, hwdata->params.p2, hwdata->params.p3, si5351_pll_set_rate()
606 if (!hwdata->params.valid) si5351_msynth_recalc_rate()
607 si5351_read_parameters(hwdata->drvdata, reg, &hwdata->params); si5351_msynth_recalc_rate()
609 if (hwdata->params.p3 == 0) si5351_msynth_recalc_rate()
618 m = hwdata->params.p1; si5351_msynth_recalc_rate()
623 rate *= 128 * hwdata->params.p3; si5351_msynth_recalc_rate()
624 m = hwdata->params.p1 * hwdata->params.p3; si5351_msynth_recalc_rate()
625 m += hwdata->params.p2; si5351_msynth_recalc_rate()
626 m += 512 * hwdata->params.p3; si5351_msynth_recalc_rate()
636 hwdata->params.p1, hwdata->params.p2, hwdata->params.p3, si5351_msynth_recalc_rate()
723 hwdata->params.p3 = 1; si5351_msynth_round_rate()
724 hwdata->params.p2 = 0; si5351_msynth_round_rate()
725 hwdata->params.p1 = 0; si5351_msynth_round_rate()
727 hwdata->params.p3 = c; si5351_msynth_round_rate()
728 hwdata->params.p2 = (128 * b) % c; si5351_msynth_round_rate()
729 hwdata->params.p1 = 128 * a; si5351_msynth_round_rate()
730 hwdata->params.p1 += (128 * b / c); si5351_msynth_round_rate()
731 hwdata->params.p1 -= 512; si5351_msynth_round_rate()
751 si5351_write_parameters(hwdata->drvdata, reg, &hwdata->params); si5351_msynth_set_rate()
763 (hwdata->params.p2 == 0) ? SI5351_CLK_INTEGER_MODE : 0); si5351_msynth_set_rate()
769 hwdata->params.p1, hwdata->params.p2, hwdata->params.p3, si5351_msynth_set_rate()
133 si5351_read_parameters(struct si5351_driver_data *drvdata, u8 reg, struct si5351_parameters *params) si5351_read_parameters() argument
155 si5351_write_parameters(struct si5351_driver_data *drvdata, u8 reg, struct si5351_parameters *params) si5351_write_parameters() argument
/linux-4.1.27/drivers/net/wireless/iwlwifi/mvm/
H A Dtt.c73 u32 duration = mvm->thermal_throttle.params->ct_kill_duration; iwl_mvm_enter_ctkill()
226 duration = tt->params->ct_kill_duration; check_exit_ctkill()
250 if (temp <= tt->params->ct_kill_exit) { check_exit_ctkill()
328 const struct iwl_tt_params *params = mvm->thermal_throttle.params; iwl_mvm_tt_handler() local
337 if (params->support_ct_kill && temperature >= params->ct_kill_entry) { iwl_mvm_tt_handler()
342 if (params->support_ct_kill && iwl_mvm_tt_handler()
343 temperature <= tt->params->ct_kill_exit) { iwl_mvm_tt_handler()
348 if (params->support_dynamic_smps) { iwl_mvm_tt_handler()
350 temperature >= params->dynamic_smps_entry) { iwl_mvm_tt_handler()
358 temperature <= params->dynamic_smps_exit) { iwl_mvm_tt_handler()
367 if (params->support_tx_protection) { iwl_mvm_tt_handler()
368 if (temperature >= params->tx_protection_entry) { iwl_mvm_tt_handler()
371 } else if (temperature <= params->tx_protection_exit) { iwl_mvm_tt_handler()
376 if (params->support_tx_backoff) { iwl_mvm_tt_handler()
379 if (temperature < params->tx_backoff[i].temperature) iwl_mvm_tt_handler()
382 params->tx_backoff[i].backoff); iwl_mvm_tt_handler()
396 temperature <= params->tx_protection_exit) { iwl_mvm_tt_handler()
454 tt->params = &iwl7000_high_temp_tt_params; iwl_mvm_tt_initialize()
456 tt->params = &iwl7000_tt_params; iwl_mvm_tt_initialize()
H A Dscan.c209 struct iwl_mvm_scan_params *params) iwl_mvm_scan_calc_params()
223 params->suspend_time = 30; iwl_mvm_scan_calc_params()
224 params->max_out_time = 120; iwl_mvm_scan_calc_params()
229 params->suspend_time = 105; iwl_mvm_scan_calc_params()
235 params->max_out_time = frag_passive_dwell; iwl_mvm_scan_calc_params()
237 params->suspend_time = 120; iwl_mvm_scan_calc_params()
238 params->max_out_time = 120; iwl_mvm_scan_calc_params()
254 params->max_out_time = passive_dwell; iwl_mvm_scan_calc_params()
256 params->passive_fragmented = true; iwl_mvm_scan_calc_params()
261 params->max_out_time = 200; iwl_mvm_scan_calc_params()
266 if (params->passive_fragmented) iwl_mvm_scan_calc_params()
267 params->dwell[band].fragmented = frag_passive_dwell; iwl_mvm_scan_calc_params()
269 params->dwell[band].passive = iwl_mvm_get_passive_dwell(mvm, iwl_mvm_scan_calc_params()
271 params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band, iwl_mvm_scan_calc_params()
764 struct iwl_mvm_scan_params *params) iwl_mvm_build_generic_unified_scan_cmd()
767 cmd->active_dwell = params->dwell[IEEE80211_BAND_2GHZ].active; iwl_mvm_build_generic_unified_scan_cmd()
768 cmd->passive_dwell = params->dwell[IEEE80211_BAND_2GHZ].passive; iwl_mvm_build_generic_unified_scan_cmd()
769 if (params->passive_fragmented) iwl_mvm_build_generic_unified_scan_cmd()
771 params->dwell[IEEE80211_BAND_2GHZ].fragmented; iwl_mvm_build_generic_unified_scan_cmd()
773 cmd->max_out_time = cpu_to_le32(params->max_out_time); iwl_mvm_build_generic_unified_scan_cmd()
774 cmd->suspend_time = cpu_to_le32(params->suspend_time); iwl_mvm_build_generic_unified_scan_cmd()
798 struct iwl_mvm_scan_params params = {}; iwl_mvm_unified_scan_lmac() local
819 &params); iwl_mvm_unified_scan_lmac()
821 iwl_mvm_build_generic_unified_scan_cmd(mvm, cmd, &params); iwl_mvm_unified_scan_lmac()
830 if (params.passive_fragmented) iwl_mvm_unified_scan_lmac()
890 * should try to send the command again with different params. iwl_mvm_unified_scan_lmac()
915 struct iwl_mvm_scan_params params = {}; iwl_mvm_unified_sched_scan_lmac() local
932 iwl_mvm_scan_calc_params(mvm, vif, req->n_ssids, 0, &params); iwl_mvm_unified_sched_scan_lmac()
934 iwl_mvm_build_generic_unified_scan_cmd(mvm, cmd, &params); iwl_mvm_unified_sched_scan_lmac()
948 if (params.passive_fragmented) iwl_mvm_unified_sched_scan_lmac()
1010 * should try to send the command again with different params. iwl_mvm_unified_sched_scan_lmac()
1222 struct iwl_mvm_scan_params *params) iwl_mvm_build_generic_umac_scan_cmd()
1227 cmd->active_dwell = params->dwell[IEEE80211_BAND_2GHZ].active; iwl_mvm_build_generic_umac_scan_cmd()
1228 cmd->passive_dwell = params->dwell[IEEE80211_BAND_2GHZ].passive; iwl_mvm_build_generic_umac_scan_cmd()
1229 if (params->passive_fragmented) iwl_mvm_build_generic_umac_scan_cmd()
1231 params->dwell[IEEE80211_BAND_2GHZ].fragmented; iwl_mvm_build_generic_umac_scan_cmd()
1232 cmd->max_out_time = cpu_to_le32(params->max_out_time); iwl_mvm_build_generic_umac_scan_cmd()
1233 cmd->suspend_time = cpu_to_le32(params->suspend_time); iwl_mvm_build_generic_umac_scan_cmd()
1288 struct iwl_mvm_scan_params params = {}; iwl_mvm_scan_umac() local
1312 &params); iwl_mvm_scan_umac()
1314 iwl_mvm_build_generic_umac_scan_cmd(mvm, cmd, &params); iwl_mvm_scan_umac()
1324 params.passive_fragmented); iwl_mvm_scan_umac()
1363 * should try to send the command again with different params. iwl_mvm_scan_umac()
1385 struct iwl_mvm_scan_params params = {}; iwl_mvm_sched_scan_umac() local
1408 &params); iwl_mvm_sched_scan_umac()
1410 iwl_mvm_build_generic_umac_scan_cmd(mvm, cmd, &params); iwl_mvm_sched_scan_umac()
1421 params.passive_fragmented); iwl_mvm_sched_scan_umac()
1474 * should try to send the command again with different params. iwl_mvm_sched_scan_umac()
206 iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, struct ieee80211_vif *vif, int n_ssids, u32 flags, struct iwl_mvm_scan_params *params) iwl_mvm_scan_calc_params() argument
762 iwl_mvm_build_generic_unified_scan_cmd(struct iwl_mvm *mvm, struct iwl_scan_req_unified_lmac *cmd, struct iwl_mvm_scan_params *params) iwl_mvm_build_generic_unified_scan_cmd() argument
1220 iwl_mvm_build_generic_umac_scan_cmd(struct iwl_mvm *mvm, struct iwl_scan_req_umac *cmd, struct iwl_mvm_scan_params *params) iwl_mvm_build_generic_umac_scan_cmd() argument
H A Dtdls.c683 struct ieee80211_tdls_ch_sw_params *params) iwl_mvm_tdls_recv_channel_switch()
689 params->action_code == WLAN_TDLS_CHANNEL_SWITCH_REQUEST ? iwl_mvm_tdls_recv_channel_switch()
696 action_str, params->sta->addr, params->status); iwl_mvm_tdls_recv_channel_switch()
702 if (params->action_code == WLAN_TDLS_CHANNEL_SWITCH_RESPONSE && iwl_mvm_tdls_recv_channel_switch()
703 params->status != 0 && iwl_mvm_tdls_recv_channel_switch()
712 if (cur_sta == params->sta) { iwl_mvm_tdls_recv_channel_switch()
719 type = (params->action_code == WLAN_TDLS_CHANNEL_SWITCH_REQUEST) ? iwl_mvm_tdls_recv_channel_switch()
722 iwl_mvm_tdls_config_channel_switch(mvm, vif, type, params->sta->addr, iwl_mvm_tdls_recv_channel_switch()
723 params->sta->tdls_initiator, 0, iwl_mvm_tdls_recv_channel_switch()
724 params->chandef, params->timestamp, iwl_mvm_tdls_recv_channel_switch()
725 params->switch_time, iwl_mvm_tdls_recv_channel_switch()
726 params->switch_timeout, iwl_mvm_tdls_recv_channel_switch()
727 params->tmpl_skb, iwl_mvm_tdls_recv_channel_switch()
728 params->ch_sw_tm_ie); iwl_mvm_tdls_recv_channel_switch()
681 iwl_mvm_tdls_recv_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_tdls_ch_sw_params *params) iwl_mvm_tdls_recv_channel_switch() argument
/linux-4.1.27/sound/core/
H A Dpcm_native.c281 struct snd_pcm_hw_params *params) snd_pcm_hw_refine()
293 params->info = 0; snd_pcm_hw_refine()
294 params->fifo_size = 0; snd_pcm_hw_refine()
295 if (params->rmask & (1 << SNDRV_PCM_HW_PARAM_SAMPLE_BITS)) snd_pcm_hw_refine()
296 params->msbits = 0; snd_pcm_hw_refine()
297 if (params->rmask & (1 << SNDRV_PCM_HW_PARAM_RATE)) { snd_pcm_hw_refine()
298 params->rate_num = 0; snd_pcm_hw_refine()
299 params->rate_den = 0; snd_pcm_hw_refine()
303 m = hw_param_mask(params, k); snd_pcm_hw_refine()
306 if (!(params->rmask & (1 << k))) snd_pcm_hw_refine()
317 params->cmask |= 1 << k; snd_pcm_hw_refine()
323 i = hw_param_interval(params, k); snd_pcm_hw_refine()
326 if (!(params->rmask & (1 << k))) snd_pcm_hw_refine()
348 params->cmask |= 1 << k; snd_pcm_hw_refine()
356 vstamps[k] = (params->rmask & (1 << k)) ? 1 : 0; snd_pcm_hw_refine()
363 if (r->cond && !(r->cond & params->flags)) snd_pcm_hw_refine()
378 m = hw_param_mask(params, r->var); snd_pcm_hw_refine()
381 i = hw_param_interval(params, r->var); snd_pcm_hw_refine()
391 changed = r->func(params, r); snd_pcm_hw_refine()
410 params->cmask |= (1 << r->var); snd_pcm_hw_refine()
419 if (!params->msbits) { snd_pcm_hw_refine()
420 i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS); snd_pcm_hw_refine()
422 params->msbits = snd_interval_value(i); snd_pcm_hw_refine()
425 if (!params->rate_den) { snd_pcm_hw_refine()
426 i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); snd_pcm_hw_refine()
428 params->rate_num = snd_interval_value(i); snd_pcm_hw_refine()
429 params->rate_den = 1; snd_pcm_hw_refine()
434 if (!params->info) { snd_pcm_hw_refine()
435 params->info = hw->info & ~(SNDRV_PCM_INFO_FIFO_IN_FRAMES | snd_pcm_hw_refine()
438 params->info &= ~(SNDRV_PCM_INFO_MMAP | snd_pcm_hw_refine()
441 if (!params->fifo_size) { snd_pcm_hw_refine()
442 m = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); snd_pcm_hw_refine()
443 i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); snd_pcm_hw_refine()
447 SNDRV_PCM_IOCTL1_FIFO_SIZE, params); snd_pcm_hw_refine()
452 params->rmask = 0; snd_pcm_hw_refine()
461 struct snd_pcm_hw_params *params; snd_pcm_hw_refine_user() local
464 params = memdup_user(_params, sizeof(*params)); snd_pcm_hw_refine_user()
465 if (IS_ERR(params)) snd_pcm_hw_refine_user()
466 return PTR_ERR(params); snd_pcm_hw_refine_user()
468 err = snd_pcm_hw_refine(substream, params); snd_pcm_hw_refine_user()
469 if (copy_to_user(_params, params, sizeof(*params))) { snd_pcm_hw_refine_user()
474 kfree(params); snd_pcm_hw_refine_user()
502 struct snd_pcm_hw_params *params) snd_pcm_hw_params()
529 params->rmask = ~0U; snd_pcm_hw_params()
530 err = snd_pcm_hw_refine(substream, params); snd_pcm_hw_params()
534 err = snd_pcm_hw_params_choose(substream, params); snd_pcm_hw_params()
539 err = substream->ops->hw_params(substream, params); snd_pcm_hw_params()
544 runtime->access = params_access(params); snd_pcm_hw_params()
545 runtime->format = params_format(params); snd_pcm_hw_params()
546 runtime->subformat = params_subformat(params); snd_pcm_hw_params()
547 runtime->channels = params_channels(params); snd_pcm_hw_params()
548 runtime->rate = params_rate(params); snd_pcm_hw_params()
549 runtime->period_size = params_period_size(params); snd_pcm_hw_params()
550 runtime->periods = params_periods(params); snd_pcm_hw_params()
551 runtime->buffer_size = params_buffer_size(params); snd_pcm_hw_params()
552 runtime->info = params->info; snd_pcm_hw_params()
553 runtime->rate_num = params->rate_num; snd_pcm_hw_params()
554 runtime->rate_den = params->rate_den; snd_pcm_hw_params()
556 (params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) && snd_pcm_hw_params()
557 (params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP); snd_pcm_hw_params()
571 /* Default sw params */ snd_pcm_hw_params()
605 struct snd_pcm_hw_params *params; snd_pcm_hw_params_user() local
608 params = memdup_user(_params, sizeof(*params)); snd_pcm_hw_params_user()
609 if (IS_ERR(params)) snd_pcm_hw_params_user()
610 return PTR_ERR(params); snd_pcm_hw_params_user()
612 err = snd_pcm_hw_params(substream, params); snd_pcm_hw_params_user()
613 if (copy_to_user(_params, params, sizeof(*params))) { snd_pcm_hw_params_user()
618 kfree(params); snd_pcm_hw_params_user()
650 struct snd_pcm_sw_params *params) snd_pcm_sw_params()
665 if (params->tstamp_mode > SNDRV_PCM_TSTAMP_LAST) snd_pcm_sw_params()
667 if (params->proto >= SNDRV_PROTOCOL_VERSION(2, 0, 12) && snd_pcm_sw_params()
668 params->tstamp_type > SNDRV_PCM_TSTAMP_TYPE_LAST) snd_pcm_sw_params()
670 if (params->avail_min == 0) snd_pcm_sw_params()
672 if (params->silence_size >= runtime->boundary) { snd_pcm_sw_params()
673 if (params->silence_threshold != 0) snd_pcm_sw_params()
676 if (params->silence_size > params->silence_threshold) snd_pcm_sw_params()
678 if (params->silence_threshold > runtime->buffer_size) snd_pcm_sw_params()
683 runtime->tstamp_mode = params->tstamp_mode; snd_pcm_sw_params()
684 if (params->proto >= SNDRV_PROTOCOL_VERSION(2, 0, 12)) snd_pcm_sw_params()
685 runtime->tstamp_type = params->tstamp_type; snd_pcm_sw_params()
686 runtime->period_step = params->period_step; snd_pcm_sw_params()
687 runtime->control->avail_min = params->avail_min; snd_pcm_sw_params()
688 runtime->start_threshold = params->start_threshold; snd_pcm_sw_params()
689 runtime->stop_threshold = params->stop_threshold; snd_pcm_sw_params()
690 runtime->silence_threshold = params->silence_threshold; snd_pcm_sw_params()
691 runtime->silence_size = params->silence_size; snd_pcm_sw_params()
692 params->boundary = runtime->boundary; snd_pcm_sw_params()
706 struct snd_pcm_sw_params params; snd_pcm_sw_params_user() local
708 if (copy_from_user(&params, _params, sizeof(params))) snd_pcm_sw_params_user()
710 err = snd_pcm_sw_params(substream, &params); snd_pcm_sw_params_user()
711 if (copy_to_user(_params, &params, sizeof(params))) snd_pcm_sw_params_user()
1903 static int snd_pcm_hw_rule_mul(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_mul() argument
1907 snd_interval_mul(hw_param_interval_c(params, rule->deps[0]), snd_pcm_hw_rule_mul()
1908 hw_param_interval_c(params, rule->deps[1]), &t); snd_pcm_hw_rule_mul()
1909 return snd_interval_refine(hw_param_interval(params, rule->var), &t); snd_pcm_hw_rule_mul()
1912 static int snd_pcm_hw_rule_div(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_div() argument
1916 snd_interval_div(hw_param_interval_c(params, rule->deps[0]), snd_pcm_hw_rule_div()
1917 hw_param_interval_c(params, rule->deps[1]), &t); snd_pcm_hw_rule_div()
1918 return snd_interval_refine(hw_param_interval(params, rule->var), &t); snd_pcm_hw_rule_div()
1921 static int snd_pcm_hw_rule_muldivk(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_muldivk() argument
1925 snd_interval_muldivk(hw_param_interval_c(params, rule->deps[0]), snd_pcm_hw_rule_muldivk()
1926 hw_param_interval_c(params, rule->deps[1]), snd_pcm_hw_rule_muldivk()
1928 return snd_interval_refine(hw_param_interval(params, rule->var), &t); snd_pcm_hw_rule_muldivk()
1931 static int snd_pcm_hw_rule_mulkdiv(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_mulkdiv() argument
1935 snd_interval_mulkdiv(hw_param_interval_c(params, rule->deps[0]), snd_pcm_hw_rule_mulkdiv()
1937 hw_param_interval_c(params, rule->deps[1]), &t); snd_pcm_hw_rule_mulkdiv()
1938 return snd_interval_refine(hw_param_interval(params, rule->var), &t); snd_pcm_hw_rule_mulkdiv()
1941 static int snd_pcm_hw_rule_format(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_format() argument
1945 struct snd_interval *i = hw_param_interval(params, rule->deps[0]); snd_pcm_hw_rule_format()
1947 struct snd_mask *mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); snd_pcm_hw_rule_format()
1962 static int snd_pcm_hw_rule_sample_bits(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_sample_bits() argument
1973 if (! snd_mask_test(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), k)) snd_pcm_hw_rule_sample_bits()
1984 return snd_interval_refine(hw_param_interval(params, rule->var), &t); snd_pcm_hw_rule_sample_bits()
1999 static int snd_pcm_hw_rule_rate(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_rate() argument
2003 return snd_interval_list(hw_param_interval(params, rule->var), snd_pcm_hw_rule_rate()
2008 static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_buffer_bytes_max() argument
2018 return snd_interval_refine(hw_param_interval(params, rule->var), &t); snd_pcm_hw_rule_buffer_bytes_max()
3552 static void snd_pcm_hw_convert_from_old_params(struct snd_pcm_hw_params *params, snd_pcm_hw_convert_from_old_params() argument
3557 memset(params, 0, sizeof(*params)); snd_pcm_hw_convert_from_old_params()
3558 params->flags = oparams->flags; snd_pcm_hw_convert_from_old_params()
3560 params->masks[i].bits[0] = oparams->masks[i]; snd_pcm_hw_convert_from_old_params()
3561 memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals)); snd_pcm_hw_convert_from_old_params()
3562 params->rmask = __OLD_TO_NEW_MASK(oparams->rmask); snd_pcm_hw_convert_from_old_params()
3563 params->cmask = __OLD_TO_NEW_MASK(oparams->cmask); snd_pcm_hw_convert_from_old_params()
3564 params->info = oparams->info; snd_pcm_hw_convert_from_old_params()
3565 params->msbits = oparams->msbits; snd_pcm_hw_convert_from_old_params()
3566 params->rate_num = oparams->rate_num; snd_pcm_hw_convert_from_old_params()
3567 params->rate_den = oparams->rate_den; snd_pcm_hw_convert_from_old_params()
3568 params->fifo_size = oparams->fifo_size; snd_pcm_hw_convert_from_old_params()
3572 struct snd_pcm_hw_params *params) snd_pcm_hw_convert_to_old_params()
3577 oparams->flags = params->flags; snd_pcm_hw_convert_to_old_params()
3579 oparams->masks[i] = params->masks[i].bits[0]; snd_pcm_hw_convert_to_old_params()
3580 memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals)); snd_pcm_hw_convert_to_old_params()
3581 oparams->rmask = __NEW_TO_OLD_MASK(params->rmask); snd_pcm_hw_convert_to_old_params()
3582 oparams->cmask = __NEW_TO_OLD_MASK(params->cmask); snd_pcm_hw_convert_to_old_params()
3583 oparams->info = params->info; snd_pcm_hw_convert_to_old_params()
3584 oparams->msbits = params->msbits; snd_pcm_hw_convert_to_old_params()
3585 oparams->rate_num = params->rate_num; snd_pcm_hw_convert_to_old_params()
3586 oparams->rate_den = params->rate_den; snd_pcm_hw_convert_to_old_params()
3587 oparams->fifo_size = params->fifo_size; snd_pcm_hw_convert_to_old_params()
3593 struct snd_pcm_hw_params *params; snd_pcm_hw_refine_old_user() local
3597 params = kmalloc(sizeof(*params), GFP_KERNEL); snd_pcm_hw_refine_old_user()
3598 if (!params) snd_pcm_hw_refine_old_user()
3606 snd_pcm_hw_convert_from_old_params(params, oparams); snd_pcm_hw_refine_old_user()
3607 err = snd_pcm_hw_refine(substream, params); snd_pcm_hw_refine_old_user()
3608 snd_pcm_hw_convert_to_old_params(oparams, params); snd_pcm_hw_refine_old_user()
3616 kfree(params); snd_pcm_hw_refine_old_user()
3623 struct snd_pcm_hw_params *params; snd_pcm_hw_params_old_user() local
3627 params = kmalloc(sizeof(*params), GFP_KERNEL); snd_pcm_hw_params_old_user()
3628 if (!params) snd_pcm_hw_params_old_user()
3636 snd_pcm_hw_convert_from_old_params(params, oparams); snd_pcm_hw_params_old_user()
3637 err = snd_pcm_hw_params(substream, params); snd_pcm_hw_params_old_user()
3638 snd_pcm_hw_convert_to_old_params(oparams, params); snd_pcm_hw_params_old_user()
3646 kfree(params); snd_pcm_hw_params_old_user()
280 snd_pcm_hw_refine(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) snd_pcm_hw_refine() argument
501 snd_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) snd_pcm_hw_params() argument
649 snd_pcm_sw_params(struct snd_pcm_substream *substream, struct snd_pcm_sw_params *params) snd_pcm_sw_params() argument
3571 snd_pcm_hw_convert_to_old_params(struct snd_pcm_hw_params_old *oparams, struct snd_pcm_hw_params *params) snd_pcm_hw_convert_to_old_params() argument
H A Drawmidi_compat.c36 struct snd_rawmidi_params params; snd_rawmidi_ioctl_params_compat() local
41 if (get_user(params.stream, &src->stream) || snd_rawmidi_ioctl_params_compat()
42 get_user(params.buffer_size, &src->buffer_size) || snd_rawmidi_ioctl_params_compat()
43 get_user(params.avail_min, &src->avail_min) || snd_rawmidi_ioctl_params_compat()
46 params.no_active_sensing = val; snd_rawmidi_ioctl_params_compat()
47 switch (params.stream) { snd_rawmidi_ioctl_params_compat()
49 return snd_rawmidi_output_params(rfile->output, &params); snd_rawmidi_ioctl_params_compat()
51 return snd_rawmidi_input_params(rfile->input, &params); snd_rawmidi_ioctl_params_compat()
H A Dpcm_lib.c1277 static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_list() argument
1281 return snd_interval_list(hw_param_interval(params, rule->var), list->count, list->list, list->mask); snd_pcm_hw_rule_list()
1308 static int snd_pcm_hw_rule_ranges(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_ranges() argument
1312 return snd_interval_ranges(hw_param_interval(params, rule->var), snd_pcm_hw_rule_ranges()
1339 static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_ratnums() argument
1345 err = snd_interval_ratnum(hw_param_interval(params, rule->var), snd_pcm_hw_rule_ratnums()
1348 params->rate_num = num; snd_pcm_hw_rule_ratnums()
1349 params->rate_den = den; snd_pcm_hw_rule_ratnums()
1375 static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_ratdens() argument
1380 int err = snd_interval_ratden(hw_param_interval(params, rule->var), snd_pcm_hw_rule_ratdens()
1383 params->rate_num = num; snd_pcm_hw_rule_ratdens()
1384 params->rate_den = den; snd_pcm_hw_rule_ratdens()
1410 static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_msbits() argument
1416 struct snd_interval *i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS); snd_pcm_hw_rule_msbits()
1423 params->msbits = min_not_zero(params->msbits, msbits); snd_pcm_hw_rule_msbits()
1456 static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_step() argument
1460 return snd_interval_step(hw_param_interval(params, rule->var), step); snd_pcm_hw_rule_step()
1484 static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) snd_pcm_hw_rule_pow2() argument
1492 return snd_interval_list(hw_param_interval(params, rule->var), snd_pcm_hw_rule_pow2()
1515 static int snd_pcm_hw_rule_noresample_func(struct snd_pcm_hw_params *params, snd_pcm_hw_rule_noresample_func() argument
1521 rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); snd_pcm_hw_rule_noresample_func()
1543 static void _snd_pcm_hw_param_any(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_any() argument
1547 snd_mask_any(hw_param_mask(params, var)); _snd_pcm_hw_param_any()
1548 params->cmask |= 1 << var; _snd_pcm_hw_param_any()
1549 params->rmask |= 1 << var; _snd_pcm_hw_param_any()
1553 snd_interval_any(hw_param_interval(params, var)); _snd_pcm_hw_param_any()
1554 params->cmask |= 1 << var; _snd_pcm_hw_param_any()
1555 params->rmask |= 1 << var; _snd_pcm_hw_param_any()
1561 void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params) _snd_pcm_hw_params_any() argument
1564 memset(params, 0, sizeof(*params)); _snd_pcm_hw_params_any()
1566 _snd_pcm_hw_param_any(params, k); _snd_pcm_hw_params_any()
1568 _snd_pcm_hw_param_any(params, k); _snd_pcm_hw_params_any()
1569 params->info = ~0U; _snd_pcm_hw_params_any()
1575 * snd_pcm_hw_param_value - return @params field @var value
1576 * @params: the hw_params instance
1581 * defined by @params. -%EINVAL otherwise.
1583 int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, snd_pcm_hw_param_value() argument
1587 const struct snd_mask *mask = hw_param_mask_c(params, var); snd_pcm_hw_param_value()
1595 const struct snd_interval *i = hw_param_interval_c(params, var); snd_pcm_hw_param_value()
1607 void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_setempty() argument
1611 snd_mask_none(hw_param_mask(params, var)); _snd_pcm_hw_param_setempty()
1612 params->cmask |= 1 << var; _snd_pcm_hw_param_setempty()
1613 params->rmask |= 1 << var; _snd_pcm_hw_param_setempty()
1615 snd_interval_none(hw_param_interval(params, var)); _snd_pcm_hw_param_setempty()
1616 params->cmask |= 1 << var; _snd_pcm_hw_param_setempty()
1617 params->rmask |= 1 << var; _snd_pcm_hw_param_setempty()
1625 static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_first() argument
1630 changed = snd_mask_refine_first(hw_param_mask(params, var)); _snd_pcm_hw_param_first()
1632 changed = snd_interval_refine_first(hw_param_interval(params, var)); _snd_pcm_hw_param_first()
1636 params->cmask |= 1 << var; _snd_pcm_hw_param_first()
1637 params->rmask |= 1 << var; _snd_pcm_hw_param_first()
1646 * @params: the hw_params instance
1650 * Inside configuration space defined by @params remove from @var all
1656 struct snd_pcm_hw_params *params, snd_pcm_hw_param_first()
1659 int changed = _snd_pcm_hw_param_first(params, var); snd_pcm_hw_param_first()
1662 if (params->rmask) { snd_pcm_hw_param_first()
1663 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_first()
1667 return snd_pcm_hw_param_value(params, var, dir); snd_pcm_hw_param_first()
1672 static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_last() argument
1677 changed = snd_mask_refine_last(hw_param_mask(params, var)); _snd_pcm_hw_param_last()
1679 changed = snd_interval_refine_last(hw_param_interval(params, var)); _snd_pcm_hw_param_last()
1683 params->cmask |= 1 << var; _snd_pcm_hw_param_last()
1684 params->rmask |= 1 << var; _snd_pcm_hw_param_last()
1693 * @params: the hw_params instance
1697 * Inside configuration space defined by @params remove from @var all
1703 struct snd_pcm_hw_params *params, snd_pcm_hw_param_last()
1706 int changed = _snd_pcm_hw_param_last(params, var); snd_pcm_hw_param_last()
1709 if (params->rmask) { snd_pcm_hw_param_last()
1710 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_last()
1714 return snd_pcm_hw_param_value(params, var, dir); snd_pcm_hw_param_last()
1720 * snd_pcm_hw_param_choose - choose a configuration defined by @params
1722 * @params: the hw_params instance
1724 * Choose one configuration from configuration space defined by @params.
1732 struct snd_pcm_hw_params *params) snd_pcm_hw_params_choose()
1749 err = snd_pcm_hw_param_first(pcm, params, *v, NULL); snd_pcm_hw_params_choose()
1751 err = snd_pcm_hw_param_last(pcm, params, *v, NULL); snd_pcm_hw_params_choose()
1813 struct snd_pcm_hw_params *params = arg; snd_pcm_lib_ioctl_fifo_size() local
1818 params->fifo_size = substream->runtime->hw.fifo_size; snd_pcm_lib_ioctl_fifo_size()
1820 format = params_format(params); snd_pcm_lib_ioctl_fifo_size()
1821 channels = params_channels(params); snd_pcm_lib_ioctl_fifo_size()
1824 params->fifo_size /= (unsigned)frame_size; snd_pcm_lib_ioctl_fifo_size()
1655 snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, int *dir) snd_pcm_hw_param_first() argument
1702 snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, int *dir) snd_pcm_hw_param_last() argument
1731 snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params) snd_pcm_hw_params_choose() argument
H A Dcompress_offload.c476 struct snd_compr_params *params) snd_compr_allocate_buffer()
481 buffer_size = params->buffer.fragment_size * params->buffer.fragments; snd_compr_allocate_buffer()
492 stream->runtime->fragment_size = params->buffer.fragment_size; snd_compr_allocate_buffer()
493 stream->runtime->fragments = params->buffer.fragments; snd_compr_allocate_buffer()
499 static int snd_compress_check_input(struct snd_compr_params *params) snd_compress_check_input() argument
502 if (params->buffer.fragment_size == 0 || snd_compress_check_input()
503 params->buffer.fragments > INT_MAX / params->buffer.fragment_size) snd_compress_check_input()
507 if (params->codec.id == 0 || params->codec.id > SND_AUDIOCODEC_MAX) snd_compress_check_input()
510 if (params->codec.ch_in == 0 || params->codec.ch_out == 0) snd_compress_check_input()
519 struct snd_compr_params *params; snd_compr_set_params() local
527 params = kmalloc(sizeof(*params), GFP_KERNEL); snd_compr_set_params()
528 if (!params) snd_compr_set_params()
530 if (copy_from_user(params, (void __user *)arg, sizeof(*params))) { snd_compr_set_params()
535 retval = snd_compress_check_input(params); snd_compr_set_params()
539 retval = snd_compr_allocate_buffer(stream, params); snd_compr_set_params()
545 retval = stream->ops->set_params(stream, params); snd_compr_set_params()
560 kfree(params); snd_compr_set_params()
567 struct snd_codec *params; snd_compr_get_params() local
573 params = kzalloc(sizeof(*params), GFP_KERNEL); snd_compr_get_params()
574 if (!params) snd_compr_get_params()
576 retval = stream->ops->get_params(stream, params); snd_compr_get_params()
579 if (copy_to_user((char __user *)arg, params, sizeof(*params))) snd_compr_get_params()
583 kfree(params); snd_compr_get_params()
475 snd_compr_allocate_buffer(struct snd_compr_stream *stream, struct snd_compr_params *params) snd_compr_allocate_buffer() argument
H A Dpcm_compat.c125 struct snd_pcm_sw_params params; snd_pcm_ioctl_sw_params_compat() local
129 memset(&params, 0, sizeof(params)); snd_pcm_ioctl_sw_params_compat()
130 if (get_user(params.tstamp_mode, &src->tstamp_mode) || snd_pcm_ioctl_sw_params_compat()
131 get_user(params.period_step, &src->period_step) || snd_pcm_ioctl_sw_params_compat()
132 get_user(params.sleep_min, &src->sleep_min) || snd_pcm_ioctl_sw_params_compat()
133 get_user(params.avail_min, &src->avail_min) || snd_pcm_ioctl_sw_params_compat()
134 get_user(params.xfer_align, &src->xfer_align) || snd_pcm_ioctl_sw_params_compat()
135 get_user(params.start_threshold, &src->start_threshold) || snd_pcm_ioctl_sw_params_compat()
136 get_user(params.stop_threshold, &src->stop_threshold) || snd_pcm_ioctl_sw_params_compat()
137 get_user(params.silence_threshold, &src->silence_threshold) || snd_pcm_ioctl_sw_params_compat()
138 get_user(params.silence_size, &src->silence_size) || snd_pcm_ioctl_sw_params_compat()
139 get_user(params.tstamp_type, &src->tstamp_type) || snd_pcm_ioctl_sw_params_compat()
140 get_user(params.proto, &src->proto)) snd_pcm_ioctl_sw_params_compat()
147 if (boundary && params.silence_size >= boundary) snd_pcm_ioctl_sw_params_compat()
148 params.silence_size = substream->runtime->boundary; snd_pcm_ioctl_sw_params_compat()
149 err = snd_pcm_sw_params(substream, &params); snd_pcm_ioctl_sw_params_compat()
/linux-4.1.27/drivers/dma/
H A Ddmatest.c104 * @params: test parameters
109 struct dmatest_params params; member in struct:dmatest_info
190 struct dmatest_params *params = &info->params; dmatest_wait_get() local
192 if (params->iterations) dmatest_wait_get()
205 static bool dmatest_match_channel(struct dmatest_params *params, dmatest_match_channel() argument
208 if (params->channel[0] == '\0') dmatest_match_channel()
210 return strcmp(dma_chan_name(chan), params->channel) == 0; dmatest_match_channel()
213 static bool dmatest_match_device(struct dmatest_params *params, dmatest_match_device() argument
216 if (params->device[0] == '\0') dmatest_match_device()
218 return strcmp(dev_name(device->dev), params->device) == 0; dmatest_match_device()
405 struct dmatest_params *params; dmatest_func() local
429 params = &info->params; dmatest_func()
436 src_cnt = min_odd(params->xor_sources | 1, dev->max_xor); dmatest_func()
440 src_cnt = min_odd(params->pq_sources | 1, dma_maxpq(dev, 0)); dmatest_func()
443 pq_coefs = kmalloc(params->pq_sources+1, GFP_KERNEL); dmatest_func()
456 thread->srcs[i] = kmalloc(params->buf_size, GFP_KERNEL); dmatest_func()
466 thread->dsts[i] = kmalloc(params->buf_size, GFP_KERNEL); dmatest_func()
481 && !(params->iterations && total_tests >= params->iterations)) { dmatest_func()
499 if (1 << align > params->buf_size) { dmatest_func()
501 params->buf_size, 1 << align); dmatest_func()
505 if (params->noverify) dmatest_func()
506 len = params->buf_size; dmatest_func()
508 len = dmatest_random() % params->buf_size + 1; dmatest_func()
516 if (params->noverify) { dmatest_func()
520 src_off = dmatest_random() % (params->buf_size - len + 1); dmatest_func()
521 dst_off = dmatest_random() % (params->buf_size - len + 1); dmatest_func()
527 params->buf_size); dmatest_func()
529 params->buf_size); dmatest_func()
541 um->len = params->buf_size; dmatest_func()
624 msecs_to_jiffies(params->timeout)); dmatest_func()
654 if (params->noverify) { dmatest_func()
667 params->buf_size, src_off + len, dmatest_func()
677 params->buf_size, dst_off + len, dmatest_func()
743 struct dmatest_params *params = &info->params; dmatest_add_threads() local
758 for (i = 0; i < params->threads_per_chan; i++) { dmatest_add_threads()
828 struct dmatest_params *params = param; filter() local
830 if (!dmatest_match_channel(params, chan) || filter()
831 !dmatest_match_device(params, chan->device)) filter()
845 struct dmatest_params *params = &info->params; request_channels() local
848 chan = dma_request_channel(mask, filter, params); request_channels()
856 if (params->max_channels && request_channels()
857 info->nr_channels >= params->max_channels) request_channels()
864 struct dmatest_params *params = &info->params; run_threaded_test() local
867 params->buf_size = test_buf_size; run_threaded_test()
868 strlcpy(params->channel, strim(test_channel), sizeof(params->channel)); run_threaded_test()
869 strlcpy(params->device, strim(test_device), sizeof(params->device)); run_threaded_test()
870 params->threads_per_chan = threads_per_chan; run_threaded_test()
871 params->max_channels = max_channels; run_threaded_test()
872 params->iterations = iterations; run_threaded_test()
873 params->xor_sources = xor_sources; run_threaded_test()
874 params->pq_sources = pq_sources; run_threaded_test()
875 params->timeout = timeout; run_threaded_test()
876 params->noverify = noverify; run_threaded_test()
955 struct dmatest_params *params = &info->params; dmatest_init() local
963 if (params->iterations && wait) dmatest_init()
/linux-4.1.27/arch/arm/plat-versatile/
H A Dclock.c59 vco = icst_hz_to_vco(clk->params, rate); icst_clk_round()
60 return icst_hz(clk->params, vco); icst_clk_round()
68 vco = icst_hz_to_vco(clk->params, rate); icst_clk_set()
69 clk->rate = icst_hz(clk->params, vco); icst_clk_set()
/linux-4.1.27/drivers/clk/tegra/
H A Dclk-pll.c187 #define pll_readl_base(p) pll_readl(p->params->base_reg, p)
188 #define pll_readl_misc(p) pll_readl(p->params->misc_reg, p)
192 #define pll_writel_base(val, p) pll_writel(val, p->params->base_reg, p)
193 #define pll_writel_misc(val, p) pll_writel(val, p->params->misc_reg, p)
197 #define divm_mask(p) mask(p->params->div_nmp->divm_width)
198 #define divn_mask(p) mask(p->params->div_nmp->divn_width)
199 #define divp_mask(p) (p->params->flags & TEGRA_PLLU ? PLLU_POST_DIVP_MASK :\
200 mask(p->params->div_nmp->divp_width))
202 #define divm_shift(p) (p)->params->div_nmp->divm_shift
203 #define divn_shift(p) (p)->params->div_nmp->divn_shift
204 #define divp_shift(p) (p)->params->div_nmp->divp_shift
227 if (!(pll->params->flags & TEGRA_PLL_USE_LOCK)) clk_pll_enable_lock()
230 if (!(pll->params->flags & TEGRA_PLL_HAS_LOCK_ENABLE)) clk_pll_enable_lock()
234 val |= BIT(pll->params->lock_enable_bit_idx); clk_pll_enable_lock()
244 if (!(pll->params->flags & TEGRA_PLL_USE_LOCK)) { clk_pll_wait_for_lock()
245 udelay(pll->params->lock_delay); clk_pll_wait_for_lock()
250 if (pll->params->flags & TEGRA_PLL_LOCK_MISC) clk_pll_wait_for_lock()
251 lock_addr += pll->params->misc_reg; clk_pll_wait_for_lock()
253 lock_addr += pll->params->base_reg; clk_pll_wait_for_lock()
255 lock_mask = pll->params->lock_mask; clk_pll_wait_for_lock()
257 for (i = 0; i < pll->params->lock_delay; i++) { clk_pll_wait_for_lock()
277 if (pll->params->flags & TEGRA_PLLM) { clk_pll_is_enabled()
296 if (pll->params->flags & TEGRA_PLL_BYPASS) _clk_pll_enable()
301 if (pll->params->flags & TEGRA_PLLM) { _clk_pll_enable()
314 if (pll->params->flags & TEGRA_PLL_BYPASS) _clk_pll_disable()
319 if (pll->params->flags & TEGRA_PLLM) { _clk_pll_disable()
362 struct pdiv_map *p_tohw = pll->params->pdiv_tohw; _p_div_to_hw()
378 struct pdiv_map *p_tohw = pll->params->pdiv_tohw; _hw_to_p_div()
399 for (sel = pll->params->freq_table; sel->input_rate != 0; sel++) _get_table_rate()
461 || cfg->output_rate > pll->params->vco_max) { _calc_rate()
467 if (pll->params->pdiv_tohw) { _calc_rate()
483 struct tegra_clk_pll_params *params = pll->params; _update_pll_mnp() local
484 struct div_nmp *div_nmp = params->div_nmp; _update_pll_mnp()
486 if ((params->flags & TEGRA_PLLM) && _update_pll_mnp()
489 val = pll_override_readl(params->pmc_divp_reg, pll); _update_pll_mnp()
492 pll_override_writel(val, params->pmc_divp_reg, pll); _update_pll_mnp()
494 val = pll_override_readl(params->pmc_divnm_reg, pll); _update_pll_mnp()
499 pll_override_writel(val, params->pmc_divnm_reg, pll); _update_pll_mnp()
518 struct tegra_clk_pll_params *params = pll->params; _get_pll_mnp() local
519 struct div_nmp *div_nmp = params->div_nmp; _get_pll_mnp()
521 if ((params->flags & TEGRA_PLLM) && _get_pll_mnp()
524 val = pll_override_readl(params->pmc_divp_reg, pll); _get_pll_mnp()
527 val = pll_override_readl(params->pmc_divnm_reg, pll); _get_pll_mnp()
550 if (pll->params->flags & TEGRA_PLL_SET_LFCON) { _update_pll_cpcon()
554 } else if (pll->params->flags & TEGRA_PLL_SET_DCCON) { _update_pll_cpcon()
556 if (rate >= (pll->params->vco_max >> 1)) _update_pll_cpcon()
576 if (pll->params->flags & TEGRA_PLL_HAS_CPCON) _program_pll()
595 if (pll->params->flags & TEGRA_PLL_FIXED) { clk_pll_set_rate()
596 if (rate != pll->params->fixed_rate) { clk_pll_set_rate()
599 pll->params->fixed_rate, rate); clk_pll_set_rate()
632 if (pll->params->flags & TEGRA_PLL_FIXED) clk_pll_round_rate()
633 return pll->params->fixed_rate; clk_pll_round_rate()
636 if (pll->params->flags & TEGRA_PLLM) clk_pll_round_rate()
657 if ((pll->params->flags & TEGRA_PLL_BYPASS) && (val & PLL_BASE_BYPASS)) clk_pll_recalc_rate()
660 if ((pll->params->flags & TEGRA_PLL_FIXED) && clk_pll_recalc_rate()
663 if (_get_table_rate(hw, &sel, pll->params->fixed_rate, clk_pll_recalc_rate()
669 return pll->params->fixed_rate; clk_pll_recalc_rate()
737 if (_get_table_rate(hw, &sel, pll->params->fixed_rate, input_rate)) clk_plle_enable()
753 if (pll->params->flags & TEGRA_PLLE_CONFIGURE) { clk_plle_enable()
793 divp = (val >> pll->params->div_nmp->divp_shift) & (divp_mask(pll)); clk_plle_recalc_rate()
794 divn = (val >> pll->params->div_nmp->divn_shift) & (divn_mask(pll)); clk_plle_recalc_rate()
795 divm = (val >> pll->params->div_nmp->divm_shift) & (divm_mask(pll)); clk_plle_recalc_rate()
885 val = pll_readl(pll->params->iddq_reg, pll); clk_pll_iddq_enable()
886 val &= ~BIT(pll->params->iddq_bit_idx); clk_pll_iddq_enable()
887 pll_writel(val, pll->params->iddq_reg, pll); clk_pll_iddq_enable()
911 val = pll_readl(pll->params->iddq_reg, pll); clk_pll_iddq_disable()
912 val |= BIT(pll->params->iddq_bit_idx); clk_pll_iddq_disable()
913 pll_writel(val, pll->params->iddq_reg, pll); clk_pll_iddq_disable()
931 p = DIV_ROUND_UP(pll->params->vco_min, rate); _calc_dynamic_ramp_rate()
932 cfg->m = _pll_fixed_mdiv(pll->params, parent_rate); _calc_dynamic_ramp_rate()
942 if (cfg->n > divn_max(pll) || cfg->output_rate > pll->params->vco_max) _calc_dynamic_ramp_rate()
959 if (cfg->m != _pll_fixed_mdiv(pll->params, parent_rate)) { _pll_ramp_calc_pll()
971 if (cfg->p > pll->params->max_p) _pll_ramp_calc_pll()
1213 m = _pll_fixed_mdiv(pll->params, parent_rate); _pllre_calc_rate()
1293 if (_get_table_rate(hw, &sel, pll->params->fixed_rate, input_rate)) clk_plle_tegra114_enable()
1303 val = pll_readl(pll->params->aux_reg, pll); clk_plle_tegra114_enable()
1306 pll_writel(val, pll->params->aux_reg, pll); clk_plle_tegra114_enable()
1355 val = pll_readl(pll->params->aux_reg, pll); clk_plle_tegra114_enable()
1358 pll_writel(val, pll->params->aux_reg, pll); clk_plle_tegra114_enable()
1361 pll_writel(val, pll->params->aux_reg, pll); clk_plle_tegra114_enable()
1427 pll->params = pll_params; _tegra_init_pll()
/linux-4.1.27/sound/soc/
H A Dsoc-utils.c29 int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params) snd_soc_params_to_frame_size() argument
33 sample_size = snd_pcm_format_width(params_format(params)); snd_soc_params_to_frame_size()
37 return snd_soc_calc_frame_size(sample_size, params_channels(params), snd_soc_params_to_frame_size()
48 int snd_soc_params_to_bclk(struct snd_pcm_hw_params *params) snd_soc_params_to_bclk() argument
52 ret = snd_soc_params_to_frame_size(params); snd_soc_params_to_bclk()
55 return ret * params_rate(params); snd_soc_params_to_bclk()
76 /* BE's dont need dummy params */ dummy_dma_open()
H A Dsoc-ops.c631 struct soc_bytes *params = (void *)kcontrol->private_value; snd_soc_bytes_info() local
634 uinfo->count = params->num_regs * component->val_bytes; snd_soc_bytes_info()
644 struct soc_bytes *params = (void *)kcontrol->private_value; snd_soc_bytes_get() local
648 ret = regmap_raw_read(component->regmap, params->base, snd_soc_bytes_get()
650 params->num_regs * component->val_bytes); snd_soc_bytes_get()
655 if (ret == 0 && params->mask) { snd_soc_bytes_get()
658 ucontrol->value.bytes.data[0] &= ~params->mask; snd_soc_bytes_get()
662 &= cpu_to_be16(~params->mask); snd_soc_bytes_get()
666 &= cpu_to_be32(~params->mask); snd_soc_bytes_get()
681 struct soc_bytes *params = (void *)kcontrol->private_value; snd_soc_bytes_put() local
686 if (!component->regmap || !params->num_regs) snd_soc_bytes_put()
689 len = params->num_regs * component->val_bytes; snd_soc_bytes_put()
700 if (params->mask) { snd_soc_bytes_put()
701 ret = regmap_read(component->regmap, params->base, &val); snd_soc_bytes_put()
705 val &= params->mask; snd_soc_bytes_put()
709 ((u8 *)data)[0] &= ~params->mask; snd_soc_bytes_put()
713 mask = ~params->mask; snd_soc_bytes_put()
729 mask = ~params->mask; snd_soc_bytes_put()
750 ret = regmap_raw_write(component->regmap, params->base, snd_soc_bytes_put()
763 struct soc_bytes_ext *params = (void *)kcontrol->private_value; snd_soc_bytes_info_ext() local
766 ucontrol->count = params->max; snd_soc_bytes_info_ext()
775 struct soc_bytes_ext *params = (void *)kcontrol->private_value; snd_soc_bytes_tlv_callback() local
776 unsigned int count = size < params->max ? size : params->max; snd_soc_bytes_tlv_callback()
781 if (params->get) snd_soc_bytes_tlv_callback()
782 ret = params->get(tlv, count); snd_soc_bytes_tlv_callback()
785 if (params->put) snd_soc_bytes_tlv_callback()
786 ret = params->put(tlv, count); snd_soc_bytes_tlv_callback()
/linux-4.1.27/drivers/staging/lustre/lustre/include/
H A Dlustre_lite.h74 struct lustre_rw_params *params) lustre_build_lock_params()
76 params->lrp_lock_mode = (cmd == OBD_BRW_READ) ? LCK_PR : LCK_PW; lustre_build_lock_params()
77 params->lrp_brw_flags = 0; lustre_build_lock_params()
79 params->lrp_policy.l_extent.start = pos; lustre_build_lock_params()
80 params->lrp_policy.l_extent.end = pos + len - 1; lustre_build_lock_params()
85 params->lrp_policy.l_extent.start = 0; lustre_build_lock_params()
86 params->lrp_policy.l_extent.end = OBD_OBJECT_EOF; lustre_build_lock_params()
92 params->lrp_lock_mode = LCK_NL; lustre_build_lock_params()
93 params->lrp_brw_flags = OBD_BRW_SRVLOCK; lustre_build_lock_params()
101 params->lrp_ast_flags = (open_flags & O_NONBLOCK) ? lustre_build_lock_params()
71 lustre_build_lock_params(int cmd, unsigned long open_flags, __u64 connect_flags, loff_t pos, ssize_t len, struct lustre_rw_params *params) lustre_build_lock_params() argument
/linux-4.1.27/net/wireless/
H A Dsme.c30 struct cfg80211_connect_params params; member in struct:cfg80211_conn
72 if (wdev->conn->params.channel) cfg80211_conn_scan()
83 if (wdev->conn->params.channel) { cfg80211_conn_scan()
84 enum ieee80211_band band = wdev->conn->params.channel->band; cfg80211_conn_scan()
92 request->channels[0] = wdev->conn->params.channel; cfg80211_conn_scan()
118 memcpy(request->ssids[0].ssid, wdev->conn->params.ssid, cfg80211_conn_scan()
119 wdev->conn->params.ssid_len); cfg80211_conn_scan()
120 request->ssids[0].ssid_len = wdev->conn->params.ssid_len; cfg80211_conn_scan()
143 struct cfg80211_connect_params *params; cfg80211_conn_do_work() local
152 params = &wdev->conn->params; cfg80211_conn_do_work()
165 params->channel, params->auth_type, cfg80211_conn_do_work()
166 params->bssid, cfg80211_conn_do_work()
167 params->ssid, params->ssid_len, cfg80211_conn_do_work()
169 params->key, params->key_len, cfg80211_conn_do_work()
170 params->key_idx, NULL, 0); cfg80211_conn_do_work()
179 req.ie = params->ie; cfg80211_conn_do_work()
180 req.ie_len = params->ie_len; cfg80211_conn_do_work()
181 req.use_mfp = params->mfp != NL80211_MFP_NO; cfg80211_conn_do_work()
182 req.crypto = params->crypto; cfg80211_conn_do_work()
183 req.flags = params->flags; cfg80211_conn_do_work()
184 req.ht_capa = params->ht_capa; cfg80211_conn_do_work()
185 req.ht_capa_mask = params->ht_capa_mask; cfg80211_conn_do_work()
186 req.vht_capa = params->vht_capa; cfg80211_conn_do_work()
187 req.vht_capa_mask = params->vht_capa_mask; cfg80211_conn_do_work()
189 err = cfg80211_mlme_assoc(rdev, wdev->netdev, params->channel, cfg80211_conn_do_work()
190 params->bssid, params->ssid, cfg80211_conn_do_work()
191 params->ssid_len, &req); cfg80211_conn_do_work()
193 cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, cfg80211_conn_do_work()
199 cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, cfg80211_conn_do_work()
204 cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, cfg80211_conn_do_work()
238 if (wdev->conn->params.bssid) { cfg80211_conn_work()
239 memcpy(bssid_buf, wdev->conn->params.bssid, ETH_ALEN); cfg80211_conn_work()
263 bss = cfg80211_get_bss(wdev->wiphy, wdev->conn->params.channel, cfg80211_get_conn_bss()
264 wdev->conn->params.bssid, cfg80211_get_conn_bss()
265 wdev->conn->params.ssid, cfg80211_get_conn_bss()
266 wdev->conn->params.ssid_len, cfg80211_get_conn_bss()
268 IEEE80211_PRIVACY(wdev->conn->params.privacy)); cfg80211_get_conn_bss()
273 wdev->conn->params.bssid = wdev->conn->bssid; cfg80211_get_conn_bss()
274 wdev->conn->params.channel = bss->channel; cfg80211_get_conn_bss()
326 wdev->conn->params.auth_type != NL80211_AUTHTYPE_NETWORK_EAP) { cfg80211_sme_rx_auth()
328 switch (wdev->conn->params.auth_type) { cfg80211_sme_rx_auth()
331 wdev->conn->params.auth_type = cfg80211_sme_rx_auth()
334 wdev->conn->params.auth_type = cfg80211_sme_rx_auth()
338 wdev->conn->params.auth_type = cfg80211_sme_rx_auth()
343 wdev->conn->params.auth_type = cfg80211_sme_rx_auth()
506 memcpy(&wdev->conn->params, connect, sizeof(*connect)); cfg80211_sme_connect()
508 wdev->conn->params.bssid = wdev->conn->bssid; cfg80211_sme_connect()
514 &wdev->conn->params.ie_len)) { cfg80211_sme_connect()
519 wdev->conn->params.ie = wdev->conn->ie; cfg80211_sme_connect()
524 wdev->conn->params.auth_type = cfg80211_sme_connect()
530 wdev->conn->params.ssid = wdev->ssid; cfg80211_sme_connect()
531 wdev->conn->params.ssid_len = wdev->ssid_len; cfg80211_sme_connect()
583 /* wdev->conn->params.bssid must be set if > SCANNING */ cfg80211_sme_disconnect()
585 wdev->conn->params.bssid, cfg80211_sme_disconnect()
992 cipher = connkeys->params[idx].cipher; cfg80211_connect()
997 connect->key = connkeys->params[idx].key; cfg80211_connect()
998 connect->key_len = connkeys->params[idx].key_len; cfg80211_connect()
H A Dibss.c87 struct cfg80211_ibss_params *params, __cfg80211_join_ibss()
98 if (!params->basic_rates) { __cfg80211_join_ibss()
105 rdev->wiphy.bands[params->chandef.chan->band]; __cfg80211_join_ibss()
107 u32 flag = params->chandef.chan->band == IEEE80211_BAND_5GHZ ? __cfg80211_join_ibss()
113 params->basic_rates |= BIT(j); __cfg80211_join_ibss()
121 wdev->ibss_fixed = params->channel_fixed; __cfg80211_join_ibss()
122 wdev->ibss_dfs_possible = params->userspace_handles_dfs; __cfg80211_join_ibss()
123 wdev->chandef = params->chandef; __cfg80211_join_ibss()
125 wdev->wext.ibss.chandef = params->chandef; __cfg80211_join_ibss()
127 err = rdev_join_ibss(rdev, dev, params); __cfg80211_join_ibss()
133 memcpy(wdev->ssid, params->ssid, params->ssid_len); __cfg80211_join_ibss()
134 wdev->ssid_len = params->ssid_len; __cfg80211_join_ibss()
141 struct cfg80211_ibss_params *params, cfg80211_join_ibss()
150 err = __cfg80211_join_ibss(rdev, dev, params, connkeys); cfg80211_join_ibss()
299 ck->params[i].key = ck->data[i]; cfg80211_ibss_wext_join()
85 __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_ibss_params *params, struct cfg80211_cached_keys *connkeys) __cfg80211_join_ibss() argument
139 cfg80211_join_ibss(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_ibss_params *params, struct cfg80211_cached_keys *connkeys) cfg80211_join_ibss() argument
H A Dtrace.h616 struct station_parameters *params),
617 TP_ARGS(wiphy, netdev, mac, params),
637 __entry->sta_flags_mask = params->sta_flags_mask;
638 __entry->sta_flags_set = params->sta_flags_set;
639 __entry->sta_modify_mask = params->sta_modify_mask;
640 __entry->listen_interval = params->listen_interval;
641 __entry->aid = params->aid;
642 __entry->plink_action = params->plink_action;
643 __entry->plink_state = params->plink_state;
644 __entry->uapsd_queues = params->uapsd_queues;
646 if (params->ht_capa)
647 memcpy(__entry->ht_capa, params->ht_capa,
650 if (params->vlan)
651 memcpy(__entry->vlan, params->vlan->name, IFNAMSIZ);
666 struct station_parameters *params),
667 TP_ARGS(wiphy, netdev, mac, params)
672 struct station_parameters *params),
673 TP_ARGS(wiphy, netdev, mac, params)
695 struct station_del_parameters *params),
696 TP_ARGS(wiphy, netdev, params),
707 MAC_ASSIGN(sta_mac, params->mac);
708 __entry->subtype = params->subtype;
709 __entry->reason_code = params->reason_code;
719 struct station_del_parameters *params),
720 TP_ARGS(wiphy, netdev, params)
980 struct bss_parameters *params),
981 TP_ARGS(wiphy, netdev, params),
994 __entry->use_cts_prot = params->use_cts_prot;
995 __entry->use_short_preamble = params->use_short_preamble;
996 __entry->use_short_slot_time = params->use_short_slot_time;
997 __entry->ap_isolate = params->ap_isolate;
998 __entry->ht_opmode = params->ht_opmode;
1010 struct ieee80211_txq_params *params),
1011 TP_ARGS(wiphy, netdev, params),
1024 __entry->ac = params->ac;
1025 __entry->txop = params->txop;
1026 __entry->cwmin = params->cwmin;
1027 __entry->cwmax = params->cwmax;
1028 __entry->aifs = params->aifs;
1310 struct cfg80211_ibss_params *params),
1311 TP_ARGS(wiphy, netdev, params),
1321 MAC_ASSIGN(bssid, params->bssid);
1323 memcpy(__entry->ssid, params->ssid, params->ssid_len);
1770 struct cfg80211_mgmt_tx_params *params),
1771 TP_ARGS(wiphy, wdev, params),
1784 CHAN_ASSIGN(params->chan);
1785 __entry->offchan = params->offchan;
1786 __entry->wait = params->wait;
1787 __entry->no_cck = params->no_cck;
1788 __entry->dont_wait_for_ack = params->dont_wait_for_ack;
1854 struct cfg80211_acl_data *params),
1855 TP_ARGS(wiphy, netdev, params),
1864 __entry->acl_policy = params->acl_policy;
1927 struct cfg80211_csa_settings *params),
1928 TP_ARGS(wiphy, netdev, params),
1936 __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon)
1937 __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp)
1942 CHAN_DEF_ASSIGN(&params->chandef);
1943 __entry->radar_required = params->radar_required;
1944 __entry->block_tx = params->block_tx;
1945 __entry->count = params->count;
1947 params->counter_offsets_beacon,
1948 params->n_counter_offsets_beacon * sizeof(u16));
1951 if (params->n_counter_offsets_presp)
1953 params->counter_offsets_presp,
1954 params->n_counter_offsets_presp * sizeof(u16));
H A Dwext-compat.c435 int idx, struct key_params *params) __cfg80211_set_encryption()
450 wdev->wext.keys->params[i].key = __cfg80211_set_encryption()
458 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { __cfg80211_set_encryption()
501 wdev->wext.keys->params[idx].key_len = 0; __cfg80211_set_encryption()
502 wdev->wext.keys->params[idx].cipher = 0; __cfg80211_set_encryption()
519 if (cfg80211_validate_key_settings(rdev, params, idx, pairwise, addr)) __cfg80211_set_encryption()
524 err = rdev_add_key(rdev, dev, idx, pairwise, addr, params); __cfg80211_set_encryption()
529 wdev->wext.keys->params[idx] = *params; __cfg80211_set_encryption()
531 params->key, params->key_len); __cfg80211_set_encryption()
532 wdev->wext.keys->params[idx].key = __cfg80211_set_encryption()
536 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || __cfg80211_set_encryption()
537 params->cipher == WLAN_CIPHER_SUITE_WEP104) && __cfg80211_set_encryption()
560 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && __cfg80211_set_encryption()
575 int idx, struct key_params *params) cfg80211_set_encryption()
581 remove, tx_key, idx, params); cfg80211_set_encryption()
595 struct key_params params; cfg80211_wext_siwencode() local
632 memset(&params, 0, sizeof(params)); cfg80211_wext_siwencode()
633 params.key = keybuf; cfg80211_wext_siwencode()
634 params.key_len = erq->length; cfg80211_wext_siwencode()
636 params.cipher = WLAN_CIPHER_SUITE_WEP40; cfg80211_wext_siwencode()
638 params.cipher = WLAN_CIPHER_SUITE_WEP104; cfg80211_wext_siwencode()
644 idx, &params); cfg80211_wext_siwencode()
657 struct key_params params; cfg80211_wext_siwencodeext() local
720 memset(&params, 0, sizeof(params)); cfg80211_wext_siwencodeext()
721 params.key = ext->key; cfg80211_wext_siwencodeext()
722 params.key_len = ext->key_len; cfg80211_wext_siwencodeext()
723 params.cipher = cipher; cfg80211_wext_siwencodeext()
726 params.seq = ext->rx_seq; cfg80211_wext_siwencodeext()
727 params.seq_len = 6; cfg80211_wext_siwencodeext()
735 idx, &params); cfg80211_wext_siwencodeext()
761 if (!wdev->wext.keys || !wdev->wext.keys->params[idx].cipher) { cfg80211_wext_giwencode()
768 wdev->wext.keys->params[idx].key_len); cfg80211_wext_giwencode()
769 memcpy(keybuf, wdev->wext.keys->params[idx].key, erq->length); cfg80211_wext_giwencode()
432 __cfg80211_set_encryption(struct cfg80211_registered_device *rdev, struct net_device *dev, bool pairwise, const u8 *addr, bool remove, bool tx_key, int idx, struct key_params *params) __cfg80211_set_encryption() argument
572 cfg80211_set_encryption(struct cfg80211_registered_device *rdev, struct net_device *dev, bool pairwise, const u8 *addr, bool remove, bool tx_key, int idx, struct key_params *params) cfg80211_set_encryption() argument
H A Drdev-ops.h40 struct vif_params *params) rdev_add_virtual_intf()
45 type, flags, params); rdev_add_virtual_intf()
64 u32 *flags, struct vif_params *params) rdev_change_virtual_intf()
69 params); rdev_change_virtual_intf()
77 struct key_params *params) rdev_add_key()
82 mac_addr, params); rdev_add_key()
172 struct station_parameters *params) rdev_add_station()
175 trace_rdev_add_station(&rdev->wiphy, dev, mac, params); rdev_add_station()
176 ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params); rdev_add_station()
183 struct station_del_parameters *params) rdev_del_station()
186 trace_rdev_del_station(&rdev->wiphy, dev, params); rdev_del_station()
187 ret = rdev->ops->del_station(&rdev->wiphy, dev, params); rdev_del_station()
194 struct station_parameters *params) rdev_change_station()
197 trace_rdev_change_station(&rdev->wiphy, dev, mac, params); rdev_change_station()
198 ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params); rdev_change_station()
375 struct bss_parameters *params) rdev_change_bss()
379 trace_rdev_change_bss(&rdev->wiphy, dev, params); rdev_change_bss()
380 ret = rdev->ops->change_bss(&rdev->wiphy, dev, params); rdev_change_bss()
387 struct ieee80211_txq_params *params) rdev_set_txq_params()
391 trace_rdev_set_txq_params(&rdev->wiphy, dev, params); rdev_set_txq_params()
392 ret = rdev->ops->set_txq_params(&rdev->wiphy, dev, params); rdev_set_txq_params()
497 struct cfg80211_ibss_params *params) rdev_join_ibss()
500 trace_rdev_join_ibss(&rdev->wiphy, dev, params); rdev_join_ibss()
501 ret = rdev->ops->join_ibss(&rdev->wiphy, dev, params); rdev_join_ibss()
675 struct cfg80211_mgmt_tx_params *params, rdev_mgmt_tx()
679 trace_rdev_mgmt_tx(&rdev->wiphy, wdev, params); rdev_mgmt_tx()
680 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie); rdev_mgmt_tx()
882 struct cfg80211_acl_data *params) rdev_set_mac_acl()
886 trace_rdev_set_mac_acl(&rdev->wiphy, dev, params); rdev_set_mac_acl()
887 ret = rdev->ops->set_mac_acl(&rdev->wiphy, dev, params); rdev_set_mac_acl()
928 struct cfg80211_csa_settings *params) rdev_channel_switch()
932 trace_rdev_channel_switch(&rdev->wiphy, dev, params); rdev_channel_switch()
933 ret = rdev->ops->channel_switch(&rdev->wiphy, dev, params); rdev_channel_switch()
37 rdev_add_virtual_intf(struct cfg80211_registered_device *rdev, char *name, unsigned char name_assign_type, enum nl80211_iftype type, u32 *flags, struct vif_params *params) rdev_add_virtual_intf() argument
62 rdev_change_virtual_intf(struct cfg80211_registered_device *rdev, struct net_device *dev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) rdev_change_virtual_intf() argument
74 rdev_add_key(struct cfg80211_registered_device *rdev, struct net_device *netdev, u8 key_index, bool pairwise, const u8 *mac_addr, struct key_params *params) rdev_add_key() argument
170 rdev_add_station(struct cfg80211_registered_device *rdev, struct net_device *dev, u8 *mac, struct station_parameters *params) rdev_add_station() argument
181 rdev_del_station(struct cfg80211_registered_device *rdev, struct net_device *dev, struct station_del_parameters *params) rdev_del_station() argument
192 rdev_change_station(struct cfg80211_registered_device *rdev, struct net_device *dev, u8 *mac, struct station_parameters *params) rdev_change_station() argument
373 rdev_change_bss(struct cfg80211_registered_device *rdev, struct net_device *dev, struct bss_parameters *params) rdev_change_bss() argument
385 rdev_set_txq_params(struct cfg80211_registered_device *rdev, struct net_device *dev, struct ieee80211_txq_params *params) rdev_set_txq_params() argument
495 rdev_join_ibss(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_ibss_params *params) rdev_join_ibss() argument
673 rdev_mgmt_tx(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) rdev_mgmt_tx() argument
880 rdev_set_mac_acl(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_acl_data *params) rdev_set_mac_acl() argument
926 rdev_channel_switch(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_csa_settings *params) rdev_channel_switch() argument
H A Dnl80211.c859 result->params[parse.idx].cipher = parse.p.cipher; nla_for_each_nested()
860 result->params[parse.idx].key_len = parse.p.key_len; nla_for_each_nested()
861 result->params[parse.idx].key = result->data[parse.idx]; nla_for_each_nested()
2538 struct vif_params params; nl80211_set_interface() local
2545 memset(&params, 0, sizeof(params)); nl80211_set_interface()
2576 params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]); nl80211_set_interface()
2578 err = nl80211_valid_4addr(rdev, dev, params.use_4addr, ntype); nl80211_set_interface()
2582 params.use_4addr = -1; nl80211_set_interface()
2602 err = cfg80211_change_iface(rdev, dev, ntype, flags, &params); nl80211_set_interface()
2606 if (!err && params.use_4addr != -1) nl80211_set_interface()
2607 dev->ieee80211_ptr->use_4addr = params.use_4addr; nl80211_set_interface()
2615 struct vif_params params; nl80211_new_interface() local
2625 memset(&params, 0, sizeof(params)); nl80211_new_interface()
2643 nla_memcpy(params.macaddr, info->attrs[NL80211_ATTR_MAC], nl80211_new_interface()
2645 if (!is_valid_ether_addr(params.macaddr)) nl80211_new_interface()
2650 params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]); nl80211_new_interface()
2651 err = nl80211_valid_4addr(rdev, NULL, params.use_4addr, type); nl80211_new_interface()
2671 &params); nl80211_new_interface()
2798 static void get_key_callback(void *c, struct key_params *params) get_key_callback() argument
2803 if ((params->key && get_key_callback()
2805 params->key_len, params->key)) || get_key_callback()
2806 (params->seq && get_key_callback()
2808 params->seq_len, params->seq)) || get_key_callback()
2809 (params->cipher && get_key_callback()
2811 params->cipher))) get_key_callback()
2818 if ((params->key && get_key_callback()
2820 params->key_len, params->key)) || get_key_callback()
2821 (params->seq && get_key_callback()
2823 params->seq_len, params->seq)) || get_key_callback()
2824 (params->cipher && get_key_callback()
2826 params->cipher))) get_key_callback()
3239 struct cfg80211_ap_settings *params) nl80211_get_ap_channel()
3252 params->chandef = wdev->preset_chandef; nl80211_get_ap_channel()
3289 struct cfg80211_ap_settings params; nl80211_start_ap() local
3302 memset(&params, 0, sizeof(params)); nl80211_start_ap()
3310 err = nl80211_parse_beacon(info->attrs, &params.beacon); nl80211_start_ap()
3314 params.beacon_interval = nl80211_start_ap()
3316 params.dtim_period = nl80211_start_ap()
3319 err = cfg80211_validate_beacon_int(rdev, params.beacon_interval); nl80211_start_ap()
3331 params.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]); nl80211_start_ap()
3332 params.ssid_len = nl80211_start_ap()
3334 if (params.ssid_len == 0 || nl80211_start_ap()
3335 params.ssid_len > IEEE80211_MAX_SSID_LEN) nl80211_start_ap()
3340 params.hidden_ssid = nla_get_u32( nl80211_start_ap()
3342 if (params.hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE && nl80211_start_ap()
3343 params.hidden_ssid != NL80211_HIDDEN_SSID_ZERO_LEN && nl80211_start_ap()
3344 params.hidden_ssid != NL80211_HIDDEN_SSID_ZERO_CONTENTS) nl80211_start_ap()
3348 params.privacy = !!info->attrs[NL80211_ATTR_PRIVACY]; nl80211_start_ap()
3351 params.auth_type = nla_get_u32( nl80211_start_ap()
3353 if (!nl80211_valid_auth_type(rdev, params.auth_type, nl80211_start_ap()
3357 params.auth_type = NL80211_AUTHTYPE_AUTOMATIC; nl80211_start_ap()
3359 err = nl80211_crypto_settings(rdev, info, &params.crypto, nl80211_start_ap()
3367 params.inactivity_timeout = nla_get_u16( nl80211_start_ap()
3374 params.p2p_ctwindow = nl80211_start_ap()
3376 if (params.p2p_ctwindow > 127) nl80211_start_ap()
3378 if (params.p2p_ctwindow != 0 && nl80211_start_ap()
3391 params.p2p_opp_ps = tmp; nl80211_start_ap()
3392 if (params.p2p_opp_ps != 0 && nl80211_start_ap()
3398 err = nl80211_parse_chandef(rdev, info, &params.chandef); nl80211_start_ap()
3402 params.chandef = wdev->preset_chandef; nl80211_start_ap()
3403 } else if (!nl80211_get_ap_channel(rdev, &params)) nl80211_start_ap()
3406 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef, nl80211_start_ap()
3411 params.smps_mode = nl80211_start_ap()
3413 switch (params.smps_mode) { nl80211_start_ap()
3430 params.smps_mode = NL80211_SMPS_OFF; nl80211_start_ap()
3434 params.acl = parse_acl_data(&rdev->wiphy, info); nl80211_start_ap()
3435 if (IS_ERR(params.acl)) nl80211_start_ap()
3436 return PTR_ERR(params.acl); nl80211_start_ap()
3440 err = rdev_start_ap(rdev, dev, &params); nl80211_start_ap()
3442 wdev->preset_chandef = params.chandef; nl80211_start_ap()
3443 wdev->beacon_interval = params.beacon_interval; nl80211_start_ap()
3444 wdev->chandef = params.chandef; nl80211_start_ap()
3445 wdev->ssid_len = params.ssid_len; nl80211_start_ap()
3446 memcpy(wdev->ssid, params.ssid, wdev->ssid_len); nl80211_start_ap()
3450 kfree(params.acl); nl80211_start_ap()
3460 struct cfg80211_beacon_data params; nl80211_set_beacon() local
3473 err = nl80211_parse_beacon(info->attrs, &params); nl80211_set_beacon()
3478 err = rdev_change_beacon(rdev, dev, &params); nl80211_set_beacon()
3503 struct station_parameters *params) parse_station_flags()
3518 params->sta_flags_mask = sta_flags->mask; parse_station_flags()
3519 params->sta_flags_set = sta_flags->set; parse_station_flags()
3520 params->sta_flags_set &= params->sta_flags_mask; parse_station_flags()
3521 if ((params->sta_flags_mask | parse_station_flags()
3522 params->sta_flags_set) & BIT(__NL80211_STA_FLAG_INVALID)) parse_station_flags()
3547 params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHORIZED) | parse_station_flags()
3554 params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHORIZED) | parse_station_flags()
3558 params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHENTICATED) | parse_station_flags()
3567 params->sta_flags_set |= (1<<flag); parse_station_flags()
3943 struct station_parameters *params, cfg80211_check_station_change()
3946 if (params->listen_interval != -1) cfg80211_check_station_change()
3948 if (params->aid && cfg80211_check_station_change()
3949 !(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) cfg80211_check_station_change()
3963 if (params->sta_flags_mask & cfg80211_check_station_change()
3971 if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) cfg80211_check_station_change()
3974 params->sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER); cfg80211_check_station_change()
3978 if (params->plink_action != NL80211_PLINK_ACTION_NO_ACTION) cfg80211_check_station_change()
3980 if (params->local_pm) cfg80211_check_station_change()
3982 if (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE) cfg80211_check_station_change()
3989 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) cfg80211_check_station_change()
3996 params->sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER); cfg80211_check_station_change()
4001 if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) cfg80211_check_station_change()
4003 if (params->sta_modify_mask & STATION_PARAM_APPLY_CAPABILITY) cfg80211_check_station_change()
4005 if (params->supported_rates) cfg80211_check_station_change()
4007 if (params->ext_capab || params->ht_capa || params->vht_capa) cfg80211_check_station_change()
4012 if (params->vlan) cfg80211_check_station_change()
4019 if (!(params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED))) cfg80211_check_station_change()
4024 if (params->sta_flags_mask & cfg80211_check_station_change()
4035 params->sta_flags_mask & cfg80211_check_station_change()
4043 if (params->sta_flags_mask & ~BIT(NL80211_STA_FLAG_AUTHORIZED)) cfg80211_check_station_change()
4048 if (params->sta_flags_mask & ~(BIT(NL80211_STA_FLAG_AUTHORIZED) | cfg80211_check_station_change()
4052 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED) && cfg80211_check_station_change()
4053 !params->supported_rates) cfg80211_check_station_change()
4060 if (params->sta_modify_mask & STATION_PARAM_APPLY_PLINK_STATE) cfg80211_check_station_change()
4064 if (params->plink_action != NL80211_PLINK_ACTION_NO_ACTION) cfg80211_check_station_change()
4120 struct station_parameters *params) nl80211_parse_sta_wme()
4137 params->uapsd_queues = nla_get_u8( nl80211_parse_sta_wme()
4139 if (params->uapsd_queues & ~IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK) nl80211_parse_sta_wme()
4143 params->max_sp = nla_get_u8(tb[NL80211_STA_WME_MAX_SP]); nl80211_parse_sta_wme()
4145 if (params->max_sp & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) nl80211_parse_sta_wme()
4148 params->sta_modify_mask |= STATION_PARAM_APPLY_UAPSD; nl80211_parse_sta_wme()
4154 struct station_parameters *params) nl80211_parse_sta_channel_info()
4157 params->supported_channels = nl80211_parse_sta_channel_info()
4159 params->supported_channels_len = nl80211_parse_sta_channel_info()
4166 if (params->supported_channels_len < 2) nl80211_parse_sta_channel_info()
4168 if (params->supported_channels_len % 2) nl80211_parse_sta_channel_info()
4173 params->supported_oper_classes = nl80211_parse_sta_channel_info()
4175 params->supported_oper_classes_len = nl80211_parse_sta_channel_info()
4181 if (params->supported_oper_classes_len < 2 || nl80211_parse_sta_channel_info()
4182 params->supported_oper_classes_len > 253) nl80211_parse_sta_channel_info()
4189 struct station_parameters *params) nl80211_set_station_tdls()
4194 params->aid = nla_get_u16(info->attrs[NL80211_ATTR_PEER_AID]); nl80211_set_station_tdls()
4196 params->ht_capa = nl80211_set_station_tdls()
4199 params->vht_capa = nl80211_set_station_tdls()
4202 err = nl80211_parse_sta_channel_info(info, params); nl80211_set_station_tdls()
4206 return nl80211_parse_sta_wme(info, params); nl80211_set_station_tdls()
4213 struct station_parameters params; nl80211_set_station() local
4217 memset(&params, 0, sizeof(params)); nl80211_set_station()
4219 params.listen_interval = -1; nl80211_set_station()
4233 params.supported_rates = nl80211_set_station()
4235 params.supported_rates_len = nl80211_set_station()
4240 params.capability = nl80211_set_station()
4242 params.sta_modify_mask |= STATION_PARAM_APPLY_CAPABILITY; nl80211_set_station()
4246 params.ext_capab = nl80211_set_station()
4248 params.ext_capab_len = nl80211_set_station()
4255 if (parse_station_flags(info, dev->ieee80211_ptr->iftype, &params)) nl80211_set_station()
4259 params.plink_action = nl80211_set_station()
4261 if (params.plink_action >= NUM_NL80211_PLINK_ACTIONS) nl80211_set_station()
4266 params.plink_state = nl80211_set_station()
4268 if (params.plink_state >= NUM_NL80211_PLINK_STATES) nl80211_set_station()
4270 params.sta_modify_mask |= STATION_PARAM_APPLY_PLINK_STATE; nl80211_set_station()
4281 params.local_pm = pm; nl80211_set_station()
4285 err = nl80211_set_station_tdls(info, &params); nl80211_set_station()
4289 params.vlan = get_vlan(info, rdev); nl80211_set_station()
4290 if (IS_ERR(params.vlan)) nl80211_set_station()
4291 return PTR_ERR(params.vlan); nl80211_set_station()
4308 err = rdev_change_station(rdev, dev, mac_addr, &params); nl80211_set_station()
4311 if (params.vlan) nl80211_set_station()
4312 dev_put(params.vlan); nl80211_set_station()
4322 struct station_parameters params; nl80211_new_station() local
4325 memset(&params, 0, sizeof(params)); nl80211_new_station()
4344 params.supported_rates = nl80211_new_station()
4346 params.supported_rates_len = nl80211_new_station()
4348 params.listen_interval = nl80211_new_station()
4352 params.aid = nla_get_u16(info->attrs[NL80211_ATTR_PEER_AID]); nl80211_new_station()
4354 params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); nl80211_new_station()
4355 if (!params.aid || params.aid > IEEE80211_MAX_AID) nl80211_new_station()
4359 params.capability = nl80211_new_station()
4361 params.sta_modify_mask |= STATION_PARAM_APPLY_CAPABILITY; nl80211_new_station()
4365 params.ext_capab = nl80211_new_station()
4367 params.ext_capab_len = nl80211_new_station()
4372 params.ht_capa = nl80211_new_station()
4376 params.vht_capa = nl80211_new_station()
4380 params.opmode_notif_used = true; nl80211_new_station()
4381 params.opmode_notif = nl80211_new_station()
4386 params.plink_action = nl80211_new_station()
4388 if (params.plink_action >= NUM_NL80211_PLINK_ACTIONS) nl80211_new_station()
4392 err = nl80211_parse_sta_channel_info(info, &params); nl80211_new_station()
4396 err = nl80211_parse_sta_wme(info, &params); nl80211_new_station()
4400 if (parse_station_flags(info, dev->ieee80211_ptr->iftype, &params)) nl80211_new_station()
4408 if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) { nl80211_new_station()
4409 params.ht_capa = NULL; nl80211_new_station()
4410 params.vht_capa = NULL; nl80211_new_station()
4422 !(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) nl80211_new_station()
4423 params.sta_modify_mask &= ~STATION_PARAM_APPLY_UAPSD; nl80211_new_station()
4426 if ((params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) || nl80211_new_station()
4430 params.sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER); nl80211_new_station()
4435 params.sta_flags_mask & nl80211_new_station()
4441 params.vlan = get_vlan(info, rdev); nl80211_new_station()
4442 if (IS_ERR(params.vlan)) nl80211_new_station()
4443 return PTR_ERR(params.vlan); nl80211_new_station()
4447 params.sta_modify_mask &= ~STATION_PARAM_APPLY_UAPSD; nl80211_new_station()
4450 if (params.sta_flags_mask & BIT(NL80211_STA_FLAG_ASSOCIATED)) nl80211_new_station()
4453 if ((params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) || nl80211_new_station()
4460 params.sta_modify_mask &= ~STATION_PARAM_APPLY_UAPSD; nl80211_new_station()
4463 if (params.sta_flags_mask & nl80211_new_station()
4468 if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) nl80211_new_station()
4480 params.sta_flags_mask &= ~BIT(NL80211_STA_FLAG_AUTHORIZED); nl80211_new_station()
4486 /* be aware of params.vlan when changing code here */ nl80211_new_station()
4488 err = rdev_add_station(rdev, dev, mac_addr, &params); nl80211_new_station()
4490 if (params.vlan) nl80211_new_station()
4491 dev_put(params.vlan); nl80211_new_station()
4499 struct station_del_parameters params; nl80211_del_station() local
4501 memset(&params, 0, sizeof(params)); nl80211_del_station()
4504 params.mac = nla_data(info->attrs[NL80211_ATTR_MAC]); nl80211_del_station()
4516 params.subtype = nl80211_del_station()
4518 if (params.subtype != IEEE80211_STYPE_DISASSOC >> 4 && nl80211_del_station()
4519 params.subtype != IEEE80211_STYPE_DEAUTH >> 4) nl80211_del_station()
4523 params.subtype = IEEE80211_STYPE_DEAUTH >> 4; nl80211_del_station()
4527 params.reason_code = nl80211_del_station()
4529 if (params.reason_code == 0) nl80211_del_station()
4533 params.reason_code = WLAN_REASON_PREV_AUTH_NOT_VALID; nl80211_del_station()
4536 return rdev_del_station(rdev, dev, &params); nl80211_del_station()
4844 struct bss_parameters params; nl80211_set_bss() local
4847 memset(&params, 0, sizeof(params)); nl80211_set_bss()
4849 params.use_cts_prot = -1; nl80211_set_bss()
4850 params.use_short_preamble = -1; nl80211_set_bss()
4851 params.use_short_slot_time = -1; nl80211_set_bss()
4852 params.ap_isolate = -1; nl80211_set_bss()
4853 params.ht_opmode = -1; nl80211_set_bss()
4854 params.p2p_ctwindow = -1; nl80211_set_bss()
4855 params.p2p_opp_ps = -1; nl80211_set_bss()
4858 params.use_cts_prot = nl80211_set_bss()
4861 params.use_short_preamble = nl80211_set_bss()
4864 params.use_short_slot_time = nl80211_set_bss()
4867 params.basic_rates = nl80211_set_bss()
4869 params.basic_rates_len = nl80211_set_bss()
4873 params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]); nl80211_set_bss()
4875 params.ht_opmode = nl80211_set_bss()
4881 params.p2p_ctwindow = nl80211_set_bss()
4883 if (params.p2p_ctwindow < 0) nl80211_set_bss()
4885 if (params.p2p_ctwindow != 0 && nl80211_set_bss()
4898 params.p2p_opp_ps = tmp; nl80211_set_bss()
4899 if (params.p2p_opp_ps && nl80211_set_bss()
4912 err = rdev_change_bss(rdev, dev, &params); nl80211_set_bss()
5196 /* Fill in the params struct */ nl80211_parse_mesh_config()
6364 struct cfg80211_csa_settings params; nl80211_channel_switch() local
6399 memset(&params, 0, sizeof(params)); nl80211_channel_switch()
6416 params.count = cs_count; nl80211_channel_switch()
6421 err = nl80211_parse_beacon(info->attrs, &params.beacon_after); nl80211_channel_switch()
6431 err = nl80211_parse_beacon(csa_attrs, &params.beacon_csa); nl80211_channel_switch()
6442 params.n_counter_offsets_beacon = len / sizeof(u16); nl80211_channel_switch()
6444 (params.n_counter_offsets_beacon > nl80211_channel_switch()
6448 params.counter_offsets_beacon = nl80211_channel_switch()
6452 for (i = 0; i < params.n_counter_offsets_beacon; i++) { nl80211_channel_switch()
6453 u16 offset = params.counter_offsets_beacon[i]; nl80211_channel_switch()
6455 if (offset >= params.beacon_csa.tail_len) nl80211_channel_switch()
6458 if (params.beacon_csa.tail[offset] != params.count) nl80211_channel_switch()
6467 params.n_counter_offsets_presp = len / sizeof(u16); nl80211_channel_switch()
6469 (params.n_counter_offsets_beacon > nl80211_channel_switch()
6473 params.counter_offsets_presp = nl80211_channel_switch()
6477 for (i = 0; i < params.n_counter_offsets_presp; i++) { nl80211_channel_switch()
6478 u16 offset = params.counter_offsets_presp[i]; nl80211_channel_switch()
6480 if (offset >= params.beacon_csa.probe_resp_len) nl80211_channel_switch()
6483 if (params.beacon_csa.probe_resp[offset] != nl80211_channel_switch()
6484 params.count) nl80211_channel_switch()
6490 err = nl80211_parse_chandef(rdev, info, &params.chandef); nl80211_channel_switch()
6494 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef, nl80211_channel_switch()
6499 &params.chandef, nl80211_channel_switch()
6505 params.radar_required = true; nl80211_channel_switch()
6508 params.block_tx = true; nl80211_channel_switch()
6511 err = rdev_channel_switch(rdev, dev, &params); nl80211_channel_switch()
8320 struct cfg80211_mgmt_tx_params params = { nl80211_tx_mgmt() local
8350 params.wait = nla_get_u32(info->attrs[NL80211_ATTR_DURATION]); nl80211_tx_mgmt()
8356 if (params.wait < NL80211_MIN_REMAIN_ON_CHANNEL_TIME || nl80211_tx_mgmt()
8357 params.wait > rdev->wiphy.max_remain_on_channel_duration) nl80211_tx_mgmt()
8362 params.offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK]; nl80211_tx_mgmt()
8364 if (params.offchan && !(rdev->wiphy.flags & WIPHY_FLAG_OFFCHAN_TX)) nl80211_tx_mgmt()
8367 params.no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]); nl80211_tx_mgmt()
8379 if (!chandef.chan && params.offchan) nl80211_tx_mgmt()
8382 params.buf = nla_data(info->attrs[NL80211_ATTR_FRAME]); nl80211_tx_mgmt()
8383 params.len = nla_len(info->attrs[NL80211_ATTR_FRAME]); nl80211_tx_mgmt()
8392 params.n_csa_offsets = len / sizeof(u16); nl80211_tx_mgmt()
8393 params.csa_offsets = nl80211_tx_mgmt()
8397 for (i = 0; i < params.n_csa_offsets; i++) { nl80211_tx_mgmt()
8398 if (params.csa_offsets[i] >= params.len) nl80211_tx_mgmt()
8403 if (!params.dont_wait_for_ack) { nl80211_tx_mgmt()
8416 params.chan = chandef.chan; nl80211_tx_mgmt()
8417 err = cfg80211_mlme_mgmt_tx(rdev, wdev, &params, &cookie); nl80211_tx_mgmt()
3238 nl80211_get_ap_channel(struct cfg80211_registered_device *rdev, struct cfg80211_ap_settings *params) nl80211_get_ap_channel() argument
3501 parse_station_flags(struct genl_info *info, enum nl80211_iftype iftype, struct station_parameters *params) parse_station_flags() argument
3942 cfg80211_check_station_change(struct wiphy *wiphy, struct station_parameters *params, enum cfg80211_station_type statype) cfg80211_check_station_change() argument
4119 nl80211_parse_sta_wme(struct genl_info *info, struct station_parameters *params) nl80211_parse_sta_wme() argument
4153 nl80211_parse_sta_channel_info(struct genl_info *info, struct station_parameters *params) nl80211_parse_sta_channel_info() argument
4188 nl80211_set_station_tdls(struct genl_info *info, struct station_parameters *params) nl80211_set_station_tdls() argument
/linux-4.1.27/arch/nios2/kernel/
H A Dprom.c51 void __init early_init_devtree(void *params) early_init_devtree() argument
57 params = (void *)CONFIG_NIOS2_DTB_PHYS_ADDR; early_init_devtree()
58 early_init_dt_scan(params); early_init_devtree()
63 params = (void *)__dtb_start; early_init_devtree()
65 early_init_dt_scan(params); early_init_devtree()
/linux-4.1.27/drivers/clk/pistachio/
H A Dclk-pll.c150 struct pistachio_pll_rate_table *params; pll_gf40lp_frac_set_rate() local
154 params = pll_get_params(pll, parent_rate, rate); pll_gf40lp_frac_set_rate()
155 if (!params) pll_gf40lp_frac_set_rate()
165 val |= (params->refdiv << PLL_CTRL1_REFDIV_SHIFT) | pll_gf40lp_frac_set_rate()
166 (params->fbdiv << PLL_CTRL1_FBDIV_SHIFT); pll_gf40lp_frac_set_rate()
175 val |= (params->frac << PLL_FRAC_CTRL2_FRAC_SHIFT) | pll_gf40lp_frac_set_rate()
176 (params->postdiv1 << PLL_FRAC_CTRL2_POSTDIV1_SHIFT) | pll_gf40lp_frac_set_rate()
177 (params->postdiv2 << PLL_FRAC_CTRL2_POSTDIV2_SHIFT); pll_gf40lp_frac_set_rate()
267 struct pistachio_pll_rate_table *params; pll_gf40lp_laint_set_rate() local
271 params = pll_get_params(pll, parent_rate, rate); pll_gf40lp_laint_set_rate()
272 if (!params) pll_gf40lp_laint_set_rate()
284 val |= (params->refdiv << PLL_CTRL1_REFDIV_SHIFT) | pll_gf40lp_laint_set_rate()
285 (params->fbdiv << PLL_CTRL1_FBDIV_SHIFT) | pll_gf40lp_laint_set_rate()
286 (params->postdiv1 << PLL_INT_CTRL1_POSTDIV1_SHIFT) | pll_gf40lp_laint_set_rate()
287 (params->postdiv2 << PLL_INT_CTRL1_POSTDIV2_SHIFT); pll_gf40lp_laint_set_rate()
/linux-4.1.27/drivers/gpu/drm/radeon/
H A Dradeon_atpx_handler.c70 * @params: ATPX function params
76 struct acpi_buffer *params) radeon_atpx_call()
89 if (params) { radeon_atpx_call()
91 atpx_arg_elements[1].buffer.length = params->length; radeon_atpx_call()
92 atpx_arg_elements[1].buffer.pointer = params->pointer; radeon_atpx_call()
243 struct acpi_buffer params; radeon_atpx_set_discrete_state() local
250 params.length = input.size; radeon_atpx_set_discrete_state()
251 params.pointer = &input; radeon_atpx_set_discrete_state()
254 &params); radeon_atpx_set_discrete_state()
275 struct acpi_buffer params; radeon_atpx_switch_disp_mux() local
282 params.length = input.size; radeon_atpx_switch_disp_mux()
283 params.pointer = &input; radeon_atpx_switch_disp_mux()
286 &params); radeon_atpx_switch_disp_mux()
307 struct acpi_buffer params; radeon_atpx_switch_i2c_mux() local
314 params.length = input.size; radeon_atpx_switch_i2c_mux()
315 params.pointer = &input; radeon_atpx_switch_i2c_mux()
318 &params); radeon_atpx_switch_i2c_mux()
339 struct acpi_buffer params; radeon_atpx_switch_start() local
346 params.length = input.size; radeon_atpx_switch_start()
347 params.pointer = &input; radeon_atpx_switch_start()
350 &params); radeon_atpx_switch_start()
371 struct acpi_buffer params; radeon_atpx_switch_end() local
378 params.length = input.size; radeon_atpx_switch_end()
379 params.pointer = &input; radeon_atpx_switch_end()
382 &params); radeon_atpx_switch_end()
75 radeon_atpx_call(acpi_handle handle, int function, struct acpi_buffer *params) radeon_atpx_call() argument
H A Dradeon_acpi.c100 * @params: ATIF function params
106 struct acpi_buffer *params) radeon_atif_call()
119 if (params) { radeon_atif_call()
121 atif_arg_elements[1].buffer.length = params->length; radeon_atif_call()
122 atif_arg_elements[1].buffer.pointer = params->pointer; radeon_atif_call()
251 struct atif_system_params params; radeon_atif_get_notification_params() local
267 memset(&params, 0, sizeof(params)); radeon_atif_get_notification_params()
268 size = min(sizeof(params), size); radeon_atif_get_notification_params()
269 memcpy(&params, info->buffer.pointer, size); radeon_atif_get_notification_params()
272 params.flags, params.valid_mask); radeon_atif_get_notification_params()
273 params.flags = params.flags & params.valid_mask; radeon_atif_get_notification_params()
275 if ((params.flags & ATIF_NOTIFY_MASK) == ATIF_NOTIFY_NONE) { radeon_atif_get_notification_params()
278 } else if ((params.flags & ATIF_NOTIFY_MASK) == ATIF_NOTIFY_81) { radeon_atif_get_notification_params()
287 n->command_code = params.command_code; radeon_atif_get_notification_params()
415 * @params: ATCS function params
421 struct acpi_buffer *params) radeon_atcs_call()
434 if (params) { radeon_atcs_call()
436 atcs_arg_elements[1].buffer.length = params->length; radeon_atcs_call()
437 atcs_arg_elements[1].buffer.pointer = params->pointer; radeon_atcs_call()
590 struct acpi_buffer params; radeon_acpi_pcie_performance_request() local
612 params.length = sizeof(struct atcs_pref_req_input); radeon_acpi_pcie_performance_request()
613 params.pointer = &atcs_input; radeon_acpi_pcie_performance_request()
616 info = radeon_atcs_call(handle, ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST, &params); radeon_acpi_pcie_performance_request()
757 * params radeon_acpi_init()
105 radeon_atif_call(acpi_handle handle, int function, struct acpi_buffer *params) radeon_atif_call() argument
420 radeon_atcs_call(acpi_handle handle, int function, struct acpi_buffer *params) radeon_atcs_call() argument
/linux-4.1.27/include/net/
H A Dcodel.h171 static void codel_params_init(struct codel_params *params, codel_params_init() argument
174 params->interval = MS2TIME(100); codel_params_init()
175 params->target = MS2TIME(5); codel_params_init()
176 params->mtu = psched_mtu(qdisc_dev(sch)); codel_params_init()
177 params->ecn = false; codel_params_init()
223 struct codel_params *params, codel_should_drop()
240 if (codel_time_before(vars->ldelay, params->target) || codel_should_drop()
241 sch->qstats.backlog <= params->mtu) { codel_should_drop()
251 vars->first_above_time = now + params->interval; codel_should_drop()
262 struct codel_params *params, codel_dequeue()
276 drop = codel_should_drop(skb, sch, vars, params, stats, now); codel_dequeue()
296 if (params->ecn && INET_ECN_set_ce(skb)) { codel_dequeue()
300 params->interval, codel_dequeue()
308 vars, params, stats, now)) { codel_dequeue()
315 params->interval, codel_dequeue()
323 if (params->ecn && INET_ECN_set_ce(skb)) { codel_dequeue()
330 drop = codel_should_drop(skb, sch, vars, params, codel_dequeue()
341 16 * params->interval)) { codel_dequeue()
353 vars->drop_next = codel_control_law(now, params->interval, codel_dequeue()
220 codel_should_drop(const struct sk_buff *skb, struct Qdisc *sch, struct codel_vars *vars, struct codel_params *params, struct codel_stats *stats, codel_time_t now) codel_should_drop() argument
261 codel_dequeue(struct Qdisc *sch, struct codel_params *params, struct codel_vars *vars, struct codel_stats *stats, codel_skb_dequeue_t dequeue_func) codel_dequeue() argument
/linux-4.1.27/arch/arm/kvm/
H A Dcoproc.c408 static const struct coproc_reg *find_reg(const struct coproc_params *params, find_reg() argument
417 if (params->is_64bit != r->is_64) find_reg()
419 if (params->CRn != r->CRn) find_reg()
421 if (params->CRm != r->CRm) find_reg()
423 if (params->Op1 != r->Op1) find_reg()
425 if (params->Op2 != r->Op2) find_reg()
434 const struct coproc_params *params) emulate_cp15()
439 trace_kvm_emulate_cp15_imp(params->Op1, params->Rt1, params->CRn, emulate_cp15()
440 params->CRm, params->Op2, params->is_write); emulate_cp15()
445 r = find_reg(params, table, num); emulate_cp15()
447 r = find_reg(params, cp15_regs, ARRAY_SIZE(cp15_regs)); emulate_cp15()
453 if (likely(r->access(vcpu, params, r))) { emulate_cp15()
462 print_cp_instr(params); emulate_cp15()
475 struct coproc_params params; kvm_handle_cp15_64() local
477 params.CRn = (kvm_vcpu_get_hsr(vcpu) >> 1) & 0xf; kvm_handle_cp15_64()
478 params.Rt1 = (kvm_vcpu_get_hsr(vcpu) >> 5) & 0xf; kvm_handle_cp15_64()
479 params.is_write = ((kvm_vcpu_get_hsr(vcpu) & 1) == 0); kvm_handle_cp15_64()
480 params.is_64bit = true; kvm_handle_cp15_64()
482 params.Op1 = (kvm_vcpu_get_hsr(vcpu) >> 16) & 0xf; kvm_handle_cp15_64()
483 params.Op2 = 0; kvm_handle_cp15_64()
484 params.Rt2 = (kvm_vcpu_get_hsr(vcpu) >> 10) & 0xf; kvm_handle_cp15_64()
485 params.CRm = 0; kvm_handle_cp15_64()
487 return emulate_cp15(vcpu, &params); kvm_handle_cp15_64()
507 struct coproc_params params; kvm_handle_cp15_32() local
509 params.CRm = (kvm_vcpu_get_hsr(vcpu) >> 1) & 0xf; kvm_handle_cp15_32()
510 params.Rt1 = (kvm_vcpu_get_hsr(vcpu) >> 5) & 0xf; kvm_handle_cp15_32()
511 params.is_write = ((kvm_vcpu_get_hsr(vcpu) & 1) == 0); kvm_handle_cp15_32()
512 params.is_64bit = false; kvm_handle_cp15_32()
514 params.CRn = (kvm_vcpu_get_hsr(vcpu) >> 10) & 0xf; kvm_handle_cp15_32()
515 params.Op1 = (kvm_vcpu_get_hsr(vcpu) >> 14) & 0x7; kvm_handle_cp15_32()
516 params.Op2 = (kvm_vcpu_get_hsr(vcpu) >> 17) & 0x7; kvm_handle_cp15_32()
517 params.Rt2 = 0; kvm_handle_cp15_32()
519 return emulate_cp15(vcpu, &params); kvm_handle_cp15_32()
526 static bool index_to_params(u64 id, struct coproc_params *params) index_to_params() argument
539 params->is_64bit = false; index_to_params()
540 params->CRn = ((id & KVM_REG_ARM_32_CRN_MASK) index_to_params()
542 params->CRm = ((id & KVM_REG_ARM_CRM_MASK) index_to_params()
544 params->Op1 = ((id & KVM_REG_ARM_OPC1_MASK) index_to_params()
546 params->Op2 = ((id & KVM_REG_ARM_32_OPC2_MASK) index_to_params()
556 params->is_64bit = true; index_to_params()
558 params->CRn = ((id & KVM_REG_ARM_CRM_MASK) index_to_params()
560 params->Op1 = ((id & KVM_REG_ARM_OPC1_MASK) index_to_params()
562 params->Op2 = 0; index_to_params()
563 params->CRm = 0; index_to_params()
576 struct coproc_params params; index_to_coproc_reg() local
582 if (!index_to_params(id, &params)) index_to_coproc_reg()
586 r = find_reg(&params, table, num); index_to_coproc_reg()
588 r = find_reg(&params, cp15_regs, ARRAY_SIZE(cp15_regs)); index_to_coproc_reg()
692 struct coproc_params params; get_invariant_cp15() local
696 if (!index_to_params(id, &params)) get_invariant_cp15()
699 r = find_reg(&params, invariant_cp15, ARRAY_SIZE(invariant_cp15)); get_invariant_cp15()
716 struct coproc_params params; set_invariant_cp15() local
721 if (!index_to_params(id, &params)) set_invariant_cp15()
723 r = find_reg(&params, invariant_cp15, ARRAY_SIZE(invariant_cp15)); set_invariant_cp15()
433 emulate_cp15(struct kvm_vcpu *vcpu, const struct coproc_params *params) emulate_cp15() argument
/linux-4.1.27/arch/arm64/kvm/
H A Dsys_regs.c720 static const struct sys_reg_desc *find_reg(const struct sys_reg_params *params, find_reg() argument
729 if (params->Op0 != r->Op0) find_reg()
731 if (params->Op1 != r->Op1) find_reg()
733 if (params->CRn != r->CRn) find_reg()
735 if (params->CRm != r->CRm) find_reg()
737 if (params->Op2 != r->Op2) find_reg()
755 * @params: pointer to the descriptor of the access
762 const struct sys_reg_params *params, emulate_cp()
771 r = find_reg(params, table, num); emulate_cp()
782 if (likely(r->access(vcpu, params, r))) { emulate_cp()
796 struct sys_reg_params *params) unhandled_cp_access()
816 print_sys_reg_instr(params); unhandled_cp_access()
831 struct sys_reg_params params; kvm_handle_cp_64() local
835 params.is_aarch32 = true; kvm_handle_cp_64()
836 params.is_32bit = false; kvm_handle_cp_64()
837 params.CRm = (hsr >> 1) & 0xf; kvm_handle_cp_64()
838 params.Rt = (hsr >> 5) & 0xf; kvm_handle_cp_64()
839 params.is_write = ((hsr & 1) == 0); kvm_handle_cp_64()
841 params.Op0 = 0; kvm_handle_cp_64()
842 params.Op1 = (hsr >> 16) & 0xf; kvm_handle_cp_64()
843 params.Op2 = 0; kvm_handle_cp_64()
844 params.CRn = 0; kvm_handle_cp_64()
851 if (params.is_write) { kvm_handle_cp_64()
852 u64 val = *vcpu_reg(vcpu, params.Rt); kvm_handle_cp_64()
855 *vcpu_reg(vcpu, params.Rt) = val; kvm_handle_cp_64()
858 if (!emulate_cp(vcpu, &params, target_specific, nr_specific)) kvm_handle_cp_64()
860 if (!emulate_cp(vcpu, &params, global, nr_global)) kvm_handle_cp_64()
863 unhandled_cp_access(vcpu, &params); kvm_handle_cp_64()
867 if (!params.is_write) { kvm_handle_cp_64()
868 u64 val = *vcpu_reg(vcpu, params.Rt); kvm_handle_cp_64()
887 struct sys_reg_params params; kvm_handle_cp_32() local
890 params.is_aarch32 = true; kvm_handle_cp_32()
891 params.is_32bit = true; kvm_handle_cp_32()
892 params.CRm = (hsr >> 1) & 0xf; kvm_handle_cp_32()
893 params.Rt = (hsr >> 5) & 0xf; kvm_handle_cp_32()
894 params.is_write = ((hsr & 1) == 0); kvm_handle_cp_32()
895 params.CRn = (hsr >> 10) & 0xf; kvm_handle_cp_32()
896 params.Op0 = 0; kvm_handle_cp_32()
897 params.Op1 = (hsr >> 14) & 0x7; kvm_handle_cp_32()
898 params.Op2 = (hsr >> 17) & 0x7; kvm_handle_cp_32()
900 if (!emulate_cp(vcpu, &params, target_specific, nr_specific)) kvm_handle_cp_32()
902 if (!emulate_cp(vcpu, &params, global, nr_global)) kvm_handle_cp_32()
905 unhandled_cp_access(vcpu, &params); kvm_handle_cp_32()
946 const struct sys_reg_params *params) emulate_sys_reg()
954 r = find_reg(params, table, num); emulate_sys_reg()
956 r = find_reg(params, sys_reg_descs, ARRAY_SIZE(sys_reg_descs)); emulate_sys_reg()
967 if (likely(r->access(vcpu, params, r))) { emulate_sys_reg()
976 print_sys_reg_instr(params); emulate_sys_reg()
999 struct sys_reg_params params; kvm_handle_sys_reg() local
1002 params.is_aarch32 = false; kvm_handle_sys_reg()
1003 params.is_32bit = false; kvm_handle_sys_reg()
1004 params.Op0 = (esr >> 20) & 3; kvm_handle_sys_reg()
1005 params.Op1 = (esr >> 14) & 0x7; kvm_handle_sys_reg()
1006 params.CRn = (esr >> 10) & 0xf; kvm_handle_sys_reg()
1007 params.CRm = (esr >> 1) & 0xf; kvm_handle_sys_reg()
1008 params.Op2 = (esr >> 17) & 0x7; kvm_handle_sys_reg()
1009 params.Rt = (esr >> 5) & 0x1f; kvm_handle_sys_reg()
1010 params.is_write = !(esr & 1); kvm_handle_sys_reg()
1012 return emulate_sys_reg(vcpu, &params); kvm_handle_sys_reg()
1019 static bool index_to_params(u64 id, struct sys_reg_params *params) index_to_params() argument
1032 params->Op0 = ((id & KVM_REG_ARM64_SYSREG_OP0_MASK) index_to_params()
1034 params->Op1 = ((id & KVM_REG_ARM64_SYSREG_OP1_MASK) index_to_params()
1036 params->CRn = ((id & KVM_REG_ARM64_SYSREG_CRN_MASK) index_to_params()
1038 params->CRm = ((id & KVM_REG_ARM64_SYSREG_CRM_MASK) index_to_params()
1040 params->Op2 = ((id & KVM_REG_ARM64_SYSREG_OP2_MASK) index_to_params()
1054 struct sys_reg_params params; index_to_sys_reg_desc() local
1060 if (!index_to_params(id, &params)) index_to_sys_reg_desc()
1064 r = find_reg(&params, table, num); index_to_sys_reg_desc()
1066 r = find_reg(&params, sys_reg_descs, ARRAY_SIZE(sys_reg_descs)); index_to_sys_reg_desc()
1172 struct sys_reg_params params; get_invariant_sys_reg() local
1175 if (!index_to_params(id, &params)) get_invariant_sys_reg()
1178 r = find_reg(&params, invariant_sys_regs, ARRAY_SIZE(invariant_sys_regs)); get_invariant_sys_reg()
1187 struct sys_reg_params params; set_invariant_sys_reg() local
1192 if (!index_to_params(id, &params)) set_invariant_sys_reg()
1194 r = find_reg(&params, invariant_sys_regs, ARRAY_SIZE(invariant_sys_regs)); set_invariant_sys_reg()
761 emulate_cp(struct kvm_vcpu *vcpu, const struct sys_reg_params *params, const struct sys_reg_desc *table, size_t num) emulate_cp() argument
795 unhandled_cp_access(struct kvm_vcpu *vcpu, struct sys_reg_params *params) unhandled_cp_access() argument
945 emulate_sys_reg(struct kvm_vcpu *vcpu, const struct sys_reg_params *params) emulate_sys_reg() argument
/linux-4.1.27/arch/powerpc/kvm/
H A De500_mmu.c725 struct kvm_book3e_206_tlb_params *params) vcpu_mmu_geometry_update()
728 if (params->tlb_sizes[0] <= 2048) vcpu_mmu_geometry_update()
729 vcpu->arch.tlbcfg[0] |= params->tlb_sizes[0]; vcpu_mmu_geometry_update()
730 vcpu->arch.tlbcfg[0] |= params->tlb_ways[0] << TLBnCFG_ASSOC_SHIFT; vcpu_mmu_geometry_update()
733 vcpu->arch.tlbcfg[1] |= params->tlb_sizes[1]; vcpu_mmu_geometry_update()
734 vcpu->arch.tlbcfg[1] |= params->tlb_ways[1] << TLBnCFG_ASSOC_SHIFT; vcpu_mmu_geometry_update()
742 struct kvm_book3e_206_tlb_params params; kvm_vcpu_ioctl_config_tlb() local
754 if (copy_from_user(&params, (void __user *)(uintptr_t)cfg->params, kvm_vcpu_ioctl_config_tlb()
755 sizeof(params))) kvm_vcpu_ioctl_config_tlb()
758 if (params.tlb_sizes[1] > 64) kvm_vcpu_ioctl_config_tlb()
760 if (params.tlb_ways[1] != params.tlb_sizes[1]) kvm_vcpu_ioctl_config_tlb()
762 if (params.tlb_sizes[2] != 0 || params.tlb_sizes[3] != 0) kvm_vcpu_ioctl_config_tlb()
764 if (params.tlb_ways[2] != 0 || params.tlb_ways[3] != 0) kvm_vcpu_ioctl_config_tlb()
767 if (!is_power_of_2(params.tlb_ways[0])) kvm_vcpu_ioctl_config_tlb()
770 sets = params.tlb_sizes[0] >> ilog2(params.tlb_ways[0]); kvm_vcpu_ioctl_config_tlb()
774 array_len = params.tlb_sizes[0] + params.tlb_sizes[1]; kvm_vcpu_ioctl_config_tlb()
802 privs[0] = kzalloc(sizeof(struct tlbe_priv) * params.tlb_sizes[0], kvm_vcpu_ioctl_config_tlb()
804 privs[1] = kzalloc(sizeof(struct tlbe_priv) * params.tlb_sizes[1], kvm_vcpu_ioctl_config_tlb()
812 g2h_bitmap = kzalloc(sizeof(u64) * params.tlb_sizes[1], kvm_vcpu_ioctl_config_tlb()
828 vcpu_e500->gtlb_params[0].entries = params.tlb_sizes[0]; kvm_vcpu_ioctl_config_tlb()
829 vcpu_e500->gtlb_params[1].entries = params.tlb_sizes[1]; kvm_vcpu_ioctl_config_tlb()
832 vcpu_e500->gtlb_offset[1] = params.tlb_sizes[0]; kvm_vcpu_ioctl_config_tlb()
835 vcpu_mmu_geometry_update(vcpu, &params); kvm_vcpu_ioctl_config_tlb()
840 vcpu_e500->gtlb_params[0].ways = params.tlb_ways[0]; kvm_vcpu_ioctl_config_tlb()
843 vcpu_e500->gtlb_params[1].ways = params.tlb_sizes[1]; kvm_vcpu_ioctl_config_tlb()
873 struct kvmppc_e500_tlb_params *params) vcpu_mmu_init()
881 vcpu->arch.tlbcfg[0] |= params[0].entries; vcpu_mmu_init()
882 vcpu->arch.tlbcfg[0] |= params[0].ways << TLBnCFG_ASSOC_SHIFT; vcpu_mmu_init()
886 vcpu->arch.tlbcfg[1] |= params[1].entries; vcpu_mmu_init()
887 vcpu->arch.tlbcfg[1] |= params[1].ways << TLBnCFG_ASSOC_SHIFT; vcpu_mmu_init()
724 vcpu_mmu_geometry_update(struct kvm_vcpu *vcpu, struct kvm_book3e_206_tlb_params *params) vcpu_mmu_geometry_update() argument
872 vcpu_mmu_init(struct kvm_vcpu *vcpu, struct kvmppc_e500_tlb_params *params) vcpu_mmu_init() argument
/linux-4.1.27/drivers/media/platform/davinci/
H A Disif.c545 struct isif_params_raw *params = &isif_cfg.bayer; isif_config_raw() local
582 val = ISIF_VDHDOUT_INPUT | (params->vd_pol << ISIF_VD_POL_SHIFT) | isif_config_raw()
583 (params->hd_pol << ISIF_HD_POL_SHIFT) | isif_config_raw()
584 (params->fid_pol << ISIF_FID_POL_SHIFT) | isif_config_raw()
587 (params->frm_fmt << ISIF_FRM_FMT_SHIFT) | isif_config_raw()
588 (params->pix_fmt << ISIF_INPUT_SHIFT) | isif_config_raw()
589 (params->config_params.data_shift << ISIF_DATASFT_SHIFT); isif_config_raw()
598 val = params->cfa_pat << ISIF_GAMMAWD_CFA_SHIFT; isif_config_raw()
604 val |= (params->data_msb << ISIF_ALAW_GAMMA_WD_SHIFT); isif_config_raw()
620 val = (params->config_params.col_pat_field0.olop) | isif_config_raw()
621 (params->config_params.col_pat_field0.olep << 2) | isif_config_raw()
622 (params->config_params.col_pat_field0.elop << 4) | isif_config_raw()
623 (params->config_params.col_pat_field0.elep << 6) | isif_config_raw()
624 (params->config_params.col_pat_field1.olop << 8) | isif_config_raw()
625 (params->config_params.col_pat_field1.olep << 10) | isif_config_raw()
626 (params->config_params.col_pat_field1.elop << 12) | isif_config_raw()
627 (params->config_params.col_pat_field1.elep << 14); isif_config_raw()
632 val = (!!params->horz_flip_en) << ISIF_HSIZE_FLIP_SHIFT; isif_config_raw()
636 val |= ((params->win.width + 31) >> 5); isif_config_raw()
638 val |= (((params->win.width + isif_config_raw()
639 (params->win.width >> 2)) + 31) >> 5); isif_config_raw()
641 val |= (((params->win.width * 2) + 31) >> 5); isif_config_raw()
645 if (params->frm_fmt == CCDC_FRMFMT_INTERLACED) { isif_config_raw()
646 if (params->image_invert_en) { isif_config_raw()
655 } else if (params->frm_fmt == CCDC_FRMFMT_PROGRESSIVE) { isif_config_raw()
656 if (params->image_invert_en) { isif_config_raw()
668 isif_setwin(&params->win, params->frm_fmt, 1); isif_config_raw()
691 if (params->config_params.test_pat_gen) { isif_config_raw()
693 sync.ccdpg_hdpol = params->hd_pol; isif_config_raw()
694 sync.ccdpg_vdpol = params->vd_pol; isif_config_raw()
862 static int isif_set_hw_if_params(struct vpfe_hw_if_param *params) isif_set_hw_if_params() argument
864 isif_cfg.if_type = params->if_type; isif_set_hw_if_params()
866 switch (params->if_type) { isif_set_hw_if_params()
892 struct isif_ycbcr_config *params = &isif_cfg.ycbcr; isif_config_ycbcr() local
900 modeset = modeset | (params->pix_fmt << ISIF_INPUT_SHIFT) | isif_config_ycbcr()
901 (params->frm_fmt << ISIF_FRM_FMT_SHIFT) | isif_config_ycbcr()
902 (params->fid_pol << ISIF_FID_POL_SHIFT) | isif_config_ycbcr()
903 (params->hd_pol << ISIF_HD_POL_SHIFT) | isif_config_ycbcr()
904 (params->vd_pol << ISIF_VD_POL_SHIFT); isif_config_ycbcr()
909 if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) { isif_config_ycbcr()
918 if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) { isif_config_ycbcr()
929 if (params->pix_fmt != CCDC_PIXFMT_YCBCR_16BIT) { isif_config_ycbcr()
939 if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) { isif_config_ycbcr()
945 if (params->pix_fmt != CCDC_PIXFMT_YCBCR_16BIT) { isif_config_ycbcr()
959 ccdcfg |= params->pix_order << ISIF_PIX_ORDER_SHIFT; isif_config_ycbcr()
966 isif_setwin(&params->win, params->frm_fmt, 1); isif_config_ycbcr()
968 isif_setwin(&params->win, params->frm_fmt, 2); isif_config_ycbcr()
975 regw(((((params->win.width * 2) + 31) & 0xffffffe0) >> 5), HSIZE); isif_config_ycbcr()
978 if ((params->frm_fmt == CCDC_FRMFMT_INTERLACED) && isif_config_ycbcr()
979 (params->buf_type == CCDC_BUFTYPE_FLD_INTERLEAVED)) isif_config_ycbcr()
985 sync.ccdpg_hdpol = params->hd_pol; isif_config_ycbcr()
986 sync.ccdpg_vdpol = params->vd_pol; isif_config_ycbcr()
1002 /* copy defaults to module params */ isif_close()
H A Ddm644x_ccdc.c347 static int ccdc_set_params(void __user *params) ccdc_set_params() argument
355 x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params)); ccdc_set_params()
358 "ccdc params, %d\n", x); ccdc_set_params()
375 struct ccdc_params_ycbcr *params = &ccdc_cfg.ycbcr; ccdc_config_ycbcr() local
391 syn_mode = (((params->pix_fmt & CCDC_SYN_MODE_INPMOD_MASK) << ccdc_config_ycbcr()
393 ((params->frm_fmt & CCDC_SYN_FLDMODE_MASK) << ccdc_config_ycbcr()
398 if (params->bt656_enable) { ccdc_config_ycbcr()
412 syn_mode |= (((params->fid_pol & CCDC_FID_POL_MASK) << ccdc_config_ycbcr()
414 ((params->hd_pol & CCDC_HD_POL_MASK) << ccdc_config_ycbcr()
416 ((params->vd_pol & CCDC_VD_POL_MASK) << ccdc_config_ycbcr()
422 ccdc_setwin(&params->win, params->frm_fmt, 2); ccdc_config_ycbcr()
429 regw((params->pix_order << CCDC_CCDCFG_Y8POS_SHIFT) | ccdc_config_ycbcr()
433 regw((params->pix_order << CCDC_CCDCFG_Y8POS_SHIFT) | ccdc_config_ycbcr()
440 regw(((params->win.width * 2 + 31) & ~0x1f), CCDC_HSIZE_OFF); ccdc_config_ycbcr()
443 if (params->buf_type == CCDC_BUFTYPE_FLD_INTERLEAVED) ccdc_config_ycbcr()
511 /* Write the FPC params with FPC disable */ ccdc_config_fpc()
528 struct ccdc_params_raw *params = &ccdc_cfg.bayer; ccdc_config_raw() local
550 (((params->vd_pol & CCDC_VD_POL_MASK) << CCDC_VD_POL_SHIFT) | ccdc_config_raw()
551 ((params->hd_pol & CCDC_HD_POL_MASK) << CCDC_HD_POL_SHIFT) | ccdc_config_raw()
552 ((params->fid_pol & CCDC_FID_POL_MASK) << CCDC_FID_POL_SHIFT) | ccdc_config_raw()
553 ((params->frm_fmt & CCDC_FRM_FMT_MASK) << CCDC_FRM_FMT_SHIFT) | ccdc_config_raw()
556 ((params->pix_fmt & CCDC_PIX_FMT_MASK) << CCDC_PIX_FMT_SHIFT) | ccdc_config_raw()
568 ccdc_setwin(&params->win, params->frm_fmt, CCDC_PPC_RAW); ccdc_config_raw()
605 val = ((params->win.left & CCDC_FMT_HORZ_FMTSPH_MASK) << ccdc_config_raw()
607 (params->win.width & CCDC_FMT_HORZ_FMTLNH_MASK); ccdc_config_raw()
611 val = (params->win.top & CCDC_FMT_VERT_FMTSLV_MASK) ccdc_config_raw()
613 if (params->frm_fmt == CCDC_FRMFMT_PROGRESSIVE) ccdc_config_raw()
614 val |= (params->win.height) & CCDC_FMT_VERT_FMTLNV_MASK; ccdc_config_raw()
616 val |= (params->win.height >> 1) & CCDC_FMT_VERT_FMTLNV_MASK; ccdc_config_raw()
619 params->win.height); ccdc_config_raw()
632 regw((params->win.width + CCDC_32BYTE_ALIGN_VAL) & ccdc_config_raw()
636 regw(((params->win.width * CCDC_TWO_BYTES_PER_PIXEL) + ccdc_config_raw()
641 if (params->frm_fmt == CCDC_FRMFMT_INTERLACED) { ccdc_config_raw()
642 if (params->image_invert_enable) { ccdc_config_raw()
653 } else if (params->frm_fmt == CCDC_FRMFMT_PROGRESSIVE) { ccdc_config_raw()
662 if (params->frm_fmt == CCDC_FRMFMT_PROGRESSIVE) ccdc_config_raw()
663 val = (((params->win.height - 1) & CCDC_VP_OUT_VERT_NUM_MASK)) ccdc_config_raw()
667 ((((params->win.height >> CCDC_INTERLACED_HEIGHT_SHIFT) - ccdc_config_raw()
671 val |= ((((params->win.width))) & CCDC_VP_OUT_HORZ_NUM_MASK) ccdc_config_raw()
673 val |= (params->win.left) & CCDC_VP_OUT_HORZ_ST_MASK; ccdc_config_raw()
827 static int ccdc_set_hw_if_params(struct vpfe_hw_if_param *params) ccdc_set_hw_if_params() argument
829 ccdc_cfg.if_type = params->if_type; ccdc_set_hw_if_params()
831 switch (params->if_type) { ccdc_set_hw_if_params()
836 ccdc_cfg.ycbcr.vd_pol = params->vdpol; ccdc_set_hw_if_params()
837 ccdc_cfg.ycbcr.hd_pol = params->hdpol; ccdc_set_hw_if_params()
H A Ddm355_ccdc.c326 static int ccdc_set_params(void __user *params) ccdc_set_params() argument
335 x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params)); ccdc_set_params()
338 "params, %d\n", x); ccdc_set_params()
354 struct ccdc_params_ycbcr *params = &ccdc_cfg.ycbcr; ccdc_config_ycbcr() local
362 temp = (((params->pix_fmt & CCDC_INPUT_MODE_MASK) << ccdc_config_ycbcr()
364 ((params->frm_fmt & CCDC_FRM_FMT_MASK) << ccdc_config_ycbcr()
368 if (params->bt656_enable) { ccdc_config_ycbcr()
376 temp |= (((params->fid_pol & CCDC_FID_POL_MASK) << ccdc_config_ycbcr()
378 ((params->hd_pol & CCDC_HD_POL_MASK) << ccdc_config_ycbcr()
380 ((params->vd_pol & CCDC_VD_POL_MASK) << ccdc_config_ycbcr()
390 ccdc_setwin(&params->win, params->frm_fmt, 2); ccdc_config_ycbcr()
393 temp = (params->pix_order << CCDC_Y8POS_SHIFT); ccdc_config_ycbcr()
402 regw(((params->win.width * 2 + 31) >> 5), HSIZE); ccdc_config_ycbcr()
405 if (params->buf_type == CCDC_BUFTYPE_FLD_INTERLEAVED) { ccdc_config_ycbcr()
612 struct ccdc_params_raw *params = &ccdc_cfg.bayer; ccdc_config_raw() local
646 val |= (((params->vd_pol & CCDC_VD_POL_MASK) << CCDC_VD_POL_SHIFT) | ccdc_config_raw()
647 ((params->hd_pol & CCDC_HD_POL_MASK) << CCDC_HD_POL_SHIFT) | ccdc_config_raw()
648 ((params->fid_pol & CCDC_FID_POL_MASK) << CCDC_FID_POL_SHIFT) | ccdc_config_raw()
649 ((params->frm_fmt & CCDC_FRM_FMT_MASK) << CCDC_FRM_FMT_SHIFT) | ccdc_config_raw()
650 ((params->pix_fmt & CCDC_PIX_FMT_MASK) << CCDC_PIX_FMT_SHIFT)); ccdc_config_raw()
691 ccdc_setwin(&params->win, params->frm_fmt, 1); ccdc_config_raw()
723 val = (params->horz_flip_enable & CCDC_HSIZE_FLIP_MASK) << ccdc_config_raw()
729 val |= (((params->win.width) + 31) >> 5) & ccdc_config_raw()
734 (((params->win.width) + 31) >> 5) & ccdc_config_raw()
738 val |= (((params->win.width * 2) + 31) >> 5) & ccdc_config_raw()
742 (((params->win.width * 2) + 31) >> 5) & ccdc_config_raw()
748 if (params->frm_fmt == CCDC_FRMFMT_INTERLACED) { ccdc_config_raw()
749 if (params->image_invert_enable) { ccdc_config_raw()
760 } else if (params->frm_fmt == CCDC_FRMFMT_PROGRESSIVE) { ccdc_config_raw()
761 if (params->image_invert_enable) { ccdc_config_raw()
919 static int ccdc_set_hw_if_params(struct vpfe_hw_if_param *params) ccdc_set_hw_if_params() argument
921 ccdc_cfg.if_type = params->if_type; ccdc_set_hw_if_params()
923 switch (params->if_type) { ccdc_set_hw_if_params()
927 ccdc_cfg.ycbcr.vd_pol = params->vdpol; ccdc_set_hw_if_params()
928 ccdc_cfg.ycbcr.hd_pol = params->hdpol; ccdc_set_hw_if_params()
/linux-4.1.27/drivers/media/platform/vivid/
H A Dvivid-tpg.c1703 struct tpg_draw_params *params) tpg_fill_params_pattern()
1705 params->mv_hor_old = tpg_fill_params_pattern()
1707 params->mv_hor_new = tpg_fill_params_pattern()
1710 params->mv_vert_old = tpg->mv_vert_count % tpg->src_height; tpg_fill_params_pattern()
1711 params->mv_vert_new = tpg_fill_params_pattern()
1717 struct tpg_draw_params *params) tpg_fill_params_extras()
1720 unsigned right_pillar_start = params->img_width; tpg_fill_params_extras()
1722 params->wss_width = tpg->crop.left < tpg->src_width / 2 ? tpg_fill_params_extras()
1724 if (params->wss_width > tpg->crop.width) tpg_fill_params_extras()
1725 params->wss_width = tpg->crop.width; tpg_fill_params_extras()
1726 params->wss_width = tpg_hscale_div(tpg, p, params->wss_width); tpg_fill_params_extras()
1727 params->wss_random_offset = tpg_fill_params_extras()
1728 params->twopixsize * prandom_u32_max(tpg->src_width / 2); tpg_fill_params_extras()
1736 params->left_pillar_width = left_pillar_width; tpg_fill_params_extras()
1744 if (right_pillar_start > params->img_width) tpg_fill_params_extras()
1745 right_pillar_start = params->img_width; tpg_fill_params_extras()
1747 params->right_pillar_start = right_pillar_start; tpg_fill_params_extras()
1749 params->sav_eav_f = tpg->field == tpg_fill_params_extras()
1750 (params->is_60hz ? V4L2_FIELD_TOP : V4L2_FIELD_BOTTOM); tpg_fill_params_extras()
1754 const struct tpg_draw_params *params, tpg_fill_plane_extras()
1757 unsigned twopixsize = params->twopixsize; tpg_fill_plane_extras()
1758 unsigned img_width = params->img_width; tpg_fill_plane_extras()
1759 unsigned frame_line = params->frame_line; tpg_fill_plane_extras()
1764 if (params->is_tv && !params->is_60hz && tpg_fill_plane_extras()
1765 frame_line == 0 && params->wss_width) { tpg_fill_plane_extras()
1770 u8 *wss = tpg->random_line[p] + params->wss_random_offset; tpg_fill_plane_extras()
1772 memcpy(vbuf, wss, params->wss_width); tpg_fill_plane_extras()
1778 unsigned left = params->left_pillar_width; tpg_fill_plane_extras()
1779 unsigned right = params->right_pillar_start; tpg_fill_plane_extras()
1798 memcpy(vbuf, tpg->black_line[p], params->left_pillar_width); tpg_fill_plane_extras()
1799 memcpy(vbuf + params->right_pillar_start, tpg->black_line[p], tpg_fill_plane_extras()
1800 img_width - params->right_pillar_start); tpg_fill_plane_extras()
1828 p[3] = 0x80 | (params->sav_eav_f << 6) | tpg_fill_plane_extras()
1831 ((hact ^ params->sav_eav_f) << 2) | tpg_fill_plane_extras()
1832 ((params->sav_eav_f ^ vact) << 1) | tpg_fill_plane_extras()
1833 (hact ^ vact ^ params->sav_eav_f); tpg_fill_plane_extras()
1843 p[3] = 0x80 | (params->sav_eav_f << 6) | tpg_fill_plane_extras()
1846 ((hact ^ params->sav_eav_f) << 2) | tpg_fill_plane_extras()
1847 ((params->sav_eav_f ^ vact) << 1) | tpg_fill_plane_extras()
1848 (hact ^ vact ^ params->sav_eav_f); tpg_fill_plane_extras()
1853 const struct tpg_draw_params *params, tpg_fill_plane_pattern()
1856 unsigned twopixsize = params->twopixsize; tpg_fill_plane_pattern()
1857 unsigned img_width = params->img_width; tpg_fill_plane_pattern()
1858 unsigned mv_hor_old = params->mv_hor_old; tpg_fill_plane_pattern()
1859 unsigned mv_hor_new = params->mv_hor_new; tpg_fill_plane_pattern()
1860 unsigned mv_vert_old = params->mv_vert_old; tpg_fill_plane_pattern()
1861 unsigned mv_vert_new = params->mv_vert_new; tpg_fill_plane_pattern()
1862 unsigned frame_line = params->frame_line; tpg_fill_plane_pattern()
1863 unsigned frame_line_next = params->frame_line_next; tpg_fill_plane_pattern()
1876 if (h >= params->hmax) { tpg_fill_plane_pattern()
1877 if (params->hmax == tpg->compose.height) tpg_fill_plane_pattern()
1958 } else if (params->is_60hz) { tpg_fill_plane_pattern()
1998 struct tpg_draw_params params; tpg_fill_plane_buffer() local
2010 params.is_tv = std; tpg_fill_plane_buffer()
2011 params.is_60hz = std & V4L2_STD_525_60; tpg_fill_plane_buffer()
2012 params.twopixsize = tpg->twopixelsize[p]; tpg_fill_plane_buffer()
2013 params.img_width = tpg_hdiv(tpg, p, tpg->compose.width); tpg_fill_plane_buffer()
2014 params.stride = tpg->bytesperline[p]; tpg_fill_plane_buffer()
2015 params.hmax = (tpg->compose.height * tpg->perc_fill) / 100; tpg_fill_plane_buffer()
2017 tpg_fill_params_pattern(tpg, p, &params); tpg_fill_plane_buffer()
2018 tpg_fill_params_extras(tpg, p, &params); tpg_fill_plane_buffer()
2025 params.frame_line = tpg_calc_frameline(tpg, src_y, tpg->field); tpg_fill_plane_buffer()
2026 params.frame_line_next = params.frame_line; tpg_fill_plane_buffer()
2060 params.frame_line_next = tpg_fill_plane_buffer()
2065 params.frame_line_next = tpg_fill_plane_buffer()
2071 tpg_fill_plane_pattern(tpg, &params, p, h, tpg_fill_plane_buffer()
2072 vbuf + buf_line * params.stride); tpg_fill_plane_buffer()
2073 tpg_fill_plane_extras(tpg, &params, p, h, tpg_fill_plane_buffer()
2074 vbuf + buf_line * params.stride); tpg_fill_plane_buffer()
1702 tpg_fill_params_pattern(const struct tpg_data *tpg, unsigned p, struct tpg_draw_params *params) tpg_fill_params_pattern() argument
1715 tpg_fill_params_extras(const struct tpg_data *tpg, unsigned p, struct tpg_draw_params *params) tpg_fill_params_extras() argument
1753 tpg_fill_plane_extras(const struct tpg_data *tpg, const struct tpg_draw_params *params, unsigned p, unsigned h, u8 *vbuf) tpg_fill_plane_extras() argument
1852 tpg_fill_plane_pattern(const struct tpg_data *tpg, const struct tpg_draw_params *params, unsigned p, unsigned h, u8 *vbuf) tpg_fill_plane_pattern() argument
/linux-4.1.27/include/crypto/
H A Dcompress.h58 int (*compress_setup)(struct crypto_pcomp *tfm, void *params,
65 int (*decompress_setup)(struct crypto_pcomp *tfm, void *params,
100 void *params, unsigned int len) crypto_compress_setup()
102 return crypto_pcomp_alg(tfm)->compress_setup(tfm, params, len); crypto_compress_setup()
123 void *params, unsigned int len) crypto_decompress_setup()
125 return crypto_pcomp_alg(tfm)->decompress_setup(tfm, params, len); crypto_decompress_setup()
99 crypto_compress_setup(struct crypto_pcomp *tfm, void *params, unsigned int len) crypto_compress_setup() argument
122 crypto_decompress_setup(struct crypto_pcomp *tfm, void *params, unsigned int len) crypto_decompress_setup() argument
/linux-4.1.27/drivers/media/mmc/siano/
H A Dsmssdio.c248 struct smsdevice_params_t params; smssdio_probe() local
258 memset(&params, 0, sizeof(struct smsdevice_params_t)); smssdio_probe()
260 params.device = &func->dev; smssdio_probe()
261 params.buffer_size = 0x5000; /* ?? */ smssdio_probe()
262 params.num_buffers = 22; /* ?? */ smssdio_probe()
263 params.context = smsdev; smssdio_probe()
265 snprintf(params.devpath, sizeof(params.devpath), smssdio_probe()
268 params.sendrequest_handler = smssdio_sendrequest; smssdio_probe()
270 params.device_type = sms_get_board(board_id)->type; smssdio_probe()
272 if (params.device_type != SMS_STELLAR) smssdio_probe()
273 params.flags |= SMS_DEVICE_FAMILY2; smssdio_probe()
282 ret = smscore_register_device(&params, &smsdev->coredev, NULL); smssdio_probe()
/linux-4.1.27/drivers/clk/st/
H A Dclkgen-fsyn.c510 struct stm_fs params; quadfs_pll_fs660c32_recalc_rate() local
512 params.ndiv = CLKGEN_READ(pll, ndiv); quadfs_pll_fs660c32_recalc_rate()
513 if (clk_fs660c32_vco_get_rate(parent_rate, &params, &rate)) quadfs_pll_fs660c32_recalc_rate()
517 pll->ndiv = params.ndiv; quadfs_pll_fs660c32_recalc_rate()
554 struct stm_fs params; quadfs_pll_fs660c32_round_rate() local
556 if (!clk_fs660c32_vco_get_params(*prate, rate, &params)) quadfs_pll_fs660c32_round_rate()
557 clk_fs660c32_vco_get_rate(*prate, &params, &rate); quadfs_pll_fs660c32_round_rate()
561 rate, (unsigned int)params.sdiv, quadfs_pll_fs660c32_round_rate()
562 (unsigned int)params.mdiv, quadfs_pll_fs660c32_round_rate()
563 (unsigned int)params.pe, (unsigned int)params.nsdiv); quadfs_pll_fs660c32_round_rate()
572 struct stm_fs params; quadfs_pll_fs660c32_set_rate() local
579 if (!clk_fs660c32_vco_get_params(parent_rate, rate, &params)) quadfs_pll_fs660c32_set_rate()
580 clk_fs660c32_vco_get_rate(parent_rate, &params, &hwrate); quadfs_pll_fs660c32_set_rate()
584 hwrate, (unsigned int)params.ndiv); quadfs_pll_fs660c32_set_rate()
589 pll->ndiv = params.ndiv; quadfs_pll_fs660c32_set_rate()
862 struct stm_fs *params) quadfs_fsynt_get_hw_value_for_recalc()
867 params->mdiv = CLKGEN_READ(fs, mdiv[fs->chan]); quadfs_fsynt_get_hw_value_for_recalc()
868 params->pe = CLKGEN_READ(fs, pe[fs->chan]); quadfs_fsynt_get_hw_value_for_recalc()
869 params->sdiv = CLKGEN_READ(fs, sdiv[fs->chan]); quadfs_fsynt_get_hw_value_for_recalc()
872 params->nsdiv = CLKGEN_READ(fs, nsdiv[fs->chan]); quadfs_fsynt_get_hw_value_for_recalc()
874 params->nsdiv = 1; quadfs_fsynt_get_hw_value_for_recalc()
879 if (!params->mdiv && !params->pe && !params->sdiv) quadfs_fsynt_get_hw_value_for_recalc()
882 fs->md = params->mdiv; quadfs_fsynt_get_hw_value_for_recalc()
883 fs->pe = params->pe; quadfs_fsynt_get_hw_value_for_recalc()
884 fs->sdiv = params->sdiv; quadfs_fsynt_get_hw_value_for_recalc()
885 fs->nsdiv = params->nsdiv; quadfs_fsynt_get_hw_value_for_recalc()
891 unsigned long prate, struct stm_fs *params) quadfs_find_best_rate()
906 *params = fs->data->rtbl[index]; quadfs_find_best_rate()
907 prev_params = *params; quadfs_find_best_rate()
915 *params = prev_params; quadfs_find_best_rate()
927 *params = prev_params; quadfs_find_best_rate()
937 struct stm_fs params; quadfs_recalc_rate() local
943 if (quadfs_fsynt_get_hw_value_for_recalc(fs, &params)) quadfs_recalc_rate()
946 if (clk_fs_get_rate(parent_rate, &params, &rate)) { quadfs_recalc_rate()
959 struct stm_fs params; quadfs_round_rate() local
961 rate = quadfs_find_best_rate(hw, rate, *prate, &params); quadfs_round_rate()
965 rate, (unsigned int)params.sdiv, (unsigned int)params.mdiv, quadfs_round_rate()
966 (unsigned int)params.pe, (unsigned int)params.nsdiv); quadfs_round_rate()
973 struct stm_fs *params) quadfs_program_and_enable()
975 fs->md = params->mdiv; quadfs_program_and_enable()
976 fs->pe = params->pe; quadfs_program_and_enable()
977 fs->sdiv = params->sdiv; quadfs_program_and_enable()
978 fs->nsdiv = params->nsdiv; quadfs_program_and_enable()
992 struct stm_fs params; quadfs_set_rate() local
999 memset(&params, 0, sizeof(struct stm_fs)); quadfs_set_rate()
1001 hwrate = quadfs_find_best_rate(hw, rate, parent_rate, &params); quadfs_set_rate()
1005 quadfs_program_and_enable(fs, &params); quadfs_set_rate()
861 quadfs_fsynt_get_hw_value_for_recalc(struct st_clk_quadfs_fsynth *fs, struct stm_fs *params) quadfs_fsynt_get_hw_value_for_recalc() argument
890 quadfs_find_best_rate(struct clk_hw *hw, unsigned long drate, unsigned long prate, struct stm_fs *params) quadfs_find_best_rate() argument
972 quadfs_program_and_enable(struct st_clk_quadfs_fsynth *fs, struct stm_fs *params) quadfs_program_and_enable() argument
/linux-4.1.27/arch/arm64/kernel/
H A Defi.c209 struct efi_fdt_params params; efi_init() local
212 if (!efi_get_fdt_params(&params, uefi_debug)) efi_init()
215 efi_system_table = params.system_table; efi_init()
217 memblock_reserve(params.mmap & PAGE_MASK, efi_init()
218 PAGE_ALIGN(params.mmap_size + (params.mmap & ~PAGE_MASK))); efi_init()
219 memmap.phys_map = (void *)params.mmap; efi_init()
220 memmap.map = early_memremap(params.mmap, params.mmap_size); efi_init()
221 memmap.map_end = memmap.map + params.mmap_size; efi_init()
222 memmap.desc_size = params.desc_size; efi_init()
223 memmap.desc_version = params.desc_ver; efi_init()
229 early_memunmap(memmap.map, params.mmap_size); efi_init()
/linux-4.1.27/drivers/net/wireless/mwifiex/
H A Duap_cmd.c28 struct cfg80211_ap_settings *params) { mwifiex_set_secure_params()
32 if (!params->privacy) { mwifiex_set_secure_params()
43 switch (params->auth_type) { mwifiex_set_secure_params()
60 for (i = 0; i < params->crypto.n_akm_suites; i++) { mwifiex_set_secure_params()
61 switch (params->crypto.akm_suites[i]) { mwifiex_set_secure_params()
63 if (params->crypto.wpa_versions & mwifiex_set_secure_params()
68 if (params->crypto.wpa_versions & mwifiex_set_secure_params()
75 if (params->crypto.wpa_versions & mwifiex_set_secure_params()
80 if (params->crypto.wpa_versions & mwifiex_set_secure_params()
90 for (i = 0; i < params->crypto.n_ciphers_pairwise; i++) { mwifiex_set_secure_params()
91 switch (params->crypto.ciphers_pairwise[i]) { mwifiex_set_secure_params()
96 if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1) mwifiex_set_secure_params()
99 if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2) mwifiex_set_secure_params()
104 if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1) mwifiex_set_secure_params()
107 if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2) mwifiex_set_secure_params()
115 switch (params->crypto.cipher_group) { mwifiex_set_secure_params()
159 struct cfg80211_ap_settings *params) mwifiex_set_ht_params()
167 ht_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, params->beacon.tail, mwifiex_set_ht_params()
168 params->beacon.tail_len); mwifiex_set_ht_params()
208 struct cfg80211_ap_settings *params) mwifiex_set_vht_params()
212 vht_ie = cfg80211_find_ie(WLAN_EID_VHT_CAPABILITY, params->beacon.tail, mwifiex_set_vht_params()
213 params->beacon.tail_len); mwifiex_set_vht_params()
262 struct cfg80211_ap_settings *params) mwifiex_set_uap_rates()
266 const u8 *var_pos = params->beacon.head + var_offset; mwifiex_set_uap_rates()
267 int len = params->beacon.head_len - var_offset; mwifiex_set_uap_rates()
277 params->beacon.tail, mwifiex_set_uap_rates()
278 params->beacon.tail_len); mwifiex_set_uap_rates()
386 struct cfg80211_ap_settings *params) mwifiex_set_wmm_params()
394 params->beacon.tail, mwifiex_set_wmm_params()
395 params->beacon.tail_len); mwifiex_set_wmm_params()
698 sys_cfg = (struct host_cmd_ds_sys_config *)&cmd->params.uap_sys_config; mwifiex_cmd_uap_sys_config()
728 struct host_cmd_ds_sta_deauth *sta_deauth = &cmd->params.sta_deauth; mwifiex_cmd_uap_sta_deauth()
26 mwifiex_set_secure_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_config, struct cfg80211_ap_settings *params) mwifiex_set_secure_params() argument
157 mwifiex_set_ht_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) mwifiex_set_ht_params() argument
206 mwifiex_set_vht_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) mwifiex_set_vht_params() argument
261 mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) mwifiex_set_uap_rates() argument
384 mwifiex_set_wmm_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) mwifiex_set_wmm_params() argument
H A Dsta_cmd.c49 cmd->params.rssi_info.action = cpu_to_le16(cmd_action); mwifiex_cmd_802_11_rssi_info()
50 cmd->params.rssi_info.ndata = cpu_to_le16(priv->data_avg_factor); mwifiex_cmd_802_11_rssi_info()
51 cmd->params.rssi_info.nbcn = cpu_to_le16(priv->bcn_avg_factor); mwifiex_cmd_802_11_rssi_info()
77 struct host_cmd_ds_mac_control *mac_ctrl = &cmd->params.mac_ctrl; mwifiex_cmd_mac_control()
113 struct host_cmd_ds_802_11_snmp_mib *snmp_mib = &cmd->params.smib; mwifiex_cmd_802_11_snmp_mib()
169 struct host_cmd_ds_tx_rate_cfg *rate_cfg = &cmd->params.tx_rate_cfg; mwifiex_cmd_tx_rate_cfg()
246 struct host_cmd_ds_txpwr_cfg *cmd_txp_cfg = &cmd->params.txp_cfg; mwifiex_cmd_tx_power_cfg()
288 struct host_cmd_ds_rf_tx_pwr *txp = &cmd->params.txp; mwifiex_cmd_rf_tx_power()
306 struct host_cmd_ds_rf_ant_mimo *ant_mimo = &cmd->params.ant_mimo; mwifiex_cmd_rf_antenna()
307 struct host_cmd_ds_rf_ant_siso *ant_siso = &cmd->params.ant_siso; mwifiex_cmd_rf_antenna()
347 struct host_cmd_ds_802_11_hs_cfg_enh *hs_cfg = &cmd->params.opt_hs_cfg; mwifiex_cmd_802_11_hs_cfg()
375 hs_cfg->params.hs_activate.resp_ctrl = cpu_to_le16(RESP_NEEDED); mwifiex_cmd_802_11_hs_cfg()
378 hs_cfg->params.hs_config.conditions = hscfg_param->conditions; mwifiex_cmd_802_11_hs_cfg()
379 hs_cfg->params.hs_config.gpio = hscfg_param->gpio; mwifiex_cmd_802_11_hs_cfg()
380 hs_cfg->params.hs_config.gap = hscfg_param->gap; mwifiex_cmd_802_11_hs_cfg()
383 hs_cfg->params.hs_config.conditions, mwifiex_cmd_802_11_hs_cfg()
384 hs_cfg->params.hs_config.gpio, mwifiex_cmd_802_11_hs_cfg()
385 hs_cfg->params.hs_config.gap); mwifiex_cmd_802_11_hs_cfg()
408 cmd->params.mac_addr.action = cpu_to_le16(cmd_action); mwifiex_cmd_802_11_mac_address()
411 memcpy(cmd->params.mac_addr.mac_addr, priv->curr_addr, mwifiex_cmd_802_11_mac_address()
429 struct host_cmd_ds_mac_multicast_adr *mcast_addr = &cmd->params.mc_addr; mwifiex_cmd_mac_multicast_adr()
456 struct host_cmd_ds_802_11_deauthenticate *deauth = &cmd->params.deauth; mwifiex_cmd_802_11_deauthenticate()
616 &cmd->params.key_material_v2; mwifiex_cmd_802_11_key_material_v2()
789 &cmd->params.key_material; mwifiex_cmd_802_11_key_material_v1()
997 &cmd->params.domain_info; mwifiex_cmd_802_11d_domain_info()
1049 &(cmd->params.ibss_coalescing); mwifiex_cmd_ibss_coalescing_status()
1102 mac_reg = &cmd->params.mac_reg; mwifiex_cmd_reg_access()
1114 bbp_reg = &cmd->params.bbp_reg; mwifiex_cmd_reg_access()
1126 rf_reg = &cmd->params.rf_reg; mwifiex_cmd_reg_access()
1137 pmic_reg = &cmd->params.pmic_reg; mwifiex_cmd_reg_access()
1149 cau_reg = &cmd->params.rf_reg; mwifiex_cmd_reg_access()
1160 &cmd->params.eeprom; mwifiex_cmd_reg_access()
1190 &cmd->params.pcie_host_spec; mwifiex_cmd_pcie_host_spec()
1236 struct host_cmd_ds_802_11_subsc_evt *subsc_evt = &cmd->params.subsc_evt; mwifiex_cmd_802_11_subsc_evt()
1372 struct host_cmd_ds_mef_cfg *mef_cfg = &cmd->params.mef_cfg; mwifiex_cmd_mef_cfg()
1488 &cmd->params.coalesce_cfg; mwifiex_cmd_coalesce_cfg()
1510 param = rule->params; mwifiex_cmd_coalesce_cfg()
1512 param->operation = cfg->rule[cnt].params[idx].operation; mwifiex_cmd_coalesce_cfg()
1514 cfg->rule[cnt].params[idx].operand_len; mwifiex_cmd_coalesce_cfg()
1516 cpu_to_le16(cfg->rule[cnt].params[idx].offset); mwifiex_cmd_coalesce_cfg()
1518 cfg->rule[cnt].params[idx].operand_byte_stream, mwifiex_cmd_coalesce_cfg()
1528 * params mwifiex_cmd_coalesce_cfg()
1537 rule = (void *)((u8 *)rule->params + length); mwifiex_cmd_coalesce_cfg()
1551 struct host_cmd_ds_tdls_oper *tdls_oper = &cmd->params.tdls_oper; mwifiex_cmd_tdls_oper()
1563 struct station_parameters *params = priv->sta_params; mwifiex_cmd_tdls_oper() local
1585 if (!params) { mwifiex_cmd_tdls_oper()
1587 "TDLS config params not available for %pM\n", mwifiex_cmd_tdls_oper()
1592 *(__le16 *)pos = cpu_to_le16(params->capability); mwifiex_cmd_tdls_oper()
1593 config_len += sizeof(params->capability); mwifiex_cmd_tdls_oper()
1595 qos_info = params->uapsd_queues | (params->max_sp << 5); mwifiex_cmd_tdls_oper()
1603 if (params->ht_capa) { mwifiex_cmd_tdls_oper()
1610 memcpy(&ht_capab->ht_cap, params->ht_capa, mwifiex_cmd_tdls_oper()
1615 if (params->supported_rates && params->supported_rates_len) { mwifiex_cmd_tdls_oper()
1621 cpu_to_le16(params->supported_rates_len); mwifiex_cmd_tdls_oper()
1622 memcpy(tlv_rates->rates, params->supported_rates, mwifiex_cmd_tdls_oper()
1623 params->supported_rates_len); mwifiex_cmd_tdls_oper()
1625 params->supported_rates_len; mwifiex_cmd_tdls_oper()
1628 if (params->ext_capab && params->ext_capab_len) { mwifiex_cmd_tdls_oper()
1633 extcap->header.len = cpu_to_le16(params->ext_capab_len); mwifiex_cmd_tdls_oper()
1634 memcpy(extcap->ext_capab, params->ext_capab, mwifiex_cmd_tdls_oper()
1635 params->ext_capab_len); mwifiex_cmd_tdls_oper()
1637 params->ext_capab_len; mwifiex_cmd_tdls_oper()
1639 if (params->vht_capa) { mwifiex_cmd_tdls_oper()
1646 memcpy(&vht_capab->vht_cap, params->vht_capa, mwifiex_cmd_tdls_oper()
1650 if (params->aid) { mwifiex_cmd_tdls_oper()
1653 aid->header.len = cpu_to_le16(sizeof(params->aid)); mwifiex_cmd_tdls_oper()
1654 aid->aid = cpu_to_le16(params->aid); mwifiex_cmd_tdls_oper()
1680 &cmd->params.sdio_rx_aggr_cfg; mwifiex_cmd_sdio_rx_aggr_cfg()
1795 cmd_ptr->params.verext.version_str_sel = mwifiex_sta_prepare_cmd()
1797 memcpy(&cmd_ptr->params, data_buf, mwifiex_sta_prepare_cmd()
1806 cmd_ptr->params.reg_mask.action = cpu_to_le16(cmd_action); mwifiex_sta_prepare_cmd()
1807 cmd_ptr->params.reg_mask.mask = cpu_to_le32(*(u32 *)data_buf); mwifiex_sta_prepare_cmd()
1815 memcpy(&cmd_ptr->params, data_buf, mwifiex_sta_prepare_cmd()
1826 cmd_ptr->params.mode_cfg.action = cpu_to_le16(cmd_action); mwifiex_sta_prepare_cmd()
1827 cmd_ptr->params.mode_cfg.mode = cpu_to_le16(*(u16 *)data_buf); mwifiex_sta_prepare_cmd()
1899 cmd_ptr->params.bss_mode.con_type = mwifiex_sta_prepare_cmd()
1902 cmd_ptr->params.bss_mode.con_type = mwifiex_sta_prepare_cmd()
1905 cmd_ptr->params.bss_mode.con_type = CONNECTION_TYPE_AP; mwifiex_sta_prepare_cmd()
H A Dcfg80211.c155 struct cfg80211_mgmt_tx_params *params, u64 *cookie) mwifiex_cfg80211_mgmt_tx()
157 const u8 *buf = params->buf; mwifiex_cfg80211_mgmt_tx()
158 size_t len = params->len; mwifiex_cfg80211_mgmt_tx()
386 struct key_params *params) mwifiex_cfg80211_add_key()
394 (params->cipher == WLAN_CIPHER_SUITE_WEP40 || mwifiex_cfg80211_add_key()
395 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { mwifiex_cfg80211_add_key()
396 if (params->key && params->key_len) { mwifiex_cfg80211_add_key()
399 memcpy(wep_key->key_material, params->key, mwifiex_cfg80211_add_key()
400 params->key_len); mwifiex_cfg80211_add_key()
402 wep_key->key_length = params->key_len; mwifiex_cfg80211_add_key()
408 if (mwifiex_set_encode(priv, params, params->key, params->key_len, mwifiex_cfg80211_add_key()
601 "cannot change wiphy params when bss started"); mwifiex_cfg80211_set_wiphy_params()
625 wiphy_err(wiphy, "Failed to set wiphy phy params\n"); mwifiex_cfg80211_set_wiphy_params()
633 "cannot change wiphy params when connected"); mwifiex_cfg80211_set_wiphy_params()
813 struct vif_params *params) mwifiex_change_vif_to_p2p()
884 struct vif_params *params) mwifiex_change_vif_to_sta_adhoc()
943 struct vif_params *params) mwifiex_change_vif_to_ap()
998 struct vif_params *params) mwifiex_cfg80211_change_virtual_intf()
1018 type, flags, params); mwifiex_cfg80211_change_virtual_intf()
1021 flags, params); mwifiex_cfg80211_change_virtual_intf()
1046 type, flags, params); mwifiex_cfg80211_change_virtual_intf()
1049 flags, params); mwifiex_cfg80211_change_virtual_intf()
1066 params); mwifiex_cfg80211_change_virtual_intf()
1071 type, flags, params); mwifiex_cfg80211_change_virtual_intf()
1095 params); mwifiex_cfg80211_change_virtual_intf()
1101 flags, params); mwifiex_cfg80211_change_virtual_intf()
1584 struct station_del_parameters *params) mwifiex_cfg80211_del_station()
1594 if (!params->mac || is_broadcast_ether_addr(params->mac)) mwifiex_cfg80211_del_station()
1597 wiphy_dbg(wiphy, "%s: mac address %pM\n", __func__, params->mac); mwifiex_cfg80211_del_station()
1602 sta_node = mwifiex_get_sta_entry(priv, params->mac); mwifiex_cfg80211_del_station()
1604 ether_addr_copy(deauth_mac, params->mac); mwifiex_cfg80211_del_station()
1711 struct cfg80211_ap_settings *params) mwifiex_cfg80211_start_ap()
1725 if (params->beacon_interval) mwifiex_cfg80211_start_ap()
1726 bss_cfg->beacon_period = params->beacon_interval; mwifiex_cfg80211_start_ap()
1727 if (params->dtim_period) mwifiex_cfg80211_start_ap()
1728 bss_cfg->dtim_period = params->dtim_period; mwifiex_cfg80211_start_ap()
1730 if (params->ssid && params->ssid_len) { mwifiex_cfg80211_start_ap()
1731 memcpy(bss_cfg->ssid.ssid, params->ssid, params->ssid_len); mwifiex_cfg80211_start_ap()
1732 bss_cfg->ssid.ssid_len = params->ssid_len; mwifiex_cfg80211_start_ap()
1734 if (params->inactivity_timeout > 0) { mwifiex_cfg80211_start_ap()
1736 bss_cfg->sta_ao_timer = 10 * params->inactivity_timeout; mwifiex_cfg80211_start_ap()
1737 bss_cfg->ps_sta_ao_timer = 10 * params->inactivity_timeout; mwifiex_cfg80211_start_ap()
1740 switch (params->hidden_ssid) { mwifiex_cfg80211_start_ap()
1754 mwifiex_uap_set_channel(bss_cfg, params->chandef); mwifiex_cfg80211_start_ap()
1755 mwifiex_set_uap_rates(bss_cfg, params); mwifiex_cfg80211_start_ap()
1757 if (mwifiex_set_secure_params(priv, bss_cfg, params)) { mwifiex_cfg80211_start_ap()
1763 mwifiex_set_ht_params(priv, bss_cfg, params); mwifiex_cfg80211_start_ap()
1766 mwifiex_set_vht_params(priv, bss_cfg, params); mwifiex_cfg80211_start_ap()
1767 mwifiex_set_vht_width(priv, params->chandef.width, mwifiex_cfg80211_start_ap()
1776 mwifiex_set_wmm_params(priv, bss_cfg, params); mwifiex_cfg80211_start_ap()
1779 !cfg80211_chandef_dfs_required(wiphy, &params->chandef, mwifiex_cfg80211_start_ap()
1796 if (mwifiex_set_mgmt_ies(priv, &params->beacon)) mwifiex_cfg80211_start_ap()
2106 struct cfg80211_ibss_params *params) mwifiex_set_ibss_params()
2113 if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) { mwifiex_set_ibss_params()
2114 if (!params->basic_rates) { mwifiex_set_ibss_params()
2129 if (params->basic_rates < index) { mwifiex_set_ibss_params()
2133 if (params->basic_rates % index) mwifiex_set_ibss_params()
2138 if (cfg80211_get_chandef_type(&params->chandef) != mwifiex_set_ibss_params()
2142 if (cfg80211_get_chandef_type(&params->chandef) == mwifiex_set_ibss_params()
2161 cfg80211_get_chandef_type(&params->chandef)); mwifiex_set_ibss_params()
2163 params->chandef.chan->center_freq); mwifiex_set_ibss_params()
2179 struct cfg80211_ibss_params *params) mwifiex_cfg80211_join_ibss()
2191 (char *) params->ssid, params->bssid); mwifiex_cfg80211_join_ibss()
2193 mwifiex_set_ibss_params(priv, params); mwifiex_cfg80211_join_ibss()
2195 ret = mwifiex_cfg80211_assoc(priv, params->ssid_len, params->ssid, mwifiex_cfg80211_join_ibss()
2196 params->bssid, priv->bss_mode, mwifiex_cfg80211_join_ibss()
2197 params->chandef.chan, NULL, mwifiex_cfg80211_join_ibss()
2198 params->privacy); mwifiex_cfg80211_join_ibss()
2202 params->chandef.chan, GFP_KERNEL); mwifiex_cfg80211_join_ibss()
2441 struct vif_params *params) mwifiex_add_virtual_intf()
2984 dev_err(adapter->dev, "Failed to set HS params\n"); mwifiex_cfg80211_suspend()
3037 param = mrule->params; mwifiex_fill_coalesce_rule_info()
3247 const u8 *mac, struct station_parameters *params) mwifiex_cfg80211_add_station()
3251 if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) mwifiex_cfg80211_add_station()
3263 struct cfg80211_csa_settings *params) mwifiex_cfg80211_channel_switch()
3279 if (cfg80211_chandef_identical(&params->chandef, mwifiex_cfg80211_channel_switch()
3284 params->beacon_csa.tail, mwifiex_cfg80211_channel_switch()
3285 params->beacon_csa.tail_len); mwifiex_cfg80211_channel_switch()
3302 if (mwifiex_set_mgmt_ies(priv, &params->beacon_csa)) { mwifiex_cfg80211_channel_switch()
3307 memcpy(&priv->dfs_chandef, &params->chandef, sizeof(priv->dfs_chandef)); mwifiex_cfg80211_channel_switch()
3308 memcpy(&priv->beacon_after, &params->beacon_after, mwifiex_cfg80211_channel_switch()
3360 struct station_parameters *params) mwifiex_cfg80211_change_station()
3366 if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) mwifiex_cfg80211_change_station()
3373 priv->sta_params = params; mwifiex_cfg80211_change_station()
154 mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) mwifiex_cfg80211_mgmt_tx() argument
384 mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, bool pairwise, const u8 *mac_addr, struct key_params *params) mwifiex_cfg80211_add_key() argument
810 mwifiex_change_vif_to_p2p(struct net_device *dev, enum nl80211_iftype curr_iftype, enum nl80211_iftype type, u32 *flags, struct vif_params *params) mwifiex_change_vif_to_p2p() argument
881 mwifiex_change_vif_to_sta_adhoc(struct net_device *dev, enum nl80211_iftype curr_iftype, enum nl80211_iftype type, u32 *flags, struct vif_params *params) mwifiex_change_vif_to_sta_adhoc() argument
940 mwifiex_change_vif_to_ap(struct net_device *dev, enum nl80211_iftype curr_iftype, enum nl80211_iftype type, u32 *flags, struct vif_params *params) mwifiex_change_vif_to_ap() argument
995 mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) mwifiex_cfg80211_change_virtual_intf() argument
1583 mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, struct station_del_parameters *params) mwifiex_cfg80211_del_station() argument
1709 mwifiex_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) mwifiex_cfg80211_start_ap() argument
2105 mwifiex_set_ibss_params(struct mwifiex_private *priv, struct cfg80211_ibss_params *params) mwifiex_set_ibss_params() argument
2178 mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params) mwifiex_cfg80211_join_ibss() argument
2436 mwifiex_add_virtual_intf(struct wiphy *wiphy, const char *name, unsigned char name_assign_type, enum nl80211_iftype type, u32 *flags, struct vif_params *params) mwifiex_add_virtual_intf() argument
3246 mwifiex_cfg80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) mwifiex_cfg80211_add_station() argument
3262 mwifiex_cfg80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params) mwifiex_cfg80211_channel_switch() argument
3358 mwifiex_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) mwifiex_cfg80211_change_station() argument
H A Dsta_cmdresp.c60 pm = &resp->params.psmode_enh; mwifiex_process_cmdresp_error()
66 (le16_to_cpu(pm->params.ps_bitmap) & BITMAP_STA_PS) && mwifiex_process_cmdresp_error()
125 &resp->params.rssi_info_rsp; mwifiex_ret_802_11_rssi_info()
185 struct host_cmd_ds_802_11_snmp_mib *smib = &resp->params.smib; mwifiex_ret_802_11_snmp_mib()
232 &resp->params.get_log; mwifiex_ret_get_log()
279 struct host_cmd_ds_tx_rate_cfg *rate_cfg = &resp->params.tx_rate_cfg; mwifiex_ret_tx_rate_cfg()
394 struct host_cmd_ds_txpwr_cfg *txp_cfg = &resp->params.txp_cfg; mwifiex_ret_tx_power_cfg()
447 struct host_cmd_ds_rf_tx_pwr *txp = &resp->params.txp; mwifiex_ret_rf_tx_power()
471 struct host_cmd_ds_rf_ant_mimo *ant_mimo = &resp->params.ant_mimo; mwifiex_ret_rf_antenna()
472 struct host_cmd_ds_rf_ant_siso *ant_siso = &resp->params.ant_siso; mwifiex_ret_rf_antenna()
501 &resp->params.mac_addr; mwifiex_ret_802_11_mac_address()
533 priv->tx_rate = resp->params.tx_rate.tx_rate; mwifiex_ret_802_11_tx_rate_query()
534 priv->tx_htinfo = resp->params.tx_rate.ht_info; mwifiex_ret_802_11_tx_rate_query()
556 if (!memcmp(resp->params.deauth.mac_addr, mwifiex_ret_802_11_deauthenticate()
558 sizeof(resp->params.deauth.mac_addr))) mwifiex_ret_802_11_deauthenticate()
586 &resp->params.key_material; mwifiex_ret_802_11_key_material_v1()
617 key_v2 = &resp->params.key_material_v2; mwifiex_ret_802_11_key_material_v2()
657 &resp->params.domain_info_resp; mwifiex_ret_802_11d_domain_info()
701 struct host_cmd_ds_version_ext *ver_ext = &resp->params.verext; mwifiex_ret_ver_ext()
720 struct host_cmd_ds_remain_on_chan *resp_cfg = &resp->params.roc_cfg; mwifiex_ret_remain_on_chan()
736 struct host_cmd_ds_p2p_mode_cfg *mode_cfg = &resp->params.mode_cfg; mwifiex_ret_p2p_mode_cfg()
770 r.mac = &resp->params.mac_reg; mwifiex_ret_reg_access()
775 r.bbp = &resp->params.bbp_reg; mwifiex_ret_reg_access()
781 r.rf = &resp->params.rf_reg; mwifiex_ret_reg_access()
786 r.pmic = &resp->params.pmic_reg; mwifiex_ret_reg_access()
791 r.rf = &resp->params.rf_reg; mwifiex_ret_reg_access()
796 r.eeprom = &resp->params.eeprom; mwifiex_ret_reg_access()
828 &(resp->params.ibss_coalescing); mwifiex_ret_ibss_coalescing_status()
864 struct host_cmd_ds_tdls_oper *cmd_tdls_oper = &resp->params.tdls_oper; mwifiex_ret_tdls_oper()
928 &resp->params.subsc_evt; mwifiex_ret_subsc_evt()
956 &resp->params.sdio_rx_aggr_cfg; mwifiex_ret_sdio_rx_aggr_cfg()
1085 adapter->tx_buf_size = (u16) le16_to_cpu(resp->params. mwifiex_process_sta_cmdresp()
1096 le16_to_cpu(resp->params.tx_buf.mp_end_port)); mwifiex_process_sta_cmdresp()
/linux-4.1.27/sound/soc/intel/boards/
H A Dbytcr_rt5640.c68 struct snd_pcm_hw_params *params) byt_aif1_hw_params()
77 params_rate(params) * 512, byt_aif1_hw_params()
85 params_rate(params) * 50, byt_aif1_hw_params()
86 params_rate(params) * 512); byt_aif1_hw_params()
104 struct snd_pcm_hw_params *params) byt_codec_fixup()
106 struct snd_interval *rate = hw_param_interval(params, byt_codec_fixup()
108 struct snd_interval *channels = hw_param_interval(params, byt_codec_fixup()
116 params_set_format(params, SNDRV_PCM_FORMAT_S24_LE); byt_codec_fixup()
67 byt_aif1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) byt_aif1_hw_params() argument
103 byt_codec_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) byt_codec_fixup() argument
H A Dhaswell.c47 struct snd_pcm_hw_params *params) haswell_ssp0_fixup()
49 struct snd_interval *rate = hw_param_interval(params, haswell_ssp0_fixup()
51 struct snd_interval *channels = hw_param_interval(params, haswell_ssp0_fixup()
59 params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); haswell_ssp0_fixup()
64 struct snd_pcm_hw_params *params) haswell_rt5640_hw_params()
46 haswell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) haswell_ssp0_fixup() argument
63 haswell_rt5640_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) haswell_rt5640_hw_params() argument
H A Dcht_bsw_rt5645.c126 struct snd_pcm_hw_params *params) cht_aif1_hw_params()
134 CHT_PLAT_CLK_3_HZ, params_rate(params) * 512); cht_aif1_hw_params()
141 params_rate(params) * 512, SND_SOC_CLOCK_IN); cht_aif1_hw_params()
194 struct snd_pcm_hw_params *params) cht_codec_fixup()
196 struct snd_interval *rate = hw_param_interval(params, cht_codec_fixup()
198 struct snd_interval *channels = hw_param_interval(params, cht_codec_fixup()
206 params_set_format(params, SNDRV_PCM_FORMAT_S24_LE); cht_codec_fixup()
125 cht_aif1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) cht_aif1_hw_params() argument
193 cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) cht_codec_fixup() argument
H A Dcht_bsw_rt5672.c145 struct snd_pcm_hw_params *params) cht_aif1_hw_params()
153 CHT_PLAT_CLK_3_HZ, params_rate(params) * 512); cht_aif1_hw_params()
161 params_rate(params) * 512, cht_aif1_hw_params()
209 struct snd_pcm_hw_params *params) cht_codec_fixup()
211 struct snd_interval *rate = hw_param_interval(params, cht_codec_fixup()
213 struct snd_interval *channels = hw_param_interval(params, cht_codec_fixup()
221 params_set_format(params, SNDRV_PCM_FORMAT_S24_LE); cht_codec_fixup()
144 cht_aif1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) cht_aif1_hw_params() argument
208 cht_codec_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) cht_codec_fixup() argument
/linux-4.1.27/drivers/pps/
H A Dpps.c71 struct pps_kparams params; pps_cdev_ioctl() local
83 params = pps->params; pps_cdev_ioctl()
87 err = copy_to_user(uarg, &params, sizeof(struct pps_kparams)); pps_cdev_ioctl()
100 err = copy_from_user(&params, uarg, sizeof(struct pps_kparams)); pps_cdev_ioctl()
103 if (!(params.mode & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR))) { pps_cdev_ioctl()
105 params.mode); pps_cdev_ioctl()
110 if ((params.mode & ~pps->info.mode) != 0) { pps_cdev_ioctl()
112 params.mode); pps_cdev_ioctl()
119 pps->params = params; pps_cdev_ioctl()
122 if ((params.mode & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) == 0) { pps_cdev_ioctl()
125 params.mode); pps_cdev_ioctl()
126 pps->params.mode |= PPS_TSFMT_TSPEC; pps_cdev_ioctl()
129 pps->params.mode |= PPS_CANWAIT; pps_cdev_ioctl()
130 pps->params.api_version = PPS_API_VERS; pps_cdev_ioctl()
H A Dkapi.c108 pps->params.api_version = PPS_API_VERS; pps_register_source()
109 pps->params.mode = default_params; pps_register_source()
190 if ((pps->params.mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR))) pps_event()
194 pps->current_mode = pps->params.mode; pps_event()
195 if (event & pps->params.mode & PPS_CAPTUREASSERT) { pps_event()
197 if (pps->params.mode & PPS_OFFSETASSERT) pps_event()
199 &pps->params.assert_off_tu); pps_event()
209 if (event & pps->params.mode & PPS_CAPTURECLEAR) { pps_event()
211 if (pps->params.mode & PPS_OFFSETCLEAR) pps_event()
213 &pps->params.clear_off_tu); pps_event()
/linux-4.1.27/include/net/netfilter/
H A Dxt_rateest.h15 struct gnet_estimator params; member in struct:xt_rateest
/linux-4.1.27/fs/dlm/
H A Duser.c237 struct dlm_lock_params *params) device_user_lock()
248 if (!params->castaddr || !params->lksb) { device_user_lock()
257 ua->user_lksb = params->lksb; device_user_lock()
258 ua->castparam = params->castparam; device_user_lock()
259 ua->castaddr = params->castaddr; device_user_lock()
260 ua->bastparam = params->bastparam; device_user_lock()
261 ua->bastaddr = params->bastaddr; device_user_lock()
262 ua->xid = params->xid; device_user_lock()
264 if (params->flags & DLM_LKF_CONVERT) { device_user_lock()
266 params->mode, params->flags, device_user_lock()
267 params->lkid, params->lvb, device_user_lock()
268 (unsigned long) params->timeout); device_user_lock()
269 } else if (params->flags & DLM_LKF_ORPHAN) { device_user_lock()
271 params->mode, params->flags, device_user_lock()
272 params->name, params->namelen, device_user_lock()
273 (unsigned long) params->timeout, device_user_lock()
279 params->mode, params->flags, device_user_lock()
280 params->name, params->namelen, device_user_lock()
281 (unsigned long) params->timeout); device_user_lock()
291 struct dlm_lock_params *params) device_user_unlock()
305 ua->user_lksb = params->lksb; device_user_unlock()
306 ua->castparam = params->castparam; device_user_unlock()
307 ua->castaddr = params->castaddr; device_user_unlock()
309 if (params->flags & DLM_LKF_CANCEL) device_user_unlock()
310 error = dlm_user_cancel(ls, ua, params->flags, params->lkid); device_user_unlock()
312 error = dlm_user_unlock(ls, ua, params->flags, params->lkid, device_user_unlock()
313 params->lvb); device_user_unlock()
320 struct dlm_lock_params *params) device_user_deadlock()
329 error = dlm_user_deadlock(ls, params->flags, params->lkid); device_user_deadlock()
380 struct dlm_purge_params *params) device_user_purge()
389 error = dlm_user_purge(ls, proc, params->nodeid, params->pid); device_user_purge()
395 static int device_create_lockspace(struct dlm_lspace_params *params) device_create_lockspace() argument
404 error = dlm_new_lockspace(params->name, NULL, params->flags, device_create_lockspace()
414 error = dlm_device_register(ls, params->name); device_create_lockspace()
425 static int device_remove_lockspace(struct dlm_lspace_params *params) device_remove_lockspace() argument
434 ls = dlm_find_lockspace_device(params->minor); device_remove_lockspace()
438 if (params->flags & DLM_USER_LSFLG_FORCEFREE) device_remove_lockspace()
236 device_user_lock(struct dlm_user_proc *proc, struct dlm_lock_params *params) device_user_lock() argument
290 device_user_unlock(struct dlm_user_proc *proc, struct dlm_lock_params *params) device_user_unlock() argument
319 device_user_deadlock(struct dlm_user_proc *proc, struct dlm_lock_params *params) device_user_deadlock() argument
379 device_user_purge(struct dlm_user_proc *proc, struct dlm_purge_params *params) device_user_purge() argument
/linux-4.1.27/sound/arm/
H A Dpxa2xx-pcm-lib.c40 struct snd_pcm_hw_params *params) __pxa2xx_pcm_hw_params()
44 size_t totsize = params_buffer_bytes(params); __pxa2xx_pcm_hw_params()
45 size_t period = params_period_bytes(params); __pxa2xx_pcm_hw_params()
51 switch (rtd->params->addr_width) { __pxa2xx_pcm_hw_params()
66 switch (rtd->params->maxburst) { __pxa2xx_pcm_hw_params()
89 dma_desc->dtadr = rtd->params->addr; __pxa2xx_pcm_hw_params()
91 dma_desc->dsadr = rtd->params->addr; __pxa2xx_pcm_hw_params()
110 if (rtd && rtd->params && rtd->params->filter_data) { __pxa2xx_pcm_hw_free()
111 unsigned long req = *(unsigned long *) rtd->params->filter_data; __pxa2xx_pcm_hw_free()
174 if (!prtd || !prtd->params) __pxa2xx_pcm_prepare()
183 req = *(unsigned long *) prtd->params->filter_data; __pxa2xx_pcm_prepare()
39 __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) __pxa2xx_pcm_hw_params() argument
H A Dpxa2xx-pcm.h15 struct snd_dmaengine_dai_dma_data *params; member in struct:pxa2xx_runtime_data
/linux-4.1.27/sound/soc/fsl/
H A Dimx-pcm-fiq.c78 struct snd_pcm_hw_params *params) snd_imx_pcm_hw_params()
83 iprtd->periods = params_periods(params); snd_imx_pcm_hw_params()
84 iprtd->period = params_period_bytes(params); snd_imx_pcm_hw_params()
86 iprtd->poll_time_ns = 1000000000 / params_rate(params) * snd_imx_pcm_hw_params()
87 params_period_size(params); snd_imx_pcm_hw_params()
353 struct imx_pcm_fiq_params *params) imx_pcm_fiq_init()
363 mxc_set_irq_fiq(params->irq, 1); imx_pcm_fiq_init()
364 ssi_irq = params->irq; imx_pcm_fiq_init()
366 imx_pcm_fiq = params->irq; imx_pcm_fiq_init()
368 imx_ssi_fiq_base = (unsigned long)params->base; imx_pcm_fiq_init()
370 params->dma_params_tx->maxburst = 4; imx_pcm_fiq_init()
371 params->dma_params_rx->maxburst = 6; imx_pcm_fiq_init()
77 snd_imx_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) snd_imx_pcm_hw_params() argument
352 imx_pcm_fiq_init(struct platform_device *pdev, struct imx_pcm_fiq_params *params) imx_pcm_fiq_init() argument
H A Dmpc5200_psc_ac97.c142 struct snd_pcm_hw_params *params, psc_ac97_hw_analog_params()
151 __func__, substream, params_period_size(params), psc_ac97_hw_analog_params()
152 params_period_bytes(params), params_periods(params), psc_ac97_hw_analog_params()
153 params_buffer_size(params), params_buffer_bytes(params), psc_ac97_hw_analog_params()
154 params_channels(params), params_rate(params), psc_ac97_hw_analog_params()
155 params_format(params)); psc_ac97_hw_analog_params()
158 s->ac97_slot_bits = (params_channels(params) == 1) ? 0x100 : 0x300; psc_ac97_hw_analog_params()
165 struct snd_pcm_hw_params *params, psc_ac97_hw_digital_params()
172 if (params_channels(params) == 1) psc_ac97_hw_digital_params()
141 psc_ac97_hw_analog_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *cpu_dai) psc_ac97_hw_analog_params() argument
164 psc_ac97_hw_digital_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *cpu_dai) psc_ac97_hw_digital_params() argument
H A Dimx-pcm.h52 struct imx_pcm_fiq_params *params);
56 struct imx_pcm_fiq_params *params) imx_pcm_fiq_init()
55 imx_pcm_fiq_init(struct platform_device *pdev, struct imx_pcm_fiq_params *params) imx_pcm_fiq_init() argument
H A Dmpc5200_psc_i2s.c38 struct snd_pcm_hw_params *params, psc_i2s_hw_params()
47 __func__, substream, params_period_size(params), psc_i2s_hw_params()
48 params_period_bytes(params), params_periods(params), psc_i2s_hw_params()
49 params_buffer_size(params), params_buffer_bytes(params)); psc_i2s_hw_params()
51 switch (params_format(params)) { psc_i2s_hw_params()
37 psc_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) psc_i2s_hw_params() argument
/linux-4.1.27/fs/
H A Dbinfmt_elf_fdpic.c123 static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, elf_fdpic_fetch_phdrs() argument
130 if (params->hdr.e_phentsize != sizeof(struct elf_phdr)) elf_fdpic_fetch_phdrs()
132 if (params->hdr.e_phnum > 65536U / sizeof(struct elf_phdr)) elf_fdpic_fetch_phdrs()
135 size = params->hdr.e_phnum * sizeof(struct elf_phdr); elf_fdpic_fetch_phdrs()
136 params->phdrs = kmalloc(size, GFP_KERNEL); elf_fdpic_fetch_phdrs()
137 if (!params->phdrs) elf_fdpic_fetch_phdrs()
140 retval = kernel_read(file, params->hdr.e_phoff, elf_fdpic_fetch_phdrs()
141 (char *) params->phdrs, size); elf_fdpic_fetch_phdrs()
146 phdr = params->phdrs; elf_fdpic_fetch_phdrs()
147 for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { elf_fdpic_fetch_phdrs()
152 params->flags |= ELF_FDPIC_FLAG_EXEC_STACK; elf_fdpic_fetch_phdrs()
154 params->flags |= ELF_FDPIC_FLAG_NOEXEC_STACK; elf_fdpic_fetch_phdrs()
156 params->stack_size = phdr->p_memsz; elf_fdpic_fetch_phdrs()
723 * - if no other PIC bits are set in params->hdr->e_flags
730 static int elf_fdpic_map_file(struct elf_fdpic_params *params, elf_fdpic_map_file() argument
748 for (loop = 0; loop < params->hdr.e_phnum; loop++) elf_fdpic_map_file()
749 if (params->phdrs[loop].p_type == PT_LOAD) elf_fdpic_map_file()
760 params->loadmap = loadmap; elf_fdpic_map_file()
765 load_addr = params->load_addr; elf_fdpic_map_file()
769 switch (params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) { elf_fdpic_map_file()
773 ret = elf_fdpic_map_file_constdisp_on_uclinux(params, file, mm); elf_fdpic_map_file()
779 ret = elf_fdpic_map_file_by_direct_mmap(params, file, mm); elf_fdpic_map_file()
786 if (params->hdr.e_entry) { elf_fdpic_map_file()
789 if (params->hdr.e_entry >= seg->p_vaddr && elf_fdpic_map_file()
790 params->hdr.e_entry < seg->p_vaddr + seg->p_memsz) { elf_fdpic_map_file()
791 params->entry_addr = elf_fdpic_map_file()
792 (params->hdr.e_entry - seg->p_vaddr) + elf_fdpic_map_file()
800 stop = params->hdr.e_phoff; elf_fdpic_map_file()
801 stop += params->hdr.e_phnum * sizeof (struct elf_phdr); elf_fdpic_map_file()
802 phdr = params->phdrs; elf_fdpic_map_file()
804 for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { elf_fdpic_map_file()
808 if (phdr->p_offset > params->hdr.e_phoff || elf_fdpic_map_file()
817 params->ph_addr = elf_fdpic_map_file()
820 params->hdr.e_phoff - phdr->p_offset; elf_fdpic_map_file()
828 phdr = params->phdrs; elf_fdpic_map_file()
829 for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { elf_fdpic_map_file()
838 params->dynamic_addr = elf_fdpic_map_file()
851 params->dynamic_addr)[tmp - 1].d_tag != 0) elf_fdpic_map_file()
889 kdebug("- elfhdr : %lx", params->elfhdr_addr); elf_fdpic_map_file()
890 kdebug("- entry : %lx", params->entry_addr); elf_fdpic_map_file()
891 kdebug("- PHDR[] : %lx", params->ph_addr); elf_fdpic_map_file()
892 kdebug("- DYNAMIC[]: %lx", params->dynamic_addr); elf_fdpic_map_file()
914 struct elf_fdpic_params *params, elf_fdpic_map_file_constdisp_on_uclinux()
923 load_addr = params->load_addr; elf_fdpic_map_file_constdisp_on_uclinux()
924 seg = params->loadmap->segs; elf_fdpic_map_file_constdisp_on_uclinux()
928 phdr = params->phdrs; elf_fdpic_map_file_constdisp_on_uclinux()
929 for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { elf_fdpic_map_file_constdisp_on_uclinux()
930 if (params->phdrs[loop].p_type != PT_LOAD) elf_fdpic_map_file_constdisp_on_uclinux()
941 if (params->flags & ELF_FDPIC_FLAG_EXECUTABLE) elf_fdpic_map_file_constdisp_on_uclinux()
953 phdr = params->phdrs; elf_fdpic_map_file_constdisp_on_uclinux()
954 for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { elf_fdpic_map_file_constdisp_on_uclinux()
955 if (params->phdrs[loop].p_type != PT_LOAD) elf_fdpic_map_file_constdisp_on_uclinux()
969 params->elfhdr_addr = seg->addr; elf_fdpic_map_file_constdisp_on_uclinux()
1002 static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params, elf_fdpic_map_file_by_direct_mmap() argument
1011 load_addr = params->load_addr; elf_fdpic_map_file_by_direct_mmap()
1015 seg = params->loadmap->segs; elf_fdpic_map_file_by_direct_mmap()
1018 phdr = params->phdrs; elf_fdpic_map_file_by_direct_mmap()
1019 for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { elf_fdpic_map_file_by_direct_mmap()
1038 if (params->flags & ELF_FDPIC_FLAG_EXECUTABLE) elf_fdpic_map_file_by_direct_mmap()
1043 switch (params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) { elf_fdpic_map_file_by_direct_mmap()
1091 if ((params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) == elf_fdpic_map_file_by_direct_mmap()
1101 params->elfhdr_addr = seg->addr; elf_fdpic_map_file_by_direct_mmap()
913 elf_fdpic_map_file_constdisp_on_uclinux( struct elf_fdpic_params *params, struct file *file, struct mm_struct *mm) elf_fdpic_map_file_constdisp_on_uclinux() argument
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dgk20a.c122 const struct gk20a_clk_pllg_params *params; member in struct:gk20a_clk_priv
168 max_vco_f = priv->params->max_vco; gk20a_pllg_calc_mnp()
169 min_vco_f = priv->params->min_vco; gk20a_pllg_calc_mnp()
170 best_m = priv->params->max_m; gk20a_pllg_calc_mnp()
171 best_n = priv->params->min_n; gk20a_pllg_calc_mnp()
172 best_pl = priv->params->min_pl; gk20a_pllg_calc_mnp()
180 high_pl = min(high_pl, priv->params->max_pl); gk20a_pllg_calc_mnp()
181 high_pl = max(high_pl, priv->params->min_pl); gk20a_pllg_calc_mnp()
185 low_pl = min(low_pl, priv->params->max_pl); gk20a_pllg_calc_mnp()
186 low_pl = max(low_pl, priv->params->min_pl); gk20a_pllg_calc_mnp()
208 for (m = priv->params->min_m; m <= priv->params->max_m; m++) { gk20a_pllg_calc_mnp()
211 if (u_f < priv->params->min_u) gk20a_pllg_calc_mnp()
213 if (u_f > priv->params->max_u) gk20a_pllg_calc_mnp()
219 if (n > priv->params->max_n) gk20a_pllg_calc_mnp()
223 if (n < priv->params->min_n) gk20a_pllg_calc_mnp()
225 if (n > priv->params->max_n) gk20a_pllg_calc_mnp()
357 n_lo = DIV_ROUND_UP(m_old * priv->params->min_vco, _gk20a_pllg_program_mnp()
390 n_lo = DIV_ROUND_UP(priv->m * priv->params->min_vco, _gk20a_pllg_program_mnp()
448 n_lo = DIV_ROUND_UP(m * priv->params->min_vco, gk20a_pllg_disable()
658 priv->params = &gk20a_pllg_params; gk20a_clk_ctor()
/linux-4.1.27/drivers/acpi/
H A Dutils.c454 union acpi_object params[3] = { acpi_evaluate_ost() local
459 struct acpi_object_list arg_list = {3, params}; acpi_evaluate_ost()
461 params[0].integer.value = source_event; acpi_evaluate_ost()
462 params[1].integer.value = status_code; acpi_evaluate_ost()
464 params[2].buffer.pointer = status_buf->pointer; acpi_evaluate_ost()
465 params[2].buffer.length = status_buf->length; acpi_evaluate_ost()
467 params[2].buffer.pointer = NULL; acpi_evaluate_ost()
468 params[2].buffer.length = 0; acpi_evaluate_ost()
640 union acpi_object params[4]; acpi_evaluate_dsm() local
643 .pointer = params, acpi_evaluate_dsm()
646 params[0].type = ACPI_TYPE_BUFFER; acpi_evaluate_dsm()
647 params[0].buffer.length = 16; acpi_evaluate_dsm()
648 params[0].buffer.pointer = (char *)uuid; acpi_evaluate_dsm()
649 params[1].type = ACPI_TYPE_INTEGER; acpi_evaluate_dsm()
650 params[1].integer.value = rev; acpi_evaluate_dsm()
651 params[2].type = ACPI_TYPE_INTEGER; acpi_evaluate_dsm()
652 params[2].integer.value = func; acpi_evaluate_dsm()
654 params[3] = *argv4; acpi_evaluate_dsm()
656 params[3].type = ACPI_TYPE_PACKAGE; acpi_evaluate_dsm()
657 params[3].package.count = 0; acpi_evaluate_dsm()
658 params[3].package.elements = NULL; acpi_evaluate_dsm()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Den_main.c130 struct mlx4_en_profile *params = &mdev->profile; mlx4_en_get_profile() local
133 params->udp_rss = udp_rss; mlx4_en_get_profile()
134 params->num_tx_rings_p_up = mlx4_low_memory_profile() ? mlx4_en_get_profile()
138 if (params->udp_rss && !(mdev->dev->caps.flags mlx4_en_get_profile()
141 params->udp_rss = 0; mlx4_en_get_profile()
144 params->prof[i].rx_pause = 1; mlx4_en_get_profile()
145 params->prof[i].rx_ppp = pfcrx; mlx4_en_get_profile()
146 params->prof[i].tx_pause = 1; mlx4_en_get_profile()
147 params->prof[i].tx_ppp = pfctx; mlx4_en_get_profile()
148 params->prof[i].tx_ring_size = MLX4_EN_DEF_TX_RING_SIZE; mlx4_en_get_profile()
149 params->prof[i].rx_ring_size = MLX4_EN_DEF_RX_RING_SIZE; mlx4_en_get_profile()
150 params->prof[i].tx_ring_num = params->num_tx_rings_p_up * mlx4_en_get_profile()
152 params->prof[i].rss_rings = 0; mlx4_en_get_profile()
153 params->prof[i].inline_thold = inline_thold; mlx4_en_get_profile()
/linux-4.1.27/sound/core/oss/
H A Dpcm_oss.c143 * @params: the hw_params instance
150 snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params, snd_pcm_hw_param_value_min() argument
156 return snd_mask_min(hw_param_mask_c(params, var)); snd_pcm_hw_param_value_min()
159 const struct snd_interval *i = hw_param_interval_c(params, var); snd_pcm_hw_param_value_min()
169 * @params: the hw_params instance
176 snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params, snd_pcm_hw_param_value_max() argument
182 return snd_mask_max(hw_param_mask_c(params, var)); snd_pcm_hw_param_value_max()
185 const struct snd_interval *i = hw_param_interval_c(params, var); snd_pcm_hw_param_value_max()
193 static int _snd_pcm_hw_param_mask(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_mask() argument
198 changed = snd_mask_refine(hw_param_mask(params, var), val); _snd_pcm_hw_param_mask()
200 params->cmask |= 1 << var; _snd_pcm_hw_param_mask()
201 params->rmask |= 1 << var; _snd_pcm_hw_param_mask()
207 struct snd_pcm_hw_params *params, snd_pcm_hw_param_mask()
211 int changed = _snd_pcm_hw_param_mask(params, var, val); snd_pcm_hw_param_mask()
214 if (params->rmask) { snd_pcm_hw_param_mask()
215 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_mask()
222 static int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_min() argument
239 changed = snd_mask_refine_min(hw_param_mask(params, var), _snd_pcm_hw_param_min()
242 changed = snd_interval_refine_min(hw_param_interval(params, var), _snd_pcm_hw_param_min()
247 params->cmask |= 1 << var; _snd_pcm_hw_param_min()
248 params->rmask |= 1 << var; _snd_pcm_hw_param_min()
256 * @params: the hw_params instance
266 struct snd_pcm_hw_params *params, snd_pcm_hw_param_min()
270 int changed = _snd_pcm_hw_param_min(params, var, val, dir ? *dir : 0); snd_pcm_hw_param_min()
273 if (params->rmask) { snd_pcm_hw_param_min()
274 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_min()
278 return snd_pcm_hw_param_value_min(params, var, dir); snd_pcm_hw_param_min()
281 static int _snd_pcm_hw_param_max(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_max() argument
297 snd_mask_none(hw_param_mask(params, var)); _snd_pcm_hw_param_max()
300 changed = snd_mask_refine_max(hw_param_mask(params, var), _snd_pcm_hw_param_max()
303 changed = snd_interval_refine_max(hw_param_interval(params, var), _snd_pcm_hw_param_max()
308 params->cmask |= 1 << var; _snd_pcm_hw_param_max()
309 params->rmask |= 1 << var; _snd_pcm_hw_param_max()
317 * @params: the hw_params instance
327 struct snd_pcm_hw_params *params, snd_pcm_hw_param_max()
331 int changed = _snd_pcm_hw_param_max(params, var, val, dir ? *dir : 0); snd_pcm_hw_param_max()
334 if (params->rmask) { snd_pcm_hw_param_max()
335 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_max()
339 return snd_pcm_hw_param_value_max(params, var, dir); snd_pcm_hw_param_max()
389 * @params: the hw_params instance
401 struct snd_pcm_hw_params *params, snd_pcm_hw_param_near()
428 *save = *params; snd_pcm_hw_param_near()
430 min = snd_pcm_hw_param_min(pcm, params, var, min, &mindir); snd_pcm_hw_param_near()
449 *params = *params1; snd_pcm_hw_param_near()
454 *params = *save; snd_pcm_hw_param_near()
455 max = snd_pcm_hw_param_max(pcm, params, var, max, &maxdir); snd_pcm_hw_param_near()
465 v = snd_pcm_hw_param_last(pcm, params, var, dir); snd_pcm_hw_param_near()
467 v = snd_pcm_hw_param_first(pcm, params, var, dir); snd_pcm_hw_param_near()
472 static int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_set() argument
478 struct snd_mask *m = hw_param_mask(params, var); _snd_pcm_hw_param_set()
487 changed = snd_mask_refine_set(hw_param_mask(params, var), val); _snd_pcm_hw_param_set()
490 struct snd_interval *i = hw_param_interval(params, var); _snd_pcm_hw_param_set()
514 params->cmask |= 1 << var; _snd_pcm_hw_param_set()
515 params->rmask |= 1 << var; _snd_pcm_hw_param_set()
523 * @params: the hw_params instance
533 struct snd_pcm_hw_params *params, snd_pcm_hw_param_set()
537 int changed = _snd_pcm_hw_param_set(params, var, val, dir); snd_pcm_hw_param_set()
540 if (params->rmask) { snd_pcm_hw_param_set()
541 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_set()
545 return snd_pcm_hw_param_value(params, var, NULL); snd_pcm_hw_param_set()
548 static int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params, _snd_pcm_hw_param_setinteger() argument
552 changed = snd_interval_setinteger(hw_param_interval(params, var)); _snd_pcm_hw_param_setinteger()
554 params->cmask |= 1 << var; _snd_pcm_hw_param_setinteger()
555 params->rmask |= 1 << var; _snd_pcm_hw_param_setinteger()
798 struct snd_pcm_hw_params *params, unsigned int best_rate) choose_rate()
807 *save = *params; choose_rate()
817 ret = snd_pcm_hw_param_set(substream, params, choose_rate()
824 *params = *save; choose_rate()
834 return snd_pcm_hw_param_near(substream, params, SNDRV_PCM_HW_PARAM_RATE, best_rate, NULL); choose_rate()
841 struct snd_pcm_hw_params *params, *sparams; snd_pcm_oss_change_params() local
858 params = kmalloc(sizeof(*params), GFP_KERNEL); snd_pcm_oss_change_params()
860 if (!sw_params || !params || !sparams) { snd_pcm_oss_change_params()
918 memcpy(params, sparams, sizeof(*params)); snd_pcm_oss_change_params()
920 _snd_pcm_hw_params_any(params); snd_pcm_oss_change_params()
921 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_ACCESS, snd_pcm_oss_change_params()
923 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_FORMAT, snd_pcm_oss_change_params()
925 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_CHANNELS, snd_pcm_oss_change_params()
927 _snd_pcm_hw_param_set(params, SNDRV_PCM_HW_PARAM_RATE, snd_pcm_oss_change_params()
930 params_access(params), params_format(params), snd_pcm_oss_change_params()
931 params_channels(params), params_rate(params)); snd_pcm_oss_change_params()
937 oss_frame_size = snd_pcm_format_physical_width(params_format(params)) * snd_pcm_oss_change_params()
938 params_channels(params) / 8; snd_pcm_oss_change_params()
946 params, snd_pcm_oss_change_params()
974 err = snd_pcm_oss_period_size(substream, params, sparams); snd_pcm_oss_change_params()
1059 runtime->oss.format = snd_pcm_oss_format_to(params_format(params)); snd_pcm_oss_change_params()
1060 runtime->oss.channels = params_channels(params); snd_pcm_oss_change_params()
1061 runtime->oss.rate = params_rate(params); snd_pcm_oss_change_params()
1070 runtime->oss.params = 0; snd_pcm_oss_change_params()
1081 kfree(params); snd_pcm_oss_change_params()
1098 if (substream->runtime->oss.params) { snd_pcm_oss_get_active_substream()
1138 if (runtime->oss.params) { snd_pcm_oss_make_ready()
1717 runtime->oss.params = 1; snd_pcm_oss_set_rate()
1748 runtime->oss.params = 1; snd_pcm_oss_set_channels()
1780 struct snd_pcm_hw_params *params; snd_pcm_oss_get_formats() local
1799 params = kmalloc(sizeof(*params), GFP_KERNEL); snd_pcm_oss_get_formats()
1800 if (!params) snd_pcm_oss_get_formats()
1802 _snd_pcm_hw_params_any(params); snd_pcm_oss_get_formats()
1803 err = snd_pcm_hw_refine(substream, params); snd_pcm_oss_get_formats()
1804 format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); snd_pcm_oss_get_formats()
1805 kfree(params); snd_pcm_oss_get_formats()
1835 runtime->oss.params = 1; snd_pcm_oss_set_format()
1872 runtime->oss.params = 1; snd_pcm_oss_set_subdivide1()
1905 runtime->oss.params = 1; snd_pcm_oss_set_fragment1()
2074 if (runtime->oss.params || runtime->oss.prepare) snd_pcm_oss_get_odelay()
2101 if (runtime->oss.params || runtime->oss.prepare) { snd_pcm_oss_get_ptr()
2169 if (runtime->oss.params && snd_pcm_oss_get_space()
2276 runtime->oss.params = 1; snd_pcm_oss_init_substream()
2806 if (runtime->oss.params) { snd_pcm_oss_mmap()
206 snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, const struct snd_mask *val) snd_pcm_hw_param_mask() argument
265 snd_pcm_hw_param_min(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, unsigned int val, int *dir) snd_pcm_hw_param_min() argument
326 snd_pcm_hw_param_max(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, unsigned int val, int *dir) snd_pcm_hw_param_max() argument
400 snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, unsigned int best, int *dir) snd_pcm_hw_param_near() argument
532 snd_pcm_hw_param_set(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, unsigned int val, int dir) snd_pcm_hw_param_set() argument
797 choose_rate(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, unsigned int best_rate) choose_rate() argument
H A Dio.c109 struct snd_pcm_hw_params *params, snd_pcm_plugin_build_io()
119 if (snd_BUG_ON(!plug || !params)) snd_pcm_plugin_build_io()
121 format.format = params_format(params); snd_pcm_plugin_build_io()
122 format.rate = params_rate(params); snd_pcm_plugin_build_io()
123 format.channels = params_channels(params); snd_pcm_plugin_build_io()
130 plugin->access = params_access(params); snd_pcm_plugin_build_io()
108 snd_pcm_plugin_build_io(struct snd_pcm_substream *plug, struct snd_pcm_hw_params *params, struct snd_pcm_plugin **r_plugin) snd_pcm_plugin_build_io() argument
/linux-4.1.27/sound/soc/samsung/
H A Dsmdk_wm8994.c52 struct snd_pcm_hw_params *params) smdk_hw_params()
60 if (params_width(params) == 24) smdk_hw_params()
61 pll_out = params_rate(params) * 384; smdk_hw_params()
62 else if (params_rate(params) == 8000 || params_rate(params) == 11025) smdk_hw_params()
63 pll_out = params_rate(params) * 512; smdk_hw_params()
65 pll_out = params_rate(params) * 256; smdk_hw_params()
51 smdk_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) smdk_hw_params() argument
H A Djive_wm8750.c38 struct snd_pcm_hw_params *params) jive_hw_params()
47 switch (params_rate(params)) { jive_hw_params()
61 s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params), jive_hw_params()
37 jive_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) jive_hw_params() argument
H A Dsmdk_wm8580pcm.c47 struct snd_pcm_hw_params *params) smdk_wm8580_pcm_hw_params()
54 switch (params_rate(params)) { smdk_wm8580_pcm_hw_params()
59 __func__, __LINE__, params_rate(params)); smdk_wm8580_pcm_hw_params()
63 rfs = mclk_freq / params_rate(params) / 2; smdk_wm8580_pcm_hw_params()
46 smdk_wm8580_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) smdk_wm8580_pcm_hw_params() argument
H A Dsmdk_wm8994pcm.c51 struct snd_pcm_hw_params *params) smdk_wm8994_pcm_hw_params()
59 switch(params_rate(params)) { smdk_wm8994_pcm_hw_params()
65 __func__, __LINE__, params_rate(params)); smdk_wm8994_pcm_hw_params()
69 mclk_freq = params_rate(params) * rfs; smdk_wm8994_pcm_hw_params()
50 smdk_wm8994_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) smdk_wm8994_pcm_hw_params() argument
H A Dsmdk_wm8580.c32 struct snd_pcm_hw_params *params) smdk_hw_params()
39 switch (params_width(params)) { smdk_hw_params()
54 * results in (params_rate(params) * rfs), and itself, acceptable smdk_hw_params()
57 switch (params_rate(params)) { smdk_hw_params()
77 pll_out = params_rate(params) * rfs; smdk_hw_params()
31 smdk_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) smdk_hw_params() argument
H A Dbells.c249 .params = &sub_params,
273 .params = &sub_params,
285 .params = &baseband_params,
296 .params = &sub_params,
319 .params = &sub_params,
331 .params = &baseband_params,
342 .params = &sub_params,
/linux-4.1.27/drivers/net/wireless/libertas/
H A Dcfg.c1508 struct key_params *params) lbs_cfg_add_key()
1521 params->cipher, mac_addr); lbs_cfg_add_key()
1523 idx, params->key_len); lbs_cfg_add_key()
1524 if (params->key_len) lbs_cfg_add_key()
1526 params->key, params->key_len); lbs_cfg_add_key()
1528 lbs_deb_assoc("add_key: seq len %d\n", params->seq_len); lbs_cfg_add_key()
1529 if (params->seq_len) lbs_cfg_add_key()
1531 params->seq, params->seq_len); lbs_cfg_add_key()
1533 switch (params->cipher) { lbs_cfg_add_key()
1537 if ((priv->wep_key_len[idx] != params->key_len) || lbs_cfg_add_key()
1539 params->key, params->key_len) != 0) { lbs_cfg_add_key()
1540 priv->wep_key_len[idx] = params->key_len; lbs_cfg_add_key()
1542 params->key, params->key_len); lbs_cfg_add_key()
1551 key_type = (params->cipher == WLAN_CIPHER_SUITE_TKIP) lbs_cfg_add_key()
1557 params->key, params->key_len); lbs_cfg_add_key()
1560 wiphy_err(wiphy, "unhandled cipher 0x%x\n", params->cipher); lbs_cfg_add_key()
1656 struct vif_params *params) lbs_change_intf()
1700 struct cfg80211_ibss_params *params, lbs_join_post()
1720 *fake++ = params->ssid_len; lbs_join_post()
1721 memcpy(fake, params->ssid, params->ssid_len); lbs_join_post()
1722 fake += params->ssid_len; lbs_join_post()
1733 *fake++ = params->chandef.chan->hw_value; lbs_join_post()
1734 /* Fake IBSS params IE */ lbs_join_post()
1754 params->chandef.chan, lbs_join_post()
1759 params->beacon_interval, lbs_join_post()
1764 memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); lbs_join_post()
1765 priv->wdev->ssid_len = params->ssid_len; lbs_join_post()
1767 cfg80211_ibss_joined(priv->dev, bssid, params->chandef.chan, lbs_join_post()
1780 struct cfg80211_ibss_params *params, lbs_ibss_join_existing()
1829 memcpy(cmd.bss.ssid, params->ssid, params->ssid_len); lbs_ibss_join_existing()
1831 cmd.bss.beaconperiod = cpu_to_le16(params->beacon_interval); lbs_ibss_join_existing()
1834 cmd.bss.ds.channel = params->chandef.chan->hw_value; lbs_ibss_join_existing()
1883 lbs_join_post(priv, params, bss->bssid, bss->capability); lbs_ibss_join_existing()
1893 struct cfg80211_ibss_params *params) lbs_ibss_start_new()
1938 memcpy(cmd.ssid, params->ssid, params->ssid_len); lbs_ibss_start_new()
1940 cmd.beaconperiod = cpu_to_le16(params->beacon_interval); lbs_ibss_start_new()
1946 cmd.ds.channel = params->chandef.chan->hw_value; lbs_ibss_start_new()
1970 lbs_join_post(priv, params, resp->bssid, capability); lbs_ibss_start_new()
1979 struct cfg80211_ibss_params *params) lbs_join_ibss()
1990 if (!params->chandef.chan) { lbs_join_ibss()
1995 ret = lbs_set_channel(priv, params->chandef.chan->hw_value); lbs_join_ibss()
2001 bss = cfg80211_get_bss(wiphy, params->chandef.chan, params->bssid, lbs_join_ibss()
2002 params->ssid, params->ssid_len, lbs_join_ibss()
2006 ret = lbs_ibss_join_existing(priv, params, bss); lbs_join_ibss()
2009 ret = lbs_ibss_start_new(priv, params); lbs_join_ibss()
1506 lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 idx, bool pairwise, const u8 *mac_addr, struct key_params *params) lbs_cfg_add_key() argument
1654 lbs_change_intf(struct wiphy *wiphy, struct net_device *dev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) lbs_change_intf() argument
1699 lbs_join_post(struct lbs_private *priv, struct cfg80211_ibss_params *params, u8 *bssid, u16 capability) lbs_join_post() argument
1779 lbs_ibss_join_existing(struct lbs_private *priv, struct cfg80211_ibss_params *params, struct cfg80211_bss *bss) lbs_ibss_join_existing() argument
1892 lbs_ibss_start_new(struct lbs_private *priv, struct cfg80211_ibss_params *params) lbs_ibss_start_new() argument
1978 lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params) lbs_join_ibss() argument
/linux-4.1.27/lib/
H A Drhashtable.c663 static size_t rounded_hashtable_size(const struct rhashtable_params *params) rounded_hashtable_size() argument
665 return max(roundup_pow_of_two(params->nelem_hint * 4 / 3), rounded_hashtable_size()
666 (unsigned long)params->min_size); rounded_hashtable_size()
677 * @params: configuration parameters
690 * struct rhashtable_params params = {
711 * struct rhashtable_params params = {
718 const struct rhashtable_params *params) rhashtable_init()
725 if ((!params->key_len && !params->obj_hashfn) || rhashtable_init()
726 (params->obj_hashfn && !params->obj_cmpfn)) rhashtable_init()
729 if (params->nulls_base && params->nulls_base < (1U << RHT_BASE_SHIFT)) rhashtable_init()
735 memcpy(&ht->p, params, sizeof(*params)); rhashtable_init()
737 if (params->min_size) rhashtable_init()
738 ht->p.min_size = roundup_pow_of_two(params->min_size); rhashtable_init()
740 if (params->max_size) rhashtable_init()
741 ht->p.max_size = rounddown_pow_of_two(params->max_size); rhashtable_init()
743 if (params->insecure_max_entries) rhashtable_init()
745 rounddown_pow_of_two(params->insecure_max_entries); rhashtable_init()
751 if (params->nelem_hint) rhashtable_init()
766 if (!params->insecure_elasticity) rhashtable_init()
769 if (params->locks_mul) rhashtable_init()
770 ht->p.locks_mul = roundup_pow_of_two(params->locks_mul); rhashtable_init()
775 if (!params->hashfn) { rhashtable_init()
717 rhashtable_init(struct rhashtable *ht, const struct rhashtable_params *params) rhashtable_init() argument
/linux-4.1.27/drivers/media/pci/saa7164/
H A Dsaa7164-encoder.c122 struct tmHWStreamParameters *params = &port->hw_streamingparams; saa7164_encoder_buffers_alloc() local
133 params->samplesperline = 128; saa7164_encoder_buffers_alloc()
134 params->numberoflines = 256; saa7164_encoder_buffers_alloc()
135 params->pitch = 128; saa7164_encoder_buffers_alloc()
136 params->numpagetables = 2 + saa7164_encoder_buffers_alloc()
144 params->samplesperline = 188; saa7164_encoder_buffers_alloc()
145 params->numberoflines = 312; saa7164_encoder_buffers_alloc()
146 params->pitch = 188; saa7164_encoder_buffers_alloc()
147 params->numpagetables = 2 + saa7164_encoder_buffers_alloc()
153 params->bitspersample = 8; saa7164_encoder_buffers_alloc()
154 params->linethreshold = 0; saa7164_encoder_buffers_alloc()
155 params->pagetablelistvirt = NULL; saa7164_encoder_buffers_alloc()
156 params->pagetablelistphys = NULL; saa7164_encoder_buffers_alloc()
157 params->numpagetableentries = port->hwcfg.buffercount; saa7164_encoder_buffers_alloc()
162 params->numberoflines * saa7164_encoder_buffers_alloc()
163 params->pitch); saa7164_encoder_buffers_alloc()
183 len = params->numberoflines * params->pitch; saa7164_encoder_buffers_alloc()
359 struct analog_parameters params = { vidioc_s_frequency() local
390 fe->ops.tuner_ops.set_analog_params(fe, &params); vidioc_s_frequency()
501 struct saa7164_encoder_params *params = &port->encoder_params; saa7164_get_ctrl() local
505 ctrl->value = params->bitrate; saa7164_get_ctrl()
508 ctrl->value = params->stream_type; saa7164_get_ctrl()
511 ctrl->value = params->ctl_mute; saa7164_get_ctrl()
514 ctrl->value = params->ctl_aspect; saa7164_get_ctrl()
517 ctrl->value = params->bitrate_mode; saa7164_get_ctrl()
520 ctrl->value = params->refdist; saa7164_get_ctrl()
523 ctrl->value = params->bitrate_peak; saa7164_get_ctrl()
526 ctrl->value = params->gop_size; saa7164_get_ctrl()
634 struct saa7164_encoder_params *params = &port->encoder_params; saa7164_set_ctrl() local
639 params->bitrate = ctrl->value; saa7164_set_ctrl()
642 params->stream_type = ctrl->value; saa7164_set_ctrl()
645 params->ctl_mute = ctrl->value; saa7164_set_ctrl()
646 ret = saa7164_api_audio_mute(port, params->ctl_mute); saa7164_set_ctrl()
654 params->ctl_aspect = ctrl->value; saa7164_set_ctrl()
663 params->bitrate_mode = ctrl->value; saa7164_set_ctrl()
666 params->refdist = ctrl->value; saa7164_set_ctrl()
669 params->bitrate_peak = ctrl->value; saa7164_set_ctrl()
672 params->gop_size = ctrl->value; saa7164_set_ctrl()
805 static int fill_queryctrl(struct saa7164_encoder_params *params, fill_queryctrl() argument
H A Dsaa7164-buffer.c95 struct tmHWStreamParameters *params = &port->hw_streamingparams; saa7164_buffer_alloc() local
115 buf->actual_size = params->pitch * params->numberoflines; saa7164_buffer_alloc()
138 __func__, buf, params->numpagetables); saa7164_buffer_alloc()
145 for (i = 0 ; i < params->numpagetables; i++) { saa7164_buffer_alloc()
237 struct tmHWStreamParameters *params = &port->hw_streamingparams; saa7164_buffer_cfg_port() local
246 saa7164_writel(port->pitch, params->pitch); saa7164_buffer_cfg_port()
247 saa7164_writel(port->bufsize, params->pitch * params->numberoflines); saa7164_buffer_cfg_port()
H A Dsaa7164-vbi.c109 struct tmHWStreamParameters *params = &port->hw_streamingparams; saa7164_vbi_buffers_alloc() local
117 params->samplesperline = 1440; saa7164_vbi_buffers_alloc()
118 params->numberoflines = 12; saa7164_vbi_buffers_alloc()
119 params->numberoflines = 18; saa7164_vbi_buffers_alloc()
120 params->pitch = 1600; saa7164_vbi_buffers_alloc()
121 params->pitch = 1440; saa7164_vbi_buffers_alloc()
122 params->numpagetables = 2 + saa7164_vbi_buffers_alloc()
123 ((params->numberoflines * params->pitch) / PAGE_SIZE); saa7164_vbi_buffers_alloc()
124 params->bitspersample = 8; saa7164_vbi_buffers_alloc()
125 params->linethreshold = 0; saa7164_vbi_buffers_alloc()
126 params->pagetablelistvirt = NULL; saa7164_vbi_buffers_alloc()
127 params->pagetablelistphys = NULL; saa7164_vbi_buffers_alloc()
128 params->numpagetableentries = port->hwcfg.buffercount; saa7164_vbi_buffers_alloc()
133 params->numberoflines * saa7164_vbi_buffers_alloc()
134 params->pitch); saa7164_vbi_buffers_alloc()
154 len = params->numberoflines * params->pitch; saa7164_vbi_buffers_alloc()
331 struct analog_parameters params = { vidioc_s_frequency() local
362 fe->ops.tuner_ops.set_analog_params(fe, &params); vidioc_s_frequency()
473 struct saa7164_vbi_params *params = &port->vbi_params; saa7164_get_ctrl() local
477 ctrl->value = params->stream_type; saa7164_get_ctrl()
480 ctrl->value = params->ctl_mute; saa7164_get_ctrl()
483 ctrl->value = params->ctl_aspect; saa7164_get_ctrl()
486 ctrl->value = params->refdist; saa7164_get_ctrl()
489 ctrl->value = params->gop_size; saa7164_get_ctrl()
582 struct saa7164_vbi_params *params = &port->vbi_params; saa7164_set_ctrl() local
587 params->stream_type = ctrl->value; saa7164_set_ctrl()
590 params->ctl_mute = ctrl->value; saa7164_set_ctrl()
591 ret = saa7164_api_audio_mute(port, params->ctl_mute); saa7164_set_ctrl()
599 params->ctl_aspect = ctrl->value; saa7164_set_ctrl()
608 params->refdist = ctrl->value; saa7164_set_ctrl()
611 params->gop_size = ctrl->value; saa7164_set_ctrl()
744 static int fill_queryctrl(struct saa7164_vbi_params *params, fill_queryctrl() argument
/linux-4.1.27/drivers/media/platform/coda/
H A Dcoda-jpeg.c165 { 512, ctx->params.jpeg_qmat_tab[0], 64 }, coda_jpeg_write_tables()
166 { 576, ctx->params.jpeg_qmat_tab[1], 64 }, coda_jpeg_write_tables()
167 { 640, ctx->params.jpeg_qmat_tab[1], 64 }, coda_jpeg_write_tables()
214 ctx->params.jpeg_quality = quality; coda_set_jpeg_compression_quality()
231 if (ctx->params.jpeg_qmat_tab[0]) { coda_set_jpeg_compression_quality()
232 memcpy(ctx->params.jpeg_qmat_tab[0], luma_q, 64); coda_set_jpeg_compression_quality()
233 coda_scale_quant_table(ctx->params.jpeg_qmat_tab[0], scale); coda_set_jpeg_compression_quality()
235 if (ctx->params.jpeg_qmat_tab[1]) { coda_set_jpeg_compression_quality()
236 memcpy(ctx->params.jpeg_qmat_tab[1], chroma_q, 64); coda_set_jpeg_compression_quality()
237 coda_scale_quant_table(ctx->params.jpeg_qmat_tab[1], scale); coda_set_jpeg_compression_quality()
H A Dcoda-bit.c90 coda_write(dev, ctx->params.codec_mode, CODA_REG_BIT_RUN_COD_STD); coda_command_async()
91 coda_write(dev, ctx->params.codec_mode_aux, CODA7_REG_BIT_RUN_AUX_STD); coda_command_async()
766 if (!ctx->params.jpeg_qmat_tab[0]) coda_start_encoding()
767 ctx->params.jpeg_qmat_tab[0] = kmalloc(64, GFP_KERNEL); coda_start_encoding()
768 if (!ctx->params.jpeg_qmat_tab[1]) coda_start_encoding()
769 ctx->params.jpeg_qmat_tab[1] = kmalloc(64, GFP_KERNEL); coda_start_encoding()
770 coda_set_jpeg_compression_quality(ctx, ctx->params.jpeg_quality); coda_start_encoding()
829 ctx->params.framerate = 0; coda_start_encoding()
830 coda_write(dev, ctx->params.framerate, coda_start_encoding()
833 ctx->params.codec_mode = ctx->codec->mode; coda_start_encoding()
851 if (ctx->params.h264_deblk_enabled) { coda_start_encoding()
852 value = ((ctx->params.h264_deblk_alpha & coda_start_encoding()
855 ((ctx->params.h264_deblk_beta & coda_start_encoding()
865 coda_write(dev, ctx->params.jpeg_restart_interval, coda_start_encoding()
885 switch (ctx->params.slice_mode) { coda_start_encoding()
890 value = (ctx->params.slice_max_mb & coda_start_encoding()
898 value = (ctx->params.slice_max_bits & coda_start_encoding()
907 value = ctx->params.gop_size & CODA_GOP_SIZE_MASK; coda_start_encoding()
911 if (ctx->params.bitrate) { coda_start_encoding()
913 value = (ctx->params.bitrate & CODA_RATECONTROL_BITRATE_MASK) coda_start_encoding()
924 coda_write(dev, ctx->params.intra_refresh, coda_start_encoding()
941 if (ctx->params.h264_min_qp || ctx->params.h264_max_qp) { coda_start_encoding()
943 ctx->params.h264_min_qp << CODA_QPMIN_OFFSET | coda_start_encoding()
944 ctx->params.h264_max_qp << CODA_QPMAX_OFFSET, coda_start_encoding()
948 if (ctx->params.h264_max_qp) coda_start_encoding()
959 if (ctx->params.h264_min_qp) coda_start_encoding()
961 if (ctx->params.h264_max_qp) coda_start_encoding()
1147 if (src_buf->v4l2_buf.sequence % ctx->params.gop_size) { coda_prepare_encode()
1189 quant_param = ctx->params.h264_intra_qp; coda_prepare_encode()
1192 quant_param = ctx->params.mpeg4_intra_qp; coda_prepare_encode()
1206 quant_param = ctx->params.h264_inter_qp; coda_prepare_encode()
1209 quant_param = ctx->params.mpeg4_inter_qp; coda_prepare_encode()
1219 if (ctx->params.rot_mode) coda_prepare_encode()
1220 rot_mode = CODA_ROT_MIR_ENABLE | ctx->params.rot_mode; coda_prepare_encode()
1312 ctx->gopcounter = ctx->params.gop_size - 1; coda_finish_encode()
1473 ctx->params.codec_mode = ctx->codec->mode; __coda_start_decoding()
1476 ctx->params.codec_mode_aux = CODA_MP4_AUX_MPEG4; __coda_start_decoding()
1478 ctx->params.codec_mode_aux = 0; __coda_start_decoding()
1711 coda_write(dev, CODA_ROT_MIR_ENABLE | ctx->params.rot_mode, coda_prepare_decode()
/linux-4.1.27/sound/soc/intel/atom/
H A Dsst-mfld-platform-compress.c103 struct snd_compr_params *params) sst_platform_compr_set_params()
119 pr_debug("compr_set_params: fill stream params ret_val = 0x%x\n", retval); sst_platform_compr_set_params()
123 switch (params->codec.id) { sst_platform_compr_set_params()
126 str_params.sparams.uc.mp3_params.num_chan = params->codec.ch_in; sst_platform_compr_set_params()
133 str_params.sparams.uc.aac_params.num_chan = params->codec.ch_in; sst_platform_compr_set_params()
135 if (params->codec.format == SND_AUDIOSTREAMFORMAT_MP4ADTS) sst_platform_compr_set_params()
138 else if (params->codec.format == SND_AUDIOSTREAMFORMAT_RAW) sst_platform_compr_set_params()
142 pr_err("Undefined format%d\n", params->codec.format); sst_platform_compr_set_params()
146 params->codec.sample_rate; sst_platform_compr_set_params()
151 pr_err("codec not supported, id =%d\n", params->codec.id); sst_platform_compr_set_params()
102 sst_platform_compr_set_params(struct snd_compr_stream *cstream, struct snd_compr_params *params) sst_platform_compr_set_params() argument
/linux-4.1.27/drivers/net/ethernet/ti/
H A Dcpsw_ale.c123 WARN_ON(idx > ale->params.ale_entries); cpsw_ale_read()
125 __raw_writel(idx, ale->params.ale_regs + ALE_TABLE_CONTROL); cpsw_ale_read()
128 ale_entry[i] = __raw_readl(ale->params.ale_regs + cpsw_ale_read()
138 WARN_ON(idx > ale->params.ale_entries); cpsw_ale_write()
141 __raw_writel(ale_entry[i], ale->params.ale_regs + cpsw_ale_write()
144 __raw_writel(idx | ALE_TABLE_WRITE, ale->params.ale_regs + cpsw_ale_write()
155 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_match_addr()
176 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_match_vlan()
192 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_match_free()
206 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_find_ageable()
243 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_flush_multicast()
287 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_flush()
476 for (idx = 0; idx < ale->params.ale_entries; idx++) { cpsw_ale_set_allmulti()
701 if (port < 0 || port > ale->params.ale_ports) cpsw_ale_control_set()
711 tmp = __raw_readl(ale->params.ale_regs + offset); cpsw_ale_control_set()
713 __raw_writel(tmp, ale->params.ale_regs + offset); cpsw_ale_control_set()
732 if (port < 0 || port > ale->params.ale_ports) cpsw_ale_control_get()
738 tmp = __raw_readl(ale->params.ale_regs + offset) >> shift; cpsw_ale_control_get()
771 rev = __raw_readl(ale->params.ale_regs + ALE_IDVER); cpsw_ale_start()
772 dev_dbg(ale->params.dev, "initialized cpsw ale revision %d.%d\n", cpsw_ale_start()
793 struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params) cpsw_ale_create() argument
801 ale->params = *params; cpsw_ale_create()
802 ale->ageout = ale->params.ale_ageout * HZ; cpsw_ale_create()
822 for (i = 0; i < ale->params.ale_entries; i++) { cpsw_ale_dump()
H A Ddavinci_cpdma.c105 struct cpdma_params params; member in struct:cpdma_ctlr
128 /* The following make access to common cpdma_ctlr params more readable */
129 #define dmaregs params.dmaregs
130 #define num_chan params.num_chan
266 struct cpdma_ctlr *cpdma_ctlr_create(struct cpdma_params *params) cpdma_ctlr_create() argument
270 ctlr = devm_kzalloc(params->dev, sizeof(*ctlr), GFP_KERNEL); cpdma_ctlr_create()
275 ctlr->params = *params; cpdma_ctlr_create()
276 ctlr->dev = params->dev; cpdma_ctlr_create()
280 ctlr->params.desc_mem_phys, cpdma_ctlr_create()
281 ctlr->params.desc_hw_addr, cpdma_ctlr_create()
282 ctlr->params.desc_mem_size, cpdma_ctlr_create()
283 ctlr->params.desc_align); cpdma_ctlr_create()
304 if (ctlr->params.has_soft_reset) { cpdma_ctlr_start()
318 __raw_writel(0, ctlr->params.txhdp + 4 * i); cpdma_ctlr_start()
319 __raw_writel(0, ctlr->params.rxhdp + 4 * i); cpdma_ctlr_start()
320 __raw_writel(0, ctlr->params.txcp + 4 * i); cpdma_ctlr_start()
321 __raw_writel(0, ctlr->params.rxcp + 4 * i); cpdma_ctlr_start()
425 if (!ctlr->params.has_ext_regs) { cpdma_ctlr_dump()
521 chan->hdp = ctlr->params.rxhdp + offset; cpdma_chan_create()
522 chan->cp = ctlr->params.rxcp + offset; cpdma_chan_create()
523 chan->rxfree = ctlr->params.rxfree + offset; cpdma_chan_create()
529 chan->hdp = ctlr->params.txhdp + offset; cpdma_chan_create()
530 chan->cp = ctlr->params.txcp + offset; cpdma_chan_create()
685 if (len < ctlr->params.min_packet_size) { cpdma_chan_submit()
686 len = ctlr->params.min_packet_size; cpdma_chan_submit()
979 if (!ctlr->params.has_ext_regs) cpdma_control_get()
1011 if (!ctlr->params.has_ext_regs) cpdma_control_set()
/linux-4.1.27/include/linux/
H A Drhashtable.h212 const void *key, const struct rhashtable_params params) rht_key_hashfn()
216 /* params must be equal to ht->p if it isn't constant. */ rht_key_hashfn()
217 if (!__builtin_constant_p(params.key_len)) rht_key_hashfn()
219 else if (params.key_len) { rht_key_hashfn()
220 unsigned int key_len = params.key_len; rht_key_hashfn()
222 if (params.hashfn) rht_key_hashfn()
223 hash = params.hashfn(key, key_len, tbl->hash_rnd); rht_key_hashfn()
232 if (params.hashfn) rht_key_hashfn()
233 hash = params.hashfn(key, key_len, tbl->hash_rnd); rht_key_hashfn()
243 const struct rhash_head *he, const struct rhashtable_params params) rht_head_hashfn()
247 return likely(params.obj_hashfn) ? rht_head_hashfn()
248 rht_bucket_index(tbl, params.obj_hashfn(ptr, params.key_len ?: rht_head_hashfn()
251 rht_key_hashfn(ht, tbl, ptr + params.key_offset, params); rht_head_hashfn()
340 const struct rhashtable_params *params);
519 * @params: hash table parameters
528 const struct rhashtable_params params) rhashtable_lookup_fast()
542 hash = rht_key_hashfn(ht, tbl, key, params); rht_for_each_rcu()
544 if (params.obj_cmpfn ? rht_for_each_rcu()
545 params.obj_cmpfn(&arg, rht_obj(ht, he)) : rht_for_each_rcu()
566 const struct rhashtable_params params) __rhashtable_insert_fast()
588 hash = rht_head_hashfn(ht, tbl, obj, params); __rhashtable_insert_fast()
626 unlikely(!(params.obj_cmpfn ? rht_for_each()
627 params.obj_cmpfn(&arg, rht_obj(ht, head)) : rht_for_each()
657 * @params: hash table parameters
671 const struct rhashtable_params params) rhashtable_insert_fast()
673 return __rhashtable_insert_fast(ht, NULL, obj, params); rhashtable_insert_fast()
680 * @params: hash table parameters
699 const struct rhashtable_params params) rhashtable_lookup_insert_fast()
706 params); rhashtable_lookup_insert_fast()
715 * @params: hash table parameters
733 const struct rhashtable_params params) rhashtable_lookup_insert_key()
737 return __rhashtable_insert_fast(ht, key, obj, params); rhashtable_lookup_insert_key()
743 struct rhash_head *obj, const struct rhashtable_params params) __rhashtable_remove_fast()
751 hash = rht_head_hashfn(ht, tbl, obj, params); __rhashtable_remove_fast()
777 * @params: hash table parameters
790 const struct rhashtable_params params) rhashtable_remove_fast()
804 while ((err = __rhashtable_remove_fast(ht, tbl, obj, params)) && rhashtable_remove_fast()
210 rht_key_hashfn( struct rhashtable *ht, const struct bucket_table *tbl, const void *key, const struct rhashtable_params params) rht_key_hashfn() argument
241 rht_head_hashfn( struct rhashtable *ht, const struct bucket_table *tbl, const struct rhash_head *he, const struct rhashtable_params params) rht_head_hashfn() argument
526 rhashtable_lookup_fast( struct rhashtable *ht, const void *key, const struct rhashtable_params params) rhashtable_lookup_fast() argument
564 __rhashtable_insert_fast( struct rhashtable *ht, const void *key, struct rhash_head *obj, const struct rhashtable_params params) __rhashtable_insert_fast() argument
669 rhashtable_insert_fast( struct rhashtable *ht, struct rhash_head *obj, const struct rhashtable_params params) rhashtable_insert_fast() argument
697 rhashtable_lookup_insert_fast( struct rhashtable *ht, struct rhash_head *obj, const struct rhashtable_params params) rhashtable_lookup_insert_fast() argument
731 rhashtable_lookup_insert_key( struct rhashtable *ht, const void *key, struct rhash_head *obj, const struct rhashtable_params params) rhashtable_lookup_insert_key() argument
741 __rhashtable_remove_fast( struct rhashtable *ht, struct bucket_table *tbl, struct rhash_head *obj, const struct rhashtable_params params) __rhashtable_remove_fast() argument
788 rhashtable_remove_fast( struct rhashtable *ht, struct rhash_head *obj, const struct rhashtable_params params) rhashtable_remove_fast() argument
/linux-4.1.27/drivers/cpufreq/
H A Dgx-suspmod.c451 struct gxfreq_params *params; cpufreq_gx_init() local
465 params = kzalloc(sizeof(*params), GFP_KERNEL); cpufreq_gx_init()
466 if (params == NULL) cpufreq_gx_init()
469 params->cs55x0 = gx_pci; cpufreq_gx_init()
470 gx_params = params; cpufreq_gx_init()
473 pci_read_config_byte(params->cs55x0, PCI_SUSCFG, &(params->pci_suscfg)); cpufreq_gx_init()
474 pci_read_config_byte(params->cs55x0, PCI_PMER1, &(params->pci_pmer1)); cpufreq_gx_init()
475 pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2)); cpufreq_gx_init()
476 pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration)); cpufreq_gx_init()
477 pci_read_config_byte(params->cs55x0, PCI_MODOFF, cpufreq_gx_init()
478 &(params->off_duration)); cpufreq_gx_init()
482 kfree(params); cpufreq_gx_init()
/linux-4.1.27/net/nfc/
H A Ddigital_core.c161 struct digital_tg_mdaa_params *params; digital_wq_cmd() local
198 params = cmd->mdaa_params; digital_wq_cmd()
200 rc = ddev->ops->tg_listen_mdaa(ddev, params, cmd->timeout, digital_wq_cmd()
231 struct sk_buff *skb, struct digital_tg_mdaa_params *params, digital_send_cmd()
244 cmd->mdaa_params = params; digital_send_cmd()
282 struct digital_tg_mdaa_params *params; digital_tg_listen_mdaa() local
284 params = kzalloc(sizeof(struct digital_tg_mdaa_params), GFP_KERNEL); digital_tg_listen_mdaa()
285 if (!params) digital_tg_listen_mdaa()
288 params->sens_res = DIGITAL_SENS_RES_NFC_DEP; digital_tg_listen_mdaa()
289 get_random_bytes(params->nfcid1, sizeof(params->nfcid1)); digital_tg_listen_mdaa()
290 params->sel_res = DIGITAL_SEL_RES_NFC_DEP; digital_tg_listen_mdaa()
292 params->nfcid2[0] = DIGITAL_SENSF_NFCID2_NFC_DEP_B1; digital_tg_listen_mdaa()
293 params->nfcid2[1] = DIGITAL_SENSF_NFCID2_NFC_DEP_B2; digital_tg_listen_mdaa()
294 get_random_bytes(params->nfcid2 + 2, NFC_NFCID2_MAXSIZE - 2); digital_tg_listen_mdaa()
295 params->sc = DIGITAL_SENSF_FELICA_SC; digital_tg_listen_mdaa()
297 return digital_send_cmd(ddev, DIGITAL_CMD_TG_LISTEN_MDAA, NULL, params, digital_tg_listen_mdaa()
230 digital_send_cmd(struct nfc_digital_dev *ddev, u8 cmd_type, struct sk_buff *skb, struct digital_tg_mdaa_params *params, u16 timeout, nfc_digital_cmd_complete_t cmd_cb, void *cb_context) digital_send_cmd() argument
/linux-4.1.27/drivers/hid/
H A Dhid-logitech-hidpp.c73 u8 params[HIDPP_REPORT_LONG_LENGTH - 4U]; member in struct:fap
79 u8 params[HIDPP_REPORT_LONG_LENGTH - 4U]; member in struct:rap
204 ret = response->rap.params[1]; hidpp_send_message_sync()
211 ret = response->fap.params[1]; hidpp_send_message_sync()
223 u8 feat_index, u8 funcindex_clientid, u8 *params, int param_count, hidpp_send_fap_command_sync()
229 if (param_count > sizeof(message->fap.params)) hidpp_send_fap_command_sync()
238 memcpy(&message->fap.params, params, param_count); hidpp_send_fap_command_sync()
246 u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int param_count, hidpp_send_rap_command_sync()
256 if (param_count > sizeof(message->rap.params)) hidpp_send_rap_command_sync()
265 memcpy(&message->rap.params, params, param_count); hidpp_send_rap_command_sync()
292 (answer->fap.params[0] == question->fap.funcindex_clientid); hidpp_match_error()
345 u8 params[1] = { DEVICE_NAME }; hidpp_get_unifying_name() local
353 params, 1, &response); hidpp_get_unifying_name()
357 len = response.rap.params[1]; hidpp_get_unifying_name()
359 if (2 + len > sizeof(response.rap.params)) hidpp_get_unifying_name()
366 memcpy(name, &response.rap.params[2], len); hidpp_get_unifying_name()
389 u8 params[2] = { feature >> 8, feature & 0x00FF }; hidpp_root_get_feature() local
394 params, 2, &response); hidpp_root_get_feature()
398 *feature_index = response.fap.params[0]; hidpp_root_get_feature()
399 *feature_type = response.fap.params[1]; hidpp_root_get_feature()
432 hidpp->protocol_major = response.fap.params[0]; hidpp_root_get_protocol_version()
433 hidpp->protocol_minor = response.fap.params[1]; hidpp_root_get_protocol_version()
476 *nameLength = response.fap.params[0]; hidpp_devicenametype_get_count()
509 device_name[i] = response.fap.params[i]; hidpp_devicenametype_get_device_name()
603 u8 *params = (u8 *)response.fap.params; hidpp_touchpad_get_raw_info() local
616 raw_info->x_size = get_unaligned_be16(&params[0]); hidpp_touchpad_get_raw_info()
617 raw_info->y_size = get_unaligned_be16(&params[2]); hidpp_touchpad_get_raw_info()
618 raw_info->z_range = params[4]; hidpp_touchpad_get_raw_info()
619 raw_info->area_range = params[5]; hidpp_touchpad_get_raw_info()
620 raw_info->maxcontacts = params[7]; hidpp_touchpad_get_raw_info()
621 raw_info->origin = params[8]; hidpp_touchpad_get_raw_info()
623 raw_info->res = get_unaligned_be16(&params[13]) * 2 / 51; hidpp_touchpad_get_raw_info()
643 u8 params = send_raw_reports | (sensor_enhanced_settings << 2); hidpp_touchpad_set_raw_report_state() local
646 CMD_TOUCHPAD_SET_RAW_REPORT_STATE, &params, 1, &response); hidpp_touchpad_set_raw_report_state()
998 !(report->rap.params[0] & (1 << 6))); hidpp_raw_hidpp_event()
222 hidpp_send_fap_command_sync(struct hidpp_device *hidpp, u8 feat_index, u8 funcindex_clientid, u8 *params, int param_count, struct hidpp_report *response) hidpp_send_fap_command_sync() argument
245 hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev, u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int param_count, struct hidpp_report *response) hidpp_send_rap_command_sync() argument
/linux-4.1.27/drivers/media/rc/
H A Dite-cir.c188 sample_period = dev->params.sample_period; ite_decode_bytes()
238 freq = dev->params.tx_carrier_freq; ite_set_carrier_params()
242 low_freq = dev->params.rx_low_carrier_freq; ite_set_carrier_params()
243 high_freq = dev->params.rx_high_carrier_freq; ite_set_carrier_params()
270 dev->params.set_carrier_params(dev, ite_is_high_carrier_freq(freq), ite_set_carrier_params()
272 ite_get_pulse_width_bits(freq, dev->params.tx_duty_cycle)); ite_set_carrier_params()
291 iflags = dev->params.get_irq_causes(dev); ite_cir_isr()
297 dev->params.get_rx_bytes(dev, rx_buf, ite_cir_isr()
346 dev->params.rx_low_carrier_freq = carrier_low; ite_set_rx_carrier_range()
347 dev->params.rx_high_carrier_freq = carrier_high; ite_set_rx_carrier_range()
361 dev->params.tx_carrier_freq = carrier; ite_set_tx_carrier()
375 dev->params.tx_duty_cycle = duty_cycle; ite_set_tx_duty_cycle()
411 (ITE_BAUDRATE_DIVISOR * dev->params.sample_period * ite_tx_ir()
415 dev->params.disable_rx(dev); ite_tx_ir()
422 ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev); ite_tx_ir()
467 fifo_avail = ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev); ite_tx_ir()
472 dev->params. ite_tx_ir()
479 wait_event_interruptible(dev->tx_queue, (fifo_avail = ITE_TX_FIFO_LEN - dev->params.get_tx_used_slots(dev)) >= 8); ite_tx_ir()
485 dev->params. ite_tx_ir()
490 dev->params.put_tx_byte(dev, val); ite_tx_ir()
496 * otherwise we could configure the RX carrier params instead of the ite_tx_ir()
498 fifo_remaining = dev->params.get_tx_used_slots(dev); ite_tx_ir()
525 dev->params.enable_rx(dev); ite_tx_ir()
545 dev->params.idle_rx(dev); ite_s_idle()
1313 dev->params.enable_rx(dev); ite_open()
1336 dev->params.disable(dev); ite_close()
1528 itdev->params = *dev_desc; ite_probe()
1532 itdev->params.sample_period = sample_period; ite_probe()
1535 itdev->params.tx_carrier_freq = tx_carrier_freq; ite_probe()
1538 itdev->params.tx_duty_cycle = tx_duty_cycle; ite_probe()
1541 itdev->params.rx_low_carrier_freq = rx_low_carrier_freq; ite_probe()
1544 itdev->params.rx_high_carrier_freq = rx_high_carrier_freq; ite_probe()
1548 itdev->params.hw_tx_capable); ite_probe()
1550 itdev->params.sample_period); ite_probe()
1552 itdev->params.tx_carrier_freq); ite_probe()
1554 itdev->params.tx_duty_cycle); ite_probe()
1556 itdev->params.rx_low_carrier_freq); ite_probe()
1558 itdev->params.rx_high_carrier_freq); ite_probe()
1561 itdev->params.init_hardware(itdev); ite_probe()
1575 itdev->params.sample_period; ite_probe()
1577 itdev->params.sample_period; ite_probe()
1580 if (itdev->params.hw_tx_capable) { ite_probe()
1613 release_region(itdev->cir_addr, itdev->params.io_region_size); ite_probe()
1634 dev->params.disable(dev); ite_remove()
1640 release_region(dev->cir_addr, dev->params.io_region_size); ite_remove()
1660 dev->params.disable(dev); ite_suspend()
1677 dev->params.init_hardware(dev); ite_resume()
1679 dev->params.enable_rx(dev); ite_resume()
1696 dev->params.disable(dev); ite_shutdown()
/linux-4.1.27/drivers/usb/host/whci/
H A Dwusb.c73 u32 params; whc_mmcie_add() local
75 params = (interval << 24) whc_mmcie_add()
80 return whc_do_gencmd(whc, WUSBGENCMDSTS_MMCIE_ADD, params, wuie, wuie->bLength); whc_mmcie_add()
86 u32 params; whc_mmcie_rm() local
88 params = handle; whc_mmcie_rm()
90 return whc_do_gencmd(whc, WUSBGENCMDSTS_MMCIE_RM, params, NULL, 0); whc_mmcie_rm()
H A Dhw.c44 * @params: parameters for the command (the WUSBGENCMDPARAMS register value).
48 int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len) whc_do_gencmd() argument
78 le_writel(params, whc->base + WUSBGENCMDPARAMS); whc_do_gencmd()
/linux-4.1.27/arch/microblaze/kernel/
H A Dprom.c101 void __init early_init_devtree(void *params) early_init_devtree() argument
103 pr_debug(" -> early_init_devtree(%p)\n", params); early_init_devtree()
105 early_init_dt_scan(params); early_init_devtree()
/linux-4.1.27/sound/soc/blackfin/
H A Dbfin-eval-adav80x.c34 struct snd_pcm_hw_params *params) bfin_eval_adav80x_hw_params()
41 27000000, params_rate(params) * 256); bfin_eval_adav80x_hw_params()
46 params_rate(params) * 256, SND_SOC_CLOCK_IN); bfin_eval_adav80x_hw_params()
33 bfin_eval_adav80x_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) bfin_eval_adav80x_hw_params() argument
/linux-4.1.27/arch/x86/um/
H A Dstub_32.S30 /* load syscall params */
H A Dstub_64.S45 /* load syscall params */
/linux-4.1.27/net/dccp/
H A Dqpolicy.c76 __be32 params; member in struct:dccp_qpolicy_operations
83 .params = 0,
89 .params = DCCP_SCM_PRIORITY,
136 return (qpol_table[dccp_sk(sk)->dccps_qpolicy].params & param) == param; dccp_qpolicy_param_ok()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb4/
H A Dcxgb4_main.c1062 j = s->ofldqsets / adap->params.nports; /* ofld queues per channel */ for_each_ofldrxq()
1081 j = s->rdmaciqs / adap->params.nports; /* rdmaq queues per channel */
1098 t4_write_reg(adap, is_t4(adap->params.chip) ?
1329 return adap->params.offload; is_offload()
1697 (is_t4(adap->params.chip) || is_t5(adap->params.chip))) tid_init()
1925 if (is_t4(adap->params.chip)) { cxgb4_dbfifo_count()
2032 if (is_t4(adap->params.chip)) cxgb4_sync_txq_pidx()
2103 } else if (is_t4(adap->params.chip)) { cxgb4_read_tpte()
2201 if (is_t4(adap->params.chip)) { drain_db_fifo()
2304 if (is_t4(adap->params.chip)) sync_txq_pidx()
2337 if (is_t4(adap->params.chip)) { process_db_drop()
2371 if (is_t4(adap->params.chip)) { t4_db_full()
2382 if (is_t4(adap->params.chip)) { t4_db_dropped()
2401 lli.mtus = adap->params.mtus; uld_attach()
2412 lli.nchan = adap->params.nports; uld_attach()
2413 lli.nports = adap->params.nports; uld_attach()
2414 lli.wr_cred = adap->params.ofldq_wr_cred; uld_attach()
2415 lli.adapter_type = adap->params.chip; uld_attach()
2417 lli.cclk_ps = 1000000000 / adap->params.vpd.cclk; uld_attach()
2418 lli.udb_density = 1 << adap->params.sge.eq_qpp; uld_attach()
2419 lli.ucq_density = 1 << adap->params.sge.iq_qpp; uld_attach()
2420 lli.filt_mode = adap->params.tp.vlan_pri_map; uld_attach()
2426 lli.fw_vers = adap->params.fw_vers; uld_attach()
2432 lli.max_ordird_qp = adap->params.max_ordird_qp; uld_attach()
2433 lli.max_ird_adapter = adap->params.max_ird_adapter; uld_attach()
2434 lli.ulptx_memwrite_dsgl = adap->params.ulptx_memwrite_dsgl; uld_attach()
2808 if (adap->params.tp.vlan_pri_map & PORT_F) { cxgb4_create_server_filter()
2814 if (adap->params.tp.vlan_pri_map & PROTOCOL_F) { cxgb4_create_server_filter()
3080 if (is_t4(adap->params.chip)) { setup_memwin()
3193 adap->params.tp.tx_modq_map = 0xE4; adap_init1()
3195 TX_MOD_QUEUE_REQ_MAP_V(adap->params.tp.tx_modq_map)); adap_init1()
3306 switch (CHELSIO_CHIP_VERSION(adapter->params.chip)) { adap_init0_config()
3326 u32 params[7], val[7]; adap_init0_config() local
3335 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | adap_init0_config()
3338 adapter->fn, 0, 1, params, val); adap_init0_config()
3531 u32 params[7], val[7]; adap_init0() local
3559 t4_get_fw_version(adap, &adap->params.fw_vers); adap_init0()
3560 t4_get_tp_version(adap, &adap->params.tp_vers); adap_init0()
3571 fw_info = find_fw_info(CHELSIO_CHIP_VERSION(adap->params.chip)); adap_init0()
3575 CHELSIO_CHIP_VERSION(adap->params.chip)); adap_init0()
3615 ret = get_vpd_params(adap, &adap->params.vpd); adap_init0()
3631 adap->params.nports = hweight32(port_vec); adap_init0()
3632 adap->params.portvec = port_vec; adap_init0()
3648 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | adap_init0()
3651 params, val); adap_init0()
3688 adap->params.bypass = 1; adap_init0()
3703 params[0] = FW_PARAM_PFVF(EQ_START); adap_init0()
3704 params[1] = FW_PARAM_PFVF(L2T_START); adap_init0()
3705 params[2] = FW_PARAM_PFVF(L2T_END); adap_init0()
3706 params[3] = FW_PARAM_PFVF(FILTER_START); adap_init0()
3707 params[4] = FW_PARAM_PFVF(FILTER_END); adap_init0()
3708 params[5] = FW_PARAM_PFVF(IQFLINT_START); adap_init0()
3709 ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 6, params, val); adap_init0()
3725 params[0] = FW_PARAM_PFVF(EQ_END); adap_init0()
3726 params[1] = FW_PARAM_PFVF(IQFLINT_END); adap_init0()
3727 ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, params, val); adap_init0()
3764 params[0] = FW_PARAM_PFVF(CLIP_START); adap_init0()
3765 params[1] = FW_PARAM_PFVF(CLIP_END); adap_init0()
3766 ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, params, val); adap_init0()
3772 /* query params related to active filter region */ adap_init0()
3773 params[0] = FW_PARAM_PFVF(ACTIVE_FILTER_START); adap_init0()
3774 params[1] = FW_PARAM_PFVF(ACTIVE_FILTER_END); adap_init0()
3775 ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, params, val); adap_init0()
3790 params[0] = FW_PARAM_PFVF(CPLFW4MSG_ENCAP); adap_init0()
3792 (void) t4_set_params(adap, adap->mbox, adap->fn, 0, 1, params, val); adap_init0()
3800 if (is_t4(adap->params.chip)) { adap_init0()
3801 adap->params.ulptx_memwrite_dsgl = false; adap_init0()
3803 params[0] = FW_PARAM_DEV(ULPTX_MEMWRITE_DSGL); adap_init0()
3805 1, params, val); adap_init0()
3806 adap->params.ulptx_memwrite_dsgl = (ret == 0 && val[0] != 0); adap_init0()
3824 params[0] = FW_PARAM_DEV(NTID); adap_init0()
3825 params[1] = FW_PARAM_PFVF(SERVER_START); adap_init0()
3826 params[2] = FW_PARAM_PFVF(SERVER_END); adap_init0()
3827 params[3] = FW_PARAM_PFVF(TDDP_START); adap_init0()
3828 params[4] = FW_PARAM_PFVF(TDDP_END); adap_init0()
3829 params[5] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ); adap_init0()
3831 params, val); adap_init0()
3857 adap->params.ofldq_wr_cred = val[5]; adap_init0()
3859 adap->params.offload = 1; adap_init0()
3862 params[0] = FW_PARAM_PFVF(STAG_START); adap_init0()
3863 params[1] = FW_PARAM_PFVF(STAG_END); adap_init0()
3864 params[2] = FW_PARAM_PFVF(RQ_START); adap_init0()
3865 params[3] = FW_PARAM_PFVF(RQ_END); adap_init0()
3866 params[4] = FW_PARAM_PFVF(PBL_START); adap_init0()
3867 params[5] = FW_PARAM_PFVF(PBL_END); adap_init0()
3869 params, val); adap_init0()
3879 params[0] = FW_PARAM_PFVF(SQRQ_START); adap_init0()
3880 params[1] = FW_PARAM_PFVF(SQRQ_END); adap_init0()
3881 params[2] = FW_PARAM_PFVF(CQ_START); adap_init0()
3882 params[3] = FW_PARAM_PFVF(CQ_END); adap_init0()
3883 params[4] = FW_PARAM_PFVF(OCQ_START); adap_init0()
3884 params[5] = FW_PARAM_PFVF(OCQ_END); adap_init0()
3885 ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 6, params, adap_init0()
3896 params[0] = FW_PARAM_DEV(MAXORDIRD_QP); adap_init0()
3897 params[1] = FW_PARAM_DEV(MAXIRD_ADAPTER); adap_init0()
3898 ret = t4_query_params(adap, adap->mbox, adap->fn, 0, 2, params, adap_init0()
3901 adap->params.max_ordird_qp = 8; adap_init0()
3902 adap->params.max_ird_adapter = 32 * adap->tids.ntids; adap_init0()
3905 adap->params.max_ordird_qp = val[0]; adap_init0()
3906 adap->params.max_ird_adapter = val[1]; adap_init0()
3910 adap->params.max_ordird_qp, adap_init0()
3911 adap->params.max_ird_adapter); adap_init0()
3914 params[0] = FW_PARAM_PFVF(ISCSI_START); adap_init0()
3915 params[1] = FW_PARAM_PFVF(ISCSI_END); adap_init0()
3917 params, val); adap_init0()
3931 t4_read_mtu_tbl(adap, adap->params.mtus, NULL); adap_init0()
3953 if (adap->params.mtus[i] == 1492) { adap_init0()
3954 adap->params.mtus[i] = 1488; adap_init0()
3958 t4_load_mtus(adap, adap->params.mtus, adap->params.a_wnd, adap_init0()
3959 adap->params.b_wnd); adap_init0()
4060 t4_load_mtus(adap, adap->params.mtus, adap->params.a_wnd,
4061 adap->params.b_wnd);
4132 if (adap->params.nports * 8 > MAX_ETH_QSETS) { cfg_queues()
4134 MAX_ETH_QSETS, adap->params.nports * 8); cfg_queues()
4151 q10g = (MAX_ETH_QSETS - (adap->params.nports - n10g)) / n10g;
4176 s->ofldqsets = roundup(i, adap->params.nports);
4178 s->ofldqsets = adap->params.nports;
4180 s->rdmaqs = adap->params.nports;
4188 s->rdmaciqs = (s->rdmaciqs / adap->params.nports) *
4189 adap->params.nports;
4190 s->rdmaciqs = max_t(int, s->rdmaciqs, adap->params.nports);
4278 unsigned int nchan = adap->params.nports; enable_msix()
4299 need = 8 * adap->params.nports + EXTRA_VECS + ofld_need; enable_msix()
4301 need = adap->params.nports + EXTRA_VECS + ofld_need; enable_msix()
4365 if (adap->params.pci.speed == PCI_EXP_LNKSTA_CLS_2_5GB) print_port_info()
4367 else if (adap->params.pci.speed == PCI_EXP_LNKSTA_CLS_5_0GB) print_port_info()
4369 else if (adap->params.pci.speed == PCI_EXP_LNKSTA_CLS_8_0GB) print_port_info()
4385 adap->params.vpd.id, print_port_info()
4386 CHELSIO_CHIP_RELEASE(adap->params.chip), buf, print_port_info()
4387 is_offload(adap) ? "R" : "", adap->params.pci.width, spd, print_port_info()
4391 adap->params.vpd.sn, adap->params.vpd.pn); print_port_info()
4532 if (!is_t4(adapter->params.chip)) { init_one()
4622 adapter->params.offload = 0;
4634 adapter->params.offload = 0;
4640 adapter->params.offload = 0;
4704 if (!is_t4(adapter->params.chip))
4768 if (!is_t4(adapter->params.chip)) remove_one()
/linux-4.1.27/drivers/tty/
H A Dsynclink_gt.c295 MGSL_PARAMS params; /* communications parameters */ member in struct:slgt_info
504 static int get_params(struct slgt_info *info, MGSL_PARAMS __user *params);
505 static int set_params(struct slgt_info *info, MGSL_PARAMS __user *params);
821 if (info->params.mode == MGSL_MODE_HDLC) { update_tx_timer()
921 if (info->params.data_rate) { wait_until_sent()
1003 if (info->tx_enabled && info->params.mode == MGSL_MODE_ASYNC) tx_hold()
1149 tmp_params.mode = (compat_ulong_t)info->params.mode; get_params32()
1150 tmp_params.loopback = info->params.loopback; get_params32()
1151 tmp_params.flags = info->params.flags; get_params32()
1152 tmp_params.encoding = info->params.encoding; get_params32()
1153 tmp_params.clock_speed = (compat_ulong_t)info->params.clock_speed; get_params32()
1154 tmp_params.addr_filter = info->params.addr_filter; get_params32()
1155 tmp_params.crc_type = info->params.crc_type; get_params32()
1156 tmp_params.preamble_length = info->params.preamble_length; get_params32()
1157 tmp_params.preamble = info->params.preamble; get_params32()
1158 tmp_params.data_rate = (compat_ulong_t)info->params.data_rate; get_params32()
1159 tmp_params.data_bits = info->params.data_bits; get_params32()
1160 tmp_params.stop_bits = info->params.stop_bits; get_params32()
1161 tmp_params.parity = info->params.parity; get_params32()
1179 info->params.mode = tmp_params.mode; set_params32()
1180 info->params.loopback = tmp_params.loopback; set_params32()
1181 info->params.flags = tmp_params.flags; set_params32()
1182 info->params.encoding = tmp_params.encoding; set_params32()
1183 info->params.clock_speed = tmp_params.clock_speed; set_params32()
1184 info->params.addr_filter = tmp_params.addr_filter; set_params32()
1185 info->params.crc_type = tmp_params.crc_type; set_params32()
1186 info->params.preamble_length = tmp_params.preamble_length; set_params32()
1187 info->params.preamble = tmp_params.preamble; set_params32()
1188 info->params.data_rate = tmp_params.data_rate; set_params32()
1189 info->params.data_bits = tmp_params.data_bits; set_params32()
1190 info->params.stop_bits = tmp_params.stop_bits; set_params32()
1191 info->params.parity = tmp_params.parity; set_params32()
1282 if (info->params.mode != MGSL_MODE_ASYNC) { line_info()
1475 info->params.encoding = new_encoding; hdlcdev_attach()
1476 info->params.crc_type = new_crctype; hdlcdev_attach()
1649 flags = info->params.flags & (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | hdlcdev_ioctl()
1662 new_line.clock_rate = info->params.clock_speed; hdlcdev_ioctl()
1663 new_line.loopback = info->params.loopback ? 1:0; hdlcdev_ioctl()
1682 case CLOCK_DEFAULT: flags = info->params.flags & hdlcdev_ioctl()
1693 info->params.flags &= ~(HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | hdlcdev_ioctl()
1697 info->params.flags |= flags; hdlcdev_ioctl()
1699 info->params.loopback = new_line.loopback; hdlcdev_ioctl()
1702 info->params.clock_speed = new_line.clock_rate; hdlcdev_ioctl()
1704 info->params.clock_speed = 0; hdlcdev_ioctl()
1966 switch(info->params.mode) { bh_handler()
2140 if (info->params.mode == MGSL_MODE_ASYNC) isr_rxdata()
2167 if (info->params.mode == MGSL_MODE_ASYNC) { isr_serial()
2308 if (info->params.mode != MGSL_MODE_ASYNC) { isr_txeom()
2324 if (info->params.mode != MGSL_MODE_ASYNC && info->drop_rts_on_tx_done) { isr_txeom()
2514 if (info->params.mode != MGSL_MODE_ASYNC || program_hw()
2561 case CS5: info->params.data_bits = 5; break; change_params()
2562 case CS6: info->params.data_bits = 6; break; change_params()
2563 case CS7: info->params.data_bits = 7; break; change_params()
2564 case CS8: info->params.data_bits = 8; break; change_params()
2565 default: info->params.data_bits = 7; break; change_params()
2568 info->params.stop_bits = (cflag & CSTOPB) ? 2 : 1; change_params()
2571 info->params.parity = (cflag & PARODD) ? ASYNC_PARITY_ODD : ASYNC_PARITY_EVEN; change_params()
2573 info->params.parity = ASYNC_PARITY_NONE; change_params()
2578 bits_per_char = info->params.data_bits + change_params()
2579 info->params.stop_bits + 1; change_params()
2581 info->params.data_rate = tty_get_baud_rate(info->port.tty); change_params()
2583 if (info->params.data_rate) { change_params()
2585 info->params.data_rate; change_params()
2635 if (copy_to_user(user_params, &info->params, sizeof(MGSL_PARAMS))) get_params()
2653 memcpy(&info->params, &tmp_params, sizeof(MGSL_PARAMS)); set_params()
2675 if (info->params.mode != MGSL_MODE_ASYNC) set_txidle()
3571 info->params.mode = MGSL_MODE_ASYNC; add_device()
3615 memcpy(&info->params,&default_params,sizeof(MGSL_PARAMS)); alloc_dev()
3938 if (info->params.mode != MGSL_MODE_ASYNC) { enable_loopback()
3950 if (info->params.clock_speed) enable_loopback()
3951 set_rate(info, info->params.clock_speed); enable_loopback()
4020 if (info->params.mode == MGSL_MODE_ASYNC) { rx_start()
4030 if (info->params.mode != MGSL_MODE_ASYNC) { rx_start()
4059 if (info->params.mode != MGSL_MODE_ASYNC) { tx_start()
4060 if (info->params.flags & HDLC_FLAG_AUTO_RTS) { tx_start()
4163 if (info->params.parity != ASYNC_PARITY_NONE) { async_mode()
4165 if (info->params.parity == ASYNC_PARITY_ODD) async_mode()
4169 switch (info->params.data_bits) async_mode()
4176 if (info->params.stop_bits != 1) async_mode()
4179 if (info->params.flags & HDLC_FLAG_AUTO_CTS) async_mode()
4203 if (info->params.parity != ASYNC_PARITY_NONE) { async_mode()
4205 if (info->params.parity == ASYNC_PARITY_ODD) async_mode()
4209 switch (info->params.data_bits) async_mode()
4216 if (info->params.flags & HDLC_FLAG_AUTO_DCD) async_mode()
4255 if ((rd_reg32(info, JCR) & BIT8) && info->params.data_rate && async_mode()
4256 ((info->base_clock < (info->params.data_rate * 16)) || async_mode()
4257 (info->base_clock % (info->params.data_rate * 16)))) { async_mode()
4260 set_rate(info, info->params.data_rate * 8); async_mode()
4263 set_rate(info, info->params.data_rate * 16); async_mode()
4269 if (info->params.loopback) async_mode()
4303 switch(info->params.mode) { sync_mode()
4314 switch(info->params.encoding) sync_mode()
4325 switch (info->params.crc_type & HDLC_CRC_MASK) sync_mode()
4331 if (info->params.preamble != HDLC_PREAMBLE_PATTERN_NONE) sync_mode()
4334 switch (info->params.preamble_length) sync_mode()
4341 if (info->params.flags & HDLC_FLAG_AUTO_CTS) sync_mode()
4348 switch (info->params.preamble) sync_mode()
4378 switch(info->params.mode) { sync_mode()
4387 switch(info->params.encoding) sync_mode()
4398 switch (info->params.crc_type & HDLC_CRC_MASK) sync_mode()
4404 if (info->params.flags & HDLC_FLAG_AUTO_DCD) sync_mode()
4418 if (info->params.flags & HDLC_FLAG_TXC_BRG) sync_mode()
4423 if (info->params.flags & HDLC_FLAG_RXC_DPLL) sync_mode()
4428 else if (info->params.flags & HDLC_FLAG_TXC_DPLL) sync_mode()
4430 else if (info->params.flags & HDLC_FLAG_TXC_RXCPIN) sync_mode()
4433 if (info->params.flags & HDLC_FLAG_RXC_BRG) sync_mode()
4435 else if (info->params.flags & HDLC_FLAG_RXC_DPLL) sync_mode()
4437 else if (info->params.flags & HDLC_FLAG_RXC_TXCPIN) sync_mode()
4440 if (info->params.clock_speed) sync_mode()
4445 if (info->params.flags & (HDLC_FLAG_TXC_DPLL + HDLC_FLAG_RXC_DPLL)) sync_mode()
4448 switch(info->params.encoding) sync_mode()
4461 set_rate(info, info->params.clock_speed * 16); sync_mode()
4464 set_rate(info, info->params.clock_speed); sync_mode()
4491 if (info->params.loopback) sync_mode()
4660 switch (info->params.crc_type & HDLC_CRC_MASK) { rx_get_frame()
4675 if (framesize == 0 && info->params.addr_filter != 0xff) rx_get_frame()
4708 if ((info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_NONE) rx_get_frame()
4712 (addr_field != 0xff && addr_field != info->params.addr_filter)) { rx_get_frame()
4722 if (!(info->params.crc_type & HDLC_CRC_RETURN_EX)) rx_get_frame()
4738 if (!(info->params.crc_type & HDLC_CRC_RETURN_EX)) { rx_get_frame()
4763 if (info->params.crc_type & HDLC_CRC_RETURN_EX) { rx_get_frame()
4795 switch(info->params.mode) { rx_get_buf()
4939 if ((!size && info->params.mode == MGSL_MODE_HDLC) || tx_load()
4940 info->params.mode == MGSL_MODE_RAW) tx_load()
4995 u32 speed = info->params.data_rate; irq_test()
4997 info->params.data_rate = 921600; irq_test()
5025 info->params.data_rate = speed; irq_test()
5067 MGSL_PARAMS params; loopback_test() local
5069 memcpy(&params, &info->params, sizeof(params)); loopback_test()
5071 info->params.mode = MGSL_MODE_ASYNC; loopback_test()
5072 info->params.data_rate = 921600; loopback_test()
5073 info->params.loopback = 1; loopback_test()
5109 memcpy(&info->params, &params, sizeof(info->params)); loopback_test()
5140 if(info->tx_active && info->params.mode == MGSL_MODE_HDLC) { tx_timeout()
/linux-4.1.27/drivers/platform/x86/
H A Dwmi.c288 union acpi_object params[3]; wmi_evaluate_method() local
304 input.pointer = params; wmi_evaluate_method()
305 params[0].type = ACPI_TYPE_INTEGER; wmi_evaluate_method()
306 params[0].integer.value = instance; wmi_evaluate_method()
307 params[1].type = ACPI_TYPE_INTEGER; wmi_evaluate_method()
308 params[1].integer.value = method_id; wmi_evaluate_method()
314 params[2].type = ACPI_TYPE_STRING; wmi_evaluate_method()
316 params[2].type = ACPI_TYPE_BUFFER; wmi_evaluate_method()
318 params[2].buffer.length = in->length; wmi_evaluate_method()
319 params[2].buffer.pointer = in->pointer; wmi_evaluate_method()
420 union acpi_object params[2]; wmi_set_block() local
440 input.pointer = params; wmi_set_block()
441 params[0].type = ACPI_TYPE_INTEGER; wmi_set_block()
442 params[0].integer.value = instance; wmi_set_block()
445 params[1].type = ACPI_TYPE_STRING; wmi_set_block()
447 params[1].type = ACPI_TYPE_BUFFER; wmi_set_block()
449 params[1].buffer.length = in->length; wmi_set_block()
450 params[1].buffer.pointer = in->pointer; wmi_set_block()
622 union acpi_object params[1]; wmi_get_event_data() local
628 input.pointer = params; wmi_get_event_data()
629 params[0].type = ACPI_TYPE_INTEGER; wmi_get_event_data()
630 params[0].integer.value = event; wmi_get_event_data()
/linux-4.1.27/drivers/staging/wlan-ng/
H A Dcfg80211.c108 struct vif_params *params) prism2_change_virtual_intf()
149 struct key_params *params) prism2_add_key()
157 switch (params->cipher) { prism2_add_key()
190 params->key_len, params->key); prism2_add_key()
213 struct key_params params; prism2_get_key() local
220 memset(&params, 0, sizeof(params)); prism2_get_key()
223 params.cipher = WLAN_CIPHER_SUITE_WEP104; prism2_get_key()
225 params.cipher = WLAN_CIPHER_SUITE_WEP104; prism2_get_key()
228 params.key_len = len; prism2_get_key()
229 params.key = wlandev->wep_keys[key_index]; prism2_get_key()
230 params.seq_len = 0; prism2_get_key()
232 callback(cookie, &params); prism2_get_key()
643 struct cfg80211_ibss_params *params) prism2_join_ibss()
105 prism2_change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) prism2_change_virtual_intf() argument
147 prism2_add_key(struct wiphy *wiphy, struct net_device *dev, u8 key_index, bool pairwise, const u8 *mac_addr, struct key_params *params) prism2_add_key() argument
642 prism2_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params) prism2_join_ibss() argument
/linux-4.1.27/sound/drivers/opl3/
H A Dopl3_synth.c74 static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params);
147 struct snd_dm_fm_params params; snd_opl3_ioctl() local
148 if (copy_from_user(&params, argp, sizeof(struct snd_dm_fm_params))) snd_opl3_ioctl()
150 return snd_opl3_set_params(opl3, &params); snd_opl3_ioctl()
229 /* offsets for SBI params */
549 static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params) snd_opl3_set_params() argument
555 if (params->kbd_split) snd_opl3_set_params()
561 if (params->am_depth) snd_opl3_set_params()
564 if (params->vib_depth) snd_opl3_set_params()
567 if (params->rhythm) { snd_opl3_set_params()
574 if (params->bass) snd_opl3_set_params()
576 if (params->snare) snd_opl3_set_params()
578 if (params->tomtom) snd_opl3_set_params()
580 if (params->cymbal) snd_opl3_set_params()
582 if (params->hihat) snd_opl3_set_params()
/linux-4.1.27/net/ieee802154/
H A Dnl-mac.c113 struct ieee802154_mac_params params; ieee802154_nl_fill_iface() local
116 ops->get_mac_params(dev, &params); ieee802154_nl_fill_iface()
120 params.transmit_power) || ieee802154_nl_fill_iface()
121 nla_put_u8(msg, IEEE802154_ATTR_LBT_ENABLED, params.lbt) || ieee802154_nl_fill_iface()
123 params.cca.mode) || ieee802154_nl_fill_iface()
125 params.cca_ed_level) || ieee802154_nl_fill_iface()
127 params.csma_retries) || ieee802154_nl_fill_iface()
129 params.min_be) || ieee802154_nl_fill_iface()
131 params.max_be) || ieee802154_nl_fill_iface()
133 params.frame_retries)) ieee802154_nl_fill_iface()
475 struct ieee802154_mac_params params; ieee802154_set_macparams() local
510 ops->get_mac_params(dev, &params); ieee802154_set_macparams()
513 params.transmit_power = nla_get_s8(info->attrs[IEEE802154_ATTR_TXPOWER]); ieee802154_set_macparams()
516 params.lbt = nla_get_u8(info->attrs[IEEE802154_ATTR_LBT_ENABLED]); ieee802154_set_macparams()
519 params.cca.mode = nla_get_u8(info->attrs[IEEE802154_ATTR_CCA_MODE]); ieee802154_set_macparams()
522 params.cca_ed_level = nla_get_s32(info->attrs[IEEE802154_ATTR_CCA_ED_LEVEL]); ieee802154_set_macparams()
525 params.csma_retries = nla_get_u8(info->attrs[IEEE802154_ATTR_CSMA_RETRIES]); ieee802154_set_macparams()
528 params.min_be = nla_get_u8(info->attrs[IEEE802154_ATTR_CSMA_MIN_BE]); ieee802154_set_macparams()
531 params.max_be = nla_get_u8(info->attrs[IEEE802154_ATTR_CSMA_MAX_BE]); ieee802154_set_macparams()
534 params.frame_retries = nla_get_s8(info->attrs[IEEE802154_ATTR_FRAME_RETRIES]); ieee802154_set_macparams()
536 rc = ops->set_mac_params(dev, &params); ieee802154_set_macparams()
655 struct ieee802154_llsec_params params; ieee802154_llsec_getparams() local
678 rc = ops->llsec->get_params(dev, &params); ieee802154_llsec_getparams()
684 nla_put_u8(msg, IEEE802154_ATTR_LLSEC_ENABLED, params.enabled) || ieee802154_llsec_getparams()
685 nla_put_u8(msg, IEEE802154_ATTR_LLSEC_SECLEVEL, params.out_level) || ieee802154_llsec_getparams()
687 be32_to_cpu(params.frame_counter)) || ieee802154_llsec_getparams()
688 ieee802154_llsec_fill_key_id(msg, &params.out_key)) ieee802154_llsec_getparams()
706 struct ieee802154_llsec_params params; ieee802154_llsec_setparams() local
731 params.enabled = nla_get_u8(info->attrs[IEEE802154_ATTR_LLSEC_ENABLED]); ieee802154_llsec_setparams()
736 if (ieee802154_llsec_parse_key_id(info, &params.out_key)) ieee802154_llsec_setparams()
743 params.out_level = nla_get_u8(info->attrs[IEEE802154_ATTR_LLSEC_SECLEVEL]); ieee802154_llsec_setparams()
750 params.frame_counter = cpu_to_be32(fc); ieee802154_llsec_setparams()
754 rc = ops->llsec->set_params(dev, &params, changed); ieee802154_llsec_setparams()
/linux-4.1.27/drivers/usb/dwc3/
H A Dtrace.h183 struct dwc3_gadget_ep_cmd_params *params),
184 TP_ARGS(dep, cmd, params),
195 __entry->param0 = params->param0;
196 __entry->param1 = params->param1;
197 __entry->param2 = params->param2;
199 TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x",
208 struct dwc3_gadget_ep_cmd_params *params),
209 TP_ARGS(dep, cmd, params)
/linux-4.1.27/sound/soc/au1x/
H A Ddbdma2.c196 struct snd_pcm_hw_params *params) au1xpsc_pcm_hw_params()
202 ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); au1xpsc_pcm_hw_params()
215 DBG("bits %d frags %d frag_bytes %d is_rx %d\n", params->msbits, au1xpsc_pcm_hw_params()
216 params_periods(params), params_period_bytes(params), stype); au1xpsc_pcm_hw_params()
218 ret = au1x_pcm_dbdma_realloc(pcd, stype, params->msbits); au1xpsc_pcm_hw_params()
225 pcd->period_bytes = params_period_bytes(params); au1xpsc_pcm_hw_params()
226 pcd->periods = params_periods(params); au1xpsc_pcm_hw_params()
195 au1xpsc_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) au1xpsc_pcm_hw_params() argument
/linux-4.1.27/drivers/net/wireless/ti/wl12xx/
H A Dscan.c121 cmd->params.role_id = wlvif->role_id; wl1271_scan_send()
123 if (WARN_ON(cmd->params.role_id == WL12XX_INVALID_ROLE_ID)) { wl1271_scan_send()
128 cmd->params.scan_options = cpu_to_le16(scan_options); wl1271_scan_send()
130 cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req, wl1271_scan_send()
133 if (cmd->params.n_ch == 0) { wl1271_scan_send()
138 cmd->params.tx_rate = cpu_to_le32(basic_rate); wl1271_scan_send()
139 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; wl1271_scan_send()
140 cmd->params.tid_trigger = CONF_TX_AC_ANY_TID; wl1271_scan_send()
141 cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; wl1271_scan_send()
144 cmd->params.band = WL1271_SCAN_BAND_2_4_GHZ; wl1271_scan_send()
146 cmd->params.band = WL1271_SCAN_BAND_5_GHZ; wl1271_scan_send()
149 cmd->params.ssid_len = wl->scan.ssid_len; wl1271_scan_send()
150 memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len); wl1271_scan_send()
156 cmd->params.role_id, band, wl1271_scan_send()
/linux-4.1.27/drivers/gpu/drm/i2c/
H A Dch7006_drv.c34 void *params) ch7006_encoder_set_config()
38 priv->params = *(struct ch7006_encoder_params *)params; ch7006_encoder_set_config()
119 struct ch7006_encoder_params *params = &priv->params; ch7006_encoder_mode_set() local
131 params->input_format); ch7006_encoder_mode_set()
134 | bitf(CH7006_CLKMODE_XCM, params->xcm) ch7006_encoder_mode_set()
135 | bitf(CH7006_CLKMODE_PCM, params->pcm); ch7006_encoder_mode_set()
136 if (params->clock_mode) ch7006_encoder_mode_set()
138 if (params->clock_edge) ch7006_encoder_mode_set()
146 if (params->sync_direction) ch7006_encoder_mode_set()
148 if (params->sync_encoding) ch7006_encoder_mode_set()
159 if (params->pout_level) ch7006_encoder_mode_set()
163 if (params->active_detect) ch7006_encoder_mode_set()
33 ch7006_encoder_set_config(struct drm_encoder *encoder, void *params) ch7006_encoder_set_config() argument
/linux-4.1.27/arch/mips/include/asm/mach-pmcs-msp71xx/
H A Dmsp_usb.h49 u32 hwgen; /* 0x4: General HW params */
50 u32 hwhost; /* 0x8: Host HW params */
51 u32 hwdev; /* 0xc: Device HW params */
52 u32 hwtxbuf; /* 0x10: Tx buffer HW params */
53 u32 hwrxbuf; /* 0x14: Rx buffer HW params */
/linux-4.1.27/drivers/gpu/drm/tegra/
H A Dsor.c320 struct tegra_sor_params *params, tegra_sor_compute_params()
325 const u64 f = params->precision; tegra_sor_compute_params()
328 active_sym = params->ratio * tu_size; tegra_sor_compute_params()
371 error *= params->num_clocks; tegra_sor_compute_params()
373 if (error <= 0 && abs64(error) < params->error) { tegra_sor_compute_params()
374 params->active_count = div_u64(active_count, f); tegra_sor_compute_params()
375 params->active_polarity = active_polarity; tegra_sor_compute_params()
376 params->active_frac = active_frac; tegra_sor_compute_params()
377 params->error = abs64(error); tegra_sor_compute_params()
378 params->tu_size = tu_size; tegra_sor_compute_params()
395 struct tegra_sor_params params; tegra_sor_calc_config() local
408 memset(&params, 0, sizeof(params)); tegra_sor_calc_config()
409 params.ratio = div64_u64(input * f, output); tegra_sor_calc_config()
410 params.num_clocks = div_u64(link_rate * mode->hdisplay, pclk); tegra_sor_calc_config()
411 params.precision = f; tegra_sor_calc_config()
412 params.error = 64 * f; tegra_sor_calc_config()
413 params.tu_size = 64; tegra_sor_calc_config()
415 for (i = params.tu_size; i >= 32; i--) tegra_sor_calc_config()
416 if (tegra_sor_compute_params(sor, &params, i)) tegra_sor_calc_config()
419 if (params.active_frac == 0) { tegra_sor_calc_config()
421 config->active_count = params.active_count; tegra_sor_calc_config()
423 if (!params.active_polarity) tegra_sor_calc_config()
426 config->tu_size = params.tu_size; tegra_sor_calc_config()
429 config->active_polarity = params.active_polarity; tegra_sor_calc_config()
430 config->active_count = params.active_count; tegra_sor_calc_config()
431 config->active_frac = params.active_frac; tegra_sor_calc_config()
432 config->tu_size = params.tu_size; tegra_sor_calc_config()
440 watermark = params.ratio * config->tu_size * (f - params.ratio); tegra_sor_calc_config()
443 watermark = div_u64(watermark + params.error, f); tegra_sor_calc_config()
319 tegra_sor_compute_params(struct tegra_sor *sor, struct tegra_sor_params *params, unsigned int tu_size) tegra_sor_compute_params() argument
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb4vf/
H A Dt4vf_hw.c311 if (!(adapter->params.vfres.r_caps & FW_CMD_CAP_PORT)) t4vf_port_init()
360 * @params: the parameter names
367 const u32 *params, u32 *vals) t4vf_query_params()
385 p->mnem = htonl(*params++); t4vf_query_params()
398 * @params: the parameter names
405 const u32 *params, const u32 *vals) t4vf_set_params()
423 p->mnem = cpu_to_be32(*params++); t4vf_set_params()
467 if (is_t4(adapter->params.chip)) t4_bar2_sge_qregs()
472 page_shift = adapter->params.sge.sge_vf_hps + 10; t4_bar2_sge_qregs()
478 ? adapter->params.sge.sge_vf_eq_qpp t4_bar2_sge_qregs()
479 : adapter->params.sge.sge_vf_iq_qpp); t4_bar2_sge_qregs()
525 * needed. The SGE parameters are stored in @adapter->params.sge.
529 struct sge_params *sge_params = &adapter->params.sge; t4vf_get_sge_params()
530 u32 params[7], vals[7]; t4vf_get_sge_params() local
533 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
535 params[1] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
537 params[2] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
539 params[3] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
541 params[4] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
543 params[5] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
545 params[6] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
547 v = t4vf_query_params(adapter, 7, params, vals); t4vf_get_sge_params()
568 if (!is_t4(adapter->params.chip)) { t4vf_get_sge_params()
569 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
571 v = t4vf_query_params(adapter, 1, params, vals); t4vf_get_sge_params()
581 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
583 params[1] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
585 v = t4vf_query_params(adapter, 2, params, vals); t4vf_get_sge_params()
595 if (!is_t4(adapter->params.chip)) { t4vf_get_sge_params()
599 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
602 params[1] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_REG) | t4vf_get_sge_params()
605 v = t4vf_query_params(adapter, 2, params, vals); t4vf_get_sge_params()
648 * are stored in @adapter->params.vpd.
652 struct vpd_params *vpd_params = &adapter->params.vpd; t4vf_get_vpd_params()
653 u32 params[7], vals[7]; t4vf_get_vpd_params() local
656 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | t4vf_get_vpd_params()
658 v = t4vf_query_params(adapter, 1, params, vals); t4vf_get_vpd_params()
671 * @adapter->params.dev.
675 struct dev_params *dev_params = &adapter->params.dev; t4vf_get_dev_params()
676 u32 params[7], vals[7]; t4vf_get_dev_params() local
679 params[0] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | t4vf_get_dev_params()
681 params[1] = (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) | t4vf_get_dev_params()
683 v = t4vf_query_params(adapter, 2, params, vals); t4vf_get_dev_params()
701 struct rss_params *rss = &adapter->params.rss; t4vf_get_rss_glb_config()
776 struct vf_resources *vfres = &adapter->params.vfres; t4vf_get_vfres()
843 switch (adapter->params.rss.mode) { t4vf_read_rss_vi_config()
889 switch (adapter->params.rss.mode) { t4vf_write_rss_vi_config()
1194 unsigned int max_naddr = is_t4(adapter->params.chip) ? t4vf_alloc_mac_filt()
1288 unsigned int max_naddr = is_t4(adapter->params.chip) ? t4vf_change_mac()
1585 adapter->params.nports = 1; t4vf_prep_adapter()
1586 adapter->params.vfres.pmask = 1; t4vf_prep_adapter()
1587 adapter->params.vpd.cclk = 50000; t4vf_prep_adapter()
1589 adapter->params.chip = 0; t4vf_prep_adapter()
1592 adapter->params.chip |= CHELSIO_CHIP_CODE(CHELSIO_T4, 0); t4vf_prep_adapter()
1597 adapter->params.chip |= CHELSIO_CHIP_CODE(CHELSIO_T5, chipid); t4vf_prep_adapter()
366 t4vf_query_params(struct adapter *adapter, unsigned int nparams, const u32 *params, u32 *vals) t4vf_query_params() argument
404 t4vf_set_params(struct adapter *adapter, unsigned int nparams, const u32 *params, const u32 *vals) t4vf_set_params() argument
/linux-4.1.27/drivers/net/wireless/ti/wl1251/
H A Dcmd.c439 cmd->params.rx_config_options = cpu_to_le32(CFG_RX_ALL_GOOD); wl1251_cmd_scan()
440 cmd->params.rx_filter_options = cpu_to_le32(CFG_RX_PRSP_EN | wl1251_cmd_scan()
443 cmd->params.scan_options = 0; wl1251_cmd_scan()
450 cmd->params.scan_options |= cpu_to_le16(WL1251_SCAN_OPT_PRIORITY_HIGH); wl1251_cmd_scan()
451 cmd->params.num_channels = n_channels; wl1251_cmd_scan()
452 cmd->params.num_probe_requests = n_probes; wl1251_cmd_scan()
453 cmd->params.tx_rate = cpu_to_le16(1 << 1); /* 2 Mbps */ wl1251_cmd_scan()
454 cmd->params.tid_trigger = 0; wl1251_cmd_scan()
468 cmd->params.ssid_len = ssid_len; wl1251_cmd_scan()
470 memcpy(cmd->params.ssid, ssid, ssid_len); wl1251_cmd_scan()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb/
H A Dcxgb2.c161 if ((speed > 0) && (adapter->params.nports > 1)) { t1_link_negotiated()
217 adapter->params.has_msi = !disable_msi && !pci_enable_msi(adapter->pdev); cxgb_up()
219 adapter->params.has_msi ? 0 : IRQF_SHARED, cxgb_up()
222 if (adapter->params.has_msi) cxgb_up()
242 if (adapter->params.has_msi) cxgb_down()
261 if (!other_ports && adapter->params.stats_update_period) cxgb_open()
263 adapter->params.stats_update_period); cxgb_open()
281 if (adapter->params.stats_update_period && cxgb_close()
716 e->rx_pending = adapter->params.sge.freelQ_size[!jumbo_fl]; get_sge_param()
717 e->rx_jumbo_pending = adapter->params.sge.freelQ_size[jumbo_fl]; get_sge_param()
718 e->tx_pending = adapter->params.sge.cmdQ_size[0]; get_sge_param()
731 e->tx_pending < (adapter->params.nports + 1) * (MAX_SKB_FRAGS + 1)) set_sge_param()
737 adapter->params.sge.freelQ_size[!jumbo_fl] = e->rx_pending; set_sge_param()
738 adapter->params.sge.freelQ_size[jumbo_fl] = e->rx_jumbo_pending; set_sge_param()
739 adapter->params.sge.cmdQ_size[0] = e->tx_pending; set_sge_param()
740 adapter->params.sge.cmdQ_size[1] = e->tx_pending > MAX_CMDQ1_ENTRIES ? set_sge_param()
749 adapter->params.sge.rx_coalesce_usecs = c->rx_coalesce_usecs; set_coalesce()
750 adapter->params.sge.coalesce_enable = c->use_adaptive_rx_coalesce; set_coalesce()
751 adapter->params.sge.sample_interval_usecs = c->rate_sample_interval; set_coalesce()
752 t1_sge_set_coalesce_params(adapter->sge, &adapter->params.sge); set_coalesce()
760 c->rx_coalesce_usecs = adapter->params.sge.rx_coalesce_usecs; get_coalesce()
761 c->rate_sample_interval = adapter->params.sge.sample_interval_usecs; get_coalesce()
762 c->use_adaptive_rx_coalesce = adapter->params.sge.coalesce_enable; get_coalesce()
774 (PCI_VENDOR_ID_CHELSIO | ((ap)->params.chip_version << 16))
909 adapter->params.stats_update_period);
1047 if (t1_get_board_rev(adapter, bi, &adapter->params)) { init_one()
1140 adapter->name, bi->desc, adapter->params.chip_revision, init_one()
1141 adapter->params.pci.is_pcix ? "PCIX" : "PCI", init_one()
1142 adapter->params.pci.speed, adapter->params.pci.width); init_one()
/linux-4.1.27/kernel/
H A Dparams.c99 const struct kernel_param *params, parse_one()
111 if (parameq(param, params[i].name)) { parse_one()
112 if (params[i].level < min_level parse_one()
113 || params[i].level > max_level) parse_one()
117 !(params[i].ops->flags & KERNEL_PARAM_OPS_FL_NOARG)) parse_one()
120 params[i].ops->set); parse_one()
122 param_check_unsafe(&params[i]); parse_one()
123 err = params[i].ops->set(val, &params[i]); parse_one()
193 const struct kernel_param *params, parse_args()
216 ret = parse_one(param, val, doing, params, num, parse_args()
688 bool params = false; module_param_sysfs_setup() local
698 params = true; module_param_sysfs_setup()
701 if (!params) module_param_sysfs_setup()
729 void destroy_params(const struct kernel_param *params, unsigned num) destroy_params() argument
734 if (params[i].ops->free) destroy_params()
735 params[i].ops->free(params[i].arg); destroy_params()
935 * param_sysfs_init - wrapper for built-in params support
96 parse_one(char *param, char *val, const char *doing, const struct kernel_param *params, unsigned num_params, s16 min_level, s16 max_level, int (*handle_unknown)(char *param, char *val, const char *doing)) parse_one() argument
191 parse_args(const char *doing, char *args, const struct kernel_param *params, unsigned num, s16 min_level, s16 max_level, int (*unknown)(char *param, char *val, const char *doing)) parse_args() argument
/linux-4.1.27/fs/cifs/
H A Dcifssmb.c796 __u16 params, param_offset, offset, byte_count; CIFSPOSIXDelFile() local
817 params = 6 + name_len; CIFSPOSIXDelFile()
827 offset = param_offset + params; CIFSPOSIXDelFile()
837 byte_count = 3 /* pad */ + params + sizeof(struct unlink_psx_rq); CIFSPOSIXDelFile()
841 pSMB->ParameterCount = cpu_to_le16(params); CIFSPOSIXDelFile()
1009 __u16 params, param_offset, offset, byte_count, count; CIFSPOSIXCreate() local
1032 params = 6 + name_len; CIFSPOSIXCreate()
1043 offset = param_offset + params; CIFSPOSIXCreate()
1054 byte_count = 3 /* pad */ + params + count; CIFSPOSIXCreate()
1057 pSMB->ParameterCount = cpu_to_le16(params); CIFSPOSIXCreate()
2406 __u16 params, param_offset, offset, byte_count, count; CIFSSMBPosixLock() local
2418 params = 6; CIFSSMBPosixLock()
2424 offset = param_offset + params; CIFSSMBPosixLock()
2435 byte_count = 3 /* pad */ + params + count; CIFSSMBPosixLock()
2437 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBPosixLock()
2661 __u16 params, param_offset, offset, count, byte_count; CIFSSMBRenameOpenFile() local
2669 params = 6; CIFSSMBRenameOpenFile()
2676 offset = param_offset + params; CIFSSMBRenameOpenFile()
2685 byte_count = 3 /* pad */ + params; CIFSSMBRenameOpenFile()
2686 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBRenameOpenFile()
2811 __u16 params, param_offset, offset, byte_count; CIFSUnixCreateSymLink() local
2833 params = 6 + name_len; CIFSUnixCreateSymLink()
2841 offset = param_offset + params; CIFSUnixCreateSymLink()
2863 byte_count = 3 /* pad */ + params + name_len_target; CIFSUnixCreateSymLink()
2865 pSMB->ParameterCount = cpu_to_le16(params); CIFSUnixCreateSymLink()
2901 __u16 params, param_offset, offset, byte_count; CIFSUnixCreateHardLink() local
2921 params = 6 + name_len; CIFSUnixCreateHardLink()
2929 offset = param_offset + params; CIFSUnixCreateHardLink()
2950 byte_count = 3 /* pad */ + params + name_len_target; CIFSUnixCreateHardLink()
2951 pSMB->ParameterCount = cpu_to_le16(params); CIFSUnixCreateHardLink()
3060 __u16 params, byte_count; CIFSSMBUnixQuerySymLink() local
3084 params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ; CIFSSMBUnixQuerySymLink()
3100 byte_count = params + 1 /* pad */ ; CIFSSMBUnixQuerySymLink()
3101 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBUnixQuerySymLink()
3485 __u16 params, byte_count; CIFSSMBGetPosixACL() local
3510 params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ; CIFSSMBGetPosixACL()
3528 byte_count = params + 1 /* pad */ ; CIFSSMBGetPosixACL()
3529 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBGetPosixACL()
3575 __u16 params, byte_count, data_count, param_offset, offset; CIFSSMBSetPosixACL() local
3594 params = 6 + name_len; CIFSSMBSetPosixACL()
3605 offset = param_offset + params; CIFSSMBSetPosixACL()
3621 byte_count = 3 /* pad */ + params + data_count; CIFSSMBSetPosixACL()
3624 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetPosixACL()
3650 __u16 params, byte_count; CIFSGetExtAttr() local
3662 params = 2 /* level */ + 2 /* fid */; CIFSGetExtAttr()
3679 byte_count = params + 1 /* pad */ ; CIFSGetExtAttr()
3680 pSMB->t2.TotalParameterCount = cpu_to_le16(params); CIFSGetExtAttr()
4048 __u16 params, byte_count; CIFSSMBQFileInfo() local
4056 params = 2 /* level */ + 2 /* fid */; CIFSSMBQFileInfo()
4073 byte_count = params + 1 /* pad */ ; CIFSSMBQFileInfo()
4074 pSMB->t2.TotalParameterCount = cpu_to_le16(params); CIFSSMBQFileInfo()
4120 __u16 params, byte_count; CIFSSMBQPathInfo() local
4141 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; CIFSSMBQPathInfo()
4158 byte_count = params + 1 /* pad */ ; CIFSSMBQPathInfo()
4159 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBQPathInfo()
4217 __u16 params, byte_count; CIFSSMBUnixQFileInfo() local
4225 params = 2 /* level */ + 2 /* fid */; CIFSSMBUnixQFileInfo()
4242 byte_count = params + 1 /* pad */ ; CIFSSMBUnixQFileInfo()
4243 pSMB->t2.TotalParameterCount = cpu_to_le16(params); CIFSSMBUnixQFileInfo()
4289 __u16 params, byte_count; CIFSSMBUnixQPathInfo() local
4310 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; CIFSSMBUnixQPathInfo()
4327 byte_count = params + 1 /* pad */ ; CIFSSMBUnixQPathInfo()
4328 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBUnixQPathInfo()
4374 __u16 params, byte_count; CIFSFindFirst() local
4421 params = 12 + name_len /* includes null */ ; CIFSFindFirst()
4430 byte_count = params + 1 /* pad */ ; CIFSFindFirst()
4431 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSFindFirst()
4527 __u16 params, byte_count; CIFSFindNext() local
4539 params = 14; /* includes 2 bytes of null string, converted to LE below*/ CIFSFindNext()
4564 params += name_len; CIFSFindNext()
4575 byte_count = params + 1 /* pad */ ; CIFSFindNext()
4576 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSFindNext()
4692 __u16 params, byte_count; CIFSGetSrvInodeNumber() local
4717 params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ; CIFSGetSrvInodeNumber()
4734 byte_count = params + 1 /* pad */ ; CIFSGetSrvInodeNumber()
4735 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSGetSrvInodeNumber()
4899 __u16 params, byte_count; CIFSGetDFSRefer() local
4941 params = 2 /* level */ + name_len /*includes null */ ; CIFSGetDFSRefer()
4958 byte_count = params + 3 /* pad */ ; CIFSGetDFSRefer()
4959 pSMB->ParameterCount = cpu_to_le16(params); CIFSGetDFSRefer()
5007 __u16 params, byte_count; SMBOldQFSInfo() local
5016 params = 2; /* level */ SMBOldQFSInfo()
5025 byte_count = params + 1 /* pad */ ; SMBOldQFSInfo()
5026 pSMB->TotalParameterCount = cpu_to_le16(params); SMBOldQFSInfo()
5087 __u16 params, byte_count; CIFSSMBQFSInfo() local
5096 params = 2; /* level */ CIFSSMBQFSInfo()
5105 byte_count = params + 1 /* pad */ ; CIFSSMBQFSInfo()
5106 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBQFSInfo()
5166 __u16 params, byte_count; CIFSSMBQFSAttributeInfo() local
5175 params = 2; /* level */ CIFSSMBQFSAttributeInfo()
5185 byte_count = params + 1 /* pad */ ; CIFSSMBQFSAttributeInfo()
5186 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBQFSAttributeInfo()
5236 __u16 params, byte_count; CIFSSMBQFSDeviceInfo() local
5245 params = 2; /* level */ CIFSSMBQFSDeviceInfo()
5255 byte_count = params + 1 /* pad */ ; CIFSSMBQFSDeviceInfo()
5256 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBQFSDeviceInfo()
5307 __u16 params, byte_count; CIFSSMBQFSUnixInfo() local
5316 params = 2; /* level */ CIFSSMBQFSUnixInfo()
5328 byte_count = params + 1 /* pad */ ; CIFSSMBQFSUnixInfo()
5329 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBQFSUnixInfo()
5376 __u16 params, param_offset, offset, byte_count; CIFSSMBSetFSUnixInfo() local
5386 params = 4; /* 2 bytes zero followed by info level. */ CIFSSMBSetFSUnixInfo()
5394 offset = param_offset + params; CIFSSMBSetFSUnixInfo()
5402 byte_count = 1 /* pad */ + params + 12; CIFSSMBSetFSUnixInfo()
5405 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetFSUnixInfo()
5452 __u16 params, byte_count; CIFSSMBQFSPosixInfo() local
5461 params = 2; /* level */ CIFSSMBQFSPosixInfo()
5473 byte_count = params + 1 /* pad */ ; CIFSSMBQFSPosixInfo()
5474 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBQFSPosixInfo()
5548 __u16 params, byte_count, data_count, param_offset, offset; CIFSSMBSetEOF() local
5568 params = 6 + name_len; CIFSSMBSetEOF()
5579 offset = param_offset + params; CIFSSMBSetEOF()
5604 byte_count = 3 /* pad */ + params + data_count; CIFSSMBSetEOF()
5607 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetEOF()
5633 __u16 params, param_offset, offset, byte_count, count; CIFSSMBSetFileSize() local
5645 params = 6; CIFSSMBSetFileSize()
5652 offset = param_offset + params; CIFSSMBSetFileSize()
5661 byte_count = 3 /* pad */ + params + count; CIFSSMBSetFileSize()
5663 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetFileSize()
5716 __u16 params, param_offset, offset, byte_count, count; CIFSSMBSetFileInfo() local
5727 params = 6; CIFSSMBSetFileInfo()
5734 offset = param_offset + params; CIFSSMBSetFileInfo()
5746 byte_count = 3 /* pad */ + params + count; CIFSSMBSetFileInfo()
5748 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetFileInfo()
5780 __u16 params, param_offset, offset, byte_count, count; CIFSSMBSetFileDisposition() local
5791 params = 6; CIFSSMBSetFileDisposition()
5798 offset = param_offset + params; CIFSSMBSetFileDisposition()
5809 byte_count = 3 /* pad */ + params + count; CIFSSMBSetFileDisposition()
5811 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetFileDisposition()
5840 __u16 params, param_offset, offset, byte_count, count; CIFSSMBSetPathInfo() local
5862 params = 6 + name_len; CIFSSMBSetPathInfo()
5874 offset = param_offset + params; CIFSSMBSetPathInfo()
5881 byte_count = 3 /* pad */ + params + count; CIFSSMBSetPathInfo()
5884 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetPathInfo()
6015 u16 params, param_offset, offset, byte_count, count; CIFSSMBUnixSetFileInfo() local
6026 params = 6; CIFSSMBUnixSetFileInfo()
6033 offset = param_offset + params; CIFSSMBUnixSetFileInfo()
6046 byte_count = 3 /* pad */ + params + count; CIFSSMBUnixSetFileInfo()
6048 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBUnixSetFileInfo()
6084 __u16 params, param_offset, offset, count, byte_count; CIFSSMBUnixSetPathInfo() local
6105 params = 6 + name_len; CIFSSMBUnixSetPathInfo()
6117 offset = param_offset + params; CIFSSMBUnixSetPathInfo()
6127 byte_count = 3 /* pad */ + params + count; CIFSSMBUnixSetPathInfo()
6128 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBUnixSetPathInfo()
6176 __u16 params, byte_count, data_offset; CIFSSMBQAllEAs() local
6198 params = 2 /* level */ + 4 /* reserved */ + list_len /* includes NUL */; CIFSSMBQAllEAs()
6215 byte_count = params + 1 /* pad */ ; CIFSSMBQAllEAs()
6216 pSMB->TotalParameterCount = cpu_to_le16(params); CIFSSMBQAllEAs()
6358 __u16 params, param_offset, byte_count, offset, count; CIFSSMBSetEA() local
6379 params = 6 + name_len; CIFSSMBSetEA()
6400 offset = param_offset + params; CIFSSMBSetEA()
6412 byte_count = 3 /* pad */ + params + count; CIFSSMBSetEA()
6434 pSMB->ParameterCount = cpu_to_le16(params); CIFSSMBSetEA()
/linux-4.1.27/drivers/infiniband/core/
H A Dfmr_pool.c205 * @params:FMR pool parameters
211 struct ib_fmr_pool_param *params) ib_create_fmr_pool()
220 if (!params) ib_create_fmr_pool()
259 pool->flush_function = params->flush_function; ib_create_fmr_pool()
260 pool->flush_arg = params->flush_arg; ib_create_fmr_pool()
265 if (params->cache) { ib_create_fmr_pool()
280 pool->max_pages = params->max_pages_per_fmr; ib_create_fmr_pool()
282 pool->dirty_watermark = params->dirty_watermark; ib_create_fmr_pool()
302 .max_pages = params->max_pages_per_fmr, ib_create_fmr_pool()
304 .page_shift = params->page_shift ib_create_fmr_pool()
309 bytes_per_fmr += params->max_pages_per_fmr * sizeof (u64); ib_create_fmr_pool()
311 for (i = 0; i < params->pool_size; ++i) { ib_create_fmr_pool()
324 fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr); ib_create_fmr_pool()
210 ib_create_fmr_pool(struct ib_pd *pd, struct ib_fmr_pool_param *params) ib_create_fmr_pool() argument
/linux-4.1.27/sound/core/seq/
H A Dseq_midi.c185 struct snd_rawmidi_params params; midisynth_subscribe() local
196 memset(&params, 0, sizeof(params)); midisynth_subscribe()
197 params.avail_min = 1; midisynth_subscribe()
198 params.buffer_size = input_buffer_size; midisynth_subscribe()
199 if ((err = snd_rawmidi_input_params(msynth->input_rfile.input, &params)) < 0) { midisynth_subscribe()
227 struct snd_rawmidi_params params; midisynth_use() local
237 memset(&params, 0, sizeof(params)); midisynth_use()
238 params.avail_min = 1; midisynth_use()
239 params.buffer_size = output_buffer_size; midisynth_use()
240 params.no_active_sensing = 1; midisynth_use()
241 if ((err = snd_rawmidi_output_params(msynth->output_rfile.output, &params)) < 0) { midisynth_use()
/linux-4.1.27/drivers/usb/host/
H A Dehci-dbg.c29 u32 params = ehci_readl(ehci, &ehci->caps->hcs_params); dbg_hcs_params() local
33 label, params, dbg_hcs_params()
34 HCS_DEBUG_PORT (params), dbg_hcs_params()
35 HCS_INDICATOR (params) ? " ind" : "", dbg_hcs_params()
36 HCS_N_CC (params), dbg_hcs_params()
37 HCS_N_PCC (params), dbg_hcs_params()
38 HCS_PORTROUTED (params) ? "" : " ordered", dbg_hcs_params()
39 HCS_PPC (params) ? "" : " !ppc", dbg_hcs_params()
40 HCS_N_PORTS (params) dbg_hcs_params()
43 if (HCS_PORTROUTED (params)) { dbg_hcs_params()
48 for (i = 0; i < HCS_N_PORTS (params); i++) { dbg_hcs_params()
73 u32 params = ehci_readl(ehci, &ehci->caps->hcc_params); dbg_hcc_params() local
75 if (HCC_ISOC_CACHE (params)) { dbg_hcc_params()
78 label, params, dbg_hcc_params()
79 HCC_PGM_FRAMELISTLEN(params) ? "256/512/1024" : "1024", dbg_hcc_params()
80 HCC_CANPARK(params) ? " park" : "", dbg_hcc_params()
81 HCC_64BIT_ADDR(params) ? " 64 bit addr" : ""); dbg_hcc_params()
86 params, dbg_hcc_params()
87 HCC_ISOC_THRES(params), dbg_hcc_params()
88 HCC_PGM_FRAMELISTLEN(params) ? "256/512/1024" : "1024", dbg_hcc_params()
89 HCC_CANPARK(params) ? " park" : "", dbg_hcc_params()
90 HCC_64BIT_ADDR(params) ? " 64 bit addr" : "", dbg_hcc_params()
91 HCC_LPM(params) ? " LPM" : "", dbg_hcc_params()
92 HCC_PER_PORT_CHANGE_EVENT(params) ? " ppce" : "", dbg_hcc_params()
93 HCC_HW_PREFETCH(params) ? " hw prefetch" : "", dbg_hcc_params()
94 HCC_32FRAME_PERIODIC_LIST(params) ? dbg_hcc_params()
858 // FIXME interpret both types of params fill_registers_buffer()
860 temp = scnprintf (next, size, "structural params 0x%08x\n", i); fill_registers_buffer()
865 temp = scnprintf (next, size, "capability params 0x%08x\n", i); fill_registers_buffer()
/linux-4.1.27/sound/soc/codecs/
H A Dtlv320aic26.c64 struct snd_pcm_hw_params *params, aic26_hw_params()
72 dev_dbg(&aic26->spi->dev, "aic26_hw_params(substream=%p, params=%p)\n", aic26_hw_params()
73 substream, params); aic26_hw_params()
74 dev_dbg(&aic26->spi->dev, "rate=%i width=%d\n", params_rate(params), aic26_hw_params()
75 params_width(params)); aic26_hw_params()
77 switch (params_rate(params)) { aic26_hw_params()
92 switch (params_width(params)) { aic26_hw_params()
63 aic26_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) aic26_hw_params() argument
/linux-4.1.27/sound/soc/intel/baytrail/
H A Dsst-baytrail-pcm.c69 struct snd_pcm_hw_params *params) sst_byt_pcm_hw_params()
89 rate = params_rate(params); sst_byt_pcm_hw_params()
96 bits = snd_pcm_format_width(params_format(params)); sst_byt_pcm_hw_params()
100 params_rate(params)); sst_byt_pcm_hw_params()
104 channels = (u8)(params_channels(params) & 0xF); sst_byt_pcm_hw_params()
108 params_rate(params)); sst_byt_pcm_hw_params()
112 snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); sst_byt_pcm_hw_params()
116 params_buffer_bytes(params)); sst_byt_pcm_hw_params()
150 /* commit stream using existing stream params */ sst_byt_pcm_restore_stream_context()
68 sst_byt_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) sst_byt_pcm_hw_params() argument
/linux-4.1.27/sound/soc/qcom/
H A Dstorm.c28 struct snd_pcm_hw_params *params) storm_ops_hw_params()
32 snd_pcm_format_t format = params_format(params); storm_ops_hw_params()
33 unsigned int rate = params_rate(params); storm_ops_hw_params()
27 storm_ops_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) storm_ops_hw_params() argument
/linux-4.1.27/drivers/staging/media/davinci_vpfe/
H A Ddm365_ipipe_hw.c37 rsz_set_common_params(void __iomem *rsz_base, struct resizer_params *params) rsz_set_common_params() argument
39 struct rsz_common_params *rsz_common = &params->rsz_common; rsz_set_common_params()
43 regw_rsz(rsz_base, params->oper_mode, RSZ_SRC_MODE); rsz_set_common_params()
70 struct resizer_params *params) rsz_set_rsz_regs()
78 rsc_params = &params->rsz_rsc_param[rsz_id]; rsz_set_rsz_regs()
79 rgb = &params->rsz2rgb[rsz_id]; rsz_set_rsz_regs()
80 ext_mem = &params->ext_mem_param[rsz_id]; rsz_set_rsz_regs()
94 regw_rsz(rsz_base, params->oper_mode, reg_base + RSZ_MODE); rsz_set_rsz_regs()
174 ipipe_setup_resizer(void __iomem *rsz_base, struct resizer_params *params) ipipe_setup_resizer() argument
180 if (params->rsz_common.passthrough) ipipe_setup_resizer()
185 rsz_set_common_params(rsz_base, params); ipipe_setup_resizer()
187 regw_rsz(rsz_base, params->rsz_en[RSZ_A], RSZ_EN_A); ipipe_setup_resizer()
189 if (params->rsz_en[RSZ_A]) ipipe_setup_resizer()
191 rsz_set_rsz_regs(rsz_base, RSZ_A, params); ipipe_setup_resizer()
193 regw_rsz(rsz_base, params->rsz_en[RSZ_B], RSZ_EN_B); ipipe_setup_resizer()
195 if (params->rsz_en[RSZ_B]) ipipe_setup_resizer()
196 rsz_set_rsz_regs(rsz_base, RSZ_B, params); ipipe_setup_resizer()
350 * @params: pointer to ipipe_params structure
355 resizer_set_outaddr(void __iomem *rsz_base, struct resizer_params *params, resizer_set_outaddr() argument
367 mem_param = &params->ext_mem_param[resize_no]; resizer_set_outaddr()
368 rsc_param = &params->rsz_rsc_param[resize_no]; resizer_set_outaddr()
369 rsz_common = &params->rsz_common; resizer_set_outaddr()
395 params->ext_mem_param[RSZ_A].user_y_ofst + resizer_set_outaddr()
396 params->ext_mem_param[RSZ_A].user_c_ofst; resizer_set_outaddr()
402 val += params->ext_mem_param[RSZ_A].user_y_ofst + resizer_set_outaddr()
403 params->ext_mem_param[RSZ_A].user_c_ofst; resizer_set_outaddr()
408 regw_rsz(rsz_base, params->rsz_en[resize_no], rsz_start_add); resizer_set_outaddr()
69 rsz_set_rsz_regs(void __iomem *rsz_base, unsigned int rsz_id, struct resizer_params *params) rsz_set_rsz_regs() argument
/linux-4.1.27/drivers/media/dvb-frontends/
H A Dstb0899_algo.c146 struct stb0899_params *params = &state->params; stb0899_first_subrange() local
164 internal->freq = params->freq; stb0899_first_subrange()
210 struct stb0899_params *params = &state->params; stb0899_search_tmg() local
220 derot_step = (params->srate / 2L) / internal->mclk; stb0899_search_tmg()
337 struct stb0899_params *params = &state->params; stb0899_check_data() local
353 if (params->srate <= 2000000) stb0899_check_data()
355 else if (params->srate <= 5000000) stb0899_check_data()
357 else if (params->srate <= 15000000) stb0899_check_data()
397 struct stb0899_params *params = &state->params; stb0899_search_data() local
399 derot_step = (params->srate / 4L) / internal->mclk; stb0899_search_data()
451 struct stb0899_params *params = &state->params; stb0899_check_range() local
458 if ((tp_freq >= params->freq - range_offst) && (tp_freq <= params->freq + range_offst)) { stb0899_check_range()
476 struct stb0899_params *params = &state->params; next_sub_range() local
492 internal->freq = params->freq + (internal->sub_dir * internal->tuner_offst) / 1000; next_sub_range()
503 struct stb0899_params *params = &state->params; stb0899_dvbs_algo() local
525 stb0899_set_srate(state, internal->master_clk, params->srate); stb0899_dvbs_algo()
527 if (params->srate <= 5000000) { stb0899_dvbs_algo()
533 } else if (params->srate <= 15000000) { stb0899_dvbs_algo()
539 } else if(params->srate <= 25000000) { stb0899_dvbs_algo()
565 internal->derot_percent, params->srate, internal->mclk); stb0899_dvbs_algo()
568 internal->derot_step = internal->derot_percent * (params->srate / 1000L) / internal->mclk; /* DerotStep/1000 * Fsymbol */ stb0899_dvbs_algo()
569 internal->t_derot = stb0899_calc_derot_time(params->srate); stb0899_dvbs_algo()
625 if (params->srate <= bandwidth / 2) stb0899_dvbs_algo()
650 internal->freq = params->freq - ((internal->derot_freq * internal->mclk) / 1000); stb0899_dvbs_algo()
655 params->freq, internal->freq); stb0899_dvbs_algo()
1014 /*Set Carrier Search params (zigzag, num steps and freq step size*/ stb0899_dvbs2_init_calc()
/linux-4.1.27/drivers/macintosh/
H A Dwindfarm_pm121.c105 * PID params : G_d = 0x00000000
115 * PID params : G_d = 0x00000000
127 * PID params : G_d = 0x00000000
137 * PID params : G_d = 0x00000000
149 * PID params : G_d = 0x00000000
159 * PID params : G_d = 0x00000000
171 * PID params : G_d = 0x00000000
181 * PID params : G_d = 0x00000000
192 * PID params : from SDB partition
357 * loop params. Some data are not set, there are common to all loop
524 /* First, locate the params for this model */ pm121_create_sys_fans()
532 /* No params found, put fans to max */ pm121_create_sys_fans()
551 /* Fill PID params */ pm121_create_sys_fans()
661 /* First, locate the PID params in SMU SBD */ pm121_create_cpu_fans()
669 /* Get the FVT params for operating point 0 (the only supported one pm121_create_cpu_fans()
686 /* Fill PID params */ pm121_create_cpu_fans()
/linux-4.1.27/drivers/media/usb/siano/
H A Dsmsusb.c382 struct smsdevice_params_t params; smsusb_init_device() local
392 memset(&params, 0, sizeof(params)); smsusb_init_device()
397 params.device_type = sms_get_board(board_id)->type; smsusb_init_device()
399 switch (params.device_type) { smsusb_init_device()
403 params.setmode_handler = smsusb1_setmode; smsusb_init_device()
404 params.detectmode_handler = smsusb1_detectmode; smsusb_init_device()
415 params.flags |= SMS_DEVICE_FAMILY2; smsusb_init_device()
429 params.device = &dev->udev->dev; smsusb_init_device()
430 params.buffer_size = dev->buffer_size; smsusb_init_device()
431 params.num_buffers = MAX_BUFFERS; smsusb_init_device()
432 params.sendrequest_handler = smsusb_sendrequest; smsusb_init_device()
433 params.context = dev; smsusb_init_device()
434 usb_make_path(dev->udev, params.devpath, sizeof(params.devpath)); smsusb_init_device()
439 rc = smscore_register_device(&params, &dev->coredev, mdev); smsusb_init_device()
/linux-4.1.27/drivers/media/usb/ttusb-dec/
H A Dttusbdecfe.h30 int param_length, const u8 params[],
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
H A Dini.h201 struct wl1271_ini_fem_params_2 params; member in struct:wl1271_nvs_file::__anon8208
207 struct wl1271_ini_fem_params_5 params; member in struct:wl1271_nvs_file::__anon8209
222 struct wl128x_ini_fem_params_2 params; member in struct:wl128x_nvs_file::__anon8210
228 struct wl128x_ini_fem_params_5 params; member in struct:wl128x_nvs_file::__anon8211
/linux-4.1.27/arch/x86/boot/
H A Dedd.c48 sector_size = ei->params.bytes_per_sector; read_mbr_sig()
101 ei->params.length = sizeof(ei->params); get_edd_info()
103 ireg.si = (size_t)&ei->params; get_edd_info()
/linux-4.1.27/drivers/media/dvb-core/
H A Ddmxdev.c341 struct dmx_sct_filter_params *para = &dmxdevfilter->params.sec; dvb_dmxdev_filter_timer()
380 if (dmxdevfilter->params.sec.flags & DMX_ONESHOT) dvb_dmxdev_section_callback()
397 if (dmxdevfilter->params.pes.output == DMX_OUT_DECODER) { dvb_dmxdev_ts_callback()
402 if (dmxdevfilter->params.pes.output == DMX_OUT_TAP dvb_dmxdev_ts_callback()
403 || dmxdevfilter->params.pes.output == DMX_OUT_TSDEMUX_TAP) dvb_dmxdev_ts_callback()
477 u16 pid = filter->params.sec.pid; dvb_dmxdev_feed_restart()
482 dmxdev->filter[i].params.sec.pid == pid) { dvb_dmxdev_feed_restart()
562 struct dmx_pes_filter_params *para = &filter->params.pes; dvb_dmxdev_start_feed()
636 struct dmx_sct_filter_params *para = &filter->params.sec; dvb_dmxdev_filter_start()
648 dmxdev->filter[i].params.sec.pid == para->pid) { dvb_dmxdev_filter_start()
806 if ((filter->params.pes.output != DMX_OUT_TSDEMUX_TAP) && dvb_dmxdev_add_pid()
847 struct dmx_sct_filter_params *params) dvb_dmxdev_filter_set()
850 __func__, params->pid, params->flags, params->timeout); dvb_dmxdev_filter_set()
855 memcpy(&dmxdevfilter->params.sec, dvb_dmxdev_filter_set()
856 params, sizeof(struct dmx_sct_filter_params)); dvb_dmxdev_filter_set()
857 invert_mode(&dmxdevfilter->params.sec.filter); dvb_dmxdev_filter_set()
860 if (params->flags & DMX_IMMEDIATE_START) dvb_dmxdev_filter_set()
868 struct dmx_pes_filter_params *params) dvb_dmxdev_pes_filter_set()
875 if ((unsigned)params->pes_type > DMX_PES_OTHER) dvb_dmxdev_pes_filter_set()
879 memcpy(&dmxdevfilter->params, params, dvb_dmxdev_pes_filter_set()
886 dmxdevfilter->params.pes.pid); dvb_dmxdev_pes_filter_set()
890 if (params->flags & DMX_IMMEDIATE_START) dvb_dmxdev_pes_filter_set()
845 dvb_dmxdev_filter_set(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfilter, struct dmx_sct_filter_params *params) dvb_dmxdev_filter_set() argument
866 dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfilter, struct dmx_pes_filter_params *params) dvb_dmxdev_pes_filter_set() argument
/linux-4.1.27/include/net/irda/
H A Dircomm_param.h116 /* General control params */
121 /* Control params for 3- and 9-wire service type */
132 /* Control params for 9-wire service type */
137 /* Control params for Centronics service type */

Completed in 6732 milliseconds

1234567