Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
Blackfin arch: fix a broken define in dma-mapping
Blackfin arch: fix bug - Turn on DEBUG_DOUBLEFAULT, booting SMP kernel crash
Blackfin arch: fix bug - shared lib function in L2 failed be called
Blackfin arch: fix incorrect limit check for bf54x check_gpio
Blackfin arch: fix bug - Cpufreq assumes clocks in kHz and not Hz.
Blackfin arch: dont warn when running a kernel on the oldest supported silicon
Blackfin arch: fix bug - kernel build with write back policy fails to be booted up
Blackfin arch: fix bug - dmacopy test case fail on all platform
Blackfin arch: Fix typo when adding CONFIG_DEBUG_VERBOSE
Blackfin arch: don't copy bss when copying L1
Blackfin arch: fix bug - Fail to boot jffs2 kernel for BF561 with SMP patch
Blackfin arch: handle case of d_path() returning error in decode_address()

+49 -32
+1 -1
arch/blackfin/include/asm/bfin-global.h
··· 101 extern unsigned long _ramstart, _ramend, _rambase; 102 extern unsigned long memory_start, memory_end, physical_mem_end; 103 extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], 104 - _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[], 105 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], 106 _ebss_l2[], _l2_lma_start[]; 107
··· 101 extern unsigned long _ramstart, _ramend, _rambase; 102 extern unsigned long memory_start, memory_end, physical_mem_end; 103 extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], 104 + _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _sbss_b_l1[], _ebss_b_l1[], 105 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], 106 _ebss_l2[], _l2_lma_start[]; 107
+5 -1
arch/blackfin/include/asm/dma-mapping.h
··· 15 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 16 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 17 18 - #define dma_mapping_error 19 20 /* 21 * Map a single buffer of the indicated size for DMA in streaming mode.
··· 15 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 16 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 17 18 + static inline 19 + int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 20 + { 21 + return 0; 22 + } 23 24 /* 25 * Map a single buffer of the indicated size for DMA in streaming mode.
+1 -1
arch/blackfin/kernel/bfin_gpio.c
··· 218 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 219 || gpio == GPIO_PH14 || gpio == GPIO_PH15 220 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15 221 - || gpio > MAX_BLACKFIN_GPIOS) 222 return -EINVAL; 223 return 0; 224 }
··· 218 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 219 || gpio == GPIO_PH14 || gpio == GPIO_PH15 220 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15 221 + || gpio >= MAX_BLACKFIN_GPIOS) 222 return -EINVAL; 223 return 0; 224 }
+5 -4
arch/blackfin/kernel/cplb-nompu/cplbinit.c
··· 188 189 static u16 __init lock_kernel_check(u32 start, u32 end) 190 { 191 - if ((end <= (u32) _end && end >= (u32)_stext) || 192 - (start <= (u32) _end && start >= (u32)_stext)) 193 - return IN_KERNEL; 194 - return 0; 195 } 196 197 static unsigned short __init
··· 188 189 static u16 __init lock_kernel_check(u32 start, u32 end) 190 { 191 + if (start >= (u32)_end || end <= (u32)_stext) 192 + return 0; 193 + 194 + /* This cplb block overlapped with kernel area. */ 195 + return IN_KERNEL; 196 } 197 198 static unsigned short __init
+6 -1
arch/blackfin/kernel/process.c
··· 351 return 1; 352 #endif 353 #if L1_DATA_B_LENGTH != 0 354 - if (addr >= L1_DATA_B_START 355 && addr + size <= L1_DATA_B_START + L1_DATA_B_LENGTH) 356 return 1; 357 #endif 358 return 0;
··· 351 return 1; 352 #endif 353 #if L1_DATA_B_LENGTH != 0 354 + if (addr >= L1_DATA_B_START + (_ebss_b_l1 - _sdata_b_l1) 355 && addr + size <= L1_DATA_B_START + L1_DATA_B_LENGTH) 356 + return 1; 357 + #endif 358 + #if L2_LENGTH != 0 359 + if (addr >= L2_START + (_ebss_l2 - _stext_l2) 360 + && addr + size <= L2_START + L2_LENGTH) 361 return 1; 362 #endif 363 return 0;
+6 -6
arch/blackfin/kernel/setup.c
··· 119 /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ 120 dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length); 121 122 - l1_data_a_length = _ebss_l1 - _sdata_l1; 123 if (l1_data_a_length > L1_DATA_A_LENGTH) 124 panic("L1 Data SRAM Bank A Overflow\n"); 125 126 - /* Copy _sdata_l1 to _ebss_l1 to L1 data bank A SRAM */ 127 dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length); 128 129 - l1_data_b_length = _ebss_b_l1 - _sdata_b_l1; 130 if (l1_data_b_length > L1_DATA_B_LENGTH) 131 panic("L1 Data SRAM Bank B Overflow\n"); 132 133 - /* Copy _sdata_b_l1 to _ebss_b_l1 to L1 data bank B SRAM */ 134 dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + 135 l1_data_a_length, l1_data_b_length); 136 137 if (L2_LENGTH != 0) { 138 - l2_length = _ebss_l2 - _stext_l2; 139 if (l2_length > L2_LENGTH) 140 panic("L2 SRAM Overflow\n"); 141 ··· 827 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", 828 bfin_compiled_revid(), bfin_revid()); 829 } 830 - if (bfin_revid() <= CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX) 831 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", 832 CPU, bfin_revid()); 833 }
··· 119 /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ 120 dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length); 121 122 + l1_data_a_length = _sbss_l1 - _sdata_l1; 123 if (l1_data_a_length > L1_DATA_A_LENGTH) 124 panic("L1 Data SRAM Bank A Overflow\n"); 125 126 + /* Copy _sdata_l1 to _sbss_l1 to L1 data bank A SRAM */ 127 dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length); 128 129 + l1_data_b_length = _sbss_b_l1 - _sdata_b_l1; 130 if (l1_data_b_length > L1_DATA_B_LENGTH) 131 panic("L1 Data SRAM Bank B Overflow\n"); 132 133 + /* Copy _sdata_b_l1 to _sbss_b_l1 to L1 data bank B SRAM */ 134 dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + 135 l1_data_a_length, l1_data_b_length); 136 137 if (L2_LENGTH != 0) { 138 + l2_length = _sbss_l2 - _stext_l2; 139 if (l2_length > L2_LENGTH) 140 panic("L2 SRAM Overflow\n"); 141 ··· 827 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", 828 bfin_compiled_revid(), bfin_revid()); 829 } 830 + if (bfin_revid() < CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX) 831 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", 832 CPU, bfin_revid()); 833 }
+7 -4
arch/blackfin/kernel/traps.c
··· 59 #endif 60 61 62 - #ifdef CONFIG_VERBOSE_DEBUG 63 #define verbose_printk(fmt, arg...) \ 64 printk(fmt, ##arg) 65 #else ··· 147 char *name = p->comm; 148 struct file *file = vma->vm_file; 149 150 - if (file) 151 - name = d_path(&file->f_path, _tmpbuf, 152 sizeof(_tmpbuf)); 153 154 /* FLAT does not have its text aligned to the start of 155 * the map while FDPIC ELF does ... ··· 574 #endif 575 panic("Kernel exception"); 576 } else { 577 - #ifdef CONFIG_VERBOSE_DEBUG 578 unsigned long *stack; 579 /* Dump the user space stack */ 580 stack = (unsigned long *)rdusp();
··· 59 #endif 60 61 62 + #ifdef CONFIG_DEBUG_VERBOSE 63 #define verbose_printk(fmt, arg...) \ 64 printk(fmt, ##arg) 65 #else ··· 147 char *name = p->comm; 148 struct file *file = vma->vm_file; 149 150 + if (file) { 151 + char *d_name = d_path(&file->f_path, _tmpbuf, 152 sizeof(_tmpbuf)); 153 + if (!IS_ERR(d_name)) 154 + name = d_name; 155 + } 156 157 /* FLAT does not have its text aligned to the start of 158 * the map while FDPIC ELF does ... ··· 571 #endif 572 panic("Kernel exception"); 573 } else { 574 + #ifdef CONFIG_DEBUG_VERBOSE 575 unsigned long *stack; 576 /* Dump the user space stack */ 577 stack = (unsigned long *)rdusp();
+6 -2
arch/blackfin/mach-common/cache.S
··· 25 */ 26 .macro do_flush flushins:req optflushins optnopins label 27 28 /* end = ((end - 1) & -L1_CACHE_BYTES) + L1_CACHE_BYTES; */ 29 R1 += -1; 30 - R2 = -L1_CACHE_BYTES; 31 R1 = R1 & R2; 32 R1 += L1_CACHE_BYTES; 33 ··· 67 68 /* Flush all cache lines assocoiated with this area of memory. */ 69 ENTRY(_blackfin_icache_dcache_flush_range) 70 - do_flush IFLUSH, FLUSH 71 ENDPROC(_blackfin_icache_dcache_flush_range) 72 73 /* Throw away all D-cached data in specified region without any obligation to
··· 25 */ 26 .macro do_flush flushins:req optflushins optnopins label 27 28 + R2 = -L1_CACHE_BYTES; 29 + 30 + /* start = (start & -L1_CACHE_BYTES) */ 31 + R0 = R0 & R2; 32 + 33 /* end = ((end - 1) & -L1_CACHE_BYTES) + L1_CACHE_BYTES; */ 34 R1 += -1; 35 R1 = R1 & R2; 36 R1 += L1_CACHE_BYTES; 37 ··· 63 64 /* Flush all cache lines assocoiated with this area of memory. */ 65 ENTRY(_blackfin_icache_dcache_flush_range) 66 + do_flush FLUSH, IFLUSH 67 ENDPROC(_blackfin_icache_dcache_flush_range) 68 69 /* Throw away all D-cached data in specified region without any obligation to
+7 -7
arch/blackfin/mach-common/cpufreq.c
··· 72 73 /**************************************************************************/ 74 75 - static unsigned int bfin_getfreq(unsigned int cpu) 76 { 77 /* The driver only support single cpu */ 78 if (cpu != 0) 79 return -1; 80 81 - return get_cclk(); 82 } 83 84 ··· 96 97 cclk_hz = bfin_freq_table[index].frequency; 98 99 - freqs.old = bfin_getfreq(0); 100 freqs.new = cclk_hz; 101 freqs.cpu = 0; 102 ··· 137 if (policy->cpu != 0) 138 return -EINVAL; 139 140 - cclk = get_cclk(); 141 - sclk = get_sclk(); 142 143 #if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE)) 144 min_cclk = sclk * 2; ··· 152 dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */ 153 dpm_state_table[index].tscale = (TIME_SCALE / (1 << csel)) - 1; 154 155 - pr_debug("cpufreq: freq:%d csel:%d tscale:%d\n", 156 bfin_freq_table[index].frequency, 157 dpm_state_table[index].csel, 158 dpm_state_table[index].tscale); ··· 173 static struct cpufreq_driver bfin_driver = { 174 .verify = bfin_verify_speed, 175 .target = bfin_target, 176 - .get = bfin_getfreq, 177 .init = __bfin_cpu_init, 178 .name = "bfin cpufreq", 179 .owner = THIS_MODULE,
··· 72 73 /**************************************************************************/ 74 75 + static unsigned int bfin_getfreq_khz(unsigned int cpu) 76 { 77 /* The driver only support single cpu */ 78 if (cpu != 0) 79 return -1; 80 81 + return get_cclk() / 1000; 82 } 83 84 ··· 96 97 cclk_hz = bfin_freq_table[index].frequency; 98 99 + freqs.old = bfin_getfreq_khz(0); 100 freqs.new = cclk_hz; 101 freqs.cpu = 0; 102 ··· 137 if (policy->cpu != 0) 138 return -EINVAL; 139 140 + cclk = get_cclk() / 1000; 141 + sclk = get_sclk() / 1000; 142 143 #if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE)) 144 min_cclk = sclk * 2; ··· 152 dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */ 153 dpm_state_table[index].tscale = (TIME_SCALE / (1 << csel)) - 1; 154 155 + pr_debug("cpufreq: freq:%d csel:0x%x tscale:%d\n", 156 bfin_freq_table[index].frequency, 157 dpm_state_table[index].csel, 158 dpm_state_table[index].tscale); ··· 173 static struct cpufreq_driver bfin_driver = { 174 .verify = bfin_verify_speed, 175 .target = bfin_target, 176 + .get = bfin_getfreq_khz, 177 .init = __bfin_cpu_init, 178 .name = "bfin cpufreq", 179 .owner = THIS_MODULE,
+1 -1
arch/blackfin/mach-common/entry.S
··· 277 p5.h = hi(ILAT); 278 r6 = [p5]; 279 r7 = 0x20; /* Did I just cause anther HW error? */ 280 - r7 = r7 & r1; 281 CC = R7 == R6; 282 if CC JUMP _double_fault; 283 #endif
··· 277 p5.h = hi(ILAT); 278 r6 = [p5]; 279 r7 = 0x20; /* Did I just cause anther HW error? */ 280 + r6 = r7 & r6; 281 CC = R7 == R6; 282 if CC JUMP _double_fault; 283 #endif
+4 -4
arch/blackfin/mm/sram-alloc.c
··· 183 return; 184 } 185 186 - free_l2_sram_head.next->paddr = (void *)L2_START + 187 - (_etext_l2 - _stext_l2) + (_edata_l2 - _sdata_l2); 188 - free_l2_sram_head.next->size = L2_LENGTH - 189 - (_etext_l2 - _stext_l2) + (_edata_l2 - _sdata_l2); 190 free_l2_sram_head.next->pid = 0; 191 free_l2_sram_head.next->next = NULL; 192
··· 183 return; 184 } 185 186 + free_l2_sram_head.next->paddr = 187 + (void *)L2_START + (_ebss_l2 - _stext_l2); 188 + free_l2_sram_head.next->size = 189 + L2_LENGTH - (_ebss_l2 - _stext_l2); 190 free_l2_sram_head.next->pid = 0; 191 free_l2_sram_head.next->next = NULL; 192