summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-08-23 20:24:52 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-23 20:24:52 -0700
commit3d1068e8c146cce1fb7883ae0a8ad7fcc587016a (patch)
treefbab67b4ad480b39dcb3494a0bf5e58e6487dea9
parent5d09858f45c7ccb63f3c3b55d3e3c259cc92d628 (diff)
parenteb4ef163c5e433b7f0f88fcec15a52b7059152b5 (diff)
Merge "mmc: sdhci: Force probe of shdc1 based on boolean property"
-rw-r--r--Documentation/devicetree/bindings/mmc/sdhci-msm.txt1
-rw-r--r--Documentation/devicetree/bindings/spi/spidev.txt30
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--drivers/mmc/host/sdhci-msm.c8
-rw-r--r--drivers/net/wireless/cnss/Kconfig1
-rw-r--r--drivers/net/wireless/cnss/cnss_sdio.c7
-rw-r--r--drivers/spi/spidev.c2
7 files changed, 47 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
index d00e26b4d5ed..9916c34e62b8 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
+++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
@@ -80,6 +80,7 @@ Optional Properties:
register dumps on CRC errors and also downgrade bus speed mode to
SDR50/DDR50 in case of continuous CRC errors. Set this flag to enable
this workaround.
+ - qcom,force-sdhc1-probe: Force probing sdhc1 even if it is not the boot device.
In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
- qcom,<supply>-always-on - specifies whether supply should be kept "on" always.
diff --git a/Documentation/devicetree/bindings/spi/spidev.txt b/Documentation/devicetree/bindings/spi/spidev.txt
new file mode 100644
index 000000000000..886eb4bfadf5
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spidev.txt
@@ -0,0 +1,30 @@
+SPIDEV
+
+SPI slave devices using the spidev driver allowing for userspace
+control of the SPI devices. Must be children of a SPI master node
+and contain the following properties.
+
+Required properties:
+- compatible: Should contain:
+ "nxp,mpc57xx" for external CAN controller
+ "infineon,sli97" for external HSM module
+
+- reg: Chip select address of device.
+- spi-max-frequency: Maximum SPI clocking speed of device in Hz.
+
+Optional properties:
+- spi-cpol: Empty property indicating device requires
+ inverse clock polarity (CPOL) mode.
+- spi-cpha: Empty property indicating device requires
+ shifted clock phase (CPHA) mode.
+
+Other optional properties described in
+Documentation/devicetree/bindings/spi/spi-bus.txt
+
+Example:
+
+ spi@0 {
+ compatible = "nxp,mpc57xx";
+ reg = <0>;
+ spi-max-frequency = <19200000>;
+ };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 2eeedaab16a5..e3bed3a961a3 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -115,6 +115,7 @@ ibm International Business Machines (IBM)
idt Integrated Device Technologies, Inc.
iom Iomega Corporation
img Imagination Technologies Ltd.
+infineon Infineon Technologies AG
ingenic Ingenic Semiconductor
innolux Innolux Corporation
intel Intel Corporation
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 907763ddf234..ab4837128cb2 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -4249,6 +4249,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
struct resource *tlmm_memres = NULL;
void __iomem *tlmm_mem;
unsigned long flags;
+ bool force_probe;
pr_debug("%s: Enter %s\n", dev_name(&pdev->dev), __func__);
msm_host = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_msm_host),
@@ -4312,8 +4313,13 @@ static int sdhci_msm_probe(struct platform_device *pdev)
goto pltfm_free;
}
+ /* Read property to determine if the probe is forced */
+ force_probe = of_find_property(pdev->dev.of_node,
+ "qcom,force-sdhc1-probe", NULL);
+
/* skip the probe if eMMC isn't a boot device */
- if ((ret == 1) && !sdhci_msm_is_bootdevice(&pdev->dev)) {
+ if ((ret == 1) && !sdhci_msm_is_bootdevice(&pdev->dev)
+ && !force_probe) {
ret = -ENODEV;
goto pltfm_free;
}
diff --git a/drivers/net/wireless/cnss/Kconfig b/drivers/net/wireless/cnss/Kconfig
index 6faf9f1ef5d0..863f766bccdb 100644
--- a/drivers/net/wireless/cnss/Kconfig
+++ b/drivers/net/wireless/cnss/Kconfig
@@ -46,7 +46,6 @@ config CLD_HL_SDIO_CORE
select WEXT_CORE
select WEXT_SPY
select NL80211_TESTMODE
- depends on ARCH_MSM
depends on MMC
config CLD_LL_CORE
diff --git a/drivers/net/wireless/cnss/cnss_sdio.c b/drivers/net/wireless/cnss/cnss_sdio.c
index ce7dbc64c4c3..8586bb16cfd3 100644
--- a/drivers/net/wireless/cnss/cnss_sdio.c
+++ b/drivers/net/wireless/cnss/cnss_sdio.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2017, 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
@@ -276,6 +276,11 @@ static int cnss_get_hw_resources(struct device *dev)
host = info->host;
+ if (!host) {
+ pr_err("%s: MMC host is invalid\n", __func__);
+ return -ENODEV;
+ }
+
ret = regulator_enable(cnss_pdata->regulator.wlan_vreg);
if (ret) {
pr_err("%s: Failed to enable wlan vreg\n", __func__);
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 9f161b2631f2..e5ca8f150617 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -696,6 +696,8 @@ static const struct of_device_id spidev_dt_ids[] = {
{ .compatible = "rohm,dh2228fv" },
{ .compatible = "lineartechnology,ltc2488" },
{ .compatible = "qcom,spi-msm-codec-slave", },
+ { .compatible = "nxp,mpc57xx", },
+ { .compatible = "infineon,sli97", },
{},
};
MODULE_DEVICE_TABLE(of, spidev_dt_ids);