daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
  2. index cfb78c4..ce1fe93 100644
  3. --- a/arch/arm/mach-msm/dma.c
  4. +++ b/arch/arm/mach-msm/dma.c
  5. @@ -15,11 +15,8 @@
  6.   *
  7.   */
  8.  
  9. -#include <linux/clk.h>
  10. -#include <linux/err.h>
  11.  #include <linux/io.h>
  12.  #include <linux/interrupt.h>
  13. -#include <linux/completion.h>
  14.  #include <linux/module.h>
  15.  #include <mach/dma.h>
  16.  
  17. @@ -32,7 +29,6 @@ enum {
  18.  };
  19.  
  20.  static DEFINE_SPINLOCK(msm_dmov_lock);
  21. -static struct clk *msm_dmov_clk;
  22.  static unsigned int channel_active;
  23.  static struct list_head ready_commands[MSM_DMOV_CHANNEL_COUNT];
  24.  static struct list_head active_commands[MSM_DMOV_CHANNEL_COUNT];
  25. @@ -62,9 +58,6 @@ void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd)
  26.     unsigned int status;
  27.  
  28.     spin_lock_irqsave(&msm_dmov_lock, irq_flags);
  29. -   if (!channel_active)
  30. -       clk_enable(msm_dmov_clk);
  31. -   dsb();
  32.     status = readl(DMOV_STATUS(id));
  33.     if (list_empty(&ready_commands[id]) &&
  34.         (status & DMOV_STATUS_CMD_PTR_RDY)) {
  35. @@ -83,8 +76,6 @@ void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd)
  36.         channel_active |= 1U << id;
  37.         writel(cmd->cmdptr, DMOV_CMD_PTR(id));
  38.     } else {
  39. -       if (!channel_active)
  40. -           clk_disable(msm_dmov_clk);
  41.         if (list_empty(&active_commands[id]))
  42.             PRINT_ERROR("msm_dmov_enqueue_cmd(%d), error datamover stalled, status %x\n", id, status);
  43.  
  44. @@ -154,6 +145,8 @@ int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr)
  45.     return 0;
  46.  }
  47.  
  48. +EXPORT_SYMBOL(msm_dmov_exec_cmd);
  49. +
  50.  
  51.  static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
  52.  {
  53. @@ -195,7 +188,6 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
  54.                     "for %p, result %x\n", id, cmd, ch_result);
  55.                 if (cmd) {
  56.                     list_del(&cmd->list);
  57. -                   dsb();
  58.                     cmd->complete_func(cmd, ch_result, NULL);
  59.                 }
  60.             }
  61. @@ -212,7 +204,6 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
  62.                 PRINT_FLOW("msm_datamover_irq_handler id %d, flush, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]);
  63.                 if (cmd) {
  64.                     list_del(&cmd->list);
  65. -                   dsb();
  66.                     cmd->complete_func(cmd, ch_result, &errdata);
  67.                 }
  68.             }
  69. @@ -230,7 +221,6 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
  70.                 PRINT_ERROR("msm_datamover_irq_handler id %d, error, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]);
  71.                 if (cmd) {
  72.                     list_del(&cmd->list);
  73. -                   dsb();
  74.                     cmd->complete_func(cmd, ch_result, &errdata);
  75.                 }
  76.                 /* this does not seem to work, once we get an error */
  77. @@ -254,10 +244,8 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
  78.         PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
  79.     }
  80.  
  81. -   if (!channel_active) {
  82. -       disable_irq_nosync(INT_ADM_AARM);
  83. -       clk_disable(msm_dmov_clk);
  84. -   }
  85. +   if (!channel_active)
  86. +       disable_irq(INT_ADM_AARM);
  87.  
  88.     spin_unlock_irqrestore(&msm_dmov_lock, irq_flags);
  89.     return IRQ_HANDLED;
  90. @@ -267,17 +255,11 @@ static int __init msm_init_datamover(void)
  91.  {
  92.     int i;
  93.     int ret;
  94. -   struct clk *clk;
  95. -
  96.     for (i = 0; i < MSM_DMOV_CHANNEL_COUNT; i++) {
  97.         INIT_LIST_HEAD(&ready_commands[i]);
  98.         INIT_LIST_HEAD(&active_commands[i]);
  99.         writel(DMOV_CONFIG_IRQ_EN | DMOV_CONFIG_FORCE_TOP_PTR_RSLT | DMOV_CONFIG_FORCE_FLUSH_RSLT, DMOV_CONFIG(i));
  100.     }
  101. -   clk = clk_get(NULL, "adm_clk");
  102. -   if (IS_ERR(clk))
  103. -       return PTR_ERR(clk);
  104. -   msm_dmov_clk = clk;
  105.     ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL);
  106.     if (ret)
  107.         return ret;
RAW Paste Data
Top