Skip to content

Commit

Permalink
Merge tag 'mvebu-fixes-3.15-2' of git://git.infradead.org/linux-mvebu…
Browse files Browse the repository at this point in the history
… into fixes

mvebu fixes for v3.15 (incremental #2)

 - Armada 38x
    - fix PCIe dt nodes for handling more interfaces

 - mvebu
    - mvebu-soc-id: fix clock handling and PCIe interface disabling.

* tag 'mvebu-fixes-3.15-2' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: fix definitions of PCIe interfaces on Armada 38x
  ARM: mvebu: mvebu-soc-id: keep clock enabled if PCIe unit is enabled
  ARM: mvebu: mvebu-soc-id: add missing clk_put() call

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
arndb committed May 23, 2014
2 parents 767bf9f + d903bc9 commit 85aea46
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/armada-380.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/armada-385.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
Expand All @@ -131,7 +131,7 @@
pcie@4,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
reg = <0x2000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
Expand Down
13 changes: 12 additions & 1 deletion arch/arm/mach-mvebu/mvebu-soc-id.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,18 @@ static int __init mvebu_soc_id_init(void)
iounmap(pci_base);

res_ioremap:
clk_disable_unprepare(clk);
/*
* If the PCIe unit is actually enabled and we have PCI
* support in the kernel, we intentionally do not release the
* reference to the clock. We want to keep it running since
* the bootloader does some PCIe link configuration that the
* kernel is for now unable to do, and gating the clock would
* make us loose this precious configuration.
*/
if (!of_device_is_available(child) || !IS_ENABLED(CONFIG_PCI_MVEBU)) {
clk_disable_unprepare(clk);
clk_put(clk);
}

clk_err:
of_node_put(child);
Expand Down

0 comments on commit 85aea46

Please sign in to comment.