diff options
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r-- | arch/blackfin/include/asm/bfin-global.h | 8 | ||||
-rw-r--r-- | arch/blackfin/include/asm/bfin_crc.h | 14 | ||||
-rw-r--r-- | arch/blackfin/include/asm/bfin_serial.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/bfin_simple_timer.h | 6 | ||||
-rw-r--r-- | arch/blackfin/include/asm/bfin_twi.h | 10 | ||||
-rw-r--r-- | arch/blackfin/include/asm/context.S | 9 | ||||
-rw-r--r-- | arch/blackfin/include/asm/dpmc.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/irq.h | 10 | ||||
-rw-r--r-- | arch/blackfin/include/asm/mem_init.h | 212 | ||||
-rw-r--r-- | arch/blackfin/include/asm/traps.h | 2 |
11 files changed, 255 insertions, 22 deletions
diff --git a/arch/blackfin/include/asm/bfin-global.h b/arch/blackfin/include/asm/bfin-global.h index 608be5e6d25c..dc47d79287f9 100644 --- a/arch/blackfin/include/asm/bfin-global.h +++ b/arch/blackfin/include/asm/bfin-global.h | |||
@@ -14,7 +14,13 @@ | |||
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | #if defined(CONFIG_DMA_UNCACHED_4M) | 17 | #if defined(CONFIG_DMA_UNCACHED_32M) |
18 | # define DMA_UNCACHED_REGION (32 * 1024 * 1024) | ||
19 | #elif defined(CONFIG_DMA_UNCACHED_16M) | ||
20 | # define DMA_UNCACHED_REGION (16 * 1024 * 1024) | ||
21 | #elif defined(CONFIG_DMA_UNCACHED_8M) | ||
22 | # define DMA_UNCACHED_REGION (8 * 1024 * 1024) | ||
23 | #elif defined(CONFIG_DMA_UNCACHED_4M) | ||
18 | # define DMA_UNCACHED_REGION (4 * 1024 * 1024) | 24 | # define DMA_UNCACHED_REGION (4 * 1024 * 1024) |
19 | #elif defined(CONFIG_DMA_UNCACHED_2M) | 25 | #elif defined(CONFIG_DMA_UNCACHED_2M) |
20 | # define DMA_UNCACHED_REGION (2 * 1024 * 1024) | 26 | # define DMA_UNCACHED_REGION (2 * 1024 * 1024) |
diff --git a/arch/blackfin/include/asm/bfin_crc.h b/arch/blackfin/include/asm/bfin_crc.h index 3deb4452ceed..75cef4dc85a1 100644 --- a/arch/blackfin/include/asm/bfin_crc.h +++ b/arch/blackfin/include/asm/bfin_crc.h | |||
@@ -79,20 +79,6 @@ struct crc_register { | |||
79 | u32 revid; | 79 | u32 revid; |
80 | }; | 80 | }; |
81 | 81 | ||
82 | struct bfin_crc { | ||
83 | struct miscdevice mdev; | ||
84 | struct list_head list; | ||
85 | int irq; | ||
86 | int dma_ch_src; | ||
87 | int dma_ch_dest; | ||
88 | volatile struct crc_register *regs; | ||
89 | struct crc_info *info; | ||
90 | struct mutex mutex; | ||
91 | struct completion c; | ||
92 | unsigned short opmode; | ||
93 | char name[20]; | ||
94 | }; | ||
95 | |||
96 | /* CRC_STATUS Masks */ | 82 | /* CRC_STATUS Masks */ |
97 | #define CMPERR 0x00000002 /* Compare error */ | 83 | #define CMPERR 0x00000002 /* Compare error */ |
98 | #define DCNTEXP 0x00000010 /* datacnt register expired */ | 84 | #define DCNTEXP 0x00000010 /* datacnt register expired */ |
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h index 8597158010b5..2d90d62edc97 100644 --- a/arch/blackfin/include/asm/bfin_serial.h +++ b/arch/blackfin/include/asm/bfin_serial.h | |||
@@ -282,7 +282,7 @@ struct bfin_uart_regs { | |||
282 | #define UART_GET_GCTL(p) UART_GET_CTL(p) | 282 | #define UART_GET_GCTL(p) UART_GET_CTL(p) |
283 | #define UART_GET_LCR(p) UART_GET_CTL(p) | 283 | #define UART_GET_LCR(p) UART_GET_CTL(p) |
284 | #define UART_GET_MCR(p) UART_GET_CTL(p) | 284 | #define UART_GET_MCR(p) UART_GET_CTL(p) |
285 | #if ANOMALY_05001001 | 285 | #if ANOMALY_16000030 |
286 | #define UART_GET_STAT(p) \ | 286 | #define UART_GET_STAT(p) \ |
287 | ({ \ | 287 | ({ \ |
288 | u32 __ret; \ | 288 | u32 __ret; \ |
diff --git a/arch/blackfin/include/asm/bfin_simple_timer.h b/arch/blackfin/include/asm/bfin_simple_timer.h index aadfb1ad1fac..b2d5e733079e 100644 --- a/arch/blackfin/include/asm/bfin_simple_timer.h +++ b/arch/blackfin/include/asm/bfin_simple_timer.h | |||
@@ -17,5 +17,11 @@ | |||
17 | #define BFIN_SIMPLE_TIMER_START _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 6) | 17 | #define BFIN_SIMPLE_TIMER_START _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 6) |
18 | #define BFIN_SIMPLE_TIMER_STOP _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 8) | 18 | #define BFIN_SIMPLE_TIMER_STOP _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 8) |
19 | #define BFIN_SIMPLE_TIMER_READ _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 10) | 19 | #define BFIN_SIMPLE_TIMER_READ _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 10) |
20 | #define BFIN_SIMPLE_TIMER_READ_COUNTER _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 11) | ||
21 | |||
22 | #define BFIN_SIMPLE_TIMER_MODE_PWM_ONESHOT 0 | ||
23 | #define BFIN_SIMPLE_TIMER_MODE_PWMOUT_CONT 1 | ||
24 | #define BFIN_SIMPLE_TIMER_MODE_WDTH_CAP 2 | ||
25 | #define BFIN_SIMPLE_TIMER_MODE_PWMOUT_CONT_NOIRQ 3 | ||
20 | 26 | ||
21 | #endif | 27 | #endif |
diff --git a/arch/blackfin/include/asm/bfin_twi.h b/arch/blackfin/include/asm/bfin_twi.h index 2f3339a47626..f4a072787436 100644 --- a/arch/blackfin/include/asm/bfin_twi.h +++ b/arch/blackfin/include/asm/bfin_twi.h | |||
@@ -66,9 +66,9 @@ struct bfin_twi_iface { | |||
66 | 66 | ||
67 | #define DEFINE_TWI_REG(reg_name, reg) \ | 67 | #define DEFINE_TWI_REG(reg_name, reg) \ |
68 | static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \ | 68 | static inline u16 read_##reg_name(struct bfin_twi_iface *iface) \ |
69 | { return iface->regs_base->reg; } \ | 69 | { return bfin_read16(&iface->regs_base->reg); } \ |
70 | static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \ | 70 | static inline void write_##reg_name(struct bfin_twi_iface *iface, u16 v) \ |
71 | { iface->regs_base->reg = v; } | 71 | { bfin_write16(&iface->regs_base->reg, v); } |
72 | 72 | ||
73 | DEFINE_TWI_REG(CLKDIV, clkdiv) | 73 | DEFINE_TWI_REG(CLKDIV, clkdiv) |
74 | DEFINE_TWI_REG(CONTROL, control) | 74 | DEFINE_TWI_REG(CONTROL, control) |
@@ -84,7 +84,7 @@ DEFINE_TWI_REG(FIFO_CTL, fifo_ctl) | |||
84 | DEFINE_TWI_REG(FIFO_STAT, fifo_stat) | 84 | DEFINE_TWI_REG(FIFO_STAT, fifo_stat) |
85 | DEFINE_TWI_REG(XMT_DATA8, xmt_data8) | 85 | DEFINE_TWI_REG(XMT_DATA8, xmt_data8) |
86 | DEFINE_TWI_REG(XMT_DATA16, xmt_data16) | 86 | DEFINE_TWI_REG(XMT_DATA16, xmt_data16) |
87 | #if !ANOMALY_05001001 | 87 | #if !ANOMALY_16000030 |
88 | DEFINE_TWI_REG(RCV_DATA8, rcv_data8) | 88 | DEFINE_TWI_REG(RCV_DATA8, rcv_data8) |
89 | DEFINE_TWI_REG(RCV_DATA16, rcv_data16) | 89 | DEFINE_TWI_REG(RCV_DATA16, rcv_data16) |
90 | #else | 90 | #else |
@@ -94,7 +94,7 @@ static inline u16 read_RCV_DATA8(struct bfin_twi_iface *iface) | |||
94 | unsigned long flags; | 94 | unsigned long flags; |
95 | 95 | ||
96 | flags = hard_local_irq_save(); | 96 | flags = hard_local_irq_save(); |
97 | ret = iface->regs_base->rcv_data8; | 97 | ret = bfin_read16(&iface->regs_base->rcv_data8); |
98 | hard_local_irq_restore(flags); | 98 | hard_local_irq_restore(flags); |
99 | 99 | ||
100 | return ret; | 100 | return ret; |
@@ -106,7 +106,7 @@ static inline u16 read_RCV_DATA16(struct bfin_twi_iface *iface) | |||
106 | unsigned long flags; | 106 | unsigned long flags; |
107 | 107 | ||
108 | flags = hard_local_irq_save(); | 108 | flags = hard_local_irq_save(); |
109 | ret = iface->regs_base->rcv_data16; | 109 | ret = bfin_read16(&iface->regs_base->rcv_data16); |
110 | hard_local_irq_restore(flags); | 110 | hard_local_irq_restore(flags); |
111 | 111 | ||
112 | return ret; | 112 | return ret; |
diff --git a/arch/blackfin/include/asm/context.S b/arch/blackfin/include/asm/context.S index 1f9060395a0a..507e7aa6a561 100644 --- a/arch/blackfin/include/asm/context.S +++ b/arch/blackfin/include/asm/context.S | |||
@@ -396,3 +396,12 @@ | |||
396 | call \func; | 396 | call \func; |
397 | #endif | 397 | #endif |
398 | .endm | 398 | .endm |
399 | |||
400 | #if defined(CONFIG_BFIN_SCRATCH_REG_RETN) | ||
401 | # define EX_SCRATCH_REG RETN | ||
402 | #elif defined(CONFIG_BFIN_SCRATCH_REG_RETE) | ||
403 | # define EX_SCRATCH_REG RETE | ||
404 | #else | ||
405 | # define EX_SCRATCH_REG CYCLES | ||
406 | #endif | ||
407 | |||
diff --git a/arch/blackfin/include/asm/dpmc.h b/arch/blackfin/include/asm/dpmc.h index e91eae8330a6..2673b11376f4 100644 --- a/arch/blackfin/include/asm/dpmc.h +++ b/arch/blackfin/include/asm/dpmc.h | |||
@@ -280,7 +280,7 @@ | |||
280 | PM_POP_SYNC(9) | 280 | PM_POP_SYNC(9) |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | #ifdef EBIU_AMBCTL | 283 | #ifdef EBIU_AMGCTL |
284 | PM_SYS_POP(9, EBIU_AMBCTL1) | 284 | PM_SYS_POP(9, EBIU_AMBCTL1) |
285 | PM_SYS_POP(8, EBIU_AMBCTL0) | 285 | PM_SYS_POP(8, EBIU_AMBCTL0) |
286 | PM_SYS_POP16(7, EBIU_AMGCTL) | 286 | PM_SYS_POP16(7, EBIU_AMGCTL) |
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 3d84d96f7c2c..98d0133346b5 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -141,6 +141,8 @@ static inline void bfin_pm_standby_restore(void) | |||
141 | 141 | ||
142 | void bfin_gpio_pm_hibernate_restore(void); | 142 | void bfin_gpio_pm_hibernate_restore(void); |
143 | void bfin_gpio_pm_hibernate_suspend(void); | 143 | void bfin_gpio_pm_hibernate_suspend(void); |
144 | void bfin_pint_suspend(void); | ||
145 | void bfin_pint_resume(void); | ||
144 | 146 | ||
145 | # if !BFIN_GPIO_PINT | 147 | # if !BFIN_GPIO_PINT |
146 | int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl); | 148 | int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl); |
diff --git a/arch/blackfin/include/asm/irq.h b/arch/blackfin/include/asm/irq.h index 89de539ed010..4ae1144a4578 100644 --- a/arch/blackfin/include/asm/irq.h +++ b/arch/blackfin/include/asm/irq.h | |||
@@ -20,6 +20,16 @@ | |||
20 | /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */ | 20 | /* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */ |
21 | #include <mach/irq.h> | 21 | #include <mach/irq.h> |
22 | 22 | ||
23 | /* | ||
24 | * pm save bfin pint registers | ||
25 | */ | ||
26 | struct bfin_pm_pint_save { | ||
27 | u32 mask_set; | ||
28 | u32 assign; | ||
29 | u32 edge_set; | ||
30 | u32 invert_set; | ||
31 | }; | ||
32 | |||
23 | #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE) | 33 | #if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE) |
24 | # define NOP_PAD_ANOMALY_05000244 "nop; nop;" | 34 | # define NOP_PAD_ANOMALY_05000244 "nop; nop;" |
25 | #else | 35 | #else |
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h index 237579935e29..f019e9bcefe9 100644 --- a/arch/blackfin/include/asm/mem_init.h +++ b/arch/blackfin/include/asm/mem_init.h | |||
@@ -6,6 +6,9 @@ | |||
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __MEM_INIT_H__ | ||
10 | #define __MEM_INIT_H__ | ||
11 | |||
9 | #if defined(EBIU_SDGCTL) | 12 | #if defined(EBIU_SDGCTL) |
10 | #if defined(CONFIG_MEM_MT48LC16M16A2TG_75) || \ | 13 | #if defined(CONFIG_MEM_MT48LC16M16A2TG_75) || \ |
11 | defined(CONFIG_MEM_MT48LC64M4A2FB_7E) || \ | 14 | defined(CONFIG_MEM_MT48LC64M4A2FB_7E) || \ |
@@ -277,3 +280,212 @@ | |||
277 | #else | 280 | #else |
278 | #define PLL_BYPASS 0 | 281 | #define PLL_BYPASS 0 |
279 | #endif | 282 | #endif |
283 | |||
284 | #ifdef CONFIG_BF60x | ||
285 | |||
286 | /* DMC status bits */ | ||
287 | #define IDLE 0x1 | ||
288 | #define MEMINITDONE 0x4 | ||
289 | #define SRACK 0x8 | ||
290 | #define PDACK 0x10 | ||
291 | #define DPDACK 0x20 | ||
292 | #define DLLCALDONE 0x2000 | ||
293 | #define PENDREF 0xF0000 | ||
294 | #define PHYRDPHASE 0xF00000 | ||
295 | #define PHYRDPHASE_OFFSET 20 | ||
296 | |||
297 | /* DMC control bits */ | ||
298 | #define LPDDR 0x2 | ||
299 | #define INIT 0x4 | ||
300 | #define SRREQ 0x8 | ||
301 | #define PDREQ 0x10 | ||
302 | #define DPDREQ 0x20 | ||
303 | #define PREC 0x40 | ||
304 | #define ADDRMODE 0x100 | ||
305 | #define RDTOWR 0xE00 | ||
306 | #define PPREF 0x1000 | ||
307 | #define DLLCAL 0x2000 | ||
308 | |||
309 | /* DMC DLL control bits */ | ||
310 | #define DLLCALRDCNT 0xFF | ||
311 | #define DATACYC 0xF00 | ||
312 | #define DATACYC_OFFSET 8 | ||
313 | |||
314 | /* CGU Divisor bits */ | ||
315 | #define CSEL_OFFSET 0 | ||
316 | #define S0SEL_OFFSET 5 | ||
317 | #define SYSSEL_OFFSET 8 | ||
318 | #define S1SEL_OFFSET 13 | ||
319 | #define DSEL_OFFSET 16 | ||
320 | #define OSEL_OFFSET 22 | ||
321 | #define ALGN 0x20000000 | ||
322 | #define UPDT 0x40000000 | ||
323 | #define LOCK 0x80000000 | ||
324 | |||
325 | /* CGU Status bits */ | ||
326 | #define PLLEN 0x1 | ||
327 | #define PLLBP 0x2 | ||
328 | #define PLOCK 0x4 | ||
329 | #define CLKSALGN 0x8 | ||
330 | |||
331 | /* CGU Control bits */ | ||
332 | #define MSEL_MASK 0x7F00 | ||
333 | #define DF_MASK 0x1 | ||
334 | |||
335 | struct ddr_config { | ||
336 | u32 ddr_clk; | ||
337 | u32 dmc_ddrctl; | ||
338 | u32 dmc_ddrcfg; | ||
339 | u32 dmc_ddrtr0; | ||
340 | u32 dmc_ddrtr1; | ||
341 | u32 dmc_ddrtr2; | ||
342 | u32 dmc_ddrmr; | ||
343 | u32 dmc_ddrmr1; | ||
344 | }; | ||
345 | |||
346 | #if defined(CONFIG_MEM_MT47H64M16) | ||
347 | static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1"))) = { | ||
348 | [0] = { | ||
349 | .ddr_clk = 125, | ||
350 | .dmc_ddrctl = 0x00000904, | ||
351 | .dmc_ddrcfg = 0x00000422, | ||
352 | .dmc_ddrtr0 = 0x20705212, | ||
353 | .dmc_ddrtr1 = 0x201003CF, | ||
354 | .dmc_ddrtr2 = 0x00320107, | ||
355 | .dmc_ddrmr = 0x00000422, | ||
356 | .dmc_ddrmr1 = 0x4, | ||
357 | }, | ||
358 | [1] = { | ||
359 | .ddr_clk = 133, | ||
360 | .dmc_ddrctl = 0x00000904, | ||
361 | .dmc_ddrcfg = 0x00000422, | ||
362 | .dmc_ddrtr0 = 0x20806313, | ||
363 | .dmc_ddrtr1 = 0x2013040D, | ||
364 | .dmc_ddrtr2 = 0x00320108, | ||
365 | .dmc_ddrmr = 0x00000632, | ||
366 | .dmc_ddrmr1 = 0x4, | ||
367 | }, | ||
368 | [2] = { | ||
369 | .ddr_clk = 150, | ||
370 | .dmc_ddrctl = 0x00000904, | ||
371 | .dmc_ddrcfg = 0x00000422, | ||
372 | .dmc_ddrtr0 = 0x20A07323, | ||
373 | .dmc_ddrtr1 = 0x20160492, | ||
374 | .dmc_ddrtr2 = 0x00320209, | ||
375 | .dmc_ddrmr = 0x00000632, | ||
376 | .dmc_ddrmr1 = 0x4, | ||
377 | }, | ||
378 | [3] = { | ||
379 | .ddr_clk = 166, | ||
380 | .dmc_ddrctl = 0x00000904, | ||
381 | .dmc_ddrcfg = 0x00000422, | ||
382 | .dmc_ddrtr0 = 0x20A07323, | ||
383 | .dmc_ddrtr1 = 0x2016050E, | ||
384 | .dmc_ddrtr2 = 0x00320209, | ||
385 | .dmc_ddrmr = 0x00000632, | ||
386 | .dmc_ddrmr1 = 0x4, | ||
387 | }, | ||
388 | [4] = { | ||
389 | .ddr_clk = 200, | ||
390 | .dmc_ddrctl = 0x00000904, | ||
391 | .dmc_ddrcfg = 0x00000422, | ||
392 | .dmc_ddrtr0 = 0x20a07323, | ||
393 | .dmc_ddrtr1 = 0x2016050f, | ||
394 | .dmc_ddrtr2 = 0x00320509, | ||
395 | .dmc_ddrmr = 0x00000632, | ||
396 | .dmc_ddrmr1 = 0x4, | ||
397 | }, | ||
398 | [5] = { | ||
399 | .ddr_clk = 225, | ||
400 | .dmc_ddrctl = 0x00000904, | ||
401 | .dmc_ddrcfg = 0x00000422, | ||
402 | .dmc_ddrtr0 = 0x20E0A424, | ||
403 | .dmc_ddrtr1 = 0x302006DB, | ||
404 | .dmc_ddrtr2 = 0x0032020D, | ||
405 | .dmc_ddrmr = 0x00000842, | ||
406 | .dmc_ddrmr1 = 0x4, | ||
407 | }, | ||
408 | [6] = { | ||
409 | .ddr_clk = 250, | ||
410 | .dmc_ddrctl = 0x00000904, | ||
411 | .dmc_ddrcfg = 0x00000422, | ||
412 | .dmc_ddrtr0 = 0x20E0A424, | ||
413 | .dmc_ddrtr1 = 0x3020079E, | ||
414 | .dmc_ddrtr2 = 0x0032020D, | ||
415 | .dmc_ddrmr = 0x00000842, | ||
416 | .dmc_ddrmr1 = 0x4, | ||
417 | }, | ||
418 | }; | ||
419 | #endif | ||
420 | |||
421 | static inline void dmc_enter_self_refresh(void) | ||
422 | { | ||
423 | if (bfin_read_DMC0_STAT() & MEMINITDONE) { | ||
424 | bfin_write_DMC0_CTL(bfin_read_DMC0_CTL() | SRREQ); | ||
425 | while (!(bfin_read_DMC0_STAT() & SRACK)) | ||
426 | continue; | ||
427 | } | ||
428 | } | ||
429 | |||
430 | static inline void dmc_exit_self_refresh(void) | ||
431 | { | ||
432 | if (bfin_read_DMC0_STAT() & MEMINITDONE) { | ||
433 | bfin_write_DMC0_CTL(bfin_read_DMC0_CTL() & ~SRREQ); | ||
434 | while (bfin_read_DMC0_STAT() & SRACK) | ||
435 | continue; | ||
436 | } | ||
437 | } | ||
438 | |||
439 | static inline void init_cgu(u32 cgu_div, u32 cgu_ctl) | ||
440 | { | ||
441 | dmc_enter_self_refresh(); | ||
442 | |||
443 | /* Don't set the same value of MSEL and DF to CGU_CTL */ | ||
444 | if ((bfin_read32(CGU0_CTL) & (MSEL_MASK | DF_MASK)) | ||
445 | != cgu_ctl) { | ||
446 | bfin_write32(CGU0_DIV, cgu_div); | ||
447 | bfin_write32(CGU0_CTL, cgu_ctl); | ||
448 | while ((bfin_read32(CGU0_STAT) & (CLKSALGN | PLLBP)) || | ||
449 | !(bfin_read32(CGU0_STAT) & PLOCK)) | ||
450 | continue; | ||
451 | } | ||
452 | |||
453 | bfin_write32(CGU0_DIV, cgu_div | UPDT); | ||
454 | while (bfin_read32(CGU0_STAT) & CLKSALGN) | ||
455 | continue; | ||
456 | |||
457 | dmc_exit_self_refresh(); | ||
458 | } | ||
459 | |||
460 | static inline void init_dmc(u32 dmc_clk) | ||
461 | { | ||
462 | int i, dlldatacycle, dll_ctl; | ||
463 | |||
464 | for (i = 0; i < 7; i++) { | ||
465 | if (ddr_config_table[i].ddr_clk == dmc_clk) { | ||
466 | bfin_write_DMC0_CFG(ddr_config_table[i].dmc_ddrcfg); | ||
467 | bfin_write_DMC0_TR0(ddr_config_table[i].dmc_ddrtr0); | ||
468 | bfin_write_DMC0_TR1(ddr_config_table[i].dmc_ddrtr1); | ||
469 | bfin_write_DMC0_TR2(ddr_config_table[i].dmc_ddrtr2); | ||
470 | bfin_write_DMC0_MR(ddr_config_table[i].dmc_ddrmr); | ||
471 | bfin_write_DMC0_EMR1(ddr_config_table[i].dmc_ddrmr1); | ||
472 | bfin_write_DMC0_CTL(ddr_config_table[i].dmc_ddrctl); | ||
473 | break; | ||
474 | } | ||
475 | } | ||
476 | |||
477 | while (!(bfin_read_DMC0_STAT() & MEMINITDONE)) | ||
478 | continue; | ||
479 | |||
480 | dlldatacycle = (bfin_read_DMC0_STAT() & PHYRDPHASE) >> PHYRDPHASE_OFFSET; | ||
481 | dll_ctl = bfin_read_DMC0_DLLCTL(); | ||
482 | dll_ctl &= ~DATACYC; | ||
483 | bfin_write_DMC0_DLLCTL(dll_ctl | (dlldatacycle << DATACYC_OFFSET)); | ||
484 | |||
485 | while (!(bfin_read_DMC0_STAT() & DLLCALDONE)) | ||
486 | continue; | ||
487 | } | ||
488 | #endif | ||
489 | |||
490 | #endif /*__MEM_INIT_H__*/ | ||
491 | |||
diff --git a/arch/blackfin/include/asm/traps.h b/arch/blackfin/include/asm/traps.h index 70c4e511cae6..cec771b8100c 100644 --- a/arch/blackfin/include/asm/traps.h +++ b/arch/blackfin/include/asm/traps.h | |||
@@ -125,5 +125,7 @@ | |||
125 | level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \ | 125 | level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \ |
126 | level " only instructions.\n" | 126 | level " only instructions.\n" |
127 | 127 | ||
128 | extern void double_fault_c(struct pt_regs *fp); | ||
129 | |||
128 | #endif /* __ASSEMBLY__ */ | 130 | #endif /* __ASSEMBLY__ */ |
129 | #endif /* _BFIN_TRAPS_H */ | 131 | #endif /* _BFIN_TRAPS_H */ |