linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* IXP4xx current status
@ 2011-01-15 16:48 Krzysztof Halasa
  2011-01-15 17:06 ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Halasa @ 2011-01-15 16:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I just compiled and booted current Linus' git tree on my Goramo
MultiLink (IXP425-based) and it seems to work.

I have two IXP4xx patches to be sent to Linus at this point, including:
- Rename FREQ macro to avoid collisions by Ben Hutchings
- Fix qmgr_release_queue() flushing unexpected queue entries (mine).

If I'm supposed to add anything to this list, please let me know.
-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 5+ messages in thread

* IXP4xx current status
  2011-01-15 16:48 IXP4xx current status Krzysztof Halasa
@ 2011-01-15 17:06 ` Russell King - ARM Linux
  2011-01-15 22:54   ` Krzysztof Halasa
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-01-15 17:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 15, 2011 at 05:48:40PM +0100, Krzysztof Halasa wrote:
> Hi,
> 
> I just compiled and booted current Linus' git tree on my Goramo
> MultiLink (IXP425-based) and it seems to work.
> 
> I have two IXP4xx patches to be sent to Linus at this point, including:
> - Rename FREQ macro to avoid collisions by Ben Hutchings
> - Fix qmgr_release_queue() flushing unexpected queue entries (mine).
> 
> If I'm supposed to add anything to this list, please let me know.

It would be nice to have the patches posted here, so they end up in the
list archives (and so are searchable for "why was that done?" type
questions.)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* IXP4xx current status
  2011-01-15 17:06 ` Russell King - ARM Linux
@ 2011-01-15 22:54   ` Krzysztof Halasa
  2011-01-15 23:12     ` [PATCH] IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries Krzysztof Halasa
  2011-01-15 23:13     ` [PATCH] arm/ixp4xx: Rename FREQ macro to avoid collisions Krzysztof Halasa
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2011-01-15 22:54 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> It would be nice to have the patches posted here, so they end up in the
> list archives (and so are searchable for "why was that done?" type
> questions.)

The two patches have been posted, will repost.
-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries.
  2011-01-15 22:54   ` Krzysztof Halasa
@ 2011-01-15 23:12     ` Krzysztof Halasa
  2011-01-15 23:13     ` [PATCH] arm/ixp4xx: Rename FREQ macro to avoid collisions Krzysztof Halasa
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2011-01-15 23:12 UTC (permalink / raw)
  To: linux-arm-kernel

Queues should be empty when released, if not, there is a safety valve.
Make sure the queue is usable after it triggers.

--- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
@@ -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)

-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] arm/ixp4xx: Rename FREQ macro to avoid collisions
  2011-01-15 22:54   ` Krzysztof Halasa
  2011-01-15 23:12     ` [PATCH] IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries Krzysztof Halasa
@ 2011-01-15 23:13     ` Krzysztof Halasa
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2011-01-15 23:13 UTC (permalink / raw)
  To: linux-arm-kernel

Author: Ben Hutchings <ben@decadent.org.uk>

arm/ixp4xx: Rename FREQ macro to avoid collisions

FREQ is a ridiculously short name for a platform-specific macro in a
generic header, and it now conflicts with an enumeration in the
gspca/ov519 driver.

Also delete conditional reference to ixp4xx_get_board_tick_rate()
which is not defined anywhere.

--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -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);
--- a/arch/arm/mach-ixp4xx/include/mach/timex.h
+++ b/arch/arm/mach-ixp4xx/include/mach/timex.h
@@ -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)
 
--- a/drivers/input/misc/ixp4xx-beeper.c
+++ b/drivers/input/misc/ixp4xx-beeper.c
@@ -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);
 

-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-15 23:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-15 16:48 IXP4xx current status Krzysztof Halasa
2011-01-15 17:06 ` Russell King - ARM Linux
2011-01-15 22:54   ` Krzysztof Halasa
2011-01-15 23:12     ` [PATCH] IXP4xx: Fix qmgr_release_queue() flushing unexpected queue entries Krzysztof Halasa
2011-01-15 23:13     ` [PATCH] arm/ixp4xx: Rename FREQ macro to avoid collisions Krzysztof Halasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).