Cleanup the xscd_dma_chan structure by
- Reordering fields to group them by category
- Renaming the en field to enabled
- Removing the unused chan_node field
- Turning the id field from u8 to unsigned int
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
unsigned long flags;
/* TODO: Re-organise shared data in a better way */
unsigned long flags;
/* TODO: Re-organise shared data in a better way */
- chan->dmachan.en = enable;
+ chan->dmachan.enabled = enable;
spin_lock_irqsave(&chan->dmachan.lock, flags);
spin_lock_irqsave(&chan->dmachan.lock, flags);
spin_lock(&chan->lock);
chan->idle = true;
spin_lock(&chan->lock);
chan->idle = true;
- if (chan->en && (!list_empty(&chan->pending_list))) {
+ if (chan->enabled &&
+ (!list_empty(&chan->pending_list))) {
chan_en |= 1 << chan->id;
chan->valid_interrupt = true;
} else {
chan_en |= 1 << chan->id;
chan->valid_interrupt = true;
} else {
{
struct xscd_dma_tx_descriptor *desc;
{
struct xscd_dma_tx_descriptor *desc;
spin_lock(&chan->lock);
chan->idle = true;
spin_lock(&chan->lock);
chan->idle = true;
- if (chan->en && (!list_empty(&chan->pending_list))) {
+ if (chan->enabled && (!list_empty(&chan->pending_list))) {
chan_en |= 1 << chan->id;
chan->valid_interrupt = true;
} else {
chan_en |= 1 << chan->id;
chan->valid_interrupt = true;
} else {
* struct xscd_dma_chan - DMA Channel structure
* @xscd: SCD device
* @iomem: I/O memory address of the channel registers
* struct xscd_dma_chan - DMA Channel structure
* @xscd: SCD device
* @iomem: I/O memory address of the channel registers
+ * @id: scene change channel ID
+ * @common: DMA common channel
+ * @tasklet: Cleanup work after irq
* @lock: Descriptor operation lock
* @lock: Descriptor operation lock
- * @chan_node: Member of a list of framebuffer channel instances
* @pending_list: Descriptors waiting
* @done_list: Complete descriptors
* @staged_desc: Next buffer to be programmed
* @active_desc: Currently active buffer being read/written to
* @pending_list: Descriptors waiting
* @done_list: Complete descriptors
* @staged_desc: Next buffer to be programmed
* @active_desc: Currently active buffer being read/written to
- * @common: DMA common channel
* @idle: Channel idle state
* @idle: Channel idle state
- * @tasklet: Cleanup work after irq
- * @id: scene change channel ID
- * @en: Channel is enabled
+ * @enabled: Channel is enabled
* @valid_interrupt: Valid interrupt for the channel
*/
struct xscd_dma_chan {
struct xscd_device *xscd;
void __iomem *iomem;
* @valid_interrupt: Valid interrupt for the channel
*/
struct xscd_dma_chan {
struct xscd_device *xscd;
void __iomem *iomem;
+ unsigned int id;
+
+ struct dma_chan common;
+ struct tasklet_struct tasklet;
/* Descriptor operation Lock */
spinlock_t lock;
/* Descriptor operation Lock */
spinlock_t lock;
- struct list_head chan_node;
struct list_head pending_list;
struct list_head done_list;
struct xscd_dma_tx_descriptor *staged_desc;
struct xscd_dma_tx_descriptor *active_desc;
struct list_head pending_list;
struct list_head done_list;
struct xscd_dma_tx_descriptor *staged_desc;
struct xscd_dma_tx_descriptor *active_desc;
- struct dma_chan common;
- struct tasklet_struct tasklet;
- u8 id;
- bool en;