return block_idx * DBR_BLOCK_SIZE;
}
block_idx += mask_size;
- /* do shift left with 2 steps for case mask_size == 32 */
+ /* do shift left with 2 steps in case mask_size == 32 */
mask <<= mask_size - 1;
} while ((mask <<= 1) != 0);
}
if (ch->packet_length || ch->bytes_per_frame)
dim2_start_isoc_sync(ch->addr, state->idx1, buf_addr, buf_size);
else
- dim2_start_ctrl_async(ch->addr, state->idx1, buf_addr, buf_size);
+ dim2_start_ctrl_async(ch->addr, state->idx1, buf_addr,
+ buf_size);
state->idx1 ^= 1;
return true;
}
/*
- * Use while-loop and a flag to make sure the age is changed back at least once,
- * otherwise the interrupt may never come if CPU generates interrupt on changing age.
- *
- * This cycle runs not more than number of channels, because service_interrupts
- * routine doesn't start the channel again.
+ * Use while-loop and a flag to make sure the age is changed back at
+ * least once, otherwise the interrupt may never come if CPU generates
+ * interrupt on changing age.
+ * This cycle runs not more than number of channels, because
+ * channel_service_interrupt() routine doesn't start the channel again.
*/
do {
struct dim_channel *const *ch = channels;
bool DIM_EnqueueBuffer(struct dim_channel *ch, u32 buffer_addr, u16 buffer_size)
{
if (!ch)
- return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED, "Bad channel");
+ return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED,
+ "Bad channel");
return channel_start(ch, buffer_addr, buffer_size);
}
bool DIM_DetachBuffers(struct dim_channel *ch, u16 buffers_number)
{
if (!ch)
- return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED, "Bad channel");
+ return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED,
+ "Bad channel");
return channel_detach_buffers(ch, buffers_number);
}
}
if (dev->clk_speed == -1) {
- pr_info("Bad or missing clock speed parameter,"
- " using default value: 3072fs\n");
+ pr_info("Bad or missing clock speed parameter, using default value: 3072fs\n");
dev->clk_speed = CLK_3072FS;
} else
pr_info("Selected clock speed: %s\n", clock_speed);
spin_lock_irqsave(&dim_lock, flags);
if (list_empty(head)) {
spin_unlock_irqrestore(&dim_lock, flags);
- pr_crit("hard error: started_mbo list is empty "
- "whereas DIM2 has sent buffers\n");
+ pr_crit("hard error: started_mbo list is empty whereas DIM2 has sent buffers\n");
break;
}
pr_warn("%s: fixed buffer size (%d -> %d)\n",
hdm_ch->name, buf_size, new_size);
spin_lock_irqsave(&dim_lock, flags);
- hal_ret = DIM_InitControl(&hdm_ch->ch, is_tx, ch_addr, buf_size);
+ hal_ret = DIM_InitControl(&hdm_ch->ch, is_tx, ch_addr,
+ buf_size);
break;
case MOST_CH_ASYNC:
new_size = DIM_NormCtrlAsyncBufferSize(buf_size);
case MOST_CH_ISOC_AVP:
new_size = DIM_NormIsocBufferSize(buf_size, sub_size);
if (new_size == 0) {
- pr_err("%s: invalid sub-buffer size or "
- "too small buffer size\n", hdm_ch->name);
+ pr_err("%s: invalid sub-buffer size or too small buffer size\n",
+ hdm_ch->name);
return -EINVAL;
}
ccfg->buffer_size = new_size;
case MOST_CH_SYNC:
new_size = DIM_NormSyncBufferSize(buf_size, sub_size);
if (new_size == 0) {
- pr_err("%s: invalid sub-buffer size or "
- "too small buffer size\n", hdm_ch->name);
+ pr_err("%s: invalid sub-buffer size or too small buffer size\n",
+ hdm_ch->name);
return -EINVAL;
}
ccfg->buffer_size = new_size;
ret = request_irq(dev->irq_ahb0, dim2_ahb_isr, 0, "mlb_ahb0", dev);
if (ret) {
- pr_err("failed to request IRQ: %d, err: %d\n", dev->irq_ahb0, ret);
+ pr_err("failed to request IRQ: %d, err: %d\n",
+ dev->irq_ahb0, ret);
goto err_unmap_io;
}
#endif