diff options
author | Andrew Lunn <andrew@lunn.ch> | 2012-04-11 21:07:45 +0200 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2012-05-09 01:34:04 +0200 |
commit | 98d9986cb8bf65f8316b45244fdafc1d12c303be (patch) | |
tree | 88e6367c63a01ea8fe2c6480eea6d9d0782fa502 /arch/arm/mach-kirkwood/pcie.c | |
parent | ARM: Orion: Audio: Add clk/clkdev support (diff) | |
download | linux-98d9986cb8bf65f8316b45244fdafc1d12c303be.tar.xz linux-98d9986cb8bf65f8316b45244fdafc1d12c303be.zip |
ARM: Kirkwood: Replace clock gating
Add a varient of the basic clk-gate code. This variant calls a
function before gating the clock off. This function is used to disable
the SATA or PCIe PHY.
Now that all the drivers prepare and enable there clk as needed, there
is no need for the common code to keep track of which clocks need
gating on. Let the common clock framework turn off clocks which are
not used.
Buy using the added clk varient, when the clk framework turns off SATA
or PCIe clocks, we also disabled SATA and PCIe PHYs which were not
needed.
The function kirkwood_pcie_id() can now be called outside of __init
code, so remove this property for it, and functions it calls.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-kirkwood/pcie.c')
-rw-r--r-- | arch/arm/mach-kirkwood/pcie.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index 881933a0b5eb..f26d6cff8bab 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c @@ -44,7 +44,7 @@ void kirkwood_enable_pcie(void) writel(curr | CGC_PEX0, CLOCK_GATING_CTRL); } -void __init kirkwood_pcie_id(u32 *dev, u32 *rev) +void kirkwood_pcie_id(u32 *dev, u32 *rev) { kirkwood_enable_pcie(); *dev = orion_pcie_dev_id((void __iomem *)PCIE_VIRT_BASE); @@ -181,7 +181,6 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp) static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) { - extern unsigned int kirkwood_clk_ctrl; struct pcie_port *pp; int index; @@ -200,12 +199,10 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) switch (index) { case 0: - kirkwood_clk_ctrl |= CGC_PEX0; kirkwood_enable_pcie_clk("0"); pcie0_ioresources_init(pp); break; case 1: - kirkwood_clk_ctrl |= CGC_PEX1; kirkwood_enable_pcie_clk("1"); pcie1_ioresources_init(pp); break; |