diff options
-rw-r--r-- | arch/blackfin/mach-common/ints-priority-dc.c | 3 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority-sc.c | 4 | ||||
-rw-r--r-- | include/asm-blackfin/mach-bf548/cdefBF54x_base.h | 27 | ||||
-rw-r--r-- | include/asm-blackfin/mach-bf561/cdefBF561.h | 10 |
4 files changed, 40 insertions, 4 deletions
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c index 80943bbd37c2..e6511db24032 100644 --- a/arch/blackfin/mach-common/ints-priority-dc.c +++ b/arch/blackfin/mach-common/ints-priority-dc.c | |||
@@ -371,6 +371,9 @@ int __init init_arch_irq(void) | |||
371 | bfin_write_SICA_IMASK1(SIC_UNMASK_ALL); | 371 | bfin_write_SICA_IMASK1(SIC_UNMASK_ALL); |
372 | SSYNC(); | 372 | SSYNC(); |
373 | 373 | ||
374 | bfin_write_SICA_IWR0(IWR_ENABLE_ALL); | ||
375 | bfin_write_SICA_IWR1(IWR_ENABLE_ALL); | ||
376 | |||
374 | local_irq_disable(); | 377 | local_irq_disable(); |
375 | 378 | ||
376 | init_exception_buff(); | 379 | init_exception_buff(); |
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c index cec0f841fb5a..27838da55d6c 100644 --- a/arch/blackfin/mach-common/ints-priority-sc.c +++ b/arch/blackfin/mach-common/ints-priority-sc.c | |||
@@ -472,8 +472,12 @@ int __init init_arch_irq(void) | |||
472 | bfin_write_SIC_IMASK0(SIC_UNMASK_ALL); | 472 | bfin_write_SIC_IMASK0(SIC_UNMASK_ALL); |
473 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); | 473 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); |
474 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); | 474 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); |
475 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); | ||
476 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); | ||
477 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); | ||
475 | #else | 478 | #else |
476 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); | 479 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); |
480 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); | ||
477 | #endif | 481 | #endif |
478 | 482 | ||
479 | SSYNC(); | 483 | SSYNC(); |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h index b1338000e27b..87f2385ed971 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #define _CDEF_BF54X_H | 32 | #define _CDEF_BF54X_H |
33 | 33 | ||
34 | #include "defBF54x_base.h" | 34 | #include "defBF54x_base.h" |
35 | #include <asm/system.h> | ||
35 | 36 | ||
36 | /* ************************************************************** */ | 37 | /* ************************************************************** */ |
37 | /* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */ | 38 | /* SYSTEM & MMR ADDRESS DEFINITIONS COMMON TO ALL ADSP-BF54x */ |
@@ -44,7 +45,31 @@ | |||
44 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) | 45 | #define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) |
45 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) | 46 | #define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) |
46 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) | 47 | #define bfin_read_VR_CTL() bfin_read16(VR_CTL) |
47 | #define bfin_write_VR_CTL(val) bfin_write16(VR_CTL, val) | 48 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
49 | static __inline__ void bfin_write_VR_CTL(unsigned int val) | ||
50 | { | ||
51 | unsigned long flags, iwr0, iwr1, iwr2; | ||
52 | |||
53 | /* Enable the PLL Wakeup bit in SIC IWR */ | ||
54 | iwr0 = bfin_read32(SIC_IWR0); | ||
55 | iwr1 = bfin_read32(SIC_IWR1); | ||
56 | iwr2 = bfin_read32(SIC_IWR2); | ||
57 | /* Only allow PPL Wakeup) */ | ||
58 | bfin_write32(SIC_IWR0, IWR_ENABLE(0)); | ||
59 | bfin_write32(SIC_IWR1, 0); | ||
60 | bfin_write32(SIC_IWR2, 0); | ||
61 | |||
62 | bfin_write16(VR_CTL, val); | ||
63 | __builtin_bfin_ssync(); | ||
64 | |||
65 | local_irq_save(flags); | ||
66 | asm("IDLE;"); | ||
67 | local_irq_restore(flags); | ||
68 | bfin_write32(SIC_IWR0, iwr0); | ||
69 | bfin_write32(SIC_IWR1, iwr1); | ||
70 | bfin_write32(SIC_IWR2, iwr2); | ||
71 | |||
72 | } | ||
48 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 73 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
49 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) | 74 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) |
50 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) | 75 | #define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) |
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h index b14f872e5703..6e8b8168a97a 100644 --- a/include/asm-blackfin/mach-bf561/cdefBF561.h +++ b/include/asm-blackfin/mach-bf561/cdefBF561.h | |||
@@ -57,12 +57,14 @@ | |||
57 | /* Writing to VR_CTL initiates a PLL relock sequence. */ | 57 | /* Writing to VR_CTL initiates a PLL relock sequence. */ |
58 | static __inline__ void bfin_write_VR_CTL(unsigned int val) | 58 | static __inline__ void bfin_write_VR_CTL(unsigned int val) |
59 | { | 59 | { |
60 | unsigned long flags, iwr; | 60 | unsigned long flags, iwr0, iwr1; |
61 | 61 | ||
62 | /* Enable the PLL Wakeup bit in SIC IWR */ | 62 | /* Enable the PLL Wakeup bit in SIC IWR */ |
63 | iwr = bfin_read32(SICA_IWR0); | 63 | iwr0 = bfin_read32(SICA_IWR0); |
64 | iwr1 = bfin_read32(SICA_IWR1); | ||
64 | /* Only allow PPL Wakeup) */ | 65 | /* Only allow PPL Wakeup) */ |
65 | bfin_write32(SICA_IWR0, IWR_ENABLE(0)); | 66 | bfin_write32(SICA_IWR0, IWR_ENABLE(0)); |
67 | bfin_write32(SICA_IWR1, 0); | ||
66 | 68 | ||
67 | bfin_write16(VR_CTL, val); | 69 | bfin_write16(VR_CTL, val); |
68 | __builtin_bfin_ssync(); | 70 | __builtin_bfin_ssync(); |
@@ -70,7 +72,9 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
70 | local_irq_save(flags); | 72 | local_irq_save(flags); |
71 | asm("IDLE;"); | 73 | asm("IDLE;"); |
72 | local_irq_restore(flags); | 74 | local_irq_restore(flags); |
73 | bfin_write32(SICA_IWR0, iwr); | 75 | bfin_write32(SICA_IWR0, iwr0); |
76 | bfin_write32(SICA_IWR1, iwr1); | ||
77 | |||
74 | } | 78 | } |
75 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) | 79 | #define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) |
76 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) | 80 | #define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT,val) |