aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/Kconfig8
-rw-r--r--arch/blackfin/include/asm/dma-mapping.h10
-rw-r--r--arch/blackfin/include/asm/mem_init.h2
-rw-r--r--arch/blackfin/include/asm/uaccess.h1
-rw-r--r--arch/blackfin/kernel/dma-mapping.c23
-rw-r--r--arch/blackfin/kernel/process.c7
-rw-r--r--arch/blackfin/kernel/time-ts.c6
-rw-r--r--arch/blackfin/kernel/time.c6
-rw-r--r--arch/blackfin/mach-common/ints-priority.c4
9 files changed, 30 insertions, 37 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b6f3ad5441c5..e98f3248c8aa 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -24,7 +24,6 @@ config BLACKFIN
24 select HAVE_FUNCTION_TRACER 24 select HAVE_FUNCTION_TRACER
25 select HAVE_FUNCTION_TRACE_MCOUNT_TEST 25 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
26 select HAVE_IDE 26 select HAVE_IDE
27 select HAVE_IRQ_WORK
28 select HAVE_KERNEL_GZIP if RAMKERNEL 27 select HAVE_KERNEL_GZIP if RAMKERNEL
29 select HAVE_KERNEL_BZIP2 if RAMKERNEL 28 select HAVE_KERNEL_BZIP2 if RAMKERNEL
30 select HAVE_KERNEL_LZMA if RAMKERNEL 29 select HAVE_KERNEL_LZMA if RAMKERNEL
@@ -38,7 +37,6 @@ config BLACKFIN
38 select HAVE_GENERIC_HARDIRQS 37 select HAVE_GENERIC_HARDIRQS
39 select GENERIC_ATOMIC64 38 select GENERIC_ATOMIC64
40 select GENERIC_IRQ_PROBE 39 select GENERIC_IRQ_PROBE
41 select IRQ_PER_CPU if SMP
42 select USE_GENERIC_SMP_HELPERS if SMP 40 select USE_GENERIC_SMP_HELPERS if SMP
43 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG 41 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
44 select GENERIC_SMP_IDLE_THREAD 42 select GENERIC_SMP_IDLE_THREAD
@@ -562,8 +560,7 @@ choice
562 accurate - This option is therefore marked experimental. 560 accurate - This option is therefore marked experimental.
563 561
564config BFIN_KERNEL_CLOCK_MEMINIT_CALC 562config BFIN_KERNEL_CLOCK_MEMINIT_CALC
565 bool "Calculate Timings (EXPERIMENTAL)" 563 bool "Calculate Timings"
566 depends on EXPERIMENTAL
567 564
568config BFIN_KERNEL_CLOCK_MEMINIT_SPEC 565config BFIN_KERNEL_CLOCK_MEMINIT_SPEC
569 bool "Provide accurate Timings based on target SCLK" 566 bool "Provide accurate Timings based on target SCLK"
@@ -1120,7 +1117,7 @@ endchoice
1120 1117
1121comment "Memory Protection Unit" 1118comment "Memory Protection Unit"
1122config MPU 1119config MPU
1123 bool "Enable the memory protection unit (EXPERIMENTAL)" 1120 bool "Enable the memory protection unit"
1124 default n 1121 default n
1125 help 1122 help
1126 Use the processor's MPU to protect applications from accessing 1123 Use the processor's MPU to protect applications from accessing
@@ -1442,7 +1439,6 @@ config BFIN_CPU_FREQ
1442 1439
1443config CPU_VOLTAGE 1440config CPU_VOLTAGE
1444 bool "CPU Voltage scaling" 1441 bool "CPU Voltage scaling"
1445 depends on EXPERIMENTAL
1446 depends on CPU_FREQ 1442 depends on CPU_FREQ
1447 default n 1443 default n
1448 help 1444 help
diff --git a/arch/blackfin/include/asm/dma-mapping.h b/arch/blackfin/include/asm/dma-mapping.h
index bbf461076a0a..054d9ec57d9d 100644
--- a/arch/blackfin/include/asm/dma-mapping.h
+++ b/arch/blackfin/include/asm/dma-mapping.h
@@ -154,4 +154,14 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size,
154 _dma_sync((dma_addr_t)vaddr, size, dir); 154 _dma_sync((dma_addr_t)vaddr, size, dir);
155} 155}
156 156
157/* drivers/base/dma-mapping.c */
158extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
159 void *cpu_addr, dma_addr_t dma_addr, size_t size);
160extern int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
161 void *cpu_addr, dma_addr_t dma_addr,
162 size_t size);
163
164#define dma_mmap_coherent(d, v, c, h, s) dma_common_mmap(d, v, c, h, s)
165#define dma_get_sgtable(d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s)
166
157#endif /* _BLACKFIN_DMA_MAPPING_H */ 167#endif /* _BLACKFIN_DMA_MAPPING_H */
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
17static spinlock_t dma_page_lock; 18static spinlock_t dma_page_lock;
18static unsigned long *dma_page; 19static unsigned long *dma_page;
@@ -46,24 +47,17 @@ static inline unsigned int get_pages(size_t size)
46static unsigned long __alloc_dma_pages(unsigned int pages) 47static 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/process.c b/arch/blackfin/kernel/process.c
index 3e16ad9b0a99..8061426b7df5 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -39,12 +39,6 @@ int nr_l1stack_tasks;
39void *l1_stack_base; 39void *l1_stack_base;
40unsigned long l1_stack_len; 40unsigned long l1_stack_len;
41 41
42/*
43 * Powermanagement idle function, if any..
44 */
45void (*pm_idle)(void) = NULL;
46EXPORT_SYMBOL(pm_idle);
47
48void (*pm_power_off)(void) = NULL; 42void (*pm_power_off)(void) = NULL;
49EXPORT_SYMBOL(pm_power_off); 43EXPORT_SYMBOL(pm_power_off);
50 44
@@ -81,7 +75,6 @@ void cpu_idle(void)
81{ 75{
82 /* endless idle loop with no priority at all */ 76 /* endless idle loop with no priority at all */
83 while (1) { 77 while (1) {
84 void (*idle)(void) = pm_idle;
85 78
86#ifdef CONFIG_HOTPLUG_CPU 79#ifdef CONFIG_HOTPLUG_CPU
87 if (cpu_is_offline(smp_processor_id())) 80 if (cpu_is_offline(smp_processor_id()))
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/kernel/time.c b/arch/blackfin/kernel/time.c
index 2310b249675f..3126b920a4a5 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -85,7 +85,7 @@ time_sched_init(irqreturn_t(*timer_routine) (int, void *))
85/* 85/*
86 * Should return useconds since last timer tick 86 * Should return useconds since last timer tick
87 */ 87 */
88u32 arch_gettimeoffset(void) 88static u32 blackfin_gettimeoffset(void)
89{ 89{
90 unsigned long offset; 90 unsigned long offset;
91 unsigned long clocks_per_jiffy; 91 unsigned long clocks_per_jiffy;
@@ -141,6 +141,10 @@ void read_persistent_clock(struct timespec *ts)
141 141
142void __init time_init(void) 142void __init time_init(void)
143{ 143{
144#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
145 arch_gettimeoffset = blackfin_gettimeoffset;
146#endif
147
144#ifdef CONFIG_RTC_DRV_BFIN 148#ifdef CONFIG_RTC_DRV_BFIN
145 /* [#2663] hack to filter junk RTC values that would cause 149 /* [#2663] hack to filter junk RTC values that would cause
146 * userspace to have to deal with time values greater than 150 * userspace to have to deal with time values greater than
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}