mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next/clock
* 'clk-next' of git://git.linaro.org/people/mturquette/linux: clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate(). clk: Provide dummy clk_unregister() ARM: Kirkwood: Replace clock gating ARM: Orion: Audio: Add clk/clkdev support ARM: Orion: PCIE: Add support for clk ARM: Orion: XOR: Add support for clk ARM: Orion: CESA: Add support for clk ARM: Orion: SDIO: Add support for clk. ARM: Orion: NAND: Add support for clk, if there is one. ARM: Orion: EHCI: Add support for enabling clocks ARM: Orion: SATA: Add per channel clk/clkdev support. ARM: Orion: UART: Get the clock rate via clk_get_rate(). ARM: Orion: WDT: Add clk/clkdev support ARM: Orion: Eth: Add clk/clkdev support. ARM: Orion: SPI: Add clk/clkdev support. ARM: Orion: Add clocks using the generic clk infrastructure. Signed-off-by: Arnd Bergmann <[email protected]>
This commit is contained in:
commit
3c0dec5f58
36 changed files with 585 additions and 264 deletions
|
|
@ -24,8 +24,8 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/clk.h>
|
||||
#include <mach/bridge-regs.h>
|
||||
#include <plat/orion_wdt.h>
|
||||
|
||||
/*
|
||||
* Watchdog timer block registers.
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
static bool nowayout = WATCHDOG_NOWAYOUT;
|
||||
static int heartbeat = -1; /* module parameter (seconds) */
|
||||
static unsigned int wdt_max_duration; /* (seconds) */
|
||||
static struct clk *clk;
|
||||
static unsigned int wdt_tclk;
|
||||
static void __iomem *wdt_reg;
|
||||
static unsigned long wdt_status;
|
||||
|
|
@ -237,16 +238,16 @@ static struct miscdevice orion_wdt_miscdev = {
|
|||
|
||||
static int __devinit orion_wdt_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct orion_wdt_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
if (pdata) {
|
||||
wdt_tclk = pdata->tclk;
|
||||
} else {
|
||||
pr_err("misses platform data\n");
|
||||
clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(clk)) {
|
||||
printk(KERN_ERR "Orion Watchdog missing clock\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
clk_prepare_enable(clk);
|
||||
wdt_tclk = clk_get_rate(clk);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
||||
|
|
@ -282,6 +283,9 @@ static int __devexit orion_wdt_remove(struct platform_device *pdev)
|
|||
if (!ret)
|
||||
orion_wdt_miscdev.parent = NULL;
|
||||
|
||||
clk_disable_unprepare(clk);
|
||||
clk_put(clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue