Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58837
b: refs/heads/master
c: 1c5d226
h: refs/heads/master
i:
  58835: d0b4a38
v: v3
  • Loading branch information
Michael Hennerich authored and Bryan Wu committed Jun 21, 2007
1 parent 3f09d4b commit bcb11d1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 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: f8ffe652a01506e85e2dd579c58e50a3ba391921
refs/heads/master: 1c5d2265a82f8d3fa0471a60ca98072b3c53c299
3 changes: 3 additions & 0 deletions trunk/arch/blackfin/mach-common/ints-priority-dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ int __init init_arch_irq(void)
bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
SSYNC();

bfin_write_SICA_IWR0(IWR_ENABLE_ALL);
bfin_write_SICA_IWR1(IWR_ENABLE_ALL);

local_irq_disable();

init_exception_buff();
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/blackfin/mach-common/ints-priority-sc.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,12 @@ int __init init_arch_irq(void)
bfin_write_SIC_IMASK0(SIC_UNMASK_ALL);
bfin_write_SIC_IMASK1(SIC_UNMASK_ALL);
bfin_write_SIC_IMASK2(SIC_UNMASK_ALL);
bfin_write_SIC_IWR0(IWR_ENABLE_ALL);
bfin_write_SIC_IWR1(IWR_ENABLE_ALL);
bfin_write_SIC_IWR2(IWR_ENABLE_ALL);
#else
bfin_write_SIC_IMASK(SIC_UNMASK_ALL);
bfin_write_SIC_IWR(IWR_ENABLE_ALL);
#endif

SSYNC();
Expand Down
27 changes: 26 additions & 1 deletion trunk/include/asm-blackfin/mach-bf548/cdefBF54x_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define _CDEF_BF54X_H

#include "defBF54x_base.h"
#include <asm/system.h>

/* ************************************************************** */
/* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */
Expand All @@ -44,7 +45,31 @@
#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val)
#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
#define bfin_write_VR_CTL(val) bfin_write16(VR_CTL, val)
/* Writing to VR_CTL initiates a PLL relock sequence. */
static __inline__ void bfin_write_VR_CTL(unsigned int val)
{
unsigned long flags, iwr0, iwr1, iwr2;

/* Enable the PLL Wakeup bit in SIC IWR */
iwr0 = bfin_read32(SIC_IWR0);
iwr1 = bfin_read32(SIC_IWR1);
iwr2 = bfin_read32(SIC_IWR2);
/* Only allow PPL Wakeup) */
bfin_write32(SIC_IWR0, IWR_ENABLE(0));
bfin_write32(SIC_IWR1, 0);
bfin_write32(SIC_IWR2, 0);

bfin_write16(VR_CTL, val);
__builtin_bfin_ssync();

local_irq_save(flags);
asm("IDLE;");
local_irq_restore(flags);
bfin_write32(SIC_IWR0, iwr0);
bfin_write32(SIC_IWR1, iwr1);
bfin_write32(SIC_IWR2, iwr2);

}
#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val)
#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
Expand Down
10 changes: 7 additions & 3 deletions trunk/include/asm-blackfin/mach-bf561/cdefBF561.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,24 @@
/* Writing to VR_CTL initiates a PLL relock sequence. */
static __inline__ void bfin_write_VR_CTL(unsigned int val)
{
unsigned long flags, iwr;
unsigned long flags, iwr0, iwr1;

/* Enable the PLL Wakeup bit in SIC IWR */
iwr = bfin_read32(SICA_IWR0);
iwr0 = bfin_read32(SICA_IWR0);
iwr1 = bfin_read32(SICA_IWR1);
/* Only allow PPL Wakeup) */
bfin_write32(SICA_IWR0, IWR_ENABLE(0));
bfin_write32(SICA_IWR1, 0);

bfin_write16(VR_CTL, val);
__builtin_bfin_ssync();

local_irq_save(flags);
asm("IDLE;");
local_irq_restore(flags);
bfin_write32(SICA_IWR0, iwr);
bfin_write32(SICA_IWR0, iwr0);
bfin_write32(SICA_IWR1, iwr1);

}
#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val)
Expand Down

0 comments on commit bcb11d1

Please sign in to comment.