Commit 4c5e1946 authored by Russell King's avatar Russell King Committed by Russell King

[ARM] omap: watchdog: provide a dummy ick for OMAP1

Eliminate the OMAP1 vs OMAP2 clock knowledge in the watchdog driver.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 39a80c7f
...@@ -86,6 +86,8 @@ static struct omap_clk omap_clks[] = { ...@@ -86,6 +86,8 @@ static struct omap_clk omap_clks[] = {
CLK(NULL, "armxor_ck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), CLK(NULL, "armxor_ck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
CLK(NULL, "armtim_ck", &armtim_ck.clk, CK_16XX | CK_1510 | CK_310), CLK(NULL, "armtim_ck", &armtim_ck.clk, CK_16XX | CK_1510 | CK_310),
CLK("omap_wdt", "fck", &armwdt_ck.clk, CK_16XX | CK_1510 | CK_310), CLK("omap_wdt", "fck", &armwdt_ck.clk, CK_16XX | CK_1510 | CK_310),
CLK("omap_wdt", "ick", &armper_ck.clk, CK_16XX),
CLK("omap_wdt", "ick", &dummy_ck, CK_1510 | CK_310),
CLK(NULL, "arminth_ck", &arminth_ck1510, CK_1510 | CK_310), CLK(NULL, "arminth_ck", &arminth_ck1510, CK_1510 | CK_310),
CLK(NULL, "arminth_ck", &arminth_ck16xx, CK_16XX), CLK(NULL, "arminth_ck", &arminth_ck16xx, CK_16XX),
/* CK_GEN2 clocks */ /* CK_GEN2 clocks */
......
...@@ -145,7 +145,6 @@ static int omap_wdt_open(struct inode *inode, struct file *file) ...@@ -145,7 +145,6 @@ static int omap_wdt_open(struct inode *inode, struct file *file)
if (test_and_set_bit(1, (unsigned long *)&(wdev->omap_wdt_users))) if (test_and_set_bit(1, (unsigned long *)&(wdev->omap_wdt_users)))
return -EBUSY; return -EBUSY;
if (wdev->ick)
clk_enable(wdev->ick); /* Enable the interface clock */ clk_enable(wdev->ick); /* Enable the interface clock */
clk_enable(wdev->fck); /* Enable the functional clock */ clk_enable(wdev->fck); /* Enable the functional clock */
...@@ -176,7 +175,6 @@ static int omap_wdt_release(struct inode *inode, struct file *file) ...@@ -176,7 +175,6 @@ static int omap_wdt_release(struct inode *inode, struct file *file)
omap_wdt_disable(wdev); omap_wdt_disable(wdev);
if (wdev->ick)
clk_disable(wdev->ick); clk_disable(wdev->ick);
clk_disable(wdev->fck); clk_disable(wdev->fck);
#else #else
...@@ -294,14 +292,12 @@ static int __init omap_wdt_probe(struct platform_device *pdev) ...@@ -294,14 +292,12 @@ static int __init omap_wdt_probe(struct platform_device *pdev)
wdev->omap_wdt_users = 0; wdev->omap_wdt_users = 0;
wdev->mem = mem; wdev->mem = mem;
if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
wdev->ick = clk_get(&pdev->dev, "ick"); wdev->ick = clk_get(&pdev->dev, "ick");
if (IS_ERR(wdev->ick)) { if (IS_ERR(wdev->ick)) {
ret = PTR_ERR(wdev->ick); ret = PTR_ERR(wdev->ick);
wdev->ick = NULL; wdev->ick = NULL;
goto err_clk; goto err_clk;
} }
}
wdev->fck = clk_get(&pdev->dev, "fck"); wdev->fck = clk_get(&pdev->dev, "fck");
if (IS_ERR(wdev->fck)) { if (IS_ERR(wdev->fck)) {
ret = PTR_ERR(wdev->fck); ret = PTR_ERR(wdev->fck);
...@@ -383,10 +379,7 @@ static int omap_wdt_remove(struct platform_device *pdev) ...@@ -383,10 +379,7 @@ static int omap_wdt_remove(struct platform_device *pdev)
release_mem_region(res->start, res->end - res->start + 1); release_mem_region(res->start, res->end - res->start + 1);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
if (wdev->ick) {
clk_put(wdev->ick); clk_put(wdev->ick);
}
clk_put(wdev->fck); clk_put(wdev->fck);
iounmap(wdev->base); iounmap(wdev->base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment