All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamal Dasu <kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	vigneshr-l0cyMroinI0@public.gmane.org,
	f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	yendapally.reddy-dY08KVG/lbpWk0Htik3J/w@public.gmane.org
Cc: bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	Kamal Dasu <kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH v6, 3/8] spi: brcmstb-qspi: Broadcom settop platform driver
Date: Wed, 24 Aug 2016 18:04:24 -0400	[thread overview]
Message-ID: <1472076269-4731-4-git-send-email-kdasu.kdev@gmail.com> (raw)
In-Reply-To: <1472076269-4731-1-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Adding the settop SoC platfrom driver, this driver is compatible
with the settop MSPI+BSPI and MSPI only blocks implemented on the
SoCs. Driver calls the spi-bcm-qspi probe(), remove() and pm_ops.

Signed-off-by: Kamal Dasu <kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/spi/Makefile           |  2 +-
 drivers/spi/spi-brcmstb-qspi.c | 53 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 drivers/spi/spi-brcmstb-qspi.c

diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 4a715f3..3e753db 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_SPI_BCM2835AUX)		+= spi-bcm2835aux.o
 obj-$(CONFIG_SPI_BCM53XX)		+= spi-bcm53xx.o
 obj-$(CONFIG_SPI_BCM63XX)		+= spi-bcm63xx.o
 obj-$(CONFIG_SPI_BCM63XX_HSSPI)		+= spi-bcm63xx-hsspi.o
-obj-$(CONFIG_SPI_BCM_QSPI)		+= spi-bcm-qspi.o
+obj-$(CONFIG_SPI_BCM_QSPI)		+= spi-brcmstb-qspi.o spi-bcm-qspi.o
 obj-$(CONFIG_SPI_BFIN5XX)		+= spi-bfin5xx.o
 obj-$(CONFIG_SPI_ADI_V3)                += spi-adi-v3.o
 obj-$(CONFIG_SPI_BFIN_SPORT)		+= spi-bfin-sport.o
diff --git a/drivers/spi/spi-brcmstb-qspi.c b/drivers/spi/spi-brcmstb-qspi.c
new file mode 100644
index 0000000..c7df92e
--- /dev/null
+++ b/drivers/spi/spi-brcmstb-qspi.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2016 Broadcom
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation (the "GPL").
+ *
+ * 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 version 2 (GPLv2) for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 (GPLv2) along with this source code.
+ */
+
+#include <linux/device.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include "spi-bcm-qspi.h"
+
+static const struct of_device_id brcmstb_qspi_of_match[] = {
+	{ .compatible = "brcm,spi-brcmstb-qspi" },
+	{ .compatible = "brcm,spi-brcmstb-mspi" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
+
+static int brcmstb_qspi_probe(struct platform_device *pdev)
+{
+	return bcm_qspi_probe(pdev, NULL);
+}
+
+static int brcmstb_qspi_remove(struct platform_device *pdev)
+{
+	return bcm_qspi_remove(pdev);
+}
+
+static struct platform_driver brcmstb_qspi_driver = {
+	.probe			= brcmstb_qspi_probe,
+	.remove			= brcmstb_qspi_remove,
+	.driver = {
+		.name		= "brcmstb_qspi",
+		.pm		= &bcm_qspi_pm_ops,
+		.of_match_table = brcmstb_qspi_of_match,
+	}
+};
+module_platform_driver(brcmstb_qspi_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Kamal Dasu");
+MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Kamal Dasu <kdasu.kdev@gmail.com>
To: broonie@kernel.org, linux-spi@vger.kernel.org,
	computersforpeace@gmail.com, linux-mtd@lists.infradead.org,
	vigneshr@ti.com, f.fainelli@gmail.com,
	yendapally.reddy@broadcom.com
Cc: bcm-kernel-feedback-list@broadcom.com, jon.mason@broadcom.com,
	Kamal Dasu <kdasu.kdev@gmail.com>
Subject: [PATCH v6, 3/8] spi: brcmstb-qspi: Broadcom settop platform driver
Date: Wed, 24 Aug 2016 18:04:24 -0400	[thread overview]
Message-ID: <1472076269-4731-4-git-send-email-kdasu.kdev@gmail.com> (raw)
In-Reply-To: <1472076269-4731-1-git-send-email-kdasu.kdev@gmail.com>

Adding the settop SoC platfrom driver, this driver is compatible
with the settop MSPI+BSPI and MSPI only blocks implemented on the
SoCs. Driver calls the spi-bcm-qspi probe(), remove() and pm_ops.

Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
 drivers/spi/Makefile           |  2 +-
 drivers/spi/spi-brcmstb-qspi.c | 53 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 drivers/spi/spi-brcmstb-qspi.c

diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 4a715f3..3e753db 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_SPI_BCM2835AUX)		+= spi-bcm2835aux.o
 obj-$(CONFIG_SPI_BCM53XX)		+= spi-bcm53xx.o
 obj-$(CONFIG_SPI_BCM63XX)		+= spi-bcm63xx.o
 obj-$(CONFIG_SPI_BCM63XX_HSSPI)		+= spi-bcm63xx-hsspi.o
-obj-$(CONFIG_SPI_BCM_QSPI)		+= spi-bcm-qspi.o
+obj-$(CONFIG_SPI_BCM_QSPI)		+= spi-brcmstb-qspi.o spi-bcm-qspi.o
 obj-$(CONFIG_SPI_BFIN5XX)		+= spi-bfin5xx.o
 obj-$(CONFIG_SPI_ADI_V3)                += spi-adi-v3.o
 obj-$(CONFIG_SPI_BFIN_SPORT)		+= spi-bfin-sport.o
diff --git a/drivers/spi/spi-brcmstb-qspi.c b/drivers/spi/spi-brcmstb-qspi.c
new file mode 100644
index 0000000..c7df92e
--- /dev/null
+++ b/drivers/spi/spi-brcmstb-qspi.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2016 Broadcom
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation (the "GPL").
+ *
+ * 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 version 2 (GPLv2) for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 (GPLv2) along with this source code.
+ */
+
+#include <linux/device.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include "spi-bcm-qspi.h"
+
+static const struct of_device_id brcmstb_qspi_of_match[] = {
+	{ .compatible = "brcm,spi-brcmstb-qspi" },
+	{ .compatible = "brcm,spi-brcmstb-mspi" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
+
+static int brcmstb_qspi_probe(struct platform_device *pdev)
+{
+	return bcm_qspi_probe(pdev, NULL);
+}
+
+static int brcmstb_qspi_remove(struct platform_device *pdev)
+{
+	return bcm_qspi_remove(pdev);
+}
+
+static struct platform_driver brcmstb_qspi_driver = {
+	.probe			= brcmstb_qspi_probe,
+	.remove			= brcmstb_qspi_remove,
+	.driver = {
+		.name		= "brcmstb_qspi",
+		.pm		= &bcm_qspi_pm_ops,
+		.of_match_table = brcmstb_qspi_of_match,
+	}
+};
+module_platform_driver(brcmstb_qspi_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Kamal Dasu");
+MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");
-- 
1.9.1

  parent reply	other threads:[~2016-08-24 22:04 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 22:04 [PATCH v6, 0/8] Broadcom stb, and iProc SoC QSPI driver Kamal Dasu
2016-08-24 22:04 ` Kamal Dasu
     [not found] ` <1472076269-4731-1-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-24 22:04   ` [PATCH v6, 1/8] spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
     [not found]     ` <1472076269-4731-2-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-14 17:16       ` Applied "spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings" to the spi tree Mark Brown
2016-09-14 17:16         ` Mark Brown
2016-08-24 22:04   ` [PATCH v6, 2/8] spi: bcm-qspi: Add Broadcom MSPI driver Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
2016-08-24 22:04   ` Kamal Dasu [this message]
2016-08-24 22:04     ` [PATCH v6, 3/8] spi: brcmstb-qspi: Broadcom settop platform driver Kamal Dasu
     [not found]     ` <1472076269-4731-4-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-14 17:16       ` Applied "spi: brcmstb-qspi: Broadcom settop platform driver" to the spi tree Mark Brown
2016-09-14 17:16         ` Mark Brown
2016-08-24 22:04   ` [PATCH v6, 4/8] spi: bcm-qspi: Add BSPI spi-nor flash controller driver Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
     [not found]     ` <1472076269-4731-5-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-14 17:16       ` Applied "spi: bcm-qspi: Add BSPI spi-nor flash controller driver" to the spi tree Mark Brown
2016-09-14 17:16         ` Mark Brown
2016-08-24 22:04   ` [PATCH v6, 5/8] mtd: m25p80: Let m25p80_read() fallback to spi transfer Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
2016-10-10  8:04     ` Florian Fainelli
2016-10-10  8:04       ` Florian Fainelli
     [not found]       ` <4b3b3d3e-b3f8-1d5b-65e3-0c37b6a29096-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-10  8:29         ` Cyrille Pitchen
2016-10-10  8:29           ` Cyrille Pitchen
2016-10-13 21:15           ` Kamal Dasu
2016-10-13 21:15             ` Kamal Dasu
2016-10-14 13:17             ` Cyrille Pitchen
2016-10-14 13:17               ` Cyrille Pitchen
     [not found]               ` <ae2c984e-2bcf-380e-a257-dbe786973af1-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-11-29  1:32                 ` Florian Fainelli
2016-11-29  1:32                   ` Florian Fainelli
     [not found]                   ` <7697b2fa-4660-c791-e891-a22c8bc5390f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-29 14:06                     ` Cyrille Pitchen
2016-11-29 14:06                       ` Cyrille Pitchen
     [not found]                       ` <a0179d25-71a5-b47f-4272-49aa2a346b54-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-12-01 15:45                         ` Marek Vasut
2016-12-01 15:45                           ` Marek Vasut
     [not found]                           ` <3260e7e5-fcf1-599a-e7b4-fd7aaef5be2e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-20 19:35                             ` Kamal Dasu
2017-01-20 19:35                               ` Kamal Dasu
2016-08-24 22:04   ` [PATCH v6, 6/8] arm: dts: Add bcm-nsp and bcm958625k support Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
     [not found]     ` <1472076269-4731-7-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-14 20:33       ` Florian Fainelli
2016-09-14 20:33         ` Florian Fainelli
2016-08-24 22:04   ` [PATCH v6, 7/8] arm64: dts: Add ns2 SoC support Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
     [not found]     ` <1472076269-4731-8-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-14 20:34       ` Florian Fainelli
2016-09-14 20:34         ` Florian Fainelli
2016-08-24 22:04   ` [PATCH v6, 8/8] spi: iproc-qspi: Add Broadcom iProc SoCs support Kamal Dasu
2016-08-24 22:04     ` Kamal Dasu
     [not found]     ` <1472076269-4731-9-git-send-email-kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-15 17:34       ` Florian Fainelli
2016-09-15 17:34         ` Florian Fainelli
2016-09-25  5:59       ` Applied "spi: iproc-qspi: Add Broadcom iProc SoCs support" to the spi tree Mark Brown
2016-09-25  5:59         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472076269-4731-4-git-send-email-kdasu.kdev@gmail.com \
    --to=kdasu.kdev-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=vigneshr-l0cyMroinI0@public.gmane.org \
    --cc=yendapally.reddy-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.