Re: [PATCH V3 1/4] dma: qcom_bam_dma: move to qcom directory

2015-11-07 Thread Timur Tabi

Sinan Kaya wrote:

Creating a QCOM directory for all QCOM DMA
source files.

Signed-off-by: Sinan Kaya 
---
  drivers/dma/Kconfig|   13 +-
  drivers/dma/Makefile   |2 +-
  drivers/dma/qcom/Kconfig   |9 +
  drivers/dma/qcom/Makefile  |1 +
  drivers/dma/qcom/bam_dma.c | 1259 
  drivers/dma/qcom_bam_dma.c | 1259 
  6 files changed, 1273 insertions(+), 1270 deletions(-)
  create mode 100644 drivers/dma/qcom/Kconfig
  create mode 100644 drivers/dma/qcom/Makefile
  create mode 100644 drivers/dma/qcom/bam_dma.c
  delete mode 100644 drivers/dma/qcom_bam_dma.c

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index b458475..d17d9ec 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -320,7 +320,7 @@ config MOXART_DMA
select DMA_VIRTUAL_CHANNELS
help
  Enable support for the MOXA ART SoC DMA controller.
-
+


Unrelated whitespace change.


diff --git a/drivers/dma/qcom/Makefile b/drivers/dma/qcom/Makefile
new file mode 100644
index 000..f612ae3
--- /dev/null
+++ b/drivers/dma/qcom/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_QCOM_BAM_DMA) += bam_dma.o
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
new file mode 100644
index 000..5359234


Please use "git format-patch -M" when creating patches for files that 
have moved.




--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 1/4] dma: qcom_bam_dma: move to qcom directory

2015-11-07 Thread Sinan Kaya
Creating a QCOM directory for all QCOM DMA
source files.

Signed-off-by: Sinan Kaya 
---
 drivers/dma/Kconfig|   13 +-
 drivers/dma/Makefile   |2 +-
 drivers/dma/qcom/Kconfig   |9 +
 drivers/dma/qcom/Makefile  |1 +
 drivers/dma/qcom/bam_dma.c | 1259 
 drivers/dma/qcom_bam_dma.c | 1259 
 6 files changed, 1273 insertions(+), 1270 deletions(-)
 create mode 100644 drivers/dma/qcom/Kconfig
 create mode 100644 drivers/dma/qcom/Makefile
 create mode 100644 drivers/dma/qcom/bam_dma.c
 delete mode 100644 drivers/dma/qcom_bam_dma.c

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index b458475..d17d9ec 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -320,7 +320,7 @@ config MOXART_DMA
select DMA_VIRTUAL_CHANNELS
help
  Enable support for the MOXA ART SoC DMA controller.
- 
+
  Say Y here if you enabled MMP ADMA, otherwise say N.
 
 config MPC512X_DMA
@@ -408,15 +408,6 @@ config PXA_DMA
  16 to 32 channels for peripheral to memory or memory to memory
  transfers.
 
-config QCOM_BAM_DMA
-   tristate "QCOM BAM DMA support"
-   depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM)
-   select DMA_ENGINE
-   select DMA_VIRTUAL_CHANNELS
-   ---help---
- Enable support for the QCOM BAM DMA controller.  This controller
- provides DMA capabilities for a variety of on-chip devices.
-
 config SIRF_DMA
tristate "CSR SiRFprimaII/SiRFmarco DMA support"
depends on ARCH_SIRF
@@ -527,6 +518,8 @@ config ZX_DMA
 # driver files
 source "drivers/dma/bestcomm/Kconfig"
 
+source "drivers/dma/qcom/Kconfig"
+
 source "drivers/dma/dw/Kconfig"
 
 source "drivers/dma/hsu/Kconfig"
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index 7711a71..8dba90d 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -52,7 +52,6 @@ obj-$(CONFIG_PCH_DMA) += pch_dma.o
 obj-$(CONFIG_PL330_DMA) += pl330.o
 obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
 obj-$(CONFIG_PXA_DMA) += pxa_dma.o
-obj-$(CONFIG_QCOM_BAM_DMA) += qcom_bam_dma.o
 obj-$(CONFIG_RENESAS_DMA) += sh/
 obj-$(CONFIG_SIRF_DMA) += sirf-dma.o
 obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o
@@ -66,4 +65,5 @@ obj-$(CONFIG_TI_EDMA) += edma.o
 obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
 obj-$(CONFIG_ZX_DMA) += zx296702_dma.o
 
+obj-y += qcom/
 obj-y += xilinx/
diff --git a/drivers/dma/qcom/Kconfig b/drivers/dma/qcom/Kconfig
new file mode 100644
index 000..17545df
--- /dev/null
+++ b/drivers/dma/qcom/Kconfig
@@ -0,0 +1,9 @@
+config QCOM_BAM_DMA
+   tristate "QCOM BAM DMA support"
+   depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM)
+   select DMA_ENGINE
+   select DMA_VIRTUAL_CHANNELS
+   ---help---
+ Enable support for the QCOM BAM DMA controller.  This controller
+ provides DMA capabilities for a variety of on-chip devices.
+
diff --git a/drivers/dma/qcom/Makefile b/drivers/dma/qcom/Makefile
new file mode 100644
index 000..f612ae3
--- /dev/null
+++ b/drivers/dma/qcom/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_QCOM_BAM_DMA) += bam_dma.o
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
new file mode 100644
index 000..5359234
--- /dev/null
+++ b/drivers/dma/qcom/bam_dma.c
@@ -0,0 +1,1259 @@
+/*
+ * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+/*
+ * QCOM BAM DMA engine driver
+ *
+ * QCOM BAM DMA blocks are distributed amongst a number of the on-chip
+ * peripherals on the MSM 8x74.  The configuration of the channels are 
dependent
+ * on the way they are hard wired to that specific peripheral.  The peripheral
+ * device tree entries specify the configuration of each channel.
+ *
+ * The DMA controller requires the use of external memory for storage of the
+ * hardware descriptors for each channel.  The descriptor FIFO is accessed as a
+ * circular buffer and operations are managed according to the offset within 
the
+ * FIFO.  After pipe/channel reset, all of the pipe registers and internal 
state
+ * are back to defaults.
+ *
+ * During DMA operations, we write descriptors to the FIFO, being careful to
+ * handle wrapping and then write the last FIFO offset to that channel's
+ * P_EVNT_REG register to kick off the transaction.  The P_SW_OFSTS register
+ * indicates the current FIFO offset that is being processed, so there is some
+ * indication of where the hardware is currently working.
+ */
+
+#include 

Re: [PATCH V3 1/4] dma: qcom_bam_dma: move to qcom directory

2015-11-07 Thread Timur Tabi

Sinan Kaya wrote:

Creating a QCOM directory for all QCOM DMA
source files.

Signed-off-by: Sinan Kaya 
---
  drivers/dma/Kconfig|   13 +-
  drivers/dma/Makefile   |2 +-
  drivers/dma/qcom/Kconfig   |9 +
  drivers/dma/qcom/Makefile  |1 +
  drivers/dma/qcom/bam_dma.c | 1259 
  drivers/dma/qcom_bam_dma.c | 1259 
  6 files changed, 1273 insertions(+), 1270 deletions(-)
  create mode 100644 drivers/dma/qcom/Kconfig
  create mode 100644 drivers/dma/qcom/Makefile
  create mode 100644 drivers/dma/qcom/bam_dma.c
  delete mode 100644 drivers/dma/qcom_bam_dma.c

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index b458475..d17d9ec 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -320,7 +320,7 @@ config MOXART_DMA
select DMA_VIRTUAL_CHANNELS
help
  Enable support for the MOXA ART SoC DMA controller.
-
+


Unrelated whitespace change.


diff --git a/drivers/dma/qcom/Makefile b/drivers/dma/qcom/Makefile
new file mode 100644
index 000..f612ae3
--- /dev/null
+++ b/drivers/dma/qcom/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_QCOM_BAM_DMA) += bam_dma.o
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
new file mode 100644
index 000..5359234


Please use "git format-patch -M" when creating patches for files that 
have moved.




--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 1/4] dma: qcom_bam_dma: move to qcom directory

2015-11-07 Thread Sinan Kaya
Creating a QCOM directory for all QCOM DMA
source files.

Signed-off-by: Sinan Kaya 
---
 drivers/dma/Kconfig|   13 +-
 drivers/dma/Makefile   |2 +-
 drivers/dma/qcom/Kconfig   |9 +
 drivers/dma/qcom/Makefile  |1 +
 drivers/dma/qcom/bam_dma.c | 1259 
 drivers/dma/qcom_bam_dma.c | 1259 
 6 files changed, 1273 insertions(+), 1270 deletions(-)
 create mode 100644 drivers/dma/qcom/Kconfig
 create mode 100644 drivers/dma/qcom/Makefile
 create mode 100644 drivers/dma/qcom/bam_dma.c
 delete mode 100644 drivers/dma/qcom_bam_dma.c

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index b458475..d17d9ec 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -320,7 +320,7 @@ config MOXART_DMA
select DMA_VIRTUAL_CHANNELS
help
  Enable support for the MOXA ART SoC DMA controller.
- 
+
  Say Y here if you enabled MMP ADMA, otherwise say N.
 
 config MPC512X_DMA
@@ -408,15 +408,6 @@ config PXA_DMA
  16 to 32 channels for peripheral to memory or memory to memory
  transfers.
 
-config QCOM_BAM_DMA
-   tristate "QCOM BAM DMA support"
-   depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM)
-   select DMA_ENGINE
-   select DMA_VIRTUAL_CHANNELS
-   ---help---
- Enable support for the QCOM BAM DMA controller.  This controller
- provides DMA capabilities for a variety of on-chip devices.
-
 config SIRF_DMA
tristate "CSR SiRFprimaII/SiRFmarco DMA support"
depends on ARCH_SIRF
@@ -527,6 +518,8 @@ config ZX_DMA
 # driver files
 source "drivers/dma/bestcomm/Kconfig"
 
+source "drivers/dma/qcom/Kconfig"
+
 source "drivers/dma/dw/Kconfig"
 
 source "drivers/dma/hsu/Kconfig"
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index 7711a71..8dba90d 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -52,7 +52,6 @@ obj-$(CONFIG_PCH_DMA) += pch_dma.o
 obj-$(CONFIG_PL330_DMA) += pl330.o
 obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
 obj-$(CONFIG_PXA_DMA) += pxa_dma.o
-obj-$(CONFIG_QCOM_BAM_DMA) += qcom_bam_dma.o
 obj-$(CONFIG_RENESAS_DMA) += sh/
 obj-$(CONFIG_SIRF_DMA) += sirf-dma.o
 obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o
@@ -66,4 +65,5 @@ obj-$(CONFIG_TI_EDMA) += edma.o
 obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
 obj-$(CONFIG_ZX_DMA) += zx296702_dma.o
 
+obj-y += qcom/
 obj-y += xilinx/
diff --git a/drivers/dma/qcom/Kconfig b/drivers/dma/qcom/Kconfig
new file mode 100644
index 000..17545df
--- /dev/null
+++ b/drivers/dma/qcom/Kconfig
@@ -0,0 +1,9 @@
+config QCOM_BAM_DMA
+   tristate "QCOM BAM DMA support"
+   depends on ARCH_QCOM || (COMPILE_TEST && OF && ARM)
+   select DMA_ENGINE
+   select DMA_VIRTUAL_CHANNELS
+   ---help---
+ Enable support for the QCOM BAM DMA controller.  This controller
+ provides DMA capabilities for a variety of on-chip devices.
+
diff --git a/drivers/dma/qcom/Makefile b/drivers/dma/qcom/Makefile
new file mode 100644
index 000..f612ae3
--- /dev/null
+++ b/drivers/dma/qcom/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_QCOM_BAM_DMA) += bam_dma.o
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
new file mode 100644
index 000..5359234
--- /dev/null
+++ b/drivers/dma/qcom/bam_dma.c
@@ -0,0 +1,1259 @@
+/*
+ * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+/*
+ * QCOM BAM DMA engine driver
+ *
+ * QCOM BAM DMA blocks are distributed amongst a number of the on-chip
+ * peripherals on the MSM 8x74.  The configuration of the channels are 
dependent
+ * on the way they are hard wired to that specific peripheral.  The peripheral
+ * device tree entries specify the configuration of each channel.
+ *
+ * The DMA controller requires the use of external memory for storage of the
+ * hardware descriptors for each channel.  The descriptor FIFO is accessed as a
+ * circular buffer and operations are managed according to the offset within 
the
+ * FIFO.  After pipe/channel reset, all of the pipe registers and internal 
state
+ * are back to defaults.
+ *
+ * During DMA operations, we write descriptors to the FIFO, being careful to
+ * handle wrapping and then write the last FIFO offset to that channel's
+ * P_EVNT_REG register to kick off the transaction.  The P_SW_OFSTS register
+ * indicates the current FIFO offset that is being processed, so there is some
+ * indication of where the hardware is currently working.
+