aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin/mach-bf533/cdefBF532.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-blackfin/mach-bf533/cdefBF532.h')
-rw-r--r--include/asm-blackfin/mach-bf533/cdefBF532.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/include/asm-blackfin/mach-bf533/cdefBF532.h b/include/asm-blackfin/mach-bf533/cdefBF532.h
index 1d7c494ceb64..74f967b235e2 100644
--- a/include/asm-blackfin/mach-bf533/cdefBF532.h
+++ b/include/asm-blackfin/mach-bf533/cdefBF532.h
@@ -51,10 +51,6 @@
51#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) 51#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
52#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val) 52#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val)
53#define bfin_read_CHIPID() bfin_read32(CHIPID) 53#define bfin_read_CHIPID() bfin_read32(CHIPID)
54#define bfin_read_SWRST() bfin_read16(SWRST)
55#define bfin_write_SWRST(val) bfin_write16(SWRST,val)
56#define bfin_read_SYSCR() bfin_read16(SYSCR)
57#define bfin_write_SYSCR(val) bfin_write16(SYSCR,val)
58#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) 54#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
59#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val) 55#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV,val)
60#define bfin_read_VR_CTL() bfin_read16(VR_CTL) 56#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
@@ -63,12 +59,14 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
63{ 59{
64 unsigned long flags, iwr; 60 unsigned long flags, iwr;
65 61
66 bfin_write16(VR_CTL, val);
67 __builtin_bfin_ssync();
68 /* Enable the PLL Wakeup bit in SIC IWR */ 62 /* Enable the PLL Wakeup bit in SIC IWR */
69 iwr = bfin_read32(SIC_IWR); 63 iwr = bfin_read32(SIC_IWR);
70 /* Only allow PPL Wakeup) */ 64 /* Only allow PPL Wakeup) */
71 bfin_write32(SIC_IWR, IWR_ENABLE(0)); 65 bfin_write32(SIC_IWR, IWR_ENABLE(0));
66
67 bfin_write16(VR_CTL, val);
68 __builtin_bfin_ssync();
69
72 local_irq_save(flags); 70 local_irq_save(flags);
73 asm("IDLE;"); 71 asm("IDLE;");
74 local_irq_restore(flags); 72 local_irq_restore(flags);
@@ -76,6 +74,10 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
76} 74}
77 75
78/* System Interrupt Controller (0xFFC0 0C00-0xFFC0 0FFF) */ 76/* System Interrupt Controller (0xFFC0 0C00-0xFFC0 0FFF) */
77#define bfin_read_SWRST() bfin_read16(SWRST)
78#define bfin_write_SWRST(val) bfin_write16(SWRST,val)
79#define bfin_read_SYSCR() bfin_read16(SYSCR)
80#define bfin_write_SYSCR(val) bfin_write16(SYSCR,val)
79#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0) 81#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
80#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0,val) 82#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0,val)
81#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1) 83#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
@@ -115,6 +117,18 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
115#define bfin_read_RTC_PREN() bfin_read16(RTC_PREN) 117#define bfin_read_RTC_PREN() bfin_read16(RTC_PREN)
116#define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN,val) 118#define bfin_write_RTC_PREN(val) bfin_write16(RTC_PREN,val)
117 119
120/* DMA Traffic controls */
121#define bfin_read_DMA_TCPER() bfin_read16(DMA_TCPER)
122#define bfin_write_DMA_TCPER(val) bfin_write16(DMA_TCPER,val)
123#define bfin_read_DMA_TCCNT() bfin_read16(DMA_TCCNT)
124#define bfin_write_DMA_TCCNT(val) bfin_write16(DMA_TCCNT,val)
125
126/* Alternate deprecated register names (below) provided for backwards code compatibility */
127#define bfin_read_DMA_TC_PER() bfin_read16(DMA_TC_PER)
128#define bfin_write_DMA_TC_PER(val) bfin_write16(DMA_TC_PER,val)
129#define bfin_read_DMA_TC_CNT() bfin_read16(DMA_TC_CNT)
130#define bfin_write_DMA_TC_CNT(val) bfin_write16(DMA_TC_CNT,val)
131
118/* General Purpose IO (0xFFC0 2400-0xFFC0 27FF) */ 132/* General Purpose IO (0xFFC0 2400-0xFFC0 27FF) */
119#define bfin_read_FIO_DIR() bfin_read16(FIO_DIR) 133#define bfin_read_FIO_DIR() bfin_read16(FIO_DIR)
120#define bfin_write_FIO_DIR(val) bfin_write16(FIO_DIR,val) 134#define bfin_write_FIO_DIR(val) bfin_write16(FIO_DIR,val)
@@ -151,16 +165,6 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val)
151#define bfin_read_FIO_MASKB_T() bfin_read16(FIO_MASKB_T) 165#define bfin_read_FIO_MASKB_T() bfin_read16(FIO_MASKB_T)
152#define bfin_write_FIO_MASKB_T(val) bfin_write16(FIO_MASKB_T,val) 166#define bfin_write_FIO_MASKB_T(val) bfin_write16(FIO_MASKB_T,val)
153 167
154/* DMA Traffic controls */
155#define bfin_read_DMA_TCPER() bfin_read16(DMA_TCPER)
156#define bfin_write_DMA_TCPER(val) bfin_write16(DMA_TCPER,val)
157#define bfin_read_DMA_TCCNT() bfin_read16(DMA_TCCNT)
158#define bfin_write_DMA_TCCNT(val) bfin_write16(DMA_TCCNT,val)
159#define bfin_read_DMA_TC_PER() bfin_read16(DMA_TC_PER)
160#define bfin_write_DMA_TC_PER(val) bfin_write16(DMA_TC_PER,val)
161#define bfin_read_DMA_TC_CNT() bfin_read16(DMA_TC_CNT)
162#define bfin_write_DMA_TC_CNT(val) bfin_write16(DMA_TC_CNT,val)
163
164/* DMA Controller */ 168/* DMA Controller */
165#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG) 169#define bfin_read_DMA0_CONFIG() bfin_read16(DMA0_CONFIG)
166#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val) 170#define bfin_write_DMA0_CONFIG(val) bfin_write16(DMA0_CONFIG,val)