Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295329
b: refs/heads/master
c: 25eb433
h: refs/heads/master
i:
  295327: 8828596
v: v3
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Jan 20, 2012
1 parent 9768d1a commit e3c21cd
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a3ea24405de36181b6ce074e110ee7efe110297
refs/heads/master: 25eb433ab1aaa981cbb43b1d10c0d9377a50e8c9
36 changes: 0 additions & 36 deletions trunk/arch/arm/mach-msm/idle.S

This file was deleted.

49 changes: 49 additions & 0 deletions trunk/arch/arm/mach-msm/idle.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* arch/arm/mach-msm/idle.c
*
* Idle processing for MSM7K - work around bugs with SWFI.
*
* Copyright (c) 2007 QUALCOMM Incorporated.
* Copyright (C) 2007 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/

#include <linux/init.h>
#include <asm/system.h>

static void msm_idle(void)
{
#ifdef CONFIG_MSM7X00A_IDLE
asm volatile (

"mrc p15, 0, r1, c1, c0, 0 /* read current CR */ \n\t"
"bic r0, r1, #(1 << 2) /* clear dcache bit */ \n\t"
"bic r0, r0, #(1 << 12) /* clear icache bit */ \n\t"
"mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */ \n\t"

"mov r0, #0 /* prepare wfi value */ \n\t"
"mcr p15, 0, r0, c7, c10, 0 /* flush the cache */ \n\t"
"mcr p15, 0, r0, c7, c10, 4 /* memory barrier */ \n\t"
"mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */ \n\t"

"mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */ \n\t"

: : : "r0","r1" );
#endif
}

static int __init msm_idle_init(void)
{
arm_pm_idle = msm_idle;
return 0;
}

arch_initcall(msm_idle_init);
5 changes: 4 additions & 1 deletion trunk/arch/arm/mach-msm/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
* GNU General Public License for more details.
*
*/
void arch_idle(void);
static inline void arch_idle(void)
{
cpu_do_idle();
}

/* low level hardware reset hook -- for example, hitting the
* PSHOLD line on the PMIC to hard reset the system
Expand Down

0 comments on commit e3c21cd

Please sign in to comment.