Skip to contentSkip to conversation

spi: QUP based bus driver for Qualcomm MSM chipsets

PATCH Superseded Harini Jayaraman 2 participants 2 messages Nov 10, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: QUP based bus driver for Qualcomm MSM chipsets

This bus driver supports the QUP SPI hardware controller in the Qualcomm MSM SOCs. The Qualcomm Universal Peripheral Engine (QUP) is a general purpose data path engine with input/output FIFOs and an embedded SPI mini-core. The driver currently supports only FIFO mode.

---
 drivers/spi/Kconfig                   |   10 +
 drivers/spi/Makefile                  |    1 +
 drivers/spi/msm_spi_qsd.h             |  436 +++++++++++++
 drivers/spi/spi-qsd.c                 | 1144 +++++++++++++++++++++++++++++++++
 include/linux/platform_data/msm_spi.h |   19 +
 5 files changed, 1610 insertions(+), 0 deletions(-)
 create mode 100644 drivers/spi/msm_spi_qsd.h
 create mode 100644 drivers/spi/spi-qsd.c
 create mode 100644 include/linux/platform_data/msm_spi.h
drivers/spi/Kconfig +10 -0
index 52e2900..af55a0a 100644
@@ -280,6 +280,16 @@ config SPI_PXA2XX
 config SPI_PXA2XX_PCI
 	def_bool SPI_PXA2XX && X86_32 && PCI
 
+config SPI_QUP
+	tristate "Qualcomm MSM SPI QUPe Support"
+	depends on ARCH_MSM
+	help
+	  Support for Serial Peripheral Interface for Qualcomm Universal
+	  Peripheral.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called spi-qsd.
+
 config SPI_S3C24XX
 	tristate "Samsung S3C24XX series SPI"
 	depends on ARCH_S3C2410 && EXPERIMENTAL
drivers/spi/Makefile +1 -0
index 61c3261..f426c89 100644
@@ -44,6 +44,7 @@ obj-$(CONFIG_SPI_PL022)			+= spi-pl022.o
 obj-$(CONFIG_SPI_PPC4xx)		+= spi-ppc4xx.o
 obj-$(CONFIG_SPI_PXA2XX)		+= spi-pxa2xx.o
 obj-$(CONFIG_SPI_PXA2XX_PCI)		+= spi-pxa2xx-pci.o
+obj-$(CONFIG_SPI_QUP)			+= spi-qsd.o
 obj-$(CONFIG_SPI_S3C24XX)		+= spi-s3c24xx-hw.o
 spi-s3c24xx-hw-y			:= spi-s3c24xx.o
 spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o
drivers/spi/msm_spi_qsd.h new file +436 -0

436 lines not on this page · raw message

drivers/spi/spi-qsd.c new file +1144 -0

1,144 lines not on this page · raw message

include/linux/platform_data/msm_spi.h new file +19 -0
new file mode 100644
index 0000000..a37ef6d
@@ -0,0 +1,19 @@
+/* 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 __ARCH_ARM_MACH_MSM_SPI_H
+#define __ARCH_ARM_MACH_MSM_SPI_H
+
+struct msm_spi_platform_data {
+	u32 max_clock_speed;
+};
+#endif
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.
#1 lore raw
Quoted 6 lines · Harini Jayaraman

This bus driver supports the QUP SPI hardware controller in the Qualcomm MSM SOCs. The Qualcomm Universal Peripheral Engine (QUP) is a general purpose data path engine with input/output FIFOs and an embedded SPI mini-core. The driver currently supports only FIFO mode.

Quoted 10 lines
---
 drivers/spi/Kconfig                   |   10 +
 drivers/spi/Makefile                  |    1 +
 drivers/spi/msm_spi_qsd.h             |  436 +++++++++++++
 drivers/spi/spi-qsd.c                 | 1144 +++++++++++++++++++++++++++++++++
 include/linux/platform_data/msm_spi.h |   19 +
 5 files changed, 1610 insertions(+), 0 deletions(-)
 create mode 100644 drivers/spi/msm_spi_qsd.h
 create mode 100644 drivers/spi/spi-qsd.c
 create mode 100644 include/linux/platform_data/msm_spi.h

A few high-level comments to start. Let's drop 'qsd' from all the names. We haven't used that naming convention for several years now. Better to just call this 'spi-qup.[ch]'. Also, please update the copyright dates. This driver existed before 2011. Thanks.

- Bryan

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