/* arch/arm/mach-msm/include/mach/idle.S1*2* Idle processing for MSM7K - work around bugs with SWFI.3*4* Copyright (c) 2007 QUALCOMM Incorporated.5* Copyright (C) 2007 Google, Inc.6*7* This software is licensed under the terms of the GNU General Public8* License version 2, as published by the Free Software Foundation, and9* may be copied, distributed, and modified under those terms.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16*/1718#include <linux/linkage.h>19#include <asm/assembler.h>2021ENTRY(arch_idle)22#ifdef CONFIG_MSM7X00A_IDLE23mrc p15, 0, r1, c1, c0, 0 /* read current CR */24bic r0, r1, #(1 << 2) /* clear dcache bit */25bic r0, r0, #(1 << 12) /* clear icache bit */26mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */2728mov r0, #0 /* prepare wfi value */29mcr p15, 0, r0, c7, c10, 0 /* flush the cache */30mcr p15, 0, r0, c7, c10, 4 /* memory barrier */31mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */3233mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */34#endif35mov pc, lr363738