diff options
author | Sumit Semwal <sumit.semwal@ti.com> | 2011-01-24 01:21:48 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-03-11 08:46:19 -0500 |
commit | 8ba775ca0d375ab42404ffd7a1a38326a7b21321 (patch) | |
tree | 023244efbe76e82d3cbe889e1c3b0a7a442efe25 /drivers/video/omap2/dss/core.c | |
parent | e7a12b6406a478b5c9085091b5015cb3e1683958 (diff) |
OMAP2, 3: DSS2: remove forced clk-disable from omap_dss_remove
As part of omap hwmod changes, DSS will not be the only controller of its
clocks. hwmod initialization also enables the interface clocks, and
manages them.
So, when DSS is built as a module, omap_dss_remove doesn't try to disable
all clocks that have a higher usecount.
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/core.c')
-rw-r--r-- | drivers/video/omap2/dss/core.c | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 8e89f6049280..ee56859c52ce 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
@@ -623,7 +623,6 @@ static int omap_dss_remove(struct platform_device *pdev) | |||
623 | { | 623 | { |
624 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | 624 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; |
625 | int i; | 625 | int i; |
626 | int c; | ||
627 | 626 | ||
628 | dss_uninitialize_debugfs(); | 627 | dss_uninitialize_debugfs(); |
629 | 628 | ||
@@ -638,44 +637,13 @@ static int omap_dss_remove(struct platform_device *pdev) | |||
638 | 637 | ||
639 | dss_exit(); | 638 | dss_exit(); |
640 | 639 | ||
641 | /* these should be removed at some point */ | 640 | /* |
642 | c = core.dss_ick->usecount; | 641 | * As part of hwmod changes, DSS is not the only controller of dss |
643 | if (c > 0) { | 642 | * clocks; hwmod framework itself will also enable clocks during hwmod |
644 | DSSERR("warning: dss_ick usecount %d, disabling\n", c); | 643 | * init for dss, and autoidle is set in h/w for DSS. Hence, there's no |
645 | while (c-- > 0) | 644 | * need to disable clocks if their usecounts > 1. |
646 | clk_disable(core.dss_ick); | 645 | */ |
647 | } | 646 | WARN_ON(core.num_clks_enabled > 0); |
648 | |||
649 | c = core.dss1_fck->usecount; | ||
650 | if (c > 0) { | ||
651 | DSSERR("warning: dss1_fck usecount %d, disabling\n", c); | ||
652 | while (c-- > 0) | ||
653 | clk_disable(core.dss1_fck); | ||
654 | } | ||
655 | |||
656 | c = core.dss2_fck->usecount; | ||
657 | if (c > 0) { | ||
658 | DSSERR("warning: dss2_fck usecount %d, disabling\n", c); | ||
659 | while (c-- > 0) | ||
660 | clk_disable(core.dss2_fck); | ||
661 | } | ||
662 | |||
663 | c = core.dss_54m_fck->usecount; | ||
664 | if (c > 0) { | ||
665 | DSSERR("warning: dss_54m_fck usecount %d, disabling\n", c); | ||
666 | while (c-- > 0) | ||
667 | clk_disable(core.dss_54m_fck); | ||
668 | } | ||
669 | |||
670 | if (core.dss_96m_fck) { | ||
671 | c = core.dss_96m_fck->usecount; | ||
672 | if (c > 0) { | ||
673 | DSSERR("warning: dss_96m_fck usecount %d, disabling\n", | ||
674 | c); | ||
675 | while (c-- > 0) | ||
676 | clk_disable(core.dss_96m_fck); | ||
677 | } | ||
678 | } | ||
679 | 647 | ||
680 | dss_put_clocks(); | 648 | dss_put_clocks(); |
681 | 649 | ||