diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-08-21 13:16:55 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-08-21 13:17:18 -0400 |
commit | bfa664f21b0357f2ad9cdf519f594ece36ec8f64 (patch) | |
tree | f377028eba58633d917d65c1141977b2e8ca9529 /drivers/of | |
parent | 5515d9981f5f30e82d096921f86ba016911c9ea8 (diff) | |
parent | b4f173752a56187bd55752b0474429202f2ab1d3 (diff) |
Merge tag 'tegra-for-3.12-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/soc
From: Stephen Warren:
ARM: tegra: core SoC enhancements for 3.12
This branch includes a number of enhancements to core SoC support for
Tegra devices. The major new features are:
* Adds a new CPU-power-gated cpuidle state for Tegra114.
* Adds initial system suspend support for Tegra114, initially supporting
just CPU-power-gating during suspend.
* Adds "LP1" suspend mode support for all of Tegra20/30/114. This mode
both gates CPU power, and places the DRAM into self-refresh mode.
* A new DT-driven PCIe driver to Tegra20/30. The driver is also moved
from arch/arm/mach-tegra/ to drivers/pci/host/.
The PCIe driver work depends on the following tag from Thomas Petazzoni:
git://git.infradead.org/linux-mvebu.git mis-3.12.2
... which is merged into the middle of this pull request.
* tag 'tegra-for-3.12-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (33 commits)
ARM: tegra: disable LP2 cpuidle state if PCIe is enabled
MAINTAINERS: Add myself as Tegra PCIe maintainer
PCI: tegra: set up PADS_REFCLK_CFG1
PCI: tegra: Add Tegra 30 PCIe support
PCI: tegra: Move PCIe driver to drivers/pci/host
PCI: msi: add default MSI operations for !HAVE_GENERIC_HARDIRQS platforms
ARM: tegra: add LP1 suspend support for Tegra114
ARM: tegra: add LP1 suspend support for Tegra20
ARM: tegra: add LP1 suspend support for Tegra30
ARM: tegra: add common LP1 suspend support
clk: tegra114: add LP1 suspend/resume support
ARM: tegra: config the polarity of the request of sys clock
ARM: tegra: add common resume handling code for LP1 resuming
ARM: pci: add ->add_bus() and ->remove_bus() hooks to hw_pci
of: pci: add registry of MSI chips
PCI: Introduce new MSI chip infrastructure
PCI: remove ARCH_SUPPORTS_MSI kconfig option
PCI: use weak functions for MSI arch-specific functions
ARM: tegra: unify Tegra's Kconfig a bit more
ARM: tegra: remove the limitation that Tegra114 can't support suspend
...
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_pci.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c index 42c687a820ac..e5ca00893c0c 100644 --- a/drivers/of/of_pci.c +++ b/drivers/of/of_pci.c | |||
@@ -89,3 +89,48 @@ int of_pci_parse_bus_range(struct device_node *node, struct resource *res) | |||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | EXPORT_SYMBOL_GPL(of_pci_parse_bus_range); | 91 | EXPORT_SYMBOL_GPL(of_pci_parse_bus_range); |
92 | |||
93 | #ifdef CONFIG_PCI_MSI | ||
94 | |||
95 | static LIST_HEAD(of_pci_msi_chip_list); | ||
96 | static DEFINE_MUTEX(of_pci_msi_chip_mutex); | ||
97 | |||
98 | int of_pci_msi_chip_add(struct msi_chip *chip) | ||
99 | { | ||
100 | if (!of_property_read_bool(chip->of_node, "msi-controller")) | ||
101 | return -EINVAL; | ||
102 | |||
103 | mutex_lock(&of_pci_msi_chip_mutex); | ||
104 | list_add(&chip->list, &of_pci_msi_chip_list); | ||
105 | mutex_unlock(&of_pci_msi_chip_mutex); | ||
106 | |||
107 | return 0; | ||
108 | } | ||
109 | EXPORT_SYMBOL_GPL(of_pci_msi_chip_add); | ||
110 | |||
111 | void of_pci_msi_chip_remove(struct msi_chip *chip) | ||
112 | { | ||
113 | mutex_lock(&of_pci_msi_chip_mutex); | ||
114 | list_del(&chip->list); | ||
115 | mutex_unlock(&of_pci_msi_chip_mutex); | ||
116 | } | ||
117 | EXPORT_SYMBOL_GPL(of_pci_msi_chip_remove); | ||
118 | |||
119 | struct msi_chip *of_pci_find_msi_chip_by_node(struct device_node *of_node) | ||
120 | { | ||
121 | struct msi_chip *c; | ||
122 | |||
123 | mutex_lock(&of_pci_msi_chip_mutex); | ||
124 | list_for_each_entry(c, &of_pci_msi_chip_list, list) { | ||
125 | if (c->of_node == of_node) { | ||
126 | mutex_unlock(&of_pci_msi_chip_mutex); | ||
127 | return c; | ||
128 | } | ||
129 | } | ||
130 | mutex_unlock(&of_pci_msi_chip_mutex); | ||
131 | |||
132 | return NULL; | ||
133 | } | ||
134 | EXPORT_SYMBOL_GPL(of_pci_find_msi_chip_by_node); | ||
135 | |||
136 | #endif /* CONFIG_PCI_MSI */ | ||