Skip to content

Commit 44f95d8

Browse files
KamalDasubroonie
authored andcommitted
spi: brcmstb-qspi: Broadcom settop platform driver
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent fa236a7 commit 44f95d8

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

drivers/spi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ obj-$(CONFIG_SPI_BCM2835AUX) += spi-bcm2835aux.o
2121
obj-$(CONFIG_SPI_BCM53XX) += spi-bcm53xx.o
2222
obj-$(CONFIG_SPI_BCM63XX) += spi-bcm63xx.o
2323
obj-$(CONFIG_SPI_BCM63XX_HSSPI) += spi-bcm63xx-hsspi.o
24-
obj-$(CONFIG_SPI_BCM_QSPI) += spi-bcm-qspi.o
24+
obj-$(CONFIG_SPI_BCM_QSPI) += spi-brcmstb-qspi.o spi-bcm-qspi.o
2525
obj-$(CONFIG_SPI_BFIN5XX) += spi-bfin5xx.o
2626
obj-$(CONFIG_SPI_ADI_V3) += spi-adi-v3.o
2727
obj-$(CONFIG_SPI_BFIN_SPORT) += spi-bfin-sport.o

drivers/spi/spi-brcmstb-qspi.c

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright 2016 Broadcom
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License, version 2, as
6+
* published by the Free Software Foundation (the "GPL").
7+
*
8+
* This program is distributed in the hope that it will be useful, but
9+
* WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
* General Public License version 2 (GPLv2) for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* version 2 (GPLv2) along with this source code.
15+
*/
16+
17+
#include <linux/device.h>
18+
#include <linux/module.h>
19+
#include <linux/platform_device.h>
20+
#include <linux/of.h>
21+
#include "spi-bcm-qspi.h"
22+
23+
static const struct of_device_id brcmstb_qspi_of_match[] = {
24+
{ .compatible = "brcm,spi-brcmstb-qspi" },
25+
{ .compatible = "brcm,spi-brcmstb-mspi" },
26+
{},
27+
};
28+
MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
29+
30+
static int brcmstb_qspi_probe(struct platform_device *pdev)
31+
{
32+
return bcm_qspi_probe(pdev, NULL);
33+
}
34+
35+
static int brcmstb_qspi_remove(struct platform_device *pdev)
36+
{
37+
return bcm_qspi_remove(pdev);
38+
}
39+
40+
static struct platform_driver brcmstb_qspi_driver = {
41+
.probe = brcmstb_qspi_probe,
42+
.remove = brcmstb_qspi_remove,
43+
.driver = {
44+
.name = "brcmstb_qspi",
45+
.pm = &bcm_qspi_pm_ops,
46+
.of_match_table = brcmstb_qspi_of_match,
47+
}
48+
};
49+
module_platform_driver(brcmstb_qspi_driver);
50+
51+
MODULE_LICENSE("GPL v2");
52+
MODULE_AUTHOR("Kamal Dasu");
53+
MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");

0 commit comments

Comments
 (0)