diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 00:20:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 00:20:09 -0500 |
commit | df24eef3e794afbac69a377d1d2e2e3f5869f67a (patch) | |
tree | cf7b0548462ada8fdd2c2d20a86b8e59a3114186 /arch/blackfin | |
parent | 5f32ed140dac726e880d292988ba20d16f545bda (diff) | |
parent | f656c240ae07c48ddf8552e83b64692121044c42 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin
Pull small blackfin update from Bob Liu.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin:
blackfin: time-ts: Remove duplicate assignment
blackfin: pm: fix build error
blackfin: sync data in blackfin write buffer
blackfin: use bitmap library functions
blackfin: mem_init: update dmc config register
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/include/asm/mem_init.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/uaccess.h | 1 | ||||
-rw-r--r-- | arch/blackfin/kernel/dma-mapping.c | 23 | ||||
-rw-r--r-- | arch/blackfin/kernel/time-ts.c | 6 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 4 |
5 files changed, 13 insertions, 23 deletions
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h index f019e9bcefe9..9b33e7247864 100644 --- a/arch/blackfin/include/asm/mem_init.h +++ b/arch/blackfin/include/asm/mem_init.h | |||
@@ -411,7 +411,7 @@ static struct ddr_config ddr_config_table[] __attribute__((section(".data_l1"))) | |||
411 | .dmc_ddrcfg = 0x00000422, | 411 | .dmc_ddrcfg = 0x00000422, |
412 | .dmc_ddrtr0 = 0x20E0A424, | 412 | .dmc_ddrtr0 = 0x20E0A424, |
413 | .dmc_ddrtr1 = 0x3020079E, | 413 | .dmc_ddrtr1 = 0x3020079E, |
414 | .dmc_ddrtr2 = 0x0032020D, | 414 | .dmc_ddrtr2 = 0x0032050D, |
415 | .dmc_ddrmr = 0x00000842, | 415 | .dmc_ddrmr = 0x00000842, |
416 | .dmc_ddrmr1 = 0x4, | 416 | .dmc_ddrmr1 = 0x4, |
417 | }, | 417 | }, |
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 461bb542e2e8..57701c3b8a59 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h | |||
@@ -191,6 +191,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n) | |||
191 | memcpy((void __force *)to, from, n); | 191 | memcpy((void __force *)to, from, n); |
192 | else | 192 | else |
193 | return n; | 193 | return n; |
194 | SSYNC(); | ||
194 | return 0; | 195 | return 0; |
195 | } | 196 | } |
196 | 197 | ||
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c index e7be6532d6a0..df437e52d9df 100644 --- a/arch/blackfin/kernel/dma-mapping.c +++ b/arch/blackfin/kernel/dma-mapping.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
14 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
15 | #include <linux/export.h> | 15 | #include <linux/export.h> |
16 | #include <linux/bitmap.h> | ||
16 | 17 | ||
17 | static spinlock_t dma_page_lock; | 18 | static spinlock_t dma_page_lock; |
18 | static unsigned long *dma_page; | 19 | static unsigned long *dma_page; |
@@ -46,24 +47,17 @@ static inline unsigned int get_pages(size_t size) | |||
46 | static unsigned long __alloc_dma_pages(unsigned int pages) | 47 | static unsigned long __alloc_dma_pages(unsigned int pages) |
47 | { | 48 | { |
48 | unsigned long ret = 0, flags; | 49 | unsigned long ret = 0, flags; |
49 | int i, count = 0; | 50 | unsigned long start; |
50 | 51 | ||
51 | if (dma_initialized == 0) | 52 | if (dma_initialized == 0) |
52 | dma_alloc_init(_ramend - DMA_UNCACHED_REGION, _ramend); | 53 | dma_alloc_init(_ramend - DMA_UNCACHED_REGION, _ramend); |
53 | 54 | ||
54 | spin_lock_irqsave(&dma_page_lock, flags); | 55 | spin_lock_irqsave(&dma_page_lock, flags); |
55 | 56 | ||
56 | for (i = 0; i < dma_pages;) { | 57 | start = bitmap_find_next_zero_area(dma_page, dma_pages, 0, pages, 0); |
57 | if (test_bit(i++, dma_page) == 0) { | 58 | if (start < dma_pages) { |
58 | if (++count == pages) { | 59 | ret = dma_base + (start << PAGE_SHIFT); |
59 | while (count--) | 60 | bitmap_set(dma_page, start, pages); |
60 | __set_bit(--i, dma_page); | ||
61 | |||
62 | ret = dma_base + (i << PAGE_SHIFT); | ||
63 | break; | ||
64 | } | ||
65 | } else | ||
66 | count = 0; | ||
67 | } | 61 | } |
68 | spin_unlock_irqrestore(&dma_page_lock, flags); | 62 | spin_unlock_irqrestore(&dma_page_lock, flags); |
69 | return ret; | 63 | return ret; |
@@ -73,7 +67,6 @@ static void __free_dma_pages(unsigned long addr, unsigned int pages) | |||
73 | { | 67 | { |
74 | unsigned long page = (addr - dma_base) >> PAGE_SHIFT; | 68 | unsigned long page = (addr - dma_base) >> PAGE_SHIFT; |
75 | unsigned long flags; | 69 | unsigned long flags; |
76 | int i; | ||
77 | 70 | ||
78 | if ((page + pages) > dma_pages) { | 71 | if ((page + pages) > dma_pages) { |
79 | printk(KERN_ERR "%s: freeing outside range.\n", __func__); | 72 | printk(KERN_ERR "%s: freeing outside range.\n", __func__); |
@@ -81,9 +74,7 @@ static void __free_dma_pages(unsigned long addr, unsigned int pages) | |||
81 | } | 74 | } |
82 | 75 | ||
83 | spin_lock_irqsave(&dma_page_lock, flags); | 76 | spin_lock_irqsave(&dma_page_lock, flags); |
84 | for (i = page; i < page + pages; i++) | 77 | bitmap_clear(dma_page, page, pages); |
85 | __clear_bit(i, dma_page); | ||
86 | |||
87 | spin_unlock_irqrestore(&dma_page_lock, flags); | 78 | spin_unlock_irqrestore(&dma_page_lock, flags); |
88 | } | 79 | } |
89 | 80 | ||
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c index f608f02f29a3..cb0a4845339e 100644 --- a/arch/blackfin/kernel/time-ts.c +++ b/arch/blackfin/kernel/time-ts.c | |||
@@ -329,12 +329,6 @@ void bfin_coretmr_clockevent_init(void) | |||
329 | evt->broadcast = smp_timer_broadcast; | 329 | evt->broadcast = smp_timer_broadcast; |
330 | #endif | 330 | #endif |
331 | 331 | ||
332 | |||
333 | #ifdef CONFIG_SMP | ||
334 | evt->broadcast = smp_timer_broadcast; | ||
335 | #endif | ||
336 | |||
337 | |||
338 | evt->name = "bfin_core_timer"; | 332 | evt->name = "bfin_core_timer"; |
339 | evt->rating = 350; | 333 | evt->rating = 350; |
340 | evt->irq = -1; | 334 | evt->irq = -1; |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 83ff311fd6ea..6c0c6816a51a 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -1195,6 +1195,7 @@ static struct syscore_ops sec_pm_syscore_ops = { | |||
1195 | .suspend = sec_suspend, | 1195 | .suspend = sec_suspend, |
1196 | .resume = sec_resume, | 1196 | .resume = sec_resume, |
1197 | }; | 1197 | }; |
1198 | |||
1198 | #endif | 1199 | #endif |
1199 | #else | 1200 | #else |
1200 | # define bfin_gpio_set_wake NULL | 1201 | # define bfin_gpio_set_wake NULL |
@@ -1596,7 +1597,10 @@ int __init init_arch_irq(void) | |||
1596 | bfin_write_SEC_SCI(1, SEC_CCTL, SEC_CCTL_EN | SEC_CCTL_NMI_EN); | 1597 | bfin_write_SEC_SCI(1, SEC_CCTL, SEC_CCTL_EN | SEC_CCTL_NMI_EN); |
1597 | 1598 | ||
1598 | init_software_driven_irq(); | 1599 | init_software_driven_irq(); |
1600 | |||
1601 | #ifdef CONFIG_PM | ||
1599 | register_syscore_ops(&sec_pm_syscore_ops); | 1602 | register_syscore_ops(&sec_pm_syscore_ops); |
1603 | #endif | ||
1600 | 1604 | ||
1601 | return 0; | 1605 | return 0; |
1602 | } | 1606 | } |