From: Michael Hennerich Date: Mon, 21 May 2007 10:09:16 +0000 (+0800) Subject: Blackfin arch: Move write to VR_CTL closer to IDLE X-Git-Tag: v2.6.22-rc3~149 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1b945fdb62f3e6852fea5a8779c0151ac1e55a8;p=linux-2.6 Blackfin arch: Move write to VR_CTL closer to IDLE Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: Linus Torvalds --- diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h index 1d7c494ceb..521bdb4d29 100644 --- a/include/asm-blackfin/mach-bf533/cdefBF532.h +++ b/include/asm-blackfin/mach-bf533/cdefBF532.h @@ -63,12 +63,14 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) { unsigned long flags, iwr; - bfin_write16(VR_CTL, val); - __builtin_bfin_ssync(); /* Enable the PLL Wakeup bit in SIC IWR */ iwr = bfin_read32(SIC_IWR); /* Only allow PPL Wakeup) */ bfin_write32(SIC_IWR, IWR_ENABLE(0)); + + bfin_write16(VR_CTL, val); + __builtin_bfin_ssync(); + local_irq_save(flags); asm("IDLE;"); local_irq_restore(flags); diff --git a/include/asm-blackfin/mach-bf537/cdefBF534.h b/include/asm-blackfin/mach-bf537/cdefBF534.h index 7b658c175f..9a167f3b22 100644 --- a/include/asm-blackfin/mach-bf537/cdefBF534.h +++ b/include/asm-blackfin/mach-bf537/cdefBF534.h @@ -51,12 +51,14 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) { unsigned long flags, iwr; - bfin_write16(VR_CTL, val); - __builtin_bfin_ssync(); /* Enable the PLL Wakeup bit in SIC IWR */ iwr = bfin_read32(SIC_IWR); /* Only allow PPL Wakeup) */ bfin_write32(SIC_IWR, IWR_ENABLE(0)); + + bfin_write16(VR_CTL, val); + __builtin_bfin_ssync(); + local_irq_save(flags); asm("IDLE;"); local_irq_restore(flags); diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h index 5dc0ed8354..b14f872e57 100644 --- a/include/asm-blackfin/mach-bf561/cdefBF561.h +++ b/include/asm-blackfin/mach-bf561/cdefBF561.h @@ -59,12 +59,14 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) { unsigned long flags, iwr; - bfin_write16(VR_CTL, val); - __builtin_bfin_ssync(); /* Enable the PLL Wakeup bit in SIC IWR */ iwr = bfin_read32(SICA_IWR0); /* Only allow PPL Wakeup) */ bfin_write32(SICA_IWR0, IWR_ENABLE(0)); + + bfin_write16(VR_CTL, val); + __builtin_bfin_ssync(); + local_irq_save(flags); asm("IDLE;"); local_irq_restore(flags);