Skip to contentSkip to conversation

msm: sps: Smart Peripheral System (SPS) driver.

RFC PATCH New Kenneth Heitke 1 participant 1 message Feb 24, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 msm: sps: Smart Peripheral System (SPS) driver.

From: Amir Samuelov <[email protected]>

The driver controls the SPS hardware DMA to move data in the following modes:

1. Peripheral-to-Peripheral
2. Peripheral-to-Memory
3. Memory-to-Memory

This driver complies to BAM hardware version#2.

---
This patch is being submitted as RFC to get early feedback from the community.

 arch/arm/mach-msm/Kconfig                |   23 +
 arch/arm/mach-msm/Makefile               |    1 +
 arch/arm/mach-msm/include/mach/msm_sps.h |   25 +
 arch/arm/mach-msm/include/mach/sps.h     | 1105 ++++++++++++++++++
 arch/arm/mach-msm/sps/Makefile           |    2 +
 arch/arm/mach-msm/sps/bam.c              |  588 ++++++++++
 arch/arm/mach-msm/sps/bam.h              |  375 ++++++
 arch/arm/mach-msm/sps/sps.c              | 1359 ++++++++++++++++++++++
 arch/arm/mach-msm/sps/sps_bam.c          | 1820 ++++++++++++++++++++++++++++++
 arch/arm/mach-msm/sps/sps_bam.h          |  547 +++++++++
 arch/arm/mach-msm/sps/sps_core.h         |  107 ++
 arch/arm/mach-msm/sps/sps_dma.c          |  896 +++++++++++++++
 arch/arm/mach-msm/sps/sps_map.c          |  137 +++
 arch/arm/mach-msm/sps/sps_map.h          |   46 +
 arch/arm/mach-msm/sps/sps_mem.c          |  156 +++
 arch/arm/mach-msm/sps/sps_rm.c           |  806 +++++++++++++
 arch/arm/mach-msm/sps/spsi.h             |  284 +++++
 17 files changed, 8277 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-msm/include/mach/msm_sps.h
 create mode 100644 arch/arm/mach-msm/include/mach/sps.h
 create mode 100644 arch/arm/mach-msm/sps/Makefile
 create mode 100644 arch/arm/mach-msm/sps/bam.c
 create mode 100644 arch/arm/mach-msm/sps/bam.h
 create mode 100644 arch/arm/mach-msm/sps/sps.c
 create mode 100644 arch/arm/mach-msm/sps/sps_bam.c
 create mode 100644 arch/arm/mach-msm/sps/sps_bam.h
 create mode 100644 arch/arm/mach-msm/sps/sps_core.h
 create mode 100644 arch/arm/mach-msm/sps/sps_dma.c
 create mode 100644 arch/arm/mach-msm/sps/sps_map.c
 create mode 100644 arch/arm/mach-msm/sps/sps_map.h
 create mode 100644 arch/arm/mach-msm/sps/sps_mem.c
 create mode 100644 arch/arm/mach-msm/sps/sps_rm.c
 create mode 100644 arch/arm/mach-msm/sps/spsi.h
arch/arm/mach-msm/Kconfig +23 -0
index 997c5bd..0ca8720 100644
@@ -210,4 +210,27 @@ config IOMMU_API
 
 config MSM_SCM
 	bool
+
+config SPS
+	bool "SPS support"
+	depends on (HAS_IOMEM && ARCH_MSM8960)
+	select GENERIC_ALLOCATOR
+	default n
+	help
+	  The SPS (Smart Peripheral Switch) is a DMA engine.
+	  It can move data in the following modes:
+		1. Peripheral-to-Peripheral.
+		2. Peripheral-to-Memory.
+		3. Memory-to-Memory.
+
+config SPS_SUPPORT_BAMDMA
+	bool "SPS support BAM DMA"
+	depends on SPS
+	default n
+	help
+	  The BAM-DMA is used for Memory-to-Memory transfers.
+	  The main use cases is RPC between processors.
+	  The BAM-DMA hardware has 2 registers sets:
+	  1. A BAM HW like all the peripherals.
+	  2. A DMA channel configuration (i.e. channel priority).
 endif
arch/arm/mach-msm/Makefile +1 -0
index 2099c97..28553ac 100644
@@ -21,6 +21,7 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
 
 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
 obj-$(CONFIG_SMP) += headsmp.o platsmp.o
+obj-$(CONFIG_SPS) += sps/
 
 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o
arch/arm/mach-msm/include/mach/msm_sps.h new file +25 -0
new file mode 100644
index 0000000..3af6f71
@@ -0,0 +1,25 @@
+/* Copyright (c) 2011, Code Aurora Forum. 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.
+ */
+#ifndef _MSM_SPS_H_
+#define _MSM_SPS_H_
+
+/**
+ * struct msm_sps_platform_data - SPS Platform specific data.
+ * @bamdma_restricted_pipes - Bitmask of pipes restricted from local use.
+ *
+ */
+struct msm_sps_platform_data {
+	u32 bamdma_restricted_pipes;
+};
+
+#endif /* _MSM_SPS_H_ */
+
arch/arm/mach-msm/include/mach/sps.h new file +1105 -0

1,105 lines not on this page · raw message

arch/arm/mach-msm/sps/Makefile new file +2 -0
new file mode 100644
index 0000000..f19e162
@@ -0,0 +1,2 @@
+obj-y += bam.o sps_bam.o sps.o sps_dma.o sps_map.o sps_mem.o sps_rm.o
+
arch/arm/mach-msm/sps/bam.c new file +588 -0

588 lines not on this page · raw message

arch/arm/mach-msm/sps/bam.h new file +375 -0

375 lines not on this page · raw message

arch/arm/mach-msm/sps/sps.c new file +1359 -0

871 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_bam.c new file +1820 -0

1,820 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_bam.h new file +547 -0

547 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_core.h new file +107 -0

107 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_dma.c new file +896 -0

896 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_map.c new file +137 -0

137 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_map.h new file +46 -0

46 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_mem.c new file +156 -0

156 lines not on this page · raw message

arch/arm/mach-msm/sps/sps_rm.c new file +806 -0

806 lines not on this page · raw message

arch/arm/mach-msm/sps/spsi.h new file +284 -0

284 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 4 lines
1.7.3.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum

Part of the diff is not shown here. View the raw message.