Skip to content

Commit

Permalink
Blackfin arch: Move write to VR_CTL closer to IDLE
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed May 21, 2007
1 parent 9ae246c commit d1b945f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions include/asm-blackfin/mach-bf533/cdefBF532.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions include/asm-blackfin/mach-bf537/cdefBF534.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions include/asm-blackfin/mach-bf561/cdefBF561.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d1b945f

Please sign in to comment.