]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 Feb 2011 20:05:58 +0000 (12:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 Feb 2011 20:05:58 +0000 (12:05 -0800)
* 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6:
  arm/ixp4xx: Rename FREQ macro to avoid collisions
  IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries.

arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/include/mach/timex.h
arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
drivers/input/misc/ixp4xx-beeper.c

index 4dc68d6bb6bebe43419ef1ac510b06e065fdf7ab..9fd894271d5d0b353ca1e5214af258d22f99f686 100644 (file)
@@ -432,7 +432,7 @@ static struct clocksource clocksource_ixp4xx = {
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-unsigned long ixp4xx_timer_freq = FREQ;
+unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
 EXPORT_SYMBOL(ixp4xx_timer_freq);
 static void __init ixp4xx_clocksource_init(void)
 {
@@ -496,7 +496,7 @@ static struct clock_event_device clockevent_ixp4xx = {
 
 static void __init ixp4xx_clockevent_init(void)
 {
-       clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC,
+       clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
                                        clockevent_ixp4xx.shift);
        clockevent_ixp4xx.max_delta_ns =
                clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
index 2c3f93c3eb79937cb6360904cbeb1f6599adf1ce..c9e930f29339770a79dc36bc015b28e4b45a4414 100644 (file)
@@ -10,6 +10,7 @@
  * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
  * timer register ignores the bottom 2 bits of the LATCH value.
  */
-#define FREQ 66666000
-#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
+#define IXP4XX_TIMER_FREQ 66666000
+#define CLOCK_TICK_RATE \
+       (((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
 
index bfdbe4b5a3cc860eb4bc96c6a1714a6bae6cb7ff..852f7c9f87d06ff69c6defde901732a3926aea7d 100644 (file)
@@ -265,6 +265,11 @@ void qmgr_release_queue(unsigned int queue)
               qmgr_queue_descs[queue], queue);
        qmgr_queue_descs[queue][0] = '\x0';
 #endif
+
+       while ((addr = qmgr_get_entry(queue)))
+               printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
+                      queue, addr);
+
        __raw_writel(0, &qmgr_regs->sram[queue]);
 
        used_sram_bitmap[0] &= ~mask[0];
@@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue)
        spin_unlock_irq(&qmgr_lock);
 
        module_put(THIS_MODULE);
-
-       while ((addr = qmgr_get_entry(queue)))
-               printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n",
-                      queue, addr);
 }
 
 static int qmgr_init(void)
index 9dfd6e5f786f6b04b9d35699333dbc6324414bc5..1f38302a5951515a767e96d5c29f01af5922768e 100644 (file)
@@ -69,11 +69,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned
        }
 
        if (value > 20 && value < 32767)
-#ifndef FREQ
-               count = (ixp4xx_get_board_tick_rate() / (value * 4)) - 1;
-#else
-               count = (FREQ / (value * 4)) - 1;
-#endif
+               count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1;
 
        ixp4xx_spkr_control(pin, count);