aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2007-07-12 10:58:21 -0400
committerBryan Wu <bryan.wu@analog.com>2007-07-12 10:58:21 -0400
commit1f83b8f148a1eb967d2a628cbb741cd56fb54572 (patch)
tree43b56238822ab35ec90a9ee9e9c014247950622f /arch
parent669b792c77bbc30e9f4d9c95dbc918dc348c49c2 (diff)
Blackfin arch: cleanup warnings from checkpatch -- no functional changes
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/asm-offsets.c7
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c46
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c11
-rw-r--r--arch/blackfin/kernel/bfin_ksyms.c5
-rw-r--r--arch/blackfin/kernel/dma-mapping.c2
-rw-r--r--arch/blackfin/kernel/dualcore_test.c6
-rw-r--r--arch/blackfin/kernel/fixed_code.S2
-rw-r--r--arch/blackfin/kernel/flat.c55
-rw-r--r--arch/blackfin/kernel/irqchip.c2
-rw-r--r--arch/blackfin/kernel/module.c32
-rw-r--r--arch/blackfin/kernel/process.c10
-rw-r--r--arch/blackfin/kernel/ptrace.c6
-rw-r--r--arch/blackfin/kernel/setup.c44
-rw-r--r--arch/blackfin/kernel/signal.c10
-rw-r--r--arch/blackfin/kernel/sys_bfin.c8
-rw-r--r--arch/blackfin/kernel/time.c4
-rw-r--r--arch/blackfin/kernel/traps.c46
-rw-r--r--arch/blackfin/lib/strcmp.c3
-rw-r--r--arch/blackfin/lib/strcpy.c3
-rw-r--r--arch/blackfin/lib/strncmp.c3
-rw-r--r--arch/blackfin/lib/strncpy.c3
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c14
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c8
-rw-r--r--arch/blackfin/mach-bf533/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c30
-rw-r--r--arch/blackfin/mach-bf533/cpu.c3
-rw-r--r--arch/blackfin/mach-bf533/ints-priority.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c16
-rw-r--r--arch/blackfin/mach-bf537/boards/eth_mac.c5
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c36
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c54
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c51
-rw-r--r--arch/blackfin/mach-bf537/ints-priority.c2
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf548/gpio.c2
-rw-r--r--arch/blackfin/mach-bf548/ints-priority.c2
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c32
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c33
-rw-r--r--arch/blackfin/mach-bf561/boards/generic_board.c6
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c6
-rw-r--r--arch/blackfin/mach-bf561/coreb.c18
-rw-r--r--arch/blackfin/mach-bf561/ints-priority.c2
-rw-r--r--arch/blackfin/mach-common/cplbinfo.c13
-rw-r--r--arch/blackfin/mach-common/entry.S2
-rw-r--r--arch/blackfin/mach-common/ints-priority-dc.c8
-rw-r--r--arch/blackfin/mach-common/ints-priority-sc.c10
-rw-r--r--arch/blackfin/mach-common/pm.c4
-rw-r--r--arch/blackfin/mm/blackfin_sram.c4
-rw-r--r--arch/blackfin/mm/init.c2
-rw-r--r--arch/blackfin/oprofile/common.c6
-rw-r--r--arch/blackfin/oprofile/op_model_bf533.c6
-rw-r--r--arch/blackfin/oprofile/timer_int.c3
52 files changed, 321 insertions, 375 deletions
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c
index e455f4504509..b56b2741cdea 100644
--- a/arch/blackfin/kernel/asm-offsets.c
+++ b/arch/blackfin/kernel/asm-offsets.c
@@ -32,11 +32,10 @@
32#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
33#include <linux/ptrace.h> 33#include <linux/ptrace.h>
34#include <linux/hardirq.h> 34#include <linux/hardirq.h>
35#include <asm/irq.h> 35#include <linux/irq.h>
36#include <asm/thread_info.h> 36#include <linux/thread_info.h>
37 37
38#define DEFINE(sym, val) \ 38#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
39 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
40 39
41int main(void) 40int main(void)
42{ 41{
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 8a16c2bbec04..7cf02f02a1db 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -332,7 +332,7 @@ set_bfin_dma_config(char direction, char flow_mode,
332} 332}
333EXPORT_SYMBOL(set_bfin_dma_config); 333EXPORT_SYMBOL(set_bfin_dma_config);
334 334
335void set_dma_sg(unsigned int channel, struct dmasg * sg, int nr_sg) 335void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg)
336{ 336{
337 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE 337 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
338 && channel < MAX_BLACKFIN_DMA_CHANNEL)); 338 && channel < MAX_BLACKFIN_DMA_CHANNEL));
@@ -401,7 +401,7 @@ static void *__dma_memcpy(void *dest, const void *src, size_t size)
401 401
402 if (size <= 0) 402 if (size <= 0)
403 return NULL; 403 return NULL;
404 404
405 local_irq_save(flags); 405 local_irq_save(flags);
406 406
407 if ((unsigned long)src < memory_end) 407 if ((unsigned long)src < memory_end)
@@ -545,7 +545,6 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
545 addr = __dma_memcpy(dest+bulk, src+bulk, rest); 545 addr = __dma_memcpy(dest+bulk, src+bulk, rest);
546 return addr; 546 return addr;
547} 547}
548
549EXPORT_SYMBOL(dma_memcpy); 548EXPORT_SYMBOL(dma_memcpy);
550 549
551void *safe_dma_memcpy(void *dest, const void *src, size_t size) 550void *safe_dma_memcpy(void *dest, const void *src, size_t size)
@@ -558,14 +557,13 @@ EXPORT_SYMBOL(safe_dma_memcpy);
558 557
559void dma_outsb(void __iomem *addr, const void *buf, unsigned short len) 558void dma_outsb(void __iomem *addr, const void *buf, unsigned short len)
560{ 559{
561
562 unsigned long flags; 560 unsigned long flags;
563 561
564 local_irq_save(flags); 562 local_irq_save(flags);
565
566 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
567 563
568 bfin_write_MDMA_D0_START_ADDR(addr); 564 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
565
566 bfin_write_MDMA_D0_START_ADDR(addr);
569 bfin_write_MDMA_D0_X_COUNT(len); 567 bfin_write_MDMA_D0_X_COUNT(len);
570 bfin_write_MDMA_D0_X_MODIFY(0); 568 bfin_write_MDMA_D0_X_MODIFY(0);
571 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 569 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -593,9 +591,9 @@ EXPORT_SYMBOL(dma_outsb);
593void dma_insb(const void __iomem *addr, void *buf, unsigned short len) 591void dma_insb(const void __iomem *addr, void *buf, unsigned short len)
594{ 592{
595 unsigned long flags; 593 unsigned long flags;
596 594
597 local_irq_save(flags); 595 local_irq_save(flags);
598 bfin_write_MDMA_D0_START_ADDR(buf); 596 bfin_write_MDMA_D0_START_ADDR(buf);
599 bfin_write_MDMA_D0_X_COUNT(len); 597 bfin_write_MDMA_D0_X_COUNT(len);
600 bfin_write_MDMA_D0_X_MODIFY(1); 598 bfin_write_MDMA_D0_X_MODIFY(1);
601 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 599 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -624,12 +622,12 @@ EXPORT_SYMBOL(dma_insb);
624void dma_outsw(void __iomem *addr, const void *buf, unsigned short len) 622void dma_outsw(void __iomem *addr, const void *buf, unsigned short len)
625{ 623{
626 unsigned long flags; 624 unsigned long flags;
627 625
628 local_irq_save(flags); 626 local_irq_save(flags);
629
630 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
631 627
632 bfin_write_MDMA_D0_START_ADDR(addr); 628 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
629
630 bfin_write_MDMA_D0_START_ADDR(addr);
633 bfin_write_MDMA_D0_X_COUNT(len); 631 bfin_write_MDMA_D0_X_COUNT(len);
634 bfin_write_MDMA_D0_X_MODIFY(0); 632 bfin_write_MDMA_D0_X_MODIFY(0);
635 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 633 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -656,10 +654,10 @@ EXPORT_SYMBOL(dma_outsw);
656void dma_insw(const void __iomem *addr, void *buf, unsigned short len) 654void dma_insw(const void __iomem *addr, void *buf, unsigned short len)
657{ 655{
658 unsigned long flags; 656 unsigned long flags;
659 657
660 local_irq_save(flags); 658 local_irq_save(flags);
661 659
662 bfin_write_MDMA_D0_START_ADDR(buf); 660 bfin_write_MDMA_D0_START_ADDR(buf);
663 bfin_write_MDMA_D0_X_COUNT(len); 661 bfin_write_MDMA_D0_X_COUNT(len);
664 bfin_write_MDMA_D0_X_MODIFY(2); 662 bfin_write_MDMA_D0_X_MODIFY(2);
665 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 663 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -688,12 +686,12 @@ EXPORT_SYMBOL(dma_insw);
688void dma_outsl(void __iomem *addr, const void *buf, unsigned short len) 686void dma_outsl(void __iomem *addr, const void *buf, unsigned short len)
689{ 687{
690 unsigned long flags; 688 unsigned long flags;
691 689
692 local_irq_save(flags); 690 local_irq_save(flags);
693
694 blackfin_dcache_flush_range((unsigned int)buf,(unsigned int)(buf) + len);
695 691
696 bfin_write_MDMA_D0_START_ADDR(addr); 692 blackfin_dcache_flush_range((unsigned int)buf, (unsigned int)(buf) + len);
693
694 bfin_write_MDMA_D0_START_ADDR(addr);
697 bfin_write_MDMA_D0_X_COUNT(len); 695 bfin_write_MDMA_D0_X_COUNT(len);
698 bfin_write_MDMA_D0_X_MODIFY(0); 696 bfin_write_MDMA_D0_X_MODIFY(0);
699 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 697 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
@@ -720,10 +718,10 @@ EXPORT_SYMBOL(dma_outsl);
720void dma_insl(const void __iomem *addr, void *buf, unsigned short len) 718void dma_insl(const void __iomem *addr, void *buf, unsigned short len)
721{ 719{
722 unsigned long flags; 720 unsigned long flags;
723 721
724 local_irq_save(flags); 722 local_irq_save(flags);
725 723
726 bfin_write_MDMA_D0_START_ADDR(buf); 724 bfin_write_MDMA_D0_START_ADDR(buf);
727 bfin_write_MDMA_D0_X_COUNT(len); 725 bfin_write_MDMA_D0_X_COUNT(len);
728 bfin_write_MDMA_D0_X_MODIFY(4); 726 bfin_write_MDMA_D0_X_MODIFY(4);
729 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR); 727 bfin_write_MDMA_D0_IRQ_STATUS(DMA_DONE | DMA_ERR);
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index bb1f4fb2467c..bafcfa52142b 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -162,7 +162,7 @@ static void port_setup(unsigned short gpio, unsigned short usage)
162 162
163static void default_gpio(unsigned short gpio) 163static void default_gpio(unsigned short gpio)
164{ 164{
165 unsigned short bank,bitmask; 165 unsigned short bank, bitmask;
166 166
167 bank = gpio_bank(gpio); 167 bank = gpio_bank(gpio);
168 bitmask = gpio_bit(gpio); 168 bitmask = gpio_bit(gpio);
@@ -183,7 +183,7 @@ static int __init bfin_gpio_init(void)
183 183
184 printk(KERN_INFO "Blackfin GPIO Controller\n"); 184 printk(KERN_INFO "Blackfin GPIO Controller\n");
185 185
186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) 186 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
187 reserved_map[gpio_bank(i)] = 0; 187 reserved_map[gpio_bank(i)] = 0;
188 188
189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) 189#if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE))
@@ -478,7 +478,7 @@ u32 gpio_pm_setup(void)
478 u32 sic_iwr = 0; 478 u32 sic_iwr = 0;
479 u16 bank, mask, i, gpio; 479 u16 bank, mask, i, gpio;
480 480
481 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { 481 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
482 mask = wakeup_map[gpio_bank(i)]; 482 mask = wakeup_map[gpio_bank(i)];
483 bank = gpio_bank(i); 483 bank = gpio_bank(i);
484 484
@@ -522,12 +522,11 @@ u32 gpio_pm_setup(void)
522 return IWR_ENABLE_ALL; 522 return IWR_ENABLE_ALL;
523} 523}
524 524
525
526void gpio_pm_restore(void) 525void gpio_pm_restore(void)
527{ 526{
528 u16 bank, mask, i; 527 u16 bank, mask, i;
529 528
530 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) { 529 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
531 mask = wakeup_map[gpio_bank(i)]; 530 mask = wakeup_map[gpio_bank(i)];
532 bank = gpio_bank(i); 531 bank = gpio_bank(i);
533 532
@@ -591,7 +590,6 @@ int gpio_request(unsigned short gpio, const char *label)
591} 590}
592EXPORT_SYMBOL(gpio_request); 591EXPORT_SYMBOL(gpio_request);
593 592
594
595void gpio_free(unsigned short gpio) 593void gpio_free(unsigned short gpio)
596{ 594{
597 unsigned long flags; 595 unsigned long flags;
@@ -616,7 +614,6 @@ void gpio_free(unsigned short gpio)
616} 614}
617EXPORT_SYMBOL(gpio_free); 615EXPORT_SYMBOL(gpio_free);
618 616
619
620void gpio_direction_input(unsigned short gpio) 617void gpio_direction_input(unsigned short gpio)
621{ 618{
622 unsigned long flags; 619 unsigned long flags;
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c
index f64ecb638fab..70455949cfd2 100644
--- a/arch/blackfin/kernel/bfin_ksyms.c
+++ b/arch/blackfin/kernel/bfin_ksyms.c
@@ -28,10 +28,11 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <asm/irq.h> 31#include <linux/irq.h>
32#include <linux/uaccess.h>
33
32#include <asm/checksum.h> 34#include <asm/checksum.h>
33#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
34#include <asm/uaccess.h>
35 36
36/* platform dependent support */ 37/* platform dependent support */
37 38
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index 539eb24e062f..bda57ec88151 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -34,8 +34,8 @@
34#include <linux/spinlock.h> 34#include <linux/spinlock.h>
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <linux/io.h>
37#include <asm/cacheflush.h> 38#include <asm/cacheflush.h>
38#include <asm/io.h>
39#include <asm/bfin-global.h> 39#include <asm/bfin-global.h>
40 40
41static spinlock_t dma_page_lock; 41static spinlock_t dma_page_lock;
diff --git a/arch/blackfin/kernel/dualcore_test.c b/arch/blackfin/kernel/dualcore_test.c
index 8b89c99f9dfa..0fcba74840b7 100644
--- a/arch/blackfin/kernel/dualcore_test.c
+++ b/arch/blackfin/kernel/dualcore_test.c
@@ -30,19 +30,19 @@
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/module.h> 31#include <linux/module.h>
32 32
33static int *testarg = (int*)0xfeb00000; 33static int *testarg = (int *)0xfeb00000;
34 34
35static int test_init(void) 35static int test_init(void)
36{ 36{
37 *testarg = 1; 37 *testarg = 1;
38 printk("Dual core test module inserted: set testarg = [%d]\n @ [%p]\n", 38 printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
39 *testarg, testarg); 39 *testarg, testarg);
40 return 0; 40 return 0;
41} 41}
42 42
43static void test_exit(void) 43static void test_exit(void)
44{ 44{
45 printk("Dual core test module removed: testarg = [%d]\n", *testarg); 45 printk(KERN_INFO "Dual core test module removed: testarg = [%d]\n", *testarg);
46} 46}
47 47
48module_init(test_init); 48module_init(test_init);
diff --git a/arch/blackfin/kernel/fixed_code.S b/arch/blackfin/kernel/fixed_code.S
index 99ea296c82c7..d8b1ebc70996 100644
--- a/arch/blackfin/kernel/fixed_code.S
+++ b/arch/blackfin/kernel/fixed_code.S
@@ -8,8 +8,8 @@
8 * BF561 SMP). 8 * BF561 SMP).
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <linux/unistd.h>
11#include <asm/entry.h> 12#include <asm/entry.h>
12#include <asm/unistd.h>
13 13
14.text 14.text
15ENTRY(_fixed_code_start) 15ENTRY(_fixed_code_start)
diff --git a/arch/blackfin/kernel/flat.c b/arch/blackfin/kernel/flat.c
index a92587b628b5..d188b2430536 100644
--- a/arch/blackfin/kernel/flat.c
+++ b/arch/blackfin/kernel/flat.c
@@ -36,24 +36,22 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr,
36 unsigned long val; 36 unsigned long val;
37 37
38 switch (type) { 38 switch (type) {
39 case FLAT_BFIN_RELOC_TYPE_16_BIT: 39 case FLAT_BFIN_RELOC_TYPE_16_BIT:
40 case FLAT_BFIN_RELOC_TYPE_16H_BIT: 40 case FLAT_BFIN_RELOC_TYPE_16H_BIT:
41 usptr = (unsigned short *)ptr; 41 usptr = (unsigned short *)ptr;
42 pr_debug("*usptr = %x", get_unaligned(usptr)); 42 pr_debug("*usptr = %x", get_unaligned(usptr));
43 val = get_unaligned(usptr); 43 val = get_unaligned(usptr);
44 val += *persistent; 44 val += *persistent;
45 break; 45 break;
46 46
47 case FLAT_BFIN_RELOC_TYPE_32_BIT: 47 case FLAT_BFIN_RELOC_TYPE_32_BIT:
48 pr_debug("*ptr = %lx", get_unaligned(ptr)); 48 pr_debug("*ptr = %lx", get_unaligned(ptr));
49 val = get_unaligned(ptr); 49 val = get_unaligned(ptr);
50 break; 50 break;
51 51
52 default: 52 default:
53 pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", 53 pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", type);
54 type); 54 return 0;
55
56 return 0;
57 } 55 }
58 56
59 /* 57 /*
@@ -81,21 +79,20 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr,
81 int type = (relval >> 26) & 7; 79 int type = (relval >> 26) & 7;
82 80
83 switch (type) { 81 switch (type) {
84 case FLAT_BFIN_RELOC_TYPE_16_BIT: 82 case FLAT_BFIN_RELOC_TYPE_16_BIT:
85 put_unaligned(addr, usptr); 83 put_unaligned(addr, usptr);
86 pr_debug("new value %x at %p", get_unaligned(usptr), 84 pr_debug("new value %x at %p", get_unaligned(usptr), usptr);
87 usptr); 85 break;
88 break;
89 86
90 case FLAT_BFIN_RELOC_TYPE_16H_BIT: 87 case FLAT_BFIN_RELOC_TYPE_16H_BIT:
91 put_unaligned(addr >> 16, usptr); 88 put_unaligned(addr >> 16, usptr);
92 pr_debug("new value %x", get_unaligned(usptr)); 89 pr_debug("new value %x", get_unaligned(usptr));
93 break; 90 break;
94 91
95 case FLAT_BFIN_RELOC_TYPE_32_BIT: 92 case FLAT_BFIN_RELOC_TYPE_32_BIT:
96 put_unaligned(addr, ptr); 93 put_unaligned(addr, ptr);
97 pr_debug("new ptr =%lx", get_unaligned(ptr)); 94 pr_debug("new ptr =%lx", get_unaligned(ptr));
98 break; 95 break;
99 } 96 }
100} 97}
101EXPORT_SYMBOL(bfin_put_addr_at_rp); 98EXPORT_SYMBOL(bfin_put_addr_at_rp);
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index 80996a1a94ca..1fc001c7abda 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -82,7 +82,7 @@ int show_interrupts(struct seq_file *p, void *v)
82 seq_printf(p, ", %s", action->name); 82 seq_printf(p, ", %s", action->name);
83 83
84 seq_putc(p, '\n'); 84 seq_putc(p, '\n');
85 unlock: 85 unlock:
86 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 86 spin_unlock_irqrestore(&irq_desc[i].lock, flags);
87 } else if (i == NR_IRQS) { 87 } else if (i == NR_IRQS) {
88 seq_printf(p, "Err: %10lu\n", irq_err_count); 88 seq_printf(p, "Err: %10lu\n", irq_err_count);
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c
index 372f756f1ad9..8b9fe29d03f4 100644
--- a/arch/blackfin/kernel/module.c
+++ b/arch/blackfin/kernel/module.c
@@ -165,8 +165,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
165 165
166 for (s = sechdrs; s < sechdrs_end; ++s) { 166 for (s = sechdrs; s < sechdrs_end; ++s) {
167 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || 167 if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) ||
168 ((strcmp(".text", secstrings + s->sh_name)==0) && 168 ((strcmp(".text", secstrings + s->sh_name) == 0) &&
169 (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) { 169 (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) {
170 mod->arch.text_l1 = s; 170 mod->arch.text_l1 = s;
171 dest = l1_inst_sram_alloc(s->sh_size); 171 dest = l1_inst_sram_alloc(s->sh_size);
172 if (dest == NULL) { 172 if (dest == NULL) {
@@ -179,9 +179,9 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
179 s->sh_flags &= ~SHF_ALLOC; 179 s->sh_flags &= ~SHF_ALLOC;
180 s->sh_addr = (unsigned long)dest; 180 s->sh_addr = (unsigned long)dest;
181 } 181 }
182 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0)|| 182 if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) ||
183 ((strcmp(".data", secstrings + s->sh_name)==0) && 183 ((strcmp(".data", secstrings + s->sh_name) == 0) &&
184 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { 184 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
185 mod->arch.data_a_l1 = s; 185 mod->arch.data_a_l1 = s;
186 dest = l1_data_sram_alloc(s->sh_size); 186 dest = l1_data_sram_alloc(s->sh_size);
187 if (dest == NULL) { 187 if (dest == NULL) {
@@ -195,8 +195,8 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
195 s->sh_addr = (unsigned long)dest; 195 s->sh_addr = (unsigned long)dest;
196 } 196 }
197 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || 197 if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 ||
198 ((strcmp(".bss", secstrings + s->sh_name)==0) && 198 ((strcmp(".bss", secstrings + s->sh_name) == 0) &&
199 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { 199 (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) {
200 mod->arch.bss_a_l1 = s; 200 mod->arch.bss_a_l1 = s;
201 dest = l1_data_sram_alloc(s->sh_size); 201 dest = l1_data_sram_alloc(s->sh_size);
202 if (dest == NULL) { 202 if (dest == NULL) {
@@ -326,7 +326,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
326 pr_debug("before %x after %x\n", *location16, 326 pr_debug("before %x after %x\n", *location16,
327 (value & 0xffff)); 327 (value & 0xffff));
328 tmp = (value & 0xffff); 328 tmp = (value & 0xffff);
329 if((unsigned long)location16 >= L1_CODE_START) { 329 if ((unsigned long)location16 >= L1_CODE_START) {
330 dma_memcpy(location16, &tmp, 2); 330 dma_memcpy(location16, &tmp, 2);
331 } else 331 } else
332 *location16 = tmp; 332 *location16 = tmp;
@@ -335,7 +335,7 @@ apply_relocate_add(Elf_Shdr * sechdrs, const char *strtab,
335 pr_debug("before %x after %x\n", *location16, 335 pr_debug("before %x after %x\n", *location16,
336 ((value >> 16) & 0xffff)); 336 ((value >> 16) & 0xffff));
337 tmp = ((value >> 16) & 0xffff); 337 tmp = ((value >> 16) & 0xffff);
338 if((unsigned long)location16 >= L1_CODE_START) { 338 if ((unsigned long)location16 >= L1_CODE_START) {
339 dma_memcpy(location16, &tmp, 2); 339 dma_memcpy(location16, &tmp, 2);
340 } else 340 } else
341 *location16 = tmp; 341 *location16 = tmp;
@@ -404,8 +404,8 @@ module_finalize(const Elf_Ehdr * hdr,
404 continue; 404 continue;
405 405
406 if ((sechdrs[i].sh_type == SHT_RELA) && 406 if ((sechdrs[i].sh_type == SHT_RELA) &&
407 ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0)|| 407 ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) ||
408 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && 408 ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) &&
409 (hdr->e_flags & FLG_CODE_IN_L1)))) { 409 (hdr->e_flags & FLG_CODE_IN_L1)))) {
410 apply_relocate_add((Elf_Shdr *) sechdrs, strtab, 410 apply_relocate_add((Elf_Shdr *) sechdrs, strtab,
411 symindex, i, mod); 411 symindex, i, mod);
@@ -417,13 +417,13 @@ module_finalize(const Elf_Ehdr * hdr,
417void module_arch_cleanup(struct module *mod) 417void module_arch_cleanup(struct module *mod)
418{ 418{
419 if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr)) 419 if ((mod->arch.text_l1) && (mod->arch.text_l1->sh_addr))
420 l1_inst_sram_free((void*)mod->arch.text_l1->sh_addr); 420 l1_inst_sram_free((void *)mod->arch.text_l1->sh_addr);
421 if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr)) 421 if ((mod->arch.data_a_l1) && (mod->arch.data_a_l1->sh_addr))
422 l1_data_sram_free((void*)mod->arch.data_a_l1->sh_addr); 422 l1_data_sram_free((void *)mod->arch.data_a_l1->sh_addr);
423 if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr)) 423 if ((mod->arch.bss_a_l1) && (mod->arch.bss_a_l1->sh_addr))
424 l1_data_sram_free((void*)mod->arch.bss_a_l1->sh_addr); 424 l1_data_sram_free((void *)mod->arch.bss_a_l1->sh_addr);
425 if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr)) 425 if ((mod->arch.data_b_l1) && (mod->arch.data_b_l1->sh_addr))
426 l1_data_B_sram_free((void*)mod->arch.data_b_l1->sh_addr); 426 l1_data_B_sram_free((void *)mod->arch.data_b_l1->sh_addr);
427 if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr)) 427 if ((mod->arch.bss_b_l1) && (mod->arch.bss_b_l1->sh_addr))
428 l1_data_B_sram_free((void*)mod->arch.bss_b_l1->sh_addr); 428 l1_data_B_sram_free((void *)mod->arch.bss_b_l1->sh_addr);
429} 429}
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 6b7a94ab96c2..5a51dd6ab280 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -32,9 +32,9 @@
32#include <linux/unistd.h> 32#include <linux/unistd.h>
33#include <linux/user.h> 33#include <linux/user.h>
34#include <linux/a.out.h> 34#include <linux/a.out.h>
35#include <linux/uaccess.h>
35 36
36#include <asm/blackfin.h> 37#include <asm/blackfin.h>
37#include <asm/uaccess.h>
38#include <asm/fixed_code.h> 38#include <asm/fixed_code.h>
39 39
40#define LED_ON 0 40#define LED_ON 0
@@ -174,8 +174,8 @@ void show_regs(struct pt_regs *regs)
174 printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", 174 printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n",
175 regs->r4, regs->r5, regs->r6, regs->r7); 175 regs->r4, regs->r5, regs->r6, regs->r7);
176 176
177 if (!(regs->ipend)) 177 if (!regs->ipend)
178 printk("USP: %08lx\n", rdusp()); 178 printk(KERN_NOTICE "USP: %08lx\n", rdusp());
179} 179}
180 180
181/* Fill in the fpu structure for a core dump. */ 181/* Fill in the fpu structure for a core dump. */
@@ -323,7 +323,7 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
323 goto out; 323 goto out;
324 error = do_execve(filename, argv, envp, regs); 324 error = do_execve(filename, argv, envp, regs);
325 putname(filename); 325 putname(filename);
326 out: 326 out:
327 unlock_kernel(); 327 unlock_kernel();
328 return error; 328 return error;
329} 329}
@@ -421,7 +421,7 @@ int _access_ok(unsigned long addr, unsigned long size)
421 421
422 if (addr > (addr + size)) 422 if (addr > (addr + size))
423 return 0; 423 return 0;
424 if (segment_eq(get_fs(),KERNEL_DS)) 424 if (segment_eq(get_fs(), KERNEL_DS))
425 return 1; 425 return 1;
426#ifdef CONFIG_MTD_UCLINUX 426#ifdef CONFIG_MTD_UCLINUX
427 if (addr >= memory_start && (addr + size) <= memory_end) 427 if (addr >= memory_start && (addr + size) <= memory_end)
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index e718bb4a1ef0..ed800c7456dd 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -36,8 +36,8 @@
36#include <linux/ptrace.h> 36#include <linux/ptrace.h>
37#include <linux/user.h> 37#include <linux/user.h>
38#include <linux/signal.h> 38#include <linux/signal.h>
39#include <linux/uaccess.h>
39 40
40#include <asm/uaccess.h>
41#include <asm/page.h> 41#include <asm/page.h>
42#include <asm/pgtable.h> 42#include <asm/pgtable.h>
43#include <asm/system.h> 43#include <asm/system.h>
@@ -122,7 +122,7 @@ static inline long get_reg(struct task_struct *task, int regno)
122static inline int 122static inline int
123put_reg(struct task_struct *task, int regno, unsigned long data) 123put_reg(struct task_struct *task, int regno, unsigned long data)
124{ 124{
125 char * reg_ptr; 125 char *reg_ptr;
126 126
127 struct pt_regs *regs = 127 struct pt_regs *regs =
128 (struct pt_regs *)((unsigned long)task_stack_page(task) + 128 (struct pt_regs *)((unsigned long)task_stack_page(task) +
@@ -146,7 +146,7 @@ put_reg(struct task_struct *task, int regno, unsigned long data)
146 break; 146 break;
147 default: 147 default:
148 if (regno <= 216) 148 if (regno <= 216)
149 *(long *)(reg_ptr + regno) = data; 149 *(long *)(reg_ptr + regno) = data;
150 } 150 }
151 return 0; 151 return 0;
152} 152}
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index a86bf6545781..3309238890ae 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -362,15 +362,15 @@ void __init setup_arch(char **cmdline_p)
362 , _stext, _etext, 362 , _stext, _etext,
363 __start_rodata, __end_rodata, 363 __start_rodata, __end_rodata,
364 _sdata, _edata, 364 _sdata, _edata,
365 (void*)&init_thread_union, (void*)((int)(&init_thread_union) + 0x2000), 365 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000),
366 __init_begin, __init_end, 366 __init_begin, __init_end,
367 __bss_start, __bss_stop, 367 __bss_start, __bss_stop,
368 (void*)_ramstart, (void*)memory_end 368 (void *)_ramstart, (void *)memory_end
369#ifdef CONFIG_MTD_UCLINUX 369#ifdef CONFIG_MTD_UCLINUX
370 , (void*)memory_mtd_start, (void*)(memory_mtd_start + mtd_size) 370 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size)
371#endif 371#endif
372#if DMA_UNCACHED_REGION > 0 372#if DMA_UNCACHED_REGION > 0
373 , (void*)(_ramend - DMA_UNCACHED_REGION), (void*)(_ramend) 373 , (void *)(_ramend - DMA_UNCACHED_REGION), (void *)(_ramend)
374#endif 374#endif
375 ); 375 );
376 376
@@ -476,7 +476,6 @@ u_long get_cclk(void)
476 return get_vco() / ssel; 476 return get_vco() / ssel;
477 return get_vco() >> csel; 477 return get_vco() >> csel;
478} 478}
479
480EXPORT_SYMBOL(get_cclk); 479EXPORT_SYMBOL(get_cclk);
481 480
482/* Get the System clock */ 481/* Get the System clock */
@@ -495,7 +494,6 @@ u_long get_sclk(void)
495 494
496 return get_vco() / ssel; 495 return get_vco() / ssel;
497} 496}
498
499EXPORT_SYMBOL(get_sclk); 497EXPORT_SYMBOL(get_sclk);
500 498
501/* 499/*
@@ -550,23 +548,23 @@ static int show_cpuinfo(struct seq_file *m, void *v)
550 seq_printf(m, "D-CACHE:\tOFF\n"); 548 seq_printf(m, "D-CACHE:\tOFF\n");
551 549
552 550
553 switch(bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) { 551 switch (bfin_read_DMEM_CONTROL() & (1 << DMC0_P | 1 << DMC1_P)) {
554 case ACACHE_BSRAM: 552 case ACACHE_BSRAM:
555 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n"); 553 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tSRAM\n");
556 dcache_size = 16; 554 dcache_size = 16;
557 dsup_banks = 1; 555 dsup_banks = 1;
558 break; 556 break;
559 case ACACHE_BCACHE: 557 case ACACHE_BCACHE:
560 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n"); 558 seq_printf(m, "DBANK-A:\tCACHE\n" "DBANK-B:\tCACHE\n");
561 dcache_size = 32; 559 dcache_size = 32;
562 dsup_banks = 2; 560 dsup_banks = 2;
563 break; 561 break;
564 case ASRAM_BSRAM: 562 case ASRAM_BSRAM:
565 seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n"); 563 seq_printf(m, "DBANK-A:\tSRAM\n" "DBANK-B:\tSRAM\n");
566 dcache_size = 0; 564 dcache_size = 0;
567 dsup_banks = 0; 565 dsup_banks = 0;
568 break; 566 break;
569 default: 567 default:
570 break; 568 break;
571 } 569 }
572 570
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 316e65c3439d..5564c9588aa8 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -34,8 +34,8 @@
34#include <linux/personality.h> 34#include <linux/personality.h>
35#include <linux/binfmts.h> 35#include <linux/binfmts.h>
36#include <linux/freezer.h> 36#include <linux/freezer.h>
37#include <linux/uaccess.h>
37 38
38#include <asm/uaccess.h>
39#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40#include <asm/ucontext.h> 40#include <asm/ucontext.h>
41 41
@@ -124,7 +124,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused)
124 124
125 return r0; 125 return r0;
126 126
127 badframe: 127 badframe:
128 force_sig(SIGSEGV, current); 128 force_sig(SIGSEGV, current);
129 return 0; 129 return 0;
130} 130}
@@ -239,7 +239,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info,
239 239
240 return 0; 240 return 0;
241 241
242 give_sigsegv: 242 give_sigsegv:
243 if (sig == SIGSEGV) 243 if (sig == SIGSEGV)
244 ka->sa.sa_handler = SIG_DFL; 244 ka->sa.sa_handler = SIG_DFL;
245 force_sig(SIGSEGV, current); 245 force_sig(SIGSEGV, current);
@@ -263,7 +263,7 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
263 } 263 }
264 /* fallthrough */ 264 /* fallthrough */
265 case -ERESTARTNOINTR: 265 case -ERESTARTNOINTR:
266 do_restart: 266 do_restart:
267 regs->p0 = regs->orig_p0; 267 regs->p0 = regs->orig_p0;
268 regs->r0 = regs->orig_r0; 268 regs->r0 = regs->orig_r0;
269 regs->pc -= 2; 269 regs->pc -= 2;
@@ -341,7 +341,7 @@ asmlinkage void do_signal(struct pt_regs *regs)
341 return; 341 return;
342 } 342 }
343 343
344no_signal: 344 no_signal:
345 /* Did we come from a system call? */ 345 /* Did we come from a system call? */
346 if (regs->orig_p0 >= 0) 346 if (regs->orig_p0 >= 0)
347 /* Restart the system call - no handlers present */ 347 /* Restart the system call - no handlers present */
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c
index f436e6743f5a..f5e1ae3d1705 100644
--- a/arch/blackfin/kernel/sys_bfin.c
+++ b/arch/blackfin/kernel/sys_bfin.c
@@ -37,12 +37,12 @@
37#include <linux/syscalls.h> 37#include <linux/syscalls.h>
38#include <linux/mman.h> 38#include <linux/mman.h>
39#include <linux/file.h> 39#include <linux/file.h>
40#include <linux/uaccess.h>
41#include <linux/ipc.h>
42#include <linux/unistd.h>
40 43
41#include <asm/cacheflush.h> 44#include <asm/cacheflush.h>
42#include <asm/uaccess.h>
43#include <asm/ipc.h>
44#include <asm/dma.h> 45#include <asm/dma.h>
45#include <asm/unistd.h>
46 46
47/* 47/*
48 * sys_pipe() is the normal C calling standard for creating 48 * sys_pipe() is the normal C calling standard for creating
@@ -83,7 +83,7 @@ do_mmap2(unsigned long addr, unsigned long len,
83 83
84 if (file) 84 if (file)
85 fput(file); 85 fput(file);
86 out: 86 out:
87 return error; 87 return error;
88} 88}
89 89
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index f578176b6d92..beef057bd1dc 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -87,7 +87,7 @@ void __init init_leds(void)
87static inline void do_leds(void) 87static inline void do_leds(void)
88{ 88{
89 static unsigned int count = 50; 89 static unsigned int count = 50;
90 static int flag = 0; 90 static int flag;
91 unsigned short tmp = 0; 91 unsigned short tmp = 0;
92 92
93 if (--count == 0) { 93 if (--count == 0) {
@@ -200,7 +200,7 @@ irqreturn_t timer_interrupt(int irq, void *dummy)__attribute__((l1_text));
200irqreturn_t timer_interrupt(int irq, void *dummy) 200irqreturn_t timer_interrupt(int irq, void *dummy)
201{ 201{
202 /* last time the cmos clock got updated */ 202 /* last time the cmos clock got updated */
203 static long last_rtc_update = 0; 203 static long last_rtc_update;
204 204
205 write_seqlock(&xtime_lock); 205 write_seqlock(&xtime_lock);
206 206
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index a58d0f50be20..114277bb46f8 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -27,16 +27,15 @@
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */ 28 */
29 29
30#include <asm/uaccess.h> 30#include <linux/uaccess.h>
31#include <linux/interrupt.h>
32#include <linux/module.h>
33#include <linux/kallsyms.h>
31#include <asm/traps.h> 34#include <asm/traps.h>
32#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
33#include <asm/blackfin.h> 36#include <asm/blackfin.h>
34#include <asm/uaccess.h>
35#include <asm/irq_handler.h> 37#include <asm/irq_handler.h>
36#include <asm/trace.h> 38#include <asm/trace.h>
37#include <linux/interrupt.h>
38#include <linux/module.h>
39#include <linux/kallsyms.h>
40 39
41#ifdef CONFIG_KGDB 40#ifdef CONFIG_KGDB
42# include <linux/debugger.h> 41# include <linux/debugger.h>
@@ -77,7 +76,7 @@ static int printk_address(unsigned long address)
77 if (!modname) 76 if (!modname)
78 modname = delim = ""; 77 modname = delim = "";
79 return printk("<0x%p> { %s%s%s%s + 0x%lx }", 78 return printk("<0x%p> { %s%s%s%s + 0x%lx }",
80 (void*)address, delim, modname, delim, symname, 79 (void *)address, delim, modname, delim, symname,
81 (unsigned long)offset); 80 (unsigned long)offset);
82 81
83 } 82 }
@@ -120,7 +119,7 @@ static int printk_address(unsigned long address)
120 119
121 write_unlock_irq(&tasklist_lock); 120 write_unlock_irq(&tasklist_lock);
122 return printk("<0x%p> [ %s + 0x%lx ]", 121 return printk("<0x%p> [ %s + 0x%lx ]",
123 (void*)address, name, offset); 122 (void *)address, name, offset);
124 } 123 }
125 124
126 vml = vml->next; 125 vml = vml->next;
@@ -129,7 +128,7 @@ static int printk_address(unsigned long address)
129 write_unlock_irq(&tasklist_lock); 128 write_unlock_irq(&tasklist_lock);
130 129
131 /* we were unable to find this address anywhere */ 130 /* we were unable to find this address anywhere */
132 return printk("[<0x%p>]", (void*)address); 131 return printk("[<0x%p>]", (void *)address);
133} 132}
134 133
135asmlinkage void trap_c(struct pt_regs *fp) 134asmlinkage void trap_c(struct pt_regs *fp)
@@ -538,29 +537,28 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
538 printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" 537 printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
539 KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" 538 KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n"
540 KERN_EMERG "\n", 539 KERN_EMERG "\n",
541 (void*)current->mm->start_code, 540 (void *)current->mm->start_code,
542 (void*)current->mm->end_code, 541 (void *)current->mm->end_code,
543 (void*)current->mm->start_data, 542 (void *)current->mm->start_data,
544 (void*)current->mm->end_data, 543 (void *)current->mm->end_data,
545 (void*)current->mm->end_data, 544 (void *)current->mm->end_data,
546 (void*)current->mm->brk, 545 (void *)current->mm->brk,
547 (void*)current->mm->start_stack); 546 (void *)current->mm->start_stack);
548 } 547 }
549 548
550 printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr); 549 printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr);
551 if (retaddr != 0 && retaddr <= (void*)physical_mem_end 550 if (retaddr != 0 && retaddr <= (void *)physical_mem_end
552#if L1_CODE_LENGTH != 0 551#if L1_CODE_LENGTH != 0
553 /* FIXME: Copy the code out of L1 Instruction SRAM through dma 552 /* FIXME: Copy the code out of L1 Instruction SRAM through dma
554 memcpy. */ 553 memcpy. */
555 && !(retaddr >= (void*)L1_CODE_START 554 && !(retaddr >= (void *)L1_CODE_START
556 && retaddr < (void*)(L1_CODE_START + L1_CODE_LENGTH)) 555 && retaddr < (void *)(L1_CODE_START + L1_CODE_LENGTH))
557#endif 556#endif
558 ) { 557 ) {
559 int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32; 558 int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32;
560 unsigned short x = 0; 559 unsigned short x = 0;
561 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0 ) + 32 ; 560 for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) {
562 i += 2) { 561 if (!(i & 0xF))
563 if ( !(i & 0xF) )
564 printk(KERN_EMERG "\n" KERN_EMERG 562 printk(KERN_EMERG "\n" KERN_EMERG
565 "0x%08x: ", i); 563 "0x%08x: ", i);
566 564
@@ -579,7 +577,7 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
579 " The rest of this error" 577 " The rest of this error"
580 " is meanless\n"); 578 " is meanless\n");
581#endif 579#endif
582 if ( i == (unsigned int)retaddr ) 580 if (i == (unsigned int)retaddr)
583 printk("[%04x]", x); 581 printk("[%04x]", x);
584 else 582 else
585 printk(" %04x ", x); 583 printk(" %04x ", x);
@@ -672,8 +670,8 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
672 break; 670 break;
673 } 671 }
674 672
675 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void*)bfin_read_DCPLB_FAULT_ADDR()); 673 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR());
676 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void*)bfin_read_ICPLB_FAULT_ADDR()); 674 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR());
677 dump_bfin_regs(fp, (void *)fp->retx); 675 dump_bfin_regs(fp, (void *)fp->retx);
678 dump_stack(); 676 dump_stack();
679 panic("Unrecoverable event\n"); 677 panic("Unrecoverable event\n");
diff --git a/arch/blackfin/lib/strcmp.c b/arch/blackfin/lib/strcmp.c
index 2ad47c4254ba..4eeefd86907f 100644
--- a/arch/blackfin/lib/strcmp.c
+++ b/arch/blackfin/lib/strcmp.c
@@ -6,6 +6,5 @@
6 6
7int strcmp(const char *dest, const char *src) 7int strcmp(const char *dest, const char *src)
8{ 8{
9 return __inline_strcmp(dest, src); 9 return __inline_strcmp(dest, src);
10} 10}
11
diff --git a/arch/blackfin/lib/strcpy.c b/arch/blackfin/lib/strcpy.c
index 4dc835a8a19b..534589db7256 100644
--- a/arch/blackfin/lib/strcpy.c
+++ b/arch/blackfin/lib/strcpy.c
@@ -6,6 +6,5 @@
6 6
7char *strcpy(char *dest, const char *src) 7char *strcpy(char *dest, const char *src)
8{ 8{
9 return __inline_strcpy(dest, src); 9 return __inline_strcpy(dest, src);
10} 10}
11
diff --git a/arch/blackfin/lib/strncmp.c b/arch/blackfin/lib/strncmp.c
index 947bcfe3f3bb..d791f120bff7 100644
--- a/arch/blackfin/lib/strncmp.c
+++ b/arch/blackfin/lib/strncmp.c
@@ -6,6 +6,5 @@
6 6
7int strncmp(const char *cs, const char *ct, size_t count) 7int strncmp(const char *cs, const char *ct, size_t count)
8{ 8{
9 return __inline_strncmp(cs, ct, count); 9 return __inline_strncmp(cs, ct, count);
10} 10}
11
diff --git a/arch/blackfin/lib/strncpy.c b/arch/blackfin/lib/strncpy.c
index 77a9b2e95097..1fecb5c71ffb 100644
--- a/arch/blackfin/lib/strncpy.c
+++ b/arch/blackfin/lib/strncpy.c
@@ -6,6 +6,5 @@
6 6
7char *strncpy(char *dest, const char *src, size_t n) 7char *strncpy(char *dest, const char *src, size_t n)
8{ 8{
9 return __inline_strncpy(dest, src, n); 9 return __inline_strncpy(dest, src, n);
10} 10}
11
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index edd31ce4f8d2..4545f363e641 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <asm/bfin5xx_spi.h> 38#include <asm/bfin5xx_spi.h>
39 39
40/* 40/*
@@ -51,11 +51,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
51 .size = 0x00020000, 51 .size = 0x00020000,
52 .offset = 0, 52 .offset = 0,
53 .mask_flags = MTD_CAP_ROM 53 .mask_flags = MTD_CAP_ROM
54 },{ 54 }, {
55 .name = "kernel", 55 .name = "kernel",
56 .size = 0xe0000, 56 .size = 0xe0000,
57 .offset = 0x20000 57 .offset = 0x20000
58 },{ 58 }, {
59 .name = "file system", 59 .name = "file system",
60 .size = 0x700000, 60 .size = 0x700000,
61 .offset = 0x00100000, 61 .offset = 0x00100000,
@@ -98,7 +98,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
98 .platform_data = &bfin_spi_flash_data, 98 .platform_data = &bfin_spi_flash_data,
99 .controller_data = &spi_flash_chip_info, 99 .controller_data = &spi_flash_chip_info,
100 .mode = SPI_MODE_3, 100 .mode = SPI_MODE_3,
101 },{ 101 }, {
102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 102 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 103 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
104 .bus_num = 1, /* Framework bus number */ 104 .bus_num = 1, /* Framework bus number */
@@ -145,7 +145,7 @@ static struct resource smc91x_resources[] = {
145 .start = 0x20200300, 145 .start = 0x20200300,
146 .end = 0x20200300 + 16, 146 .end = 0x20200300 + 16,
147 .flags = IORESOURCE_MEM, 147 .flags = IORESOURCE_MEM,
148 },{ 148 }, {
149 .start = IRQ_PF0, 149 .start = IRQ_PF0,
150 .end = IRQ_PF0, 150 .end = IRQ_PF0,
151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 151 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -194,11 +194,11 @@ static struct resource isp1362_hcd_resources[] = {
194 .start = 0x20308000, 194 .start = 0x20308000,
195 .end = 0x20308000, 195 .end = 0x20308000,
196 .flags = IORESOURCE_MEM, 196 .flags = IORESOURCE_MEM,
197 },{ 197 }, {
198 .start = 0x20308004, 198 .start = 0x20308004,
199 .end = 0x20308004, 199 .end = 0x20308004,
200 .flags = IORESOURCE_MEM, 200 .flags = IORESOURCE_MEM,
201 },{ 201 }, {
202 .start = IRQ_PF4, 202 .start = IRQ_PF4,
203 .end = IRQ_PF4, 203 .end = IRQ_PF4,
204 .flags = IORESOURCE_IRQ, 204 .flags = IORESOURCE_IRQ,
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 0b522d95160d..0000b8f1239c 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h> 39#include <asm/bfin5xx_spi.h>
40 40
41/* 41/*
@@ -61,7 +61,7 @@ static struct resource smc91x_resources[] = {
61 .start = 0x20310300, 61 .start = 0x20310300,
62 .end = 0x20310300 + 16, 62 .end = 0x20310300 + 16,
63 .flags = IORESOURCE_MEM, 63 .flags = IORESOURCE_MEM,
64 },{ 64 }, {
65 .start = IRQ_PF9, 65 .start = IRQ_PF9,
66 .end = IRQ_PF9, 66 .end = IRQ_PF9,
67 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 67 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -85,11 +85,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
85 .size = 0x00020000, 85 .size = 0x00020000,
86 .offset = 0, 86 .offset = 0,
87 .mask_flags = MTD_CAP_ROM 87 .mask_flags = MTD_CAP_ROM
88 },{ 88 }, {
89 .name = "kernel", 89 .name = "kernel",
90 .size = 0xe0000, 90 .size = 0xe0000,
91 .offset = 0x20000 91 .offset = 0x20000
92 },{ 92 }, {
93 .name = "file system", 93 .name = "file system",
94 .size = 0x700000, 94 .size = 0x700000,
95 .offset = 0x00100000, 95 .offset = 0x00100000,
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c
index c0f43ccfbfb5..9bc1f0d0ab50 100644
--- a/arch/blackfin/mach-bf533/boards/generic_board.c
+++ b/arch/blackfin/mach-bf533/boards/generic_board.c
@@ -30,7 +30,7 @@
30 30
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/irq.h> 33#include <linux/irq.h>
34 34
35/* 35/*
36 * Name the Board for the /proc/cpuinfo 36 * Name the Board for the /proc/cpuinfo
@@ -53,11 +53,11 @@ static struct resource smc91x_resources[] = {
53 .start = 0x20300300, 53 .start = 0x20300300,
54 .end = 0x20300300 + 16, 54 .end = 0x20300300 + 16,
55 .flags = IORESOURCE_MEM, 55 .flags = IORESOURCE_MEM,
56 },{ 56 }, {
57 .start = IRQ_PROG_INTB, 57 .start = IRQ_PROG_INTB,
58 .end = IRQ_PROG_INTB, 58 .end = IRQ_PROG_INTB,
59 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 59 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
60 },{ 60 }, {
61 /* 61 /*
62 * denotes the flag pin and is used directly if 62 * denotes the flag pin and is used directly if
63 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 63 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 9a472fe15833..a9143c4cbdcd 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h> 40#include <linux/irq.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
42 42
43/* 43/*
@@ -62,7 +62,7 @@ static struct resource smc91x_resources[] = {
62 .start = 0x20300300, 62 .start = 0x20300300,
63 .end = 0x20300300 + 16, 63 .end = 0x20300300 + 16,
64 .flags = IORESOURCE_MEM, 64 .flags = IORESOURCE_MEM,
65 },{ 65 }, {
66 .start = IRQ_PF7, 66 .start = IRQ_PF7,
67 .end = IRQ_PF7, 67 .end = IRQ_PF7,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -83,7 +83,7 @@ static struct resource net2272_bfin_resources[] = {
83 .start = 0x20300000, 83 .start = 0x20300000,
84 .end = 0x20300000 + 0x100, 84 .end = 0x20300000 + 0x100,
85 .flags = IORESOURCE_MEM, 85 .flags = IORESOURCE_MEM,
86 },{ 86 }, {
87 .start = IRQ_PF10, 87 .start = IRQ_PF10,
88 .end = IRQ_PF10, 88 .end = IRQ_PF10,
89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -108,11 +108,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
108 .size = 0x00020000, 108 .size = 0x00020000,
109 .offset = 0, 109 .offset = 0,
110 .mask_flags = MTD_CAP_ROM 110 .mask_flags = MTD_CAP_ROM
111 },{ 111 }, {
112 .name = "kernel", 112 .name = "kernel",
113 .size = 0xe0000, 113 .size = 0xe0000,
114 .offset = 0x20000 114 .offset = 0x20000
115 },{ 115 }, {
116 .name = "file system", 116 .name = "file system",
117 .size = 0x700000, 117 .size = 0x700000,
118 .offset = 0x00100000, 118 .offset = 0x00100000,
@@ -229,19 +229,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
229 229
230#if defined(CONFIG_PBX) 230#if defined(CONFIG_PBX)
231 { 231 {
232 .modalias = "fxs-spi", 232 .modalias = "fxs-spi",
233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 233 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
234 .bus_num = 1, 234 .bus_num = 1,
235 .chip_select = 3, 235 .chip_select = 3,
236 .controller_data= &spi_si3xxx_chip_info, 236 .controller_data = &spi_si3xxx_chip_info,
237 .mode = SPI_MODE_3, 237 .mode = SPI_MODE_3,
238 }, 238 },
239 { 239 {
240 .modalias = "fxo-spi", 240 .modalias = "fxo-spi",
241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 241 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
242 .bus_num = 1, 242 .bus_num = 1,
243 .chip_select = 2, 243 .chip_select = 2,
244 .controller_data= &spi_si3xxx_chip_info, 244 .controller_data = &spi_si3xxx_chip_info,
245 .mode = SPI_MODE_3, 245 .mode = SPI_MODE_3,
246 }, 246 },
247#endif 247#endif
diff --git a/arch/blackfin/mach-bf533/cpu.c b/arch/blackfin/mach-bf533/cpu.c
index 99547c4c290e..6fd9cfd0a31b 100644
--- a/arch/blackfin/mach-bf533/cpu.c
+++ b/arch/blackfin/mach-bf533/cpu.c
@@ -79,8 +79,7 @@ static int bf533_target(struct cpufreq_policy *policy,
79 int i; 79 int i;
80 80
81 struct cpufreq_freqs freqs; 81 struct cpufreq_freqs freqs;
82 if (cpufreq_frequency_table_target 82 if (cpufreq_frequency_table_target(policy, bf533_freq_table, target_freq, relation, &index))
83 (policy, bf533_freq_table, target_freq, relation, &index))
84 return -EINVAL; 83 return -EINVAL;
85 cclk_mhz = bf533_freq_table[index].frequency; 84 cclk_mhz = bf533_freq_table[index].frequency;
86 vco_mhz = bf533_freq_table[index].index; 85 vco_mhz = bf533_freq_table[index].index;
diff --git a/arch/blackfin/mach-bf533/ints-priority.c b/arch/blackfin/mach-bf533/ints-priority.c
index a3e1789167be..7d79e0f9503d 100644
--- a/arch/blackfin/mach-bf533/ints-priority.c
+++ b/arch/blackfin/mach-bf533/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index 6a60618a78ec..a8f947b72754 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h> 39#include <asm/bfin5xx_spi.h>
40 40
41/* 41/*
@@ -53,11 +53,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
53 .size = 0x00020000, 53 .size = 0x00020000,
54 .offset = 0, 54 .offset = 0,
55 .mask_flags = MTD_CAP_ROM 55 .mask_flags = MTD_CAP_ROM
56 },{ 56 }, {
57 .name = "kernel", 57 .name = "kernel",
58 .size = 0xe0000, 58 .size = 0xe0000,
59 .offset = 0x20000 59 .offset = 0x20000
60 },{ 60 }, {
61 .name = "file system", 61 .name = "file system",
62 .size = 0x700000, 62 .size = 0x700000,
63 .offset = 0x00100000, 63 .offset = 0x00100000,
@@ -202,7 +202,7 @@ static struct resource smc91x_resources[] = {
202 .start = 0x20200300, 202 .start = 0x20200300,
203 .end = 0x20200300 + 16, 203 .end = 0x20200300 + 16,
204 .flags = IORESOURCE_MEM, 204 .flags = IORESOURCE_MEM,
205 },{ 205 }, {
206 .start = IRQ_PF14, 206 .start = IRQ_PF14,
207 .end = IRQ_PF14, 207 .end = IRQ_PF14,
208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 208 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -223,11 +223,11 @@ static struct resource isp1362_hcd_resources[] = {
223 .start = 0x20308000, 223 .start = 0x20308000,
224 .end = 0x20308000, 224 .end = 0x20308000,
225 .flags = IORESOURCE_MEM, 225 .flags = IORESOURCE_MEM,
226 },{ 226 }, {
227 .start = 0x20308004, 227 .start = 0x20308004,
228 .end = 0x20308004, 228 .end = 0x20308004,
229 .flags = IORESOURCE_MEM, 229 .flags = IORESOURCE_MEM,
230 },{ 230 }, {
231 .start = IRQ_PG15, 231 .start = IRQ_PG15,
232 .end = IRQ_PG15, 232 .end = IRQ_PG15,
233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -262,7 +262,7 @@ static struct resource net2272_bfin_resources[] = {
262 .start = 0x20200000, 262 .start = 0x20200000,
263 .end = 0x20200000 + 0x100, 263 .end = 0x20200000 + 0x100,
264 .flags = IORESOURCE_MEM, 264 .flags = IORESOURCE_MEM,
265 },{ 265 }, {
266 .start = IRQ_PF7, 266 .start = IRQ_PF7,
267 .end = IRQ_PF7, 267 .end = IRQ_PF7,
268 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 268 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -283,7 +283,7 @@ static struct resource bfin_uart_resources[] = {
283 .start = 0xFFC00400, 283 .start = 0xFFC00400,
284 .end = 0xFFC004FF, 284 .end = 0xFFC004FF,
285 .flags = IORESOURCE_MEM, 285 .flags = IORESOURCE_MEM,
286 },{ 286 }, {
287 .start = 0xFFC02000, 287 .start = 0xFFC02000,
288 .end = 0xFFC020FF, 288 .end = 0xFFC020FF,
289 .flags = IORESOURCE_MEM, 289 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c
index e129a08d63de..a725cc8a9290 100644
--- a/arch/blackfin/mach-bf537/boards/eth_mac.c
+++ b/arch/blackfin/mach-bf537/boards/eth_mac.c
@@ -20,8 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <asm/blackfin.h> 21#include <asm/blackfin.h>
22 22
23#if defined(CONFIG_GENERIC_BOARD) \ 23#if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP)
24 || defined(CONFIG_BFIN537_STAMP)
25 24
26/* 25/*
27 * Currently the MAC address is saved in Flash by U-Boot 26 * Currently the MAC address is saved in Flash by U-Boot
@@ -43,7 +42,7 @@ void get_bf537_ether_addr(char *addr)
43 */ 42 */
44void get_bf537_ether_addr(char *addr) 43void get_bf537_ether_addr(char *addr)
45{ 44{
46 printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n",__FILE__); 45 printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__);
47} 46}
48 47
49#endif 48#endif
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index fd57e7439e0f..648d984e98d6 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -35,9 +35,9 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb_isp1362.h> 37#include <linux/usb_isp1362.h>
38#include <asm/irq.h> 38#include <linux/irq.h>
39#include <asm/bfin5xx_spi.h>
40#include <linux/usb_sl811.h> 39#include <linux/usb_sl811.h>
40#include <asm/bfin5xx_spi.h>
41 41
42/* 42/*
43 * Name the Board for the /proc/cpuinfo 43 * Name the Board for the /proc/cpuinfo
@@ -54,19 +54,19 @@ static struct resource bfin_pcmcia_cf_resources[] = {
54 .start = 0x20310000, /* IO PORT */ 54 .start = 0x20310000, /* IO PORT */
55 .end = 0x20312000, 55 .end = 0x20312000,
56 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
57 },{ 57 }, {
58 .start = 0x20311000, /* Attribute Memory */ 58 .start = 0x20311000, /* Attribute Memory */
59 .end = 0x20311FFF, 59 .end = 0x20311FFF,
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 },{ 61 }, {
62 .start = IRQ_PROG_INTA, 62 .start = IRQ_PROG_INTA,
63 .end = IRQ_PROG_INTA, 63 .end = IRQ_PROG_INTA,
64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 64 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
65 },{ 65 }, {
66 .start = IRQ_PF4, 66 .start = IRQ_PF4,
67 .end = IRQ_PF4, 67 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
69 },{ 69 }, {
70 .start = 6, /* Card Detect PF6 */ 70 .start = 6, /* Card Detect PF6 */
71 .end = 6, 71 .end = 6,
72 .flags = IORESOURCE_IRQ, 72 .flags = IORESOURCE_IRQ,
@@ -95,11 +95,11 @@ static struct resource smc91x_resources[] = {
95 .start = 0x20300300, 95 .start = 0x20300300,
96 .end = 0x20300300 + 16, 96 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 97 .flags = IORESOURCE_MEM,
98 },{ 98 }, {
99 .start = IRQ_PROG_INTB, 99 .start = IRQ_PROG_INTB,
100 .end = IRQ_PROG_INTB, 100 .end = IRQ_PROG_INTB,
101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 101 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
102 },{ 102 }, {
103 /* 103 /*
104 * denotes the flag pin and is used directly if 104 * denotes the flag pin and is used directly if
105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 105 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
@@ -123,15 +123,15 @@ static struct resource sl811_hcd_resources[] = {
123 .start = 0x20340000, 123 .start = 0x20340000,
124 .end = 0x20340000, 124 .end = 0x20340000,
125 .flags = IORESOURCE_MEM, 125 .flags = IORESOURCE_MEM,
126 },{ 126 }, {
127 .start = 0x20340004, 127 .start = 0x20340004,
128 .end = 0x20340004, 128 .end = 0x20340004,
129 .flags = IORESOURCE_MEM, 129 .flags = IORESOURCE_MEM,
130 },{ 130 }, {
131 .start = IRQ_PROG_INTA, 131 .start = IRQ_PROG_INTA,
132 .end = IRQ_PROG_INTA, 132 .end = IRQ_PROG_INTA,
133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 133 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
134 },{ 134 }, {
135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, 135 .start = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO, 136 .end = IRQ_PF0 + CONFIG_USB_SL811_BFIN_GPIO,
137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 137 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -179,15 +179,15 @@ static struct resource isp1362_hcd_resources[] = {
179 .start = 0x20360000, 179 .start = 0x20360000,
180 .end = 0x20360000, 180 .end = 0x20360000,
181 .flags = IORESOURCE_MEM, 181 .flags = IORESOURCE_MEM,
182 },{ 182 }, {
183 .start = 0x20360004, 183 .start = 0x20360004,
184 .end = 0x20360004, 184 .end = 0x20360004,
185 .flags = IORESOURCE_MEM, 185 .flags = IORESOURCE_MEM,
186 },{ 186 }, {
187 .start = IRQ_PROG_INTA, 187 .start = IRQ_PROG_INTA,
188 .end = IRQ_PROG_INTA, 188 .end = IRQ_PROG_INTA,
189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 189 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
190 },{ 190 }, {
191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, 191 .start = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO, 192 .end = IRQ_PF0 + CONFIG_USB_ISP1362_BFIN_GPIO,
193 .flags = IORESOURCE_IRQ, 193 .flags = IORESOURCE_IRQ,
@@ -228,7 +228,7 @@ static struct resource net2272_bfin_resources[] = {
228 .start = 0x20300000, 228 .start = 0x20300000,
229 .end = 0x20300000 + 0x100, 229 .end = 0x20300000 + 0x100,
230 .flags = IORESOURCE_MEM, 230 .flags = IORESOURCE_MEM,
231 },{ 231 }, {
232 .start = IRQ_PF7, 232 .start = IRQ_PF7,
233 .end = IRQ_PF7, 233 .end = IRQ_PF7,
234 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 234 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -253,11 +253,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
253 .size = 0x00020000, 253 .size = 0x00020000,
254 .offset = 0, 254 .offset = 0,
255 .mask_flags = MTD_CAP_ROM 255 .mask_flags = MTD_CAP_ROM
256 },{ 256 }, {
257 .name = "kernel", 257 .name = "kernel",
258 .size = 0xe0000, 258 .size = 0xe0000,
259 .offset = 0x20000 259 .offset = 0x20000
260 },{ 260 }, {
261 .name = "file system", 261 .name = "file system",
262 .size = 0x700000, 262 .size = 0x700000,
263 .offset = 0x00100000, 263 .offset = 0x00100000,
@@ -375,7 +375,7 @@ static struct resource bfin_uart_resources[] = {
375 .start = 0xFFC00400, 375 .start = 0xFFC00400,
376 .end = 0xFFC004FF, 376 .end = 0xFFC004FF,
377 .flags = IORESOURCE_MEM, 377 .flags = IORESOURCE_MEM,
378 },{ 378 }, {
379 .start = 0xFFC02000, 379 .start = 0xFFC02000,
380 .end = 0xFFC020FF, 380 .end = 0xFFC020FF,
381 .flags = IORESOURCE_MEM, 381 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 8aaf76dfce80..8806f1230f2d 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h> 40#include <linux/irq.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
42#include <linux/usb_sl811.h> 42#include <linux/usb_sl811.h>
43 43
@@ -58,15 +58,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
58 .start = 0x20310000, /* IO PORT */ 58 .start = 0x20310000, /* IO PORT */
59 .end = 0x20312000, 59 .end = 0x20312000,
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 },{ 61 }, {
62 .start = 0x20311000, /* Attribute Memory */ 62 .start = 0x20311000, /* Attribute Memory */
63 .end = 0x20311FFF, 63 .end = 0x20311FFF,
64 .flags = IORESOURCE_MEM, 64 .flags = IORESOURCE_MEM,
65 },{ 65 }, {
66 .start = IRQ_PF4, 66 .start = IRQ_PF4,
67 .end = IRQ_PF4, 67 .end = IRQ_PF4,
68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 68 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
69 },{ 69 }, {
70 .start = 6, /* Card Detect PF6 */ 70 .start = 6, /* Card Detect PF6 */
71 .end = 6, 71 .end = 6,
72 .flags = IORESOURCE_IRQ, 72 .flags = IORESOURCE_IRQ,
@@ -95,7 +95,7 @@ static struct resource smc91x_resources[] = {
95 .start = 0x20300300, 95 .start = 0x20300300,
96 .end = 0x20300300 + 16, 96 .end = 0x20300300 + 16,
97 .flags = IORESOURCE_MEM, 97 .flags = IORESOURCE_MEM,
98 },{ 98 }, {
99 99
100 .start = IRQ_PF7, 100 .start = IRQ_PF7,
101 .end = IRQ_PF7, 101 .end = IRQ_PF7,
@@ -116,11 +116,11 @@ static struct resource sl811_hcd_resources[] = {
116 .start = 0x20340000, 116 .start = 0x20340000,
117 .end = 0x20340000, 117 .end = 0x20340000,
118 .flags = IORESOURCE_MEM, 118 .flags = IORESOURCE_MEM,
119 },{ 119 }, {
120 .start = 0x20340004, 120 .start = 0x20340004,
121 .end = 0x20340004, 121 .end = 0x20340004,
122 .flags = IORESOURCE_MEM, 122 .flags = IORESOURCE_MEM,
123 },{ 123 }, {
124 .start = CONFIG_USB_SL811_BFIN_IRQ, 124 .start = CONFIG_USB_SL811_BFIN_IRQ,
125 .end = CONFIG_USB_SL811_BFIN_IRQ, 125 .end = CONFIG_USB_SL811_BFIN_IRQ,
126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -167,11 +167,11 @@ static struct resource isp1362_hcd_resources[] = {
167 .start = 0x20360000, 167 .start = 0x20360000,
168 .end = 0x20360000, 168 .end = 0x20360000,
169 .flags = IORESOURCE_MEM, 169 .flags = IORESOURCE_MEM,
170 },{ 170 }, {
171 .start = 0x20360004, 171 .start = 0x20360004,
172 .end = 0x20360004, 172 .end = 0x20360004,
173 .flags = IORESOURCE_MEM, 173 .flags = IORESOURCE_MEM,
174 },{ 174 }, {
175 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 175 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
176 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 176 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 177 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -212,7 +212,7 @@ static struct resource net2272_bfin_resources[] = {
212 .start = 0x20300000, 212 .start = 0x20300000,
213 .end = 0x20300000 + 0x100, 213 .end = 0x20300000 + 0x100,
214 .flags = IORESOURCE_MEM, 214 .flags = IORESOURCE_MEM,
215 },{ 215 }, {
216 .start = IRQ_PF7, 216 .start = IRQ_PF7,
217 .end = IRQ_PF7, 217 .end = IRQ_PF7,
218 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 218 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -238,11 +238,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
238 .size = 0x00020000, 238 .size = 0x00020000,
239 .offset = 0, 239 .offset = 0,
240 .mask_flags = MTD_CAP_ROM 240 .mask_flags = MTD_CAP_ROM
241 },{ 241 }, {
242 .name = "kernel", 242 .name = "kernel",
243 .size = 0xe0000, 243 .size = 0xe0000,
244 .offset = 0x20000 244 .offset = 0x20000
245 },{ 245 }, {
246 .name = "file system", 246 .name = "file system",
247 .size = 0x700000, 247 .size = 0x700000,
248 .offset = 0x00100000, 248 .offset = 0x00100000,
@@ -294,16 +294,6 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
294}; 294};
295#endif 295#endif
296 296
297#if defined(CONFIG_PBX)
298static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
299 .ctl_reg = 0x4, /* send zero */
300 .enable_dma = 0,
301 .bits_per_word = 8,
302 .cs_change_per_word = 1,
303};
304#endif
305
306
307#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 297#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
308static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 298static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
309 .cs_change_per_word = 1, 299 .cs_change_per_word = 1,
@@ -392,24 +382,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
392 .mode = SPI_MODE_3, 382 .mode = SPI_MODE_3,
393 }, 383 },
394#endif 384#endif
395#if defined(CONFIG_PBX)
396 {
397 .modalias = "fxs-spi",
398 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
399 .bus_num = 1,
400 .chip_select = 3,
401 .controller_data= &spi_si3xxx_chip_info,
402 .mode = SPI_MODE_3,
403 },
404 {
405 .modalias = "fxo-spi",
406 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
407 .bus_num = 1,
408 .chip_select = 2,
409 .controller_data= &spi_si3xxx_chip_info,
410 .mode = SPI_MODE_3,
411 },
412#endif
413#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 385#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
414{ 386{
415 .modalias = "ad7877", 387 .modalias = "ad7877",
@@ -451,7 +423,7 @@ static struct resource bfin_uart_resources[] = {
451 .start = 0xFFC00400, 423 .start = 0xFFC00400,
452 .end = 0xFFC004FF, 424 .end = 0xFFC004FF,
453 .flags = IORESOURCE_MEM, 425 .flags = IORESOURCE_MEM,
454 },{ 426 }, {
455 .start = 0xFFC02000, 427 .start = 0xFFC02000,
456 .end = 0xFFC020FF, 428 .end = 0xFFC020FF,
457 .flags = IORESOURCE_MEM, 429 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 3a29b4d15f25..c6373530898f 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -37,12 +37,10 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb_isp1362.h> 38#include <linux/usb_isp1362.h>
39#endif 39#endif
40#include <asm/irq.h>
41#include <linux/irq.h> 40#include <linux/irq.h>
42#include <linux/interrupt.h> 41#include <linux/interrupt.h>
43#include <asm/bfin5xx_spi.h>
44#include <linux/usb_sl811.h> 42#include <linux/usb_sl811.h>
45 43#include <asm/bfin5xx_spi.h>
46#include <linux/spi/ad7877.h> 44#include <linux/spi/ad7877.h>
47 45
48/* 46/*
@@ -85,7 +83,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
85 83
86int __init bfin_isp1761_init(void) 84int __init bfin_isp1761_init(void)
87{ 85{
88 unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); 86 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
89 87
90 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 88 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
91 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); 89 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
@@ -107,15 +105,15 @@ static struct resource bfin_pcmcia_cf_resources[] = {
107 .start = 0x20310000, /* IO PORT */ 105 .start = 0x20310000, /* IO PORT */
108 .end = 0x20312000, 106 .end = 0x20312000,
109 .flags = IORESOURCE_MEM, 107 .flags = IORESOURCE_MEM,
110 },{ 108 }, {
111 .start = 0x20311000, /* Attribute Memory */ 109 .start = 0x20311000, /* Attribute Memory */
112 .end = 0x20311FFF, 110 .end = 0x20311FFF,
113 .flags = IORESOURCE_MEM, 111 .flags = IORESOURCE_MEM,
114 },{ 112 }, {
115 .start = IRQ_PF4, 113 .start = IRQ_PF4,
116 .end = IRQ_PF4, 114 .end = IRQ_PF4,
117 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, 115 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
118 },{ 116 }, {
119 .start = 6, /* Card Detect PF6 */ 117 .start = 6, /* Card Detect PF6 */
120 .end = 6, 118 .end = 6,
121 .flags = IORESOURCE_IRQ, 119 .flags = IORESOURCE_IRQ,
@@ -144,7 +142,7 @@ static struct resource smc91x_resources[] = {
144 .start = 0x20300300, 142 .start = 0x20300300,
145 .end = 0x20300300 + 16, 143 .end = 0x20300300 + 16,
146 .flags = IORESOURCE_MEM, 144 .flags = IORESOURCE_MEM,
147 },{ 145 }, {
148 146
149 .start = IRQ_PF7, 147 .start = IRQ_PF7,
150 .end = IRQ_PF7, 148 .end = IRQ_PF7,
@@ -165,11 +163,11 @@ static struct resource sl811_hcd_resources[] = {
165 .start = 0x20340000, 163 .start = 0x20340000,
166 .end = 0x20340000, 164 .end = 0x20340000,
167 .flags = IORESOURCE_MEM, 165 .flags = IORESOURCE_MEM,
168 },{ 166 }, {
169 .start = 0x20340004, 167 .start = 0x20340004,
170 .end = 0x20340004, 168 .end = 0x20340004,
171 .flags = IORESOURCE_MEM, 169 .flags = IORESOURCE_MEM,
172 },{ 170 }, {
173 .start = CONFIG_USB_SL811_BFIN_IRQ, 171 .start = CONFIG_USB_SL811_BFIN_IRQ,
174 .end = CONFIG_USB_SL811_BFIN_IRQ, 172 .end = CONFIG_USB_SL811_BFIN_IRQ,
175 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 173 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -216,11 +214,11 @@ static struct resource isp1362_hcd_resources[] = {
216 .start = 0x20360000, 214 .start = 0x20360000,
217 .end = 0x20360000, 215 .end = 0x20360000,
218 .flags = IORESOURCE_MEM, 216 .flags = IORESOURCE_MEM,
219 },{ 217 }, {
220 .start = 0x20360004, 218 .start = 0x20360004,
221 .end = 0x20360004, 219 .end = 0x20360004,
222 .flags = IORESOURCE_MEM, 220 .flags = IORESOURCE_MEM,
223 },{ 221 }, {
224 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 222 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
225 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 223 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
226 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 224 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -261,7 +259,7 @@ static struct resource net2272_bfin_resources[] = {
261 .start = 0x20300000, 259 .start = 0x20300000,
262 .end = 0x20300000 + 0x100, 260 .end = 0x20300000 + 0x100,
263 .flags = IORESOURCE_MEM, 261 .flags = IORESOURCE_MEM,
264 },{ 262 }, {
265 .start = IRQ_PF7, 263 .start = IRQ_PF7,
266 .end = IRQ_PF7, 264 .end = IRQ_PF7,
267 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 265 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -287,11 +285,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
287 .size = 0x00020000, 285 .size = 0x00020000,
288 .offset = 0, 286 .offset = 0,
289 .mask_flags = MTD_CAP_ROM 287 .mask_flags = MTD_CAP_ROM
290 },{ 288 }, {
291 .name = "kernel", 289 .name = "kernel",
292 .size = 0xe0000, 290 .size = 0xe0000,
293 .offset = 0x20000 291 .offset = 0x20000
294 },{ 292 }, {
295 .name = "file system", 293 .name = "file system",
296 .size = 0x700000, 294 .size = 0x700000,
297 .offset = 0x00100000, 295 .offset = 0x00100000,
@@ -361,7 +359,6 @@ static struct bfin5xx_spi_chip ad5304_chip_info = {
361 359
362#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 360#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
363static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 361static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
364// .cs_change_per_word = 1,
365 .enable_dma = 0, 362 .enable_dma = 0,
366 .bits_per_word = 16, 363 .bits_per_word = 16,
367}; 364};
@@ -449,19 +446,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
449#endif 446#endif
450#if defined(CONFIG_PBX) 447#if defined(CONFIG_PBX)
451 { 448 {
452 .modalias = "fxs-spi", 449 .modalias = "fxs-spi",
453 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 450 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
454 .bus_num = 1, 451 .bus_num = 1,
455 .chip_select = 3, 452 .chip_select = 3,
456 .controller_data= &spi_si3xxx_chip_info, 453 .controller_data = &spi_si3xxx_chip_info,
457 .mode = SPI_MODE_3, 454 .mode = SPI_MODE_3,
458 }, 455 },
459 { 456 {
460 .modalias = "fxo-spi", 457 .modalias = "fxo-spi",
461 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 458 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
462 .bus_num = 1, 459 .bus_num = 1,
463 .chip_select = 2, 460 .chip_select = 2,
464 .controller_data= &spi_si3xxx_chip_info, 461 .controller_data = &spi_si3xxx_chip_info,
465 .mode = SPI_MODE_3, 462 .mode = SPI_MODE_3,
466 }, 463 },
467#endif 464#endif
@@ -516,7 +513,7 @@ static struct resource bfin_uart_resources[] = {
516 .start = 0xFFC00400, 513 .start = 0xFFC00400,
517 .end = 0xFFC004FF, 514 .end = 0xFFC004FF,
518 .flags = IORESOURCE_MEM, 515 .flags = IORESOURCE_MEM,
519 },{ 516 }, {
520 .start = 0xFFC02000, 517 .start = 0xFFC02000,
521 .end = 0xFFC020FF, 518 .end = 0xFFC020FF,
522 .flags = IORESOURCE_MEM, 519 .flags = IORESOURCE_MEM,
diff --git a/arch/blackfin/mach-bf537/ints-priority.c b/arch/blackfin/mach-bf537/ints-priority.c
index 2dbf3df465d1..a8b915f202ec 100644
--- a/arch/blackfin/mach-bf537/ints-priority.c
+++ b/arch/blackfin/mach-bf537/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 100379c4b926..96ad95fab1a8 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -34,7 +34,7 @@
34#include <linux/mtd/partitions.h> 34#include <linux/mtd/partitions.h>
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <linux/irq.h> 38#include <linux/irq.h>
39#include <linux/interrupt.h> 39#include <linux/interrupt.h>
40#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
diff --git a/arch/blackfin/mach-bf548/gpio.c b/arch/blackfin/mach-bf548/gpio.c
index 854896d6ceda..fac7cf3d6791 100644
--- a/arch/blackfin/mach-bf548/gpio.c
+++ b/arch/blackfin/mach-bf548/gpio.c
@@ -75,7 +75,7 @@ static int __init bfin_gpio_init(void)
75 75
76 printk(KERN_INFO "Blackfin GPIO Controller\n"); 76 printk(KERN_INFO "Blackfin GPIO Controller\n");
77 77
78 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=GPIO_BANKSIZE) 78 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE)
79 reserved_map[gpio_bank(i)] = 0; 79 reserved_map[gpio_bank(i)] = 0;
80 80
81 return 0; 81 return 0;
diff --git a/arch/blackfin/mach-bf548/ints-priority.c b/arch/blackfin/mach-bf548/ints-priority.c
index dde450f119e1..cb0ebac53c79 100644
--- a/arch/blackfin/mach-bf548/ints-priority.c
+++ b/arch/blackfin/mach-bf548/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 3dc5c042048c..5b2b544529a1 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb_isp1362.h> 36#include <linux/usb_isp1362.h>
37#include <asm/irq.h> 37#include <linux/irq.h>
38#include <asm/bfin5xx_spi.h> 38#include <asm/bfin5xx_spi.h>
39 39
40/* 40/*
@@ -52,11 +52,11 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
52 .size = 0x00020000, 52 .size = 0x00020000,
53 .offset = 0, 53 .offset = 0,
54 .mask_flags = MTD_CAP_ROM 54 .mask_flags = MTD_CAP_ROM
55 },{ 55 }, {
56 .name = "kernel", 56 .name = "kernel",
57 .size = 0xe0000, 57 .size = 0xe0000,
58 .offset = 0x20000 58 .offset = 0x20000
59 },{ 59 }, {
60 .name = "file system", 60 .name = "file system",
61 .size = 0x700000, 61 .size = 0x700000,
62 .offset = 0x00100000, 62 .offset = 0x00100000,
@@ -186,7 +186,7 @@ static struct resource smc91x_resources[] = {
186 .start = 0x28000300, 186 .start = 0x28000300,
187 .end = 0x28000300 + 16, 187 .end = 0x28000300 + 16,
188 .flags = IORESOURCE_MEM, 188 .flags = IORESOURCE_MEM,
189 },{ 189 }, {
190 .start = IRQ_PF0, 190 .start = IRQ_PF0,
191 .end = IRQ_PF0, 191 .end = IRQ_PF0,
192 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 192 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -206,11 +206,11 @@ static struct resource isp1362_hcd_resources[] = {
206 .start = 0x24008000, 206 .start = 0x24008000,
207 .end = 0x24008000, 207 .end = 0x24008000,
208 .flags = IORESOURCE_MEM, 208 .flags = IORESOURCE_MEM,
209 },{ 209 }, {
210 .start = 0x24008004, 210 .start = 0x24008004,
211 .end = 0x24008004, 211 .end = 0x24008004,
212 .flags = IORESOURCE_MEM, 212 .flags = IORESOURCE_MEM,
213 },{ 213 }, {
214 .start = IRQ_PF47, 214 .start = IRQ_PF47,
215 .end = IRQ_PF47, 215 .end = IRQ_PF47,
216 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 216 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
@@ -241,25 +241,25 @@ static struct platform_device isp1362_hcd_device = {
241 241
242#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 242#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
243static struct resource bfin_uart_resources[] = { 243static struct resource bfin_uart_resources[] = {
244 { 244 {
245 .start = 0xFFC00400, 245 .start = 0xFFC00400,
246 .end = 0xFFC004FF, 246 .end = 0xFFC004FF,
247 .flags = IORESOURCE_MEM, 247 .flags = IORESOURCE_MEM,
248 }, 248 },
249}; 249};
250 250
251static struct platform_device bfin_uart_device = { 251static struct platform_device bfin_uart_device = {
252 .name = "bfin-uart", 252 .name = "bfin-uart",
253 .id = 1, 253 .id = 1,
254 .num_resources = ARRAY_SIZE(bfin_uart_resources), 254 .num_resources = ARRAY_SIZE(bfin_uart_resources),
255 .resource = bfin_uart_resources, 255 .resource = bfin_uart_resources,
256}; 256};
257#endif 257#endif
258 258
259static struct platform_device *cm_bf561_devices[] __initdata = { 259static struct platform_device *cm_bf561_devices[] __initdata = {
260 260
261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 261#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
262 &bfin_uart_device, 262 &bfin_uart_device,
263#endif 263#endif
264 264
265#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 265#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 9720b5c307ab..724191da20a2 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -30,10 +30,9 @@
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/spi/spi.h> 32#include <linux/spi/spi.h>
33#include <asm/irq.h>
34#include <asm/bfin5xx_spi.h>
35#include <linux/interrupt.h>
36#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/interrupt.h>
35#include <asm/bfin5xx_spi.h>
37 36
38/* 37/*
39 * Name the Board for the /proc/cpuinfo 38 * Name the Board for the /proc/cpuinfo
@@ -45,13 +44,13 @@ char *bfin_board_name = "ADDS-BF561-EZKIT";
45 44
46#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 45#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
47static struct resource bfin_isp1761_resources[] = { 46static struct resource bfin_isp1761_resources[] = {
48 [0] = { 47 {
49 .name = "isp1761-regs", 48 .name = "isp1761-regs",
50 .start = ISP1761_BASE + 0x00000000, 49 .start = ISP1761_BASE + 0x00000000,
51 .end = ISP1761_BASE + 0x000fffff, 50 .end = ISP1761_BASE + 0x000fffff,
52 .flags = IORESOURCE_MEM, 51 .flags = IORESOURCE_MEM,
53 }, 52 },
54 [1] = { 53 {
55 .start = ISP1761_IRQ, 54 .start = ISP1761_IRQ,
56 .end = ISP1761_IRQ, 55 .end = ISP1761_IRQ,
57 .flags = IORESOURCE_IRQ, 56 .flags = IORESOURCE_IRQ,
@@ -71,7 +70,7 @@ static struct platform_device *bfin_isp1761_devices[] = {
71 70
72int __init bfin_isp1761_init(void) 71int __init bfin_isp1761_init(void)
73{ 72{
74 unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); 73 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
75 74
76 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 75 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
77 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); 76 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
@@ -98,7 +97,7 @@ static struct resource smc91x_resources[] = {
98 .start = 0x2C010300, 97 .start = 0x2C010300,
99 .end = 0x2C010300 + 16, 98 .end = 0x2C010300 + 16,
100 .flags = IORESOURCE_MEM, 99 .flags = IORESOURCE_MEM,
101 },{ 100 }, {
102 101
103 .start = IRQ_PF9, 102 .start = IRQ_PF9,
104 .end = IRQ_PF9, 103 .end = IRQ_PF9,
@@ -116,18 +115,18 @@ static struct platform_device smc91x_device = {
116 115
117#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 116#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
118static struct resource bfin_uart_resources[] = { 117static struct resource bfin_uart_resources[] = {
119 { 118 {
120 .start = 0xFFC00400, 119 .start = 0xFFC00400,
121 .end = 0xFFC004FF, 120 .end = 0xFFC004FF,
122 .flags = IORESOURCE_MEM, 121 .flags = IORESOURCE_MEM,
123 }, 122 },
124}; 123};
125 124
126static struct platform_device bfin_uart_device = { 125static struct platform_device bfin_uart_device = {
127 .name = "bfin-uart", 126 .name = "bfin-uart",
128 .id = 1, 127 .id = 1,
129 .num_resources = ARRAY_SIZE(bfin_uart_resources), 128 .num_resources = ARRAY_SIZE(bfin_uart_resources),
130 .resource = bfin_uart_resources, 129 .resource = bfin_uart_resources,
131}; 130};
132#endif 131#endif
133 132
@@ -176,7 +175,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
176 &spi_bfin_master_device, 175 &spi_bfin_master_device,
177#endif 176#endif
178#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 177#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
179 &bfin_uart_device, 178 &bfin_uart_device,
180#endif 179#endif
181}; 180};
182 181
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c
index 585ecdd2f6a5..4dfea5da674c 100644
--- a/arch/blackfin/mach-bf561/boards/generic_board.c
+++ b/arch/blackfin/mach-bf561/boards/generic_board.c
@@ -30,7 +30,7 @@
30 30
31#include <linux/device.h> 31#include <linux/device.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/irq.h> 33#include <linux/irq.h>
34 34
35char *bfin_board_name = "UNKNOWN BOARD"; 35char *bfin_board_name = "UNKNOWN BOARD";
36 36
@@ -43,11 +43,11 @@ static struct resource smc91x_resources[] = {
43 .start = 0x2C010300, 43 .start = 0x2C010300,
44 .end = 0x2C010300 + 16, 44 .end = 0x2C010300 + 16,
45 .flags = IORESOURCE_MEM, 45 .flags = IORESOURCE_MEM,
46 },{ 46 }, {
47 .start = IRQ_PROG_INTB, 47 .start = IRQ_PROG_INTB,
48 .end = IRQ_PROG_INTB, 48 .end = IRQ_PROG_INTB,
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
50 },{ 50 }, {
51 /* 51 /*
52 * denotes the flag pin and is used directly if 52 * denotes the flag pin and is used directly if
53 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 53 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index db308c7ccabb..c442eb23db5e 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -14,7 +14,7 @@
14 14
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <asm/irq.h> 17#include <linux/irq.h>
18 18
19char *bfin_board_name = "Tepla-BF561"; 19char *bfin_board_name = "Tepla-BF561";
20 20
@@ -26,11 +26,11 @@ static struct resource smc91x_resources[] = {
26 .start = 0x2C000300, 26 .start = 0x2C000300,
27 .end = 0x2C000320, 27 .end = 0x2C000320,
28 .flags = IORESOURCE_MEM, 28 .flags = IORESOURCE_MEM,
29 },{ 29 }, {
30 .start = IRQ_PROG_INTB, 30 .start = IRQ_PROG_INTB,
31 .end = IRQ_PROG_INTB, 31 .end = IRQ_PROG_INTB,
32 .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, 32 .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
33 },{ 33 }, {
34 /* 34 /*
35 * denotes the flag pin and is used directly if 35 * denotes the flag pin and is used directly if
36 * CONFIG_IRQCHIP_DEMUX_GPIO is defined. 36 * CONFIG_IRQCHIP_DEMUX_GPIO is defined.
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index b28582fe083c..5d1d21b4c2a7 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -32,8 +32,8 @@
32#include <linux/device.h> 32#include <linux/device.h>
33#include <linux/ioport.h> 33#include <linux/ioport.h>
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/uaccess.h>
35#include <asm/dma.h> 36#include <asm/dma.h>
36#include <asm/uaccess.h>
37 37
38#define MODULE_VER "v0.1" 38#define MODULE_VER "v0.1"
39 39
@@ -202,7 +202,7 @@ static int coreb_open(struct inode *inode, struct file *file)
202 spin_unlock_irq(&coreb_lock); 202 spin_unlock_irq(&coreb_lock);
203 return 0; 203 return 0;
204 204
205 out_busy: 205 out_busy:
206 spin_unlock_irq(&coreb_lock); 206 spin_unlock_irq(&coreb_lock);
207 return -EBUSY; 207 return -EBUSY;
208} 208}
@@ -365,19 +365,19 @@ int __init bf561_coreb_init(void)
365 printk(KERN_INFO "BF561 Core B driver %s initialized.\n", MODULE_VER); 365 printk(KERN_INFO "BF561 Core B driver %s initialized.\n", MODULE_VER);
366 return 0; 366 return 0;
367 367
368 release_dma_src: 368 release_dma_src:
369 free_dma(CH_MEM_STREAM2_SRC); 369 free_dma(CH_MEM_STREAM2_SRC);
370 release_dma_dest: 370 release_dma_dest:
371 free_dma(CH_MEM_STREAM2_DEST); 371 free_dma(CH_MEM_STREAM2_DEST);
372 release_data_a_sram: 372 release_data_a_sram:
373 release_mem_region(0xff400000, 0x8000); 373 release_mem_region(0xff400000, 0x8000);
374 release_data_b_sram: 374 release_data_b_sram:
375 release_mem_region(0xff500000, 0x8000); 375 release_mem_region(0xff500000, 0x8000);
376 release_instruction_b_sram: 376 release_instruction_b_sram:
377 release_mem_region(0xff610000, 0x4000); 377 release_mem_region(0xff610000, 0x4000);
378 release_instruction_a_sram: 378 release_instruction_a_sram:
379 release_mem_region(0xff600000, 0x4000); 379 release_mem_region(0xff600000, 0x4000);
380 exit: 380 exit:
381 return -ENOMEM; 381 return -ENOMEM;
382} 382}
383 383
diff --git a/arch/blackfin/mach-bf561/ints-priority.c b/arch/blackfin/mach-bf561/ints-priority.c
index 86e3b0ee93f4..09b541b0f7c2 100644
--- a/arch/blackfin/mach-bf561/ints-priority.c
+++ b/arch/blackfin/mach-bf561/ints-priority.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/irq.h>
31#include <asm/blackfin.h> 32#include <asm/blackfin.h>
32#include <asm/irq.h>
33 33
34void program_IAR(void) 34void program_IAR(void)
35{ 35{
diff --git a/arch/blackfin/mach-common/cplbinfo.c b/arch/blackfin/mach-common/cplbinfo.c
index caa9623e6bd6..785ca9816971 100644
--- a/arch/blackfin/mach-common/cplbinfo.c
+++ b/arch/blackfin/mach-common/cplbinfo.c
@@ -31,11 +31,10 @@
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
34#include <linux/uaccess.h>
34 35
35#include <asm/current.h> 36#include <asm/current.h>
36#include <asm/uaccess.h>
37#include <asm/system.h> 37#include <asm/system.h>
38
39#include <asm/cplb.h> 38#include <asm/cplb.h>
40#include <asm/blackfin.h> 39#include <asm/blackfin.h>
41 40
@@ -92,8 +91,7 @@ static char *cplb_print_entry(char *buf, int type)
92 } else 91 } else
93 buf += sprintf(buf, "Data CPLB entry:\n"); 92 buf += sprintf(buf, "Data CPLB entry:\n");
94 93
95 buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\ 94 buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\n\tiCount\toCount\n");
96\tiCount\toCount\n");
97 95
98 while (*p_addr != 0xffffffff) { 96 while (*p_addr != 0xffffffff) {
99 entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data); 97 entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data);
@@ -144,8 +142,7 @@ static int cplbinfo_proc_output(char *buf)
144 142
145 p = buf; 143 p = buf;
146 144
147 p += sprintf(p, 145 p += sprintf(p, "------------------ CPLB Information ------------------\n\n");
148 "------------------ CPLB Information ------------------\n\n");
149 146
150 if (bfin_read_IMEM_CONTROL() & ENICPLB) 147 if (bfin_read_IMEM_CONTROL() & ENICPLB)
151 p = cplb_print_entry(p, CPLB_I); 148 p = cplb_print_entry(p, CPLB_I);
@@ -191,9 +188,9 @@ static int __init cplbinfo_init(void)
191{ 188{
192 struct proc_dir_entry *entry; 189 struct proc_dir_entry *entry;
193 190
194 if ((entry = create_proc_entry("cplbinfo", 0, NULL)) == NULL) { 191 entry = create_proc_entry("cplbinfo", 0, NULL);
192 if (!entry)
195 return -ENOMEM; 193 return -ENOMEM;
196 }
197 194
198 entry->read_proc = cplbinfo_read_proc; 195 entry->read_proc = cplbinfo_read_proc;
199 entry->write_proc = cplbinfo_write_proc; 196 entry->write_proc = cplbinfo_write_proc;
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 15603275f749..fa4e6336317d 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -49,8 +49,8 @@
49 49
50 50
51#include <linux/linkage.h> 51#include <linux/linkage.h>
52#include <linux/unistd.h>
52#include <asm/blackfin.h> 53#include <asm/blackfin.h>
53#include <asm/unistd.h>
54#include <asm/errno.h> 54#include <asm/errno.h>
55#include <asm/thread_info.h> /* TIF_NEED_RESCHED */ 55#include <asm/thread_info.h> /* TIF_NEED_RESCHED */
56#include <asm/asm-offsets.h> 56#include <asm/asm-offsets.h>
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c
index e6511db24032..ceb61d95d443 100644
--- a/arch/blackfin/mach-common/ints-priority-dc.c
+++ b/arch/blackfin/mach-common/ints-priority-dc.c
@@ -183,7 +183,7 @@ static void bf561_gpio_ack_irq(unsigned int irq)
183{ 183{
184 u16 gpionr = irq - IRQ_PF0; 184 u16 gpionr = irq - IRQ_PF0;
185 185
186 if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) { 186 if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
187 set_gpio_data(gpionr, 0); 187 set_gpio_data(gpionr, 0);
188 SSYNC(); 188 SSYNC();
189 } 189 }
@@ -193,7 +193,7 @@ static void bf561_gpio_mask_ack_irq(unsigned int irq)
193{ 193{
194 u16 gpionr = irq - IRQ_PF0; 194 u16 gpionr = irq - IRQ_PF0;
195 195
196 if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) { 196 if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
197 set_gpio_data(gpionr, 0); 197 set_gpio_data(gpionr, 0);
198 SSYNC(); 198 SSYNC();
199 } 199 }
@@ -222,7 +222,7 @@ static unsigned int bf561_gpio_irq_startup(unsigned int irq)
222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 222 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
223 223
224 ret = gpio_request(gpionr, NULL); 224 ret = gpio_request(gpionr, NULL);
225 if(ret) 225 if (ret)
226 return ret; 226 return ret;
227 227
228 } 228 }
@@ -262,7 +262,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) { 262 if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
263 263
264 ret = gpio_request(gpionr, NULL); 264 ret = gpio_request(gpionr, NULL);
265 if(ret) 265 if (ret)
266 return ret; 266 return ret;
267 267
268 } 268 }
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c
index 27838da55d6c..9f962f9df087 100644
--- a/arch/blackfin/mach-common/ints-priority-sc.c
+++ b/arch/blackfin/mach-common/ints-priority-sc.c
@@ -146,8 +146,8 @@ static void bfin_internal_mask_irq(unsigned int irq)
146 ~(1 << (irq - (IRQ_CORETMR + 1)))); 146 ~(1 << (irq - (IRQ_CORETMR + 1))));
147#else 147#else
148 unsigned mask_bank, mask_bit; 148 unsigned mask_bank, mask_bit;
149 mask_bank = (irq - (IRQ_CORETMR +1))/32; 149 mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
150 mask_bit = (irq - (IRQ_CORETMR + 1))%32; 150 mask_bit = (irq - (IRQ_CORETMR + 1)) % 32;
151 bfin_write_SIC_IMASK( mask_bank, bfin_read_SIC_IMASK(mask_bank) & \ 151 bfin_write_SIC_IMASK( mask_bank, bfin_read_SIC_IMASK(mask_bank) & \
152 ~(1 << mask_bit)); 152 ~(1 << mask_bit));
153#endif 153#endif
@@ -161,7 +161,7 @@ static void bfin_internal_unmask_irq(unsigned int irq)
161 (1 << (irq - (IRQ_CORETMR + 1)))); 161 (1 << (irq - (IRQ_CORETMR + 1))));
162#else 162#else
163 unsigned mask_bank, mask_bit; 163 unsigned mask_bank, mask_bit;
164 mask_bank = (irq - (IRQ_CORETMR +1))/32; 164 mask_bank = (irq - (IRQ_CORETMR + 1)) / 32;
165 mask_bit = (irq - (IRQ_CORETMR + 1))%32; 165 mask_bit = (irq - (IRQ_CORETMR + 1))%32;
166 bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) | \ 166 bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) | \
167 ( 1 << mask_bit)); 167 ( 1 << mask_bit));
@@ -439,7 +439,7 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq,
439{ 439{
440 u16 i; 440 u16 i;
441 441
442 for (i = 0; i < MAX_BLACKFIN_GPIOS; i+=16) { 442 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += 16) {
443 int irq = IRQ_PF0 + i; 443 int irq = IRQ_PF0 + i;
444 int flag_d = get_gpiop_data(i); 444 int flag_d = get_gpiop_data(i);
445 int mask = 445 int mask =
@@ -590,7 +590,7 @@ void do_irq(int vec, struct pt_regs *fp)
590 sic_status[1] = bfin_read_SIC_ISR(1) & bfin_read_SIC_IMASK(1); 590 sic_status[1] = bfin_read_SIC_ISR(1) & bfin_read_SIC_IMASK(1);
591 sic_status[2] = bfin_read_SIC_ISR(2) & bfin_read_SIC_IMASK(2); 591 sic_status[2] = bfin_read_SIC_ISR(2) & bfin_read_SIC_IMASK(2);
592 SSYNC(); 592 SSYNC();
593 for(;; ivg++) { 593 for (;; ivg++) {
594 if (ivg >= ivg_stop) { 594 if (ivg >= ivg_stop) {
595 atomic_inc(&num_spurious); 595 atomic_inc(&num_spurious);
596 return; 596 return;
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 150ef5d088dc..1772d8d2c1a7 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -35,10 +35,10 @@
35#include <linux/pm.h> 35#include <linux/pm.h>
36#include <linux/sched.h> 36#include <linux/sched.h>
37#include <linux/proc_fs.h> 37#include <linux/proc_fs.h>
38#include <linux/io.h>
39#include <linux/irq.h>
38 40
39#include <asm/io.h>
40#include <asm/dpmc.h> 41#include <asm/dpmc.h>
41#include <asm/irq.h>
42#include <asm/gpio.h> 42#include <asm/gpio.h>
43 43
44#ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H 44#ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c
index 68107924639e..16c6169ed01b 100644
--- a/arch/blackfin/mm/blackfin_sram.c
+++ b/arch/blackfin/mm/blackfin_sram.c
@@ -87,7 +87,7 @@ void __init l1sram_init(void)
87 L1_SCRATCH_LENGTH >> 10); 87 L1_SCRATCH_LENGTH >> 10);
88 88
89 memset(&l1_ssram, 0x00, sizeof(l1_ssram)); 89 memset(&l1_ssram, 0x00, sizeof(l1_ssram));
90 l1_ssram[0].paddr = (void*)L1_SCRATCH_START; 90 l1_ssram[0].paddr = (void *)L1_SCRATCH_START;
91 l1_ssram[0].size = L1_SCRATCH_LENGTH; 91 l1_ssram[0].size = L1_SCRATCH_LENGTH;
92 l1_ssram[0].flag = SRAM_SLT_FREE; 92 l1_ssram[0].flag = SRAM_SLT_FREE;
93 93
@@ -126,7 +126,7 @@ void __init l1_inst_sram_init(void)
126{ 126{
127#if L1_CODE_LENGTH != 0 127#if L1_CODE_LENGTH != 0
128 memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram)); 128 memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram));
129 l1_inst_sram[0].paddr = (void*)L1_CODE_START + (_etext_l1 - _stext_l1); 129 l1_inst_sram[0].paddr = (void *)L1_CODE_START + (_etext_l1 - _stext_l1);
130 l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1); 130 l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1);
131 l1_inst_sram[0].flag = SRAM_SLT_FREE; 131 l1_inst_sram[0].flag = SRAM_SLT_FREE;
132 132
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index 570356dbe028..2d12449be596 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -29,8 +29,8 @@
29 29
30#include <linux/swap.h> 30#include <linux/swap.h>
31#include <linux/bootmem.h> 31#include <linux/bootmem.h>
32#include <linux/uaccess.h>
32#include <asm/bfin-global.h> 33#include <asm/bfin-global.h>
33#include <asm/uaccess.h>
34#include <asm/l1layout.h> 34#include <asm/l1layout.h>
35#include "blackfin_sram.h" 35#include "blackfin_sram.h"
36 36
diff --git a/arch/blackfin/oprofile/common.c b/arch/blackfin/oprofile/common.c
index 009a1700c854..cb8b8d5af34f 100644
--- a/arch/blackfin/oprofile/common.c
+++ b/arch/blackfin/oprofile/common.c
@@ -33,12 +33,12 @@
33#include <linux/smp.h> 33#include <linux/smp.h>
34#include <linux/errno.h> 34#include <linux/errno.h>
35#include <linux/mutex.h> 35#include <linux/mutex.h>
36#include <linux/ptrace.h>
37#include <linux/irq.h>
38#include <linux/io.h>
36 39
37#include <asm/ptrace.h>
38#include <asm/system.h> 40#include <asm/system.h>
39#include <asm/blackfin.h> 41#include <asm/blackfin.h>
40#include <asm/irq.h>
41#include <asm/io.h>
42 42
43#include "op_blackfin.h" 43#include "op_blackfin.h"
44 44
diff --git a/arch/blackfin/oprofile/op_model_bf533.c b/arch/blackfin/oprofile/op_model_bf533.c
index b7a20a006b49..872dffe33623 100644
--- a/arch/blackfin/oprofile/op_model_bf533.c
+++ b/arch/blackfin/oprofile/op_model_bf533.c
@@ -32,12 +32,12 @@
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/smp.h> 33#include <linux/smp.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <asm/ptrace.h> 35#include <linux/ptrace.h>
36#include <linux/irq.h>
37#include <linux/io.h>
36#include <asm/system.h> 38#include <asm/system.h>
37#include <asm/processor.h> 39#include <asm/processor.h>
38#include <asm/blackfin.h> 40#include <asm/blackfin.h>
39#include <asm/irq.h>
40#include <asm/io.h>
41 41
42#include "op_blackfin.h" 42#include "op_blackfin.h"
43 43
diff --git a/arch/blackfin/oprofile/timer_int.c b/arch/blackfin/oprofile/timer_int.c
index 8fba16c846c9..6c6f8606af4c 100644
--- a/arch/blackfin/oprofile/timer_int.c
+++ b/arch/blackfin/oprofile/timer_int.c
@@ -31,8 +31,7 @@
31#include <linux/smp.h> 31#include <linux/smp.h>
32#include <linux/irq.h> 32#include <linux/irq.h>
33#include <linux/oprofile.h> 33#include <linux/oprofile.h>
34 34#include <linux/ptrace.h>
35#include <asm/ptrace.h>
36 35
37static void enable_sys_timer0() 36static void enable_sys_timer0()
38{ 37{