]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP1: Remove omap_sram_idle()
authorVivek Kutal <vivek.kutal@celunite.com>
Mon, 17 Dec 2007 09:56:33 +0000 (01:56 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 8 Feb 2008 18:38:01 +0000 (10:38 -0800)
This patch removes omap_sram_idle() that is no longer used.

The function called in pm_idle is omap_sram_suspend, omap_sram_idle() is
not used anywhere in omap1.

Signed-off-by: Vivek Kutal <vivek.kutal@celunite.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/sleep.S

index 64adb24ffb7fe5f5e2be1a3aab4d3d6ff88ed425..1a2a37158576caa9a82621887ed78333e71728d0 100644 (file)
@@ -95,7 +95,6 @@ static struct kobj_attribute sleep_while_idle_attr =
 
 #endif
 
-static void (*omap_sram_idle)(void) = NULL;
 static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
 
 /*
@@ -676,23 +675,17 @@ static int __init omap_pm_init(void)
         * memory the MPU can see when it wakes up.
         */
        if (cpu_is_omap730()) {
-               omap_sram_idle = omap_sram_push(omap730_idle_loop_suspend,
-                                               omap730_idle_loop_suspend_sz);
                omap_sram_suspend = omap_sram_push(omap730_cpu_suspend,
                                                   omap730_cpu_suspend_sz);
        } else if (cpu_is_omap15xx()) {
-               omap_sram_idle = omap_sram_push(omap1510_idle_loop_suspend,
-                                               omap1510_idle_loop_suspend_sz);
                omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
                                                   omap1510_cpu_suspend_sz);
        } else if (cpu_is_omap16xx()) {
-               omap_sram_idle = omap_sram_push(omap1610_idle_loop_suspend,
-                                               omap1610_idle_loop_suspend_sz);
                omap_sram_suspend = omap_sram_push(omap1610_cpu_suspend,
                                                   omap1610_cpu_suspend_sz);
        }
 
-       if (omap_sram_idle == NULL || omap_sram_suspend == NULL) {
+       if (omap_sram_suspend == NULL) {
                printk(KERN_ERR "PM not initialized: Missing SRAM support\n");
                return -ENODEV;
        }
index abef33d10f016815a0c67205a8c99f83fa08f91d..68f5b39030b67680093f5bd3bdf167c811864c49 100644 (file)
 
                .text
 
-/*
- * Forces OMAP into idle state
- *
- * omapXXXX_idle_loop_suspend()
- *
- * Note: This code get's copied to internal SRAM at boot. When the OMAP
- *      wakes up it continues execution at the point it went to sleep.
- *
- * Note: Because of slightly different configuration values we have
- *       processor specific functions here.
- */
-
-#if defined(CONFIG_ARCH_OMAP730)
-ENTRY(omap730_idle_loop_suspend)
-
-       stmfd   sp!, {r0 - r12, lr}             @ save registers on stack
-
-       @ load base address of ARM_IDLECT1 and ARM_IDLECT2
-       mov     r4, #CLKGEN_REG_ASM_BASE & 0xff000000
-       orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000
-       orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00
-
-       @ turn off clock domains
-       @ get ARM_IDLECT2 into r2
-       ldrh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       mov     r5, #OMAP730_IDLECT2_SLEEP_VAL & 0xff
-       orr     r5, r5, #OMAP730_IDLECT2_SLEEP_VAL & 0xff00
-       strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-
-       @ request ARM idle
-       @ get ARM_IDLECT1 into r1
-       ldrh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-       orr     r3, r1, #OMAP730_IDLE_LOOP_REQUEST & 0xffff
-       strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-
-       mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
-l_730: subs    r5, r5, #1
-       bne     l_730
-/*
- * Let's wait for the next clock tick to wake us up.
- */
-       mov     r0, #0
-       mcr     p15, 0, r0, c7, c0, 4           @ wait for interrupt
-/*
- * omap730_idle_loop_suspend()'s resume point.
- *
- * It will just start executing here, so we'll restore stuff from the
- * stack, reset the ARM_IDLECT1 and ARM_IDLECT2.
- */
-
-       @ restore ARM_IDLECT1 and ARM_IDLECT2 and return
-       @ r1 has ARM_IDLECT1 and r2 still has ARM_IDLECT2
-       strh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       strh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-
-       ldmfd   sp!, {r0 - r12, pc}             @ restore regs and return
-
-ENTRY(omap730_idle_loop_suspend_sz)
-       .word   . - omap730_idle_loop_suspend
-#endif /* CONFIG_ARCH_OMAP730 */
-
-#ifdef CONFIG_ARCH_OMAP15XX
-ENTRY(omap1510_idle_loop_suspend)
-
-       stmfd   sp!, {r0 - r12, lr}             @ save registers on stack
-
-       @ load base address of ARM_IDLECT1 and ARM_IDLECT2
-       mov     r4, #CLKGEN_REG_ASM_BASE & 0xff000000
-       orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000
-       orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00
-
-       @ turn off clock domains
-       @ get ARM_IDLECT2 into r2
-       ldrh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       mov     r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff
-       orr     r5, r5, #OMAP1510_IDLE_CLOCK_DOMAINS & 0xff00
-       strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-
-       @ request ARM idle
-       @ get ARM_IDLECT1 into r1
-       ldrh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-       orr     r3, r1, #OMAP1510_IDLE_LOOP_REQUEST & 0xffff
-       strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-
-       mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
-l_1510:        subs    r5, r5, #1
-       bne     l_1510
-/*
- * Let's wait for the next clock tick to wake us up.
- */
-       mov     r0, #0
-       mcr     p15, 0, r0, c7, c0, 4           @ wait for interrupt
-/*
- * omap1510_idle_loop_suspend()'s resume point.
- *
- * It will just start executing here, so we'll restore stuff from the
- * stack, reset the ARM_IDLECT1 and ARM_IDLECT2.
- */
-
-       @ restore ARM_IDLECT1 and ARM_IDLECT2 and return
-       @ r1 has ARM_IDLECT1 and r2 still has ARM_IDLECT2
-       strh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       strh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-
-       ldmfd   sp!, {r0 - r12, pc}             @ restore regs and return
-
-ENTRY(omap1510_idle_loop_suspend_sz)
-       .word   . - omap1510_idle_loop_suspend
-#endif /* CONFIG_ARCH_OMAP15XX */
-
-#if defined(CONFIG_ARCH_OMAP16XX)
-ENTRY(omap1610_idle_loop_suspend)
-
-       stmfd   sp!, {r0 - r12, lr}             @ save registers on stack
-
-       @ load base address of ARM_IDLECT1 and ARM_IDLECT2
-       mov     r4, #CLKGEN_REG_ASM_BASE & 0xff000000
-       orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000
-       orr     r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00
-
-       @ turn off clock domains
-       @ get ARM_IDLECT2 into r2
-       ldrh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       mov     r5, #OMAP1610_IDLECT2_SLEEP_VAL & 0xff
-       orr     r5, r5, #OMAP1610_IDLECT2_SLEEP_VAL & 0xff00
-       strh    r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-
-       @ request ARM idle
-       @ get ARM_IDLECT1 into r1
-       ldrh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-       orr     r3, r1, #OMAP1610_IDLE_LOOP_REQUEST & 0xffff
-       strh    r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-
-       mov     r5, #IDLE_WAIT_CYCLES & 0xff
-       orr     r5, r5, #IDLE_WAIT_CYCLES & 0xff00
-l_1610:        subs    r5, r5, #1
-       bne     l_1610
-/*
- * Let's wait for the next clock tick to wake us up.
- */
-       mov     r0, #0
-       mcr     p15, 0, r0, c7, c0, 4           @ wait for interrupt
-/*
- * omap1610_idle_loop_suspend()'s resume point.
- *
- * It will just start executing here, so we'll restore stuff from the
- * stack, reset the ARM_IDLECT1 and ARM_IDLECT2.
- */
-
-       @ restore ARM_IDLECT1 and ARM_IDLECT2 and return
-       @ r1 has ARM_IDLECT1 and r2 still has ARM_IDLECT2
-       strh    r2, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff]
-       strh    r1, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff]
-
-       ldmfd   sp!, {r0 - r12, pc}             @ restore regs and return
-
-ENTRY(omap1610_idle_loop_suspend_sz)
-       .word   . - omap1610_idle_loop_suspend
-#endif /* CONFIG_ARCH_OMAP16XX */
 
 /*
  * Forces OMAP into deep sleep state