msm: dma: Convert spinlocks to mutexes for new clock apis

Converting the dma driver to mutexes is a requirement for using the new
clk_prepare and clk_unprepare apis. In order to deal with callers who
run in atomic context, refactor the enqueuing code to run in a
workqueue. Introduce a new spinlock that only protects the command lists
and not the hardware so the enqueue routine can add to the lists in
atomic context.

Change-Id: I4f2ecdb8b6d2a25e6069bf9da61f9cf9d5c9e2b0
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
diff --git a/arch/arm/mach-msm/include/mach/dma.h b/arch/arm/mach-msm/include/mach/dma.h
index 70519ff..ba621e6 100644
--- a/arch/arm/mach-msm/include/mach/dma.h
+++ b/arch/arm/mach-msm/include/mach/dma.h
@@ -35,7 +35,10 @@
 			      unsigned int result,
 			      struct msm_dmov_errdata *err);
 	void (*exec_func)(struct msm_dmov_cmd *cmd);
+	struct work_struct work;
+	unsigned id;    /* For internal use */
 	void *user;	/* Pointer for caller's reference */
+	u8 toflush;
 };
 
 struct msm_dmov_pdata {