Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=188ff65d49dadf7b0e9b6718abc3fe98a5098711
Commit:     188ff65d49dadf7b0e9b6718abc3fe98a5098711
Parent:     19b7ce8bad718a2850ea19aeb7383f1728596c24
Author:     Haavard Skinnemoen <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 14 13:23:44 2007 +0100
Committer:  Haavard Skinnemoen <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:44:13 2007 +0200

    [AVR32] Don't enable clocks with no users
    
    Bring the code that sets the initial PM clock masks in line with the
    comment preceding it by only enabling clocks that have users != 0.
    Fix SM clock definition and avr32_hpt_init() so that the SM and TC0
    clocks keep ticking.
    
    Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
---
 arch/avr32/mach-at32ap/at32ap7000.c |   14 +++++++++++++-
 arch/avr32/mach-at32ap/time-tc.c    |    1 +
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/arch/avr32/mach-at32ap/at32ap7000.c 
b/arch/avr32/mach-at32ap/at32ap7000.c
index 6eeda60..56db45b 100644
--- a/arch/avr32/mach-at32ap/at32ap7000.c
+++ b/arch/avr32/mach-at32ap/at32ap7000.c
@@ -417,7 +417,15 @@ struct platform_device at32_sm_device = {
        .resource       = sm_resource,
        .num_resources  = ARRAY_SIZE(sm_resource),
 };
-DEV_CLK(pclk, at32_sm, pbb, 0);
+static struct clk at32_sm_pclk = {
+       .name           = "pclk",
+       .dev            = &at32_sm_device.dev,
+       .parent         = &pbb_clk,
+       .mode           = pbb_clk_mode,
+       .get_rate       = pbb_clk_get_rate,
+       .users          = 1,
+       .index          = 0,
+};
 
 static struct resource intc0_resource[] = {
        PBMEM(0xfff00400),
@@ -443,6 +451,7 @@ static struct clk hramc_clk = {
        .mode           = hsb_clk_mode,
        .get_rate       = hsb_clk_get_rate,
        .users          = 1,
+       .index          = 3,
 };
 
 static struct resource smc0_resource[] = {
@@ -1080,6 +1089,9 @@ void __init at32_clock_init(void)
        for (i = 0; i < ARRAY_SIZE(at32_clock_list); i++) {
                struct clk *clk = at32_clock_list[i];
 
+               if (clk->users == 0)
+                       continue;
+
                if (clk->mode == &cpu_clk_mode)
                        cpu_mask |= 1 << clk->index;
                else if (clk->mode == &hsb_clk_mode)
diff --git a/arch/avr32/mach-at32ap/time-tc.c b/arch/avr32/mach-at32ap/time-tc.c
index 7ac0e94..e3070bd 100644
--- a/arch/avr32/mach-at32ap/time-tc.c
+++ b/arch/avr32/mach-at32ap/time-tc.c
@@ -135,6 +135,7 @@ int avr32_hpt_init(unsigned int count)
                pr_debug("timer: could not get clk: %ld\n", PTR_ERR(pclk));
                goto out_error;
        }
+       clk_enable(pclk);
 
        regs = platform_get_resource(&at32_systc0_device, IORESOURCE_MEM, 0);
        if (!regs) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to