aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-14 20:00:06 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-16 13:23:48 -0400
commit56f621c7f6f735311eed3f36858b402013023c18 (patch)
tree0aea37bf1b830f029ebca99d2608deec33b7516c
parent41bd61a8e357f79dc65502b22d9d124a619491c0 (diff)
[MIPS] Alchemy: Get rid of au_ffs().
It was plain a bad idea ... Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/au1000/common/dbdma.c2
-rw-r--r--arch/mips/au1000/common/irq.c8
-rw-r--r--arch/mips/au1000/pb1200/irqmap.c2
-rw-r--r--include/asm-mips/mach-au1x00/au1000.h10
4 files changed, 6 insertions, 16 deletions
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index 461cf0139737..9d6ad43fded6 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -859,7 +859,7 @@ dbdma_interrupt(int irq, void *dev_id)
859 859
860 intstat = dbdma_gptr->ddma_intstat; 860 intstat = dbdma_gptr->ddma_intstat;
861 au_sync(); 861 au_sync();
862 chan_index = au_ffs(intstat) - 1; 862 chan_index = ffs(intstat);
863 863
864 ctp = chan_tab_ptr[chan_index]; 864 ctp = chan_tab_ptr[chan_index];
865 cp = ctp->chan_ptr; 865 cp = ctp->chan_ptr;
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index e86b4303994f..b0ae1ab0ad9e 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -481,7 +481,7 @@ static void intc0_req0_irqdispatch(void)
481 return; 481 return;
482 } 482 }
483#endif 483#endif
484 irq = au_ffs(intc0_req0) - 1; 484 irq = ffs(intc0_req0);
485 intc0_req0 &= ~(1 << irq); 485 intc0_req0 &= ~(1 << irq);
486 do_IRQ(irq); 486 do_IRQ(irq);
487} 487}
@@ -497,7 +497,7 @@ static void intc0_req1_irqdispatch(void)
497 if (!intc0_req1) 497 if (!intc0_req1)
498 return; 498 return;
499 499
500 irq = au_ffs(intc0_req1) - 1; 500 irq = ffs(intc0_req1);
501 intc0_req1 &= ~(1 << irq); 501 intc0_req1 &= ~(1 << irq);
502 do_IRQ(irq); 502 do_IRQ(irq);
503} 503}
@@ -517,7 +517,7 @@ static void intc1_req0_irqdispatch(void)
517 if (!intc1_req0) 517 if (!intc1_req0)
518 return; 518 return;
519 519
520 irq = au_ffs(intc1_req0) - 1; 520 irq = ffs(intc1_req0);
521 intc1_req0 &= ~(1 << irq); 521 intc1_req0 &= ~(1 << irq);
522 irq += 32; 522 irq += 32;
523 do_IRQ(irq); 523 do_IRQ(irq);
@@ -534,7 +534,7 @@ static void intc1_req1_irqdispatch(void)
534 if (!intc1_req1) 534 if (!intc1_req1)
535 return; 535 return;
536 536
537 irq = au_ffs(intc1_req1) - 1; 537 irq = ffs(intc1_req1);
538 intc1_req1 &= ~(1 << irq); 538 intc1_req1 &= ~(1 << irq);
539 irq += 32; 539 irq += 32;
540 do_IRQ(irq); 540 do_IRQ(irq);
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c
index 7c708db04a88..aa85eedf7c0d 100644
--- a/arch/mips/au1000/pb1200/irqmap.c
+++ b/arch/mips/au1000/pb1200/irqmap.c
@@ -74,7 +74,7 @@ irqreturn_t pb1200_cascade_handler( int irq, void *dev_id)
74 bcsr->int_status = bisr; 74 bcsr->int_status = bisr;
75 for( ; bisr; bisr &= (bisr-1) ) 75 for( ; bisr; bisr &= (bisr-1) )
76 { 76 {
77 extirq_nr = (PB1200_INT_BEGIN-1) + au_ffs(bisr); 77 extirq_nr = PB1200_INT_BEGIN + au_ffs(bisr);
78 /* Ack and dispatch IRQ */ 78 /* Ack and dispatch IRQ */
79 do_IRQ(extirq_nr); 79 do_IRQ(extirq_nr);
80 } 80 }
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h
index 10f613f23c33..6cd6e8b8cd20 100644
--- a/include/asm-mips/mach-au1x00/au1000.h
+++ b/include/asm-mips/mach-au1x00/au1000.h
@@ -98,16 +98,6 @@ static __inline__ int au_ffz(unsigned int x)
98 return __ilog2(x & -x); 98 return __ilog2(x & -x);
99} 99}
100 100
101/*
102 * ffs: find first bit set. This is defined the same way as
103 * the libc and compiler builtin ffs routines, therefore
104 * differs in spirit from the above ffz (man ffs).
105 */
106static __inline__ int au_ffs(int x)
107{
108 return __ilog2(x & -x) + 1;
109}
110
111/* arch/mips/au1000/common/clocks.c */ 101/* arch/mips/au1000/common/clocks.c */
112extern void set_au1x00_speed(unsigned int new_freq); 102extern void set_au1x00_speed(unsigned int new_freq);
113extern unsigned int get_au1x00_speed(void); 103extern unsigned int get_au1x00_speed(void);