* Re: snd-aoa: g5 tas codec problems
From: Benjamin Herrenschmidt @ 2006-07-07 8:12 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev list, alsa-devel
In-Reply-To: <1152259414.15068.12.camel@localhost>
> I see you added DRC too, thanks :) I'll take a closer look after
> breakfast ;)
Hehe :) Oh I just added a routine to program it in hardware, not any
control to actually change it.
Ben.
^ permalink raw reply
* Re: [Alsa-devel] [RFC 01/12] snd-powermac: no longer handle anything with a layout-id property
From: Benjamin Herrenschmidt @ 2006-07-07 8:13 UTC (permalink / raw)
To: Johannes Berg; +Cc: alsa-devel, Takashi Iwai, netstar, linuxppc-dev, Lee Revell
In-Reply-To: <1152259477.15068.15.camel@localhost>
On Fri, 2006-07-07 at 10:04 +0200, Johannes Berg wrote:
> On Fri, 2006-07-07 at 15:38 +1000, Benjamin Herrenschmidt wrote:
>
> > There is still an issue... wether to enable softvol or not... With
> > snd-aoa, the card name is always the same but wether it has hardware
> > volume control or not (Toonie doesn't) is not known... Alsa should have
> > ways to add softvol automatically if no master volume control exist.
>
> Hm, good point. I probably need to completely revamp the card handling
> and not create a card object before the codecs are registered. That way,
> I could influence the naming through the codecs.
Maybe ... or not... I'd rather not bother. I think Alsa should be able
to create softvol if there is no Master volume...
Ben.
^ permalink raw reply
* Re: [Alsa-devel] [RFC 01/12] snd-powermac: no longer handle anything with a layout-id property
From: Johannes Berg @ 2006-07-07 8:22 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: alsa-devel, Takashi Iwai, netstar, linuxppc-dev, Lee Revell
In-Reply-To: <1152260005.9862.53.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
On Fri, 2006-07-07 at 18:13 +1000, Benjamin Herrenschmidt wrote:
> Maybe ... or not... I'd rather not bother. I think Alsa should be able
> to create softvol if there is no Master volume...
But how long should it wait for the master volume to become available?
Thing is, as far as I understand this, the mixer is dynamic and you can
add and remove things at any time essentially. No one does, but that's
another story.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: G5 troubles booting powerpc-git (July 6)
From: Andrew Morton @ 2006-07-07 8:23 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1152226587.9862.19.camel@localhost.localdomain>
On Fri, 07 Jul 2006 08:56:27 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> If you look at arch/powerpc/kernel/irq.c from line 479:
>
> /* Check if mapping already exist, if it does, call
> * host->ops->map() to update the flags
> */
> virq = irq_find_mapping(host, hwirq);
> if (virq != IRQ_NONE) {
> pr_debug("irq: -> existing mapping on virq %d\n", virq);
> host->ops->map(host, virq, hwirq, flags);
> return virq;
> }
>
> What if you comment out the host->ops->map(...) call in there ? Does it
> help ?
No, there's no change in behaviour.
^ permalink raw reply
* Re: G5 troubles booting powerpc-git (July 6)
From: Benjamin Herrenschmidt @ 2006-07-07 8:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20060707012330.f1dea5ac.akpm@osdl.org>
On Fri, 2006-07-07 at 01:23 -0700, Andrew Morton wrote:
> On Fri, 07 Jul 2006 08:56:27 +1000
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > If you look at arch/powerpc/kernel/irq.c from line 479:
> >
> > /* Check if mapping already exist, if it does, call
> > * host->ops->map() to update the flags
> > */
> > virq = irq_find_mapping(host, hwirq);
> > if (virq != IRQ_NONE) {
> > pr_debug("irq: -> existing mapping on virq %d\n", virq);
> > host->ops->map(host, virq, hwirq, flags);
> > return virq;
> > }
> >
> > What if you comment out the host->ops->map(...) call in there ? Does it
> > help ?
>
> No, there's no change in behaviour.
Doh ! Ok, looks like a different issue. Can you try this patch ? Please,
do _not_ apply it to your tree as, as it is it will break non-powermac.
It's some work I'm doing to clean up a couple of rough edges in my irq
rework and fix a little misdesign.
If it doesn't fix it, then it's indeed a completely different issue that I'll have to track down tomorrow
hopefully.
Index: linux-irq-work/arch/powerpc/kernel/irq.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/kernel/irq.c 2006-07-07 15:40:27.000000000 +1000
+++ linux-irq-work/arch/powerpc/kernel/irq.c 2006-07-07 15:47:23.000000000 +1000
@@ -391,15 +391,14 @@
irq_map[i].host = host;
smp_wmb();
- /* Clear some flags */
- get_irq_desc(i)->status
- &= ~(IRQ_NOREQUEST | IRQ_LEVEL);
+ /* Clear norequest flags */
+ get_irq_desc(i)->status &= ~IRQ_NOREQUEST;
/* Legacy flags are left to default at this point,
* one can then use irq_create_mapping() to
* explicitely change them
*/
- ops->map(host, i, i, 0);
+ ops->map(host, i, i);
}
break;
case IRQ_HOST_MAP_LINEAR:
@@ -457,13 +456,11 @@
}
unsigned int irq_create_mapping(struct irq_host *host,
- irq_hw_number_t hwirq,
- unsigned int flags)
+ irq_hw_number_t hwirq)
{
unsigned int virq, hint;
- pr_debug("irq: irq_create_mapping(0x%p, 0x%lx, 0x%x)\n",
- host, hwirq, flags);
+ pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", host, hwirq);
/* Look for default host if nececssary */
if (host == NULL)
@@ -482,7 +479,6 @@
virq = irq_find_mapping(host, hwirq);
if (virq != IRQ_NONE) {
pr_debug("irq: -> existing mapping on virq %d\n", virq);
- host->ops->map(host, virq, hwirq, flags);
return virq;
}
@@ -504,18 +500,18 @@
}
pr_debug("irq: -> obtained virq %d\n", virq);
- /* Clear some flags */
- get_irq_desc(virq)->status &= ~(IRQ_NOREQUEST | IRQ_LEVEL);
+ /* Clear IRQ_NOREQUEST flag */
+ get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;
/* map it */
- if (host->ops->map(host, virq, hwirq, flags)) {
+ smp_wmb();
+ irq_map[virq].hwirq = hwirq;
+ smp_mb();
+ if (host->ops->map(host, virq, hwirq)) {
pr_debug("irq: -> mapping failed, freeing\n");
irq_free_virt(virq, 1);
return NO_IRQ;
}
- smp_wmb();
- irq_map[virq].hwirq = hwirq;
- smp_mb();
return virq;
}
EXPORT_SYMBOL_GPL(irq_create_mapping);
@@ -525,7 +521,8 @@
{
struct irq_host *host;
irq_hw_number_t hwirq;
- unsigned int flags = IRQ_TYPE_NONE;
+ unsigned int type = IRQ_TYPE_NONE;
+ unsigned int virq;
if (controller == NULL)
host = irq_default_host;
@@ -539,11 +536,20 @@
hwirq = intspec[0];
else {
if (host->ops->xlate(host, controller, intspec, intsize,
- &hwirq, &flags))
+ &hwirq, &type))
return NO_IRQ;
}
- return irq_create_mapping(host, hwirq, flags);
+ /* Create mapping */
+ virq = irq_create_mapping(host, hwirq);
+ if (virq == NO_IRQ)
+ return virq;
+
+ /* Set type if specified and different than the current one */
+ if (type != IRQ_TYPE_NONE &&
+ type != (get_irq_desc(virq)->status & IRQF_TRIGGER_MASK))
+ set_irq_type(virq, type);
+ return virq;
}
EXPORT_SYMBOL_GPL(irq_create_of_mapping);
Index: linux-irq-work/arch/powerpc/platforms/powermac/pci.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/platforms/powermac/pci.c 2006-07-07 15:40:27.000000000 +1000
+++ linux-irq-work/arch/powerpc/platforms/powermac/pci.c 2006-07-07 15:47:23.000000000 +1000
@@ -46,7 +46,6 @@
static struct pci_controller *u3_agp;
static struct pci_controller *u4_pcie;
static struct pci_controller *u3_ht;
-#define has_second_ohare 0
#else
static int has_second_ohare;
#endif /* CONFIG_PPC64 */
@@ -993,6 +992,7 @@
/* Read interrupt from the device-tree */
pci_read_irq_line(dev);
+#ifdef CONFIG_PPC32
/* Fixup interrupt for the modem/ethernet combo controller.
* on machines with a second ohare chip.
* The number in the device tree (27) is bogus (correct for
@@ -1002,8 +1002,11 @@
*/
if (has_second_ohare &&
dev->vendor == PCI_VENDOR_ID_DEC &&
- dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS)
- dev->irq = irq_create_mapping(NULL, 60, 0);
+ dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS) {
+ dev->irq = irq_create_mapping(NULL, 60);
+ set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
+ }
+#endif /* CONFIG_PPC32 */
}
}
Index: linux-irq-work/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/platforms/powermac/pic.c 2006-07-07 15:40:27.000000000 +1000
+++ linux-irq-work/arch/powerpc/platforms/powermac/pic.c 2006-07-07 15:47:23.000000000 +1000
@@ -579,9 +579,10 @@
flags |= OF_IMAP_OLDWORLD_MAC;
if (get_property(of_chosen, "linux,bootx", NULL) != NULL)
flags |= OF_IMAP_NO_PHANDLE;
- of_irq_map_init(flags);
#endif /* CONFIG_PPC_32 */
+ of_irq_map_init(flags);
+
/* We first try to detect Apple's new Core99 chipset, since mac-io
* is quite different on those machines and contains an IBM MPIC2.
*/
Index: linux-irq-work/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-irq-work.orig/arch/powerpc/sysdev/mpic.c 2006-07-07 15:40:27.000000000 +1000
+++ linux-irq-work/arch/powerpc/sysdev/mpic.c 2006-07-07 15:47:23.000000000 +1000
@@ -337,6 +337,17 @@
}
}
+#else /* CONFIG_MPIC_BROKEN_U3 */
+
+static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source)
+{
+ return 0;
+}
+
+static void __init mpic_scan_ht_pics(struct mpic *mpic)
+{
+}
+
#endif /* CONFIG_MPIC_BROKEN_U3 */
@@ -405,11 +416,9 @@
unsigned int loops = 100000;
struct mpic *mpic = mpic_from_irq(irq);
unsigned int src = mpic_irq_to_hw(irq);
- unsigned long flags;
DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
- spin_lock_irqsave(&mpic_lock, flags);
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) &
~MPIC_VECPRI_MASK);
@@ -420,7 +429,6 @@
break;
}
} while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK);
- spin_unlock_irqrestore(&mpic_lock, flags);
}
static void mpic_mask_irq(unsigned int irq)
@@ -428,11 +436,9 @@
unsigned int loops = 100000;
struct mpic *mpic = mpic_from_irq(irq);
unsigned int src = mpic_irq_to_hw(irq);
- unsigned long flags;
DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
- spin_lock_irqsave(&mpic_lock, flags);
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) |
MPIC_VECPRI_MASK);
@@ -444,7 +450,6 @@
break;
}
} while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK));
- spin_unlock_irqrestore(&mpic_lock, flags);
}
static void mpic_end_irq(unsigned int irq)
@@ -512,8 +517,7 @@
mpic_ht_end_irq(mpic, src);
mpic_eoi(mpic);
}
-
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* !CONFIG_MPIC_BROKEN_U3 */
#ifdef CONFIG_SMP
@@ -560,47 +564,74 @@
mpic_physmask(cpus_addr(tmp)[0]));
}
-static unsigned int mpic_flags_to_vecpri(unsigned int flags, int *level)
+static unsigned int mpic_type_to_vecpri(unsigned int type)
{
- unsigned int vecpri;
-
/* Now convert sense value */
- switch(flags & IRQ_TYPE_SENSE_MASK) {
+ switch(type & IRQ_TYPE_SENSE_MASK) {
case IRQ_TYPE_EDGE_RISING:
- vecpri = MPIC_VECPRI_SENSE_EDGE |
- MPIC_VECPRI_POLARITY_POSITIVE;
- *level = 0;
- break;
+ return MPIC_VECPRI_SENSE_EDGE | MPIC_VECPRI_POLARITY_POSITIVE;
case IRQ_TYPE_EDGE_FALLING:
- vecpri = MPIC_VECPRI_SENSE_EDGE |
- MPIC_VECPRI_POLARITY_NEGATIVE;
- *level = 0;
- break;
+ case IRQ_TYPE_EDGE_BOTH:
+ return MPIC_VECPRI_SENSE_EDGE | MPIC_VECPRI_POLARITY_NEGATIVE;
case IRQ_TYPE_LEVEL_HIGH:
- vecpri = MPIC_VECPRI_SENSE_LEVEL |
- MPIC_VECPRI_POLARITY_POSITIVE;
- *level = 1;
- break;
+ return MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_POSITIVE;
case IRQ_TYPE_LEVEL_LOW:
default:
- vecpri = MPIC_VECPRI_SENSE_LEVEL |
- MPIC_VECPRI_POLARITY_NEGATIVE;
- *level = 1;
+ return MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_NEGATIVE;
}
- return vecpri;
+}
+
+static int mpic_set_irq_type(unsigned int virq, unsigned int flow_type)
+{
+ struct mpic *mpic = mpic_from_irq(virq);
+ unsigned int src = mpic_irq_to_hw(virq);
+ struct irq_desc *desc = get_irq_desc(virq);
+ unsigned int vecpri, vold, vnew;
+
+ pr_debug("mpic: set_irq_type(mpic:@%p,virq:%d,src:%d,type:0x%x)\n",
+ mpic, virq, src, flow_type);
+
+ if (src >= mpic->irq_count)
+ return -EINVAL;
+
+ if (flow_type == IRQ_TYPE_NONE)
+ if (mpic->senses && src < mpic->senses_count)
+ flow_type = mpic->senses[src];
+ if (flow_type == IRQ_TYPE_NONE)
+ flow_type = IRQ_TYPE_LEVEL_LOW;
+
+ desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
+ desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
+ if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
+ desc->status |= IRQ_LEVEL;
+
+ if (mpic_is_ht_interrupt(mpic, src))
+ vecpri = MPIC_VECPRI_POLARITY_POSITIVE |
+ MPIC_VECPRI_SENSE_EDGE;
+ else
+ vecpri = mpic_type_to_vecpri(flow_type);
+
+ vold = mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI);
+ vnew = vold & ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK);
+ vnew |= vecpri;
+ if (vold != vnew)
+ mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, vnew);
+
+ return 0;
}
static struct irq_chip mpic_irq_chip = {
- .mask = mpic_mask_irq,
- .unmask = mpic_unmask_irq,
- .eoi = mpic_end_irq,
+ .mask = mpic_mask_irq,
+ .unmask = mpic_unmask_irq,
+ .eoi = mpic_end_irq,
+ .set_type = mpic_set_irq_type,
};
#ifdef CONFIG_SMP
static struct irq_chip mpic_ipi_chip = {
- .mask = mpic_mask_ipi,
- .unmask = mpic_unmask_ipi,
- .eoi = mpic_end_ipi,
+ .mask = mpic_mask_ipi,
+ .unmask = mpic_unmask_ipi,
+ .eoi = mpic_end_ipi,
};
#endif /* CONFIG_SMP */
@@ -611,6 +642,7 @@
.mask = mpic_mask_irq,
.unmask = mpic_unmask_ht_irq,
.eoi = mpic_end_ht_irq,
+ .set_type = mpic_set_irq_type,
};
#endif /* CONFIG_MPIC_BROKEN_U3 */
@@ -624,18 +656,12 @@
}
static int mpic_host_map(struct irq_host *h, unsigned int virq,
- irq_hw_number_t hw, unsigned int flags)
+ irq_hw_number_t hw)
{
- struct irq_desc *desc = get_irq_desc(virq);
- struct irq_chip *chip;
struct mpic *mpic = h->host_data;
- u32 v, vecpri = MPIC_VECPRI_SENSE_LEVEL |
- MPIC_VECPRI_POLARITY_NEGATIVE;
- int level;
- unsigned long iflags;
+ struct irq_chip *chip;
- pr_debug("mpic: map virq %d, hwirq 0x%lx, flags: 0x%x\n",
- virq, hw, flags);
+ pr_debug("mpic: map virq %d, hwirq 0x%lx\n", virq, hw);
if (hw == MPIC_VEC_SPURRIOUS)
return -EINVAL;
@@ -654,44 +680,23 @@
if (hw >= mpic->irq_count)
return -EINVAL;
- /* If no sense provided, check default sense array */
- if (((flags & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_NONE) &&
- mpic->senses && hw < mpic->senses_count)
- flags |= mpic->senses[hw];
-
- vecpri = mpic_flags_to_vecpri(flags, &level);
- if (level)
- desc->status |= IRQ_LEVEL;
+ /* Default chip */
chip = &mpic->hc_irq;
#ifdef CONFIG_MPIC_BROKEN_U3
/* Check for HT interrupts, override vecpri */
- if (mpic_is_ht_interrupt(mpic, hw)) {
- vecpri &= ~(MPIC_VECPRI_SENSE_MASK |
- MPIC_VECPRI_POLARITY_MASK);
- vecpri |= MPIC_VECPRI_POLARITY_POSITIVE;
+ if (mpic_is_ht_interrupt(mpic, hw))
chip = &mpic->hc_ht_irq;
- }
-#endif
-
- /* Reconfigure irq. We must preserve the mask bit as we can be called
- * while the interrupt is still active (This may change in the future
- * but for now, it is the case).
- */
- spin_lock_irqsave(&mpic_lock, iflags);
- v = mpic_irq_read(hw, MPIC_IRQ_VECTOR_PRI);
- vecpri = (v &
- ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK)) |
- vecpri;
- if (vecpri != v)
- mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri);
- spin_unlock_irqrestore(&mpic_lock, iflags);
+#endif /* CONFIG_MPIC_BROKEN_U3 */
- pr_debug("mpic: mapping as IRQ, vecpri = 0x%08x (was 0x%08x)\n",
- vecpri, v);
+ pr_debug("mpic: mapping to irq chip @%p\n", chip);
set_irq_chip_data(virq, mpic);
set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq);
+
+ /* Set default irq type */
+ set_irq_type(virq, IRQ_TYPE_NONE);
+
return 0;
}
@@ -906,41 +911,16 @@
if (mpic->irq_count == 0)
mpic->irq_count = mpic->num_sources;
-#ifdef CONFIG_MPIC_BROKEN_U3
/* Do the HT PIC fixups on U3 broken mpic */
DBG("MPIC flags: %x\n", mpic->flags);
if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY))
mpic_scan_ht_pics(mpic);
-#endif /* CONFIG_MPIC_BROKEN_U3 */
for (i = 0; i < mpic->num_sources; i++) {
/* start with vector = source number, and masked */
- u32 vecpri = MPIC_VECPRI_MASK | i | (8 << MPIC_VECPRI_PRIORITY_SHIFT);
- int level = 1;
+ u32 vecpri = MPIC_VECPRI_MASK | i |
+ (8 << MPIC_VECPRI_PRIORITY_SHIFT);
- /* do senses munging */
- if (mpic->senses && i < mpic->senses_count)
- vecpri |= mpic_flags_to_vecpri(mpic->senses[i],
- &level);
- else
- vecpri |= MPIC_VECPRI_SENSE_LEVEL;
-
- /* deal with broken U3 */
- if (mpic->flags & MPIC_BROKEN_U3) {
-#ifdef CONFIG_MPIC_BROKEN_U3
- if (mpic_is_ht_interrupt(mpic, i)) {
- vecpri &= ~(MPIC_VECPRI_SENSE_MASK |
- MPIC_VECPRI_POLARITY_MASK);
- vecpri |= MPIC_VECPRI_POLARITY_POSITIVE;
- }
-#else
- printk(KERN_ERR "mpic: BROKEN_U3 set, but CONFIG doesn't match\n");
-#endif
- }
-
- DBG("setup source %d, vecpri: %08x, level: %d\n", i, vecpri,
- (level != 0));
-
/* init hw */
mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri);
mpic_irq_write(i, MPIC_IRQ_DESTINATION,
@@ -1154,7 +1134,7 @@
for (i = 0; i < 4; i++) {
unsigned int vipi = irq_create_mapping(mpic->irqhost,
- MPIC_VEC_IPI_0 + i, 0);
+ MPIC_VEC_IPI_0 + i);
if (vipi == NO_IRQ) {
printk(KERN_ERR "Failed to map IPI %d\n", i);
break;
Index: linux-irq-work/drivers/macintosh/macio_asic.c
===================================================================
--- linux-irq-work.orig/drivers/macintosh/macio_asic.c 2006-07-07 15:40:27.000000000 +1000
+++ linux-irq-work/drivers/macintosh/macio_asic.c 2006-07-07 15:47:23.000000000 +1000
@@ -330,7 +330,7 @@
{
unsigned int irq;
- irq = irq_create_mapping(NULL, line, 0);
+ irq = irq_create_mapping(NULL, line);
if (irq != NO_IRQ) {
dev->interrupt[index].start = irq;
dev->interrupt[index].flags = IORESOURCE_IRQ;
Index: linux-irq-work/include/asm-powerpc/irq.h
===================================================================
--- linux-irq-work.orig/include/asm-powerpc/irq.h 2006-07-07 15:40:27.000000000 +1000
+++ linux-irq-work/include/asm-powerpc/irq.h 2006-07-07 15:47:23.000000000 +1000
@@ -83,25 +83,24 @@
int (*match)(struct irq_host *h, struct device_node *node);
/* Create or update a mapping between a virtual irq number and a hw
- * irq number. This can be called several times for the same mapping
- * but with different flags, though unmap shall always be called
- * before the virq->hw mapping is changed.
+ * irq number. This is called only once for a given mapping.
*/
- int (*map)(struct irq_host *h, unsigned int virq,
- irq_hw_number_t hw, unsigned int flags);
+ int (*map)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw);
/* Dispose of such a mapping */
void (*unmap)(struct irq_host *h, unsigned int virq);
/* Translate device-tree interrupt specifier from raw format coming
* from the firmware to a irq_hw_number_t (interrupt line number) and
- * trigger flags that can be passed to irq_create_mapping().
- * If no translation is provided, raw format is assumed to be one cell
- * for interrupt line and default sense.
+ * type (sense) that can be passed to set_irq_type(). In the absence
+ * of this callback, irq_create_of_mapping() and irq_of_parse_and_map()
+ * will return the hw number in the first cell and IRQ_TYPE_NONE for
+ * the type (which amount to keeping whatever default value the
+ * interrupt controller has for that line)
*/
int (*xlate)(struct irq_host *h, struct device_node *ctrler,
u32 *intspec, unsigned int intsize,
- irq_hw_number_t *out_hwirq, unsigned int *out_flags);
+ irq_hw_number_t *out_hwirq, unsigned int *out_type);
};
struct irq_host {
@@ -193,25 +192,14 @@
* irq_create_mapping - Map a hardware interrupt into linux virq space
* @host: host owning this hardware interrupt or NULL for default host
* @hwirq: hardware irq number in that host space
- * @flags: flags passed to the controller. contains the trigger type among
- * others. Use IRQ_TYPE_* defined in include/linux/irq.h
*
* Only one mapping per hardware interrupt is permitted. Returns a linux
- * virq number. The flags can be used to provide sense information to the
- * controller (typically extracted from the device-tree). If no information
- * is passed, the controller defaults will apply (for example, xics can only
- * do edge so flags are irrelevant for some pseries specific irqs).
- *
- * The device-tree generally contains the trigger info in an encoding that is
- * specific to a given type of controller. In that case, you can directly use
- * host->ops->trigger_xlate() to translate that.
- *
- * It is recommended that new PICs that don't have existing OF bindings chose
- * to use a representation of triggers identical to linux.
+ * virq number.
+ * If the sense/trigger is to be specified, set_irq_type() should be called
+ * on the number returned from that call.
*/
extern unsigned int irq_create_mapping(struct irq_host *host,
- irq_hw_number_t hwirq,
- unsigned int flags);
+ irq_hw_number_t hwirq);
/***
@@ -295,7 +283,7 @@
*
* This function is identical to irq_create_mapping except that it takes
* as input informations straight from the device-tree (typically the results
- * of the of_irq_map_*() functions
+ * of the of_irq_map_*() functions.
*/
extern unsigned int irq_create_of_mapping(struct device_node *controller,
u32 *intspec, unsigned int intsize);
^ permalink raw reply
* Re: [Alsa-devel] [RFC 01/12] snd-powermac: no longer handle anything with a layout-id property
From: Benjamin Herrenschmidt @ 2006-07-07 8:27 UTC (permalink / raw)
To: Johannes Berg; +Cc: alsa-devel, Takashi Iwai, netstar, linuxppc-dev, Lee Revell
In-Reply-To: <1152260564.15068.20.camel@localhost>
On Fri, 2006-07-07 at 10:22 +0200, Johannes Berg wrote:
> On Fri, 2006-07-07 at 18:13 +1000, Benjamin Herrenschmidt wrote:
>
> > Maybe ... or not... I'd rather not bother. I think Alsa should be able
> > to create softvol if there is no Master volume...
>
> But how long should it wait for the master volume to become available?
> Thing is, as far as I understand this, the mixer is dynamic and you can
> add and remove things at any time essentially. No one does, but that's
> another story.
Well, when the master volume shows up, softvol can "unplug" itself :)
Ben.
^ permalink raw reply
* Re: [Alsa-devel] [RFC 01/12] snd-powermac: no longer handle anything with a layout-id property
From: Johannes Berg @ 2006-07-07 8:40 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: alsa-devel, Takashi Iwai, netstar, linuxppc-dev, Lee Revell
In-Reply-To: <1152260861.9862.59.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
On Fri, 2006-07-07 at 18:27 +1000, Benjamin Herrenschmidt wrote:
> Well, when the master volume shows up, softvol can "unplug" itself :)
Hmm, not a bad idea, that way there's always a master volume. And when
some cards have an unusable master volume then softvol could be forced
to superimpose via the config file.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: snd-aoa: g5 tas codec problems
From: Johannes Berg @ 2006-07-07 8:49 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, alsa-devel
In-Reply-To: <1152258426.9862.44.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
On Fri, 2006-07-07 at 17:47 +1000, Benjamin Herrenschmidt wrote:
> Also, we should try
> (if not already the case) to cache our clock/i2s state so that
> subsequent prepare() don't try to change things that are already ok.
I do that, the function reads the dws and sfr registers and exits early
if they match.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: G5 troubles booting powerpc-git (July 6)
From: Andrew Morton @ 2006-07-07 8:52 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1152260824.9862.57.camel@localhost.localdomain>
On Fri, 07 Jul 2006 18:27:04 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Fri, 2006-07-07 at 01:23 -0700, Andrew Morton wrote:
> > On Fri, 07 Jul 2006 08:56:27 +1000
> > Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > > If you look at arch/powerpc/kernel/irq.c from line 479:
> > >
> > > /* Check if mapping already exist, if it does, call
> > > * host->ops->map() to update the flags
> > > */
> > > virq = irq_find_mapping(host, hwirq);
> > > if (virq != IRQ_NONE) {
> > > pr_debug("irq: -> existing mapping on virq %d\n", virq);
> > > host->ops->map(host, virq, hwirq, flags);
> > > return virq;
> > > }
> > >
> > > What if you comment out the host->ops->map(...) call in there ? Does it
> > > help ?
> >
> > No, there's no change in behaviour.
>
> Doh ! Ok, looks like a different issue. Can you try this patch ? Please,
> do _not_ apply it to your tree as, as it is it will break non-powermac.
> It's some work I'm doing to clean up a couple of rough edges in my irq
> rework and fix a little misdesign.
>
> If it doesn't fix it, then it's indeed a completely different issue that I'll have to track down tomorrow
> hopefully.
Needs this to compile:
diff -puN arch/powerpc/platforms/pseries/ras.c~a-fix arch/powerpc/platforms/pseries/ras.c
--- a/arch/powerpc/platforms/pseries/ras.c~a-fix
+++ a/arch/powerpc/platforms/pseries/ras.c
@@ -93,8 +93,7 @@ static void request_ras_irqs(struct devi
for (i = 0; i < opicplen; i++) {
if (count > 15)
break;
- virqs[count] = irq_create_mapping(NULL, *(opicprop++),
- IRQ_TYPE_NONE);
+ virqs[count] = irq_create_mapping(NULL, *(opicprop++));
if (virqs[count] == NO_IRQ)
printk(KERN_ERR "Unable to allocate interrupt "
"number for %s\n", np->full_name);
diff -puN arch/powerpc/platforms/pseries/xics.c~a-fix arch/powerpc/platforms/pseries/xics.c
--- a/arch/powerpc/platforms/pseries/xics.c~a-fix
+++ a/arch/powerpc/platforms/pseries/xics.c
@@ -757,7 +757,7 @@ void xics_request_IPIs(void)
{
unsigned int ipi;
- ipi = irq_create_mapping(xics_host, XICS_IPI, 0);
+ ipi = irq_create_mapping(xics_host, XICS_IPI);
BUG_ON(ipi == NO_IRQ);
/*
diff -puN drivers/char/hvsi.c~a-fix drivers/char/hvsi.c
--- a/drivers/char/hvsi.c~a-fix
+++ a/drivers/char/hvsi.c
@@ -1299,7 +1299,7 @@ static int __init hvsi_console_init(void
hp->inbuf_end = hp->inbuf;
hp->state = HVSI_CLOSED;
hp->vtermno = *vtermno;
- hp->virq = irq_create_mapping(NULL, irq[0], 0);
+ hp->virq = irq_create_mapping(NULL, irq[0]);
if (hp->virq == NO_IRQ) {
printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
__FUNCTION__, irq[0]);
_
But it still doesn't help.
These:
arch/powerpc/sysdev/i8259.c:222: warning: initialization from incompatible pointer type
arch/powerpc/platforms/pseries/xics.c:555: warning: initialization from incompatible pointer type
arch/powerpc/platforms/pseries/xics.c:561: warning: initialization from incompatible pointer type
look like super-serious box-killers. Hope I'm not using either of those.
^ permalink raw reply
* Re: snd-aoa: g5 tas codec problems
From: Benjamin Herrenschmidt @ 2006-07-07 8:56 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev list, alsa-devel
In-Reply-To: <1152262148.15068.30.camel@localhost>
On Fri, 2006-07-07 at 10:49 +0200, Johannes Berg wrote:
> On Fri, 2006-07-07 at 17:47 +1000, Benjamin Herrenschmidt wrote:
> > Also, we should try
> > (if not already the case) to cache our clock/i2s state so that
> > subsequent prepare() don't try to change things that are already ok.
>
> I do that, the function reads the dws and sfr registers and exits early
> if they match.
Ok. Be careful that I've removed the initial init of TAS thinking we
always get to clock restart to do it in prepare()... might need to be
put back.
Ben.
^ permalink raw reply
* RE: [PATCH 1/3] Freescale QE UCC gigabit ethernet driver
From: Li Yang-r58472 @ 2006-07-07 8:59 UTC (permalink / raw)
To: Kumar Gala; +Cc: Andrew Morton, netdev, jgarzik, linuxppc-dev
In-Reply-To: <FA983307-6A01-4FCB-A15A-ACC0E7B068A9@kernel.crashing.org>
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Thursday, July 06, 2006 9:45 PM
> To: Li Yang-r58472
> Cc: Andrew Morton; jgarzik@pobox.com; netdev@vger.kernel.org;
> linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH 1/3] Freescale QE UCC gigabit ethernet driver
>=20
> Nack. Here are some high level things that should be addressed:
> * There is a ton of debug code that should probably be stripped out,
> such as dump_regs, etc..
The reason I left these debug code in is that, QE is very flexible.
User probably needs to fine tune parameters for their own application.
It will be good to give them some clue doing that. It's fine to remove
them, if you do think they are too verbose.
> * The phy support should use the phylib instead
I'll do this when I do get some time. ;)
> * convert from being a platform_device to of_device
I'm not up against moving to use of_device. But why are we putting
extra effort in closing the door to backward compatibility with ppc
arch, and doesn't provide any new feature. ;)
>=20
> - kumar
>=20
^ permalink raw reply
* Re: G5 troubles booting powerpc-git (July 6)
From: Benjamin Herrenschmidt @ 2006-07-07 8:57 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20060707015237.68c768f2.akpm@osdl.org>
> > If it doesn't fix it, then it's indeed a completely different issue that I'll have to track down tomorrow
> > hopefully.
>
> Needs this to compile:
Yeah, it's a powermac-only patch at the moment... thanks for doing part
of my work tho :)
Cheers,
Ben.
> diff -puN arch/powerpc/platforms/pseries/ras.c~a-fix arch/powerpc/platforms/pseries/ras.c
> --- a/arch/powerpc/platforms/pseries/ras.c~a-fix
> +++ a/arch/powerpc/platforms/pseries/ras.c
> @@ -93,8 +93,7 @@ static void request_ras_irqs(struct devi
> for (i = 0; i < opicplen; i++) {
> if (count > 15)
> break;
> - virqs[count] = irq_create_mapping(NULL, *(opicprop++),
> - IRQ_TYPE_NONE);
> + virqs[count] = irq_create_mapping(NULL, *(opicprop++));
> if (virqs[count] == NO_IRQ)
> printk(KERN_ERR "Unable to allocate interrupt "
> "number for %s\n", np->full_name);
> diff -puN arch/powerpc/platforms/pseries/xics.c~a-fix arch/powerpc/platforms/pseries/xics.c
> --- a/arch/powerpc/platforms/pseries/xics.c~a-fix
> +++ a/arch/powerpc/platforms/pseries/xics.c
> @@ -757,7 +757,7 @@ void xics_request_IPIs(void)
> {
> unsigned int ipi;
>
> - ipi = irq_create_mapping(xics_host, XICS_IPI, 0);
> + ipi = irq_create_mapping(xics_host, XICS_IPI);
> BUG_ON(ipi == NO_IRQ);
>
> /*
> diff -puN drivers/char/hvsi.c~a-fix drivers/char/hvsi.c
> --- a/drivers/char/hvsi.c~a-fix
> +++ a/drivers/char/hvsi.c
> @@ -1299,7 +1299,7 @@ static int __init hvsi_console_init(void
> hp->inbuf_end = hp->inbuf;
> hp->state = HVSI_CLOSED;
> hp->vtermno = *vtermno;
> - hp->virq = irq_create_mapping(NULL, irq[0], 0);
> + hp->virq = irq_create_mapping(NULL, irq[0]);
> if (hp->virq == NO_IRQ) {
> printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
> __FUNCTION__, irq[0]);
> _
>
> But it still doesn't help.
>
>
> These:
>
> arch/powerpc/sysdev/i8259.c:222: warning: initialization from incompatible pointer type
> arch/powerpc/platforms/pseries/xics.c:555: warning: initialization from incompatible pointer type
> arch/powerpc/platforms/pseries/xics.c:561: warning: initialization from incompatible pointer type
>
> look like super-serious box-killers. Hope I'm not using either of those.
As I said, it's powermac only for now. I need to fix the above among
others. It's simple changes in most case. In the meantime, try on your
quad using a g5_defconfig
Ben.
^ permalink raw reply
* Re: snd-aoa: g5 tas codec problems
From: Johannes Berg @ 2006-07-07 9:04 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, alsa-devel
In-Reply-To: <1152262585.9862.61.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
On Fri, 2006-07-07 at 18:56 +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2006-07-07 at 10:49 +0200, Johannes Berg wrote:
> > On Fri, 2006-07-07 at 17:47 +1000, Benjamin Herrenschmidt wrote:
> > > Also, we should try
> > > (if not already the case) to cache our clock/i2s state so that
> > > subsequent prepare() don't try to change things that are already ok.
> >
> > I do that, the function reads the dws and sfr registers and exits early
> > if they match.
>
> Ok. Be careful that I've removed the initial init of TAS thinking we
> always get to clock restart to do it in prepare()... might need to be
> put back.
Oh yes, we do, wonder why it even worked then since most of the time
we'll be using whatever the firmware does (44.1KHz,16bit).
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* SIU_INT_IRQ4 in MPC 8260
From: jagannathanjay @ 2006-07-07 9:05 UTC (permalink / raw)
To: linuxppc-embedded
Hi all
I am trying to set up a interrupt handler for SIU_INT_IRQ4.
The target I am using is MPC 8260 , emmbedded planet Evaluation board.
The OS is Embedded Linux .
-------------------------------------------------------------------------
------------
void my_interrupt_handler(int irq, void *dev_id, struct pt_regs *regs)
{
printk("*********** \n");
}
if( request_irq(SIU_INT_IRQ4,my_interrupt_handler,0,0,0) < 0)
{
printk("\n unable to register the interrupt handler \n");
}
-------------------------------------------------------------------------
------------
But my_interrupt_handler isn't getting called .
Can anyone help me to fix this problem
Regards
Jagan
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and
industry-leading spam and email virus protection.
^ permalink raw reply
* Re: G5 troubles booting powerpc-git (July 6)
From: Andrew Morton @ 2006-07-07 9:11 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1152262667.9862.64.camel@localhost.localdomain>
On Fri, 07 Jul 2006 18:57:47 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> In the meantime, try on your quad using a g5_defconfig
I tried it with your recently-sent patch applied. It still dies in
smu_sensors_init().
^ permalink raw reply
* RE: SIU_INT_IRQ4 in MPC 8260
From: Li Yang-r58472 @ 2006-07-07 9:18 UTC (permalink / raw)
To: jagannathanjay, linuxppc-embedded
In-Reply-To: <8C86FBB9DCF99D2-1D1C-336A@FWM-D43.sysops.aol.com>
Are you sure the IRQ4 line is generating irqs? Did you measure the line
using an oscilloscope?
Best Regards,
Leo
> -----Original Message-----
> From: linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org
> [mailto:linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org] On
Behalf
> Of jagannathanjay@aim.com
> Sent: Friday, July 07, 2006 5:05 PM
> To: linuxppc-embedded@ozlabs.org
> Subject: SIU_INT_IRQ4 in MPC 8260
>=20
> Hi all
>=20
> I am trying to set up a interrupt handler for SIU_INT_IRQ4.
>=20
> The target I am using is MPC 8260 , emmbedded planet Evaluation board.
>=20
> The OS is Embedded Linux .
>
------------------------------------------------------------------------
-
> ------------
> void my_interrupt_handler(int irq, void *dev_id, struct pt_regs *regs)
> {
>=20
> printk("*********** \n");
>=20
> }
>=20
>=20
> if( request_irq(SIU_INT_IRQ4,my_interrupt_handler,0,0,0) < 0)
> {
> printk("\n unable to register the interrupt handler \n");
> }
>=20
>
------------------------------------------------------------------------
-
> ------------
>=20
> But my_interrupt_handler isn't getting called .
>=20
> Can anyone help me to fix this problem
>=20
> Regards
> Jagan
>=20
>=20
>=20
>=20
>=20
>
________________________________________________________________________
> Check Out the new free AIM(R) Mail -- 2 GB of storage and
> industry-leading spam and email virus protection.
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: G5 troubles booting powerpc-git (July 6)
From: Benjamin Herrenschmidt @ 2006-07-07 9:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20060707021137.7f5dd182.akpm@osdl.org>
On Fri, 2006-07-07 at 02:11 -0700, Andrew Morton wrote:
> On Fri, 07 Jul 2006 18:57:47 +1000
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> >
> > In the meantime, try on your quad using a g5_defconfig
>
> I tried it with your recently-sent patch applied. It still dies in
> smu_sensors_init().
Ok, so there's something else. I'll let you know.
Ben.
^ permalink raw reply
* RE: SIU_INT_IRQ4 in MPC 8260
From: Li Yang-r58472 @ 2006-07-07 9:31 UTC (permalink / raw)
To: jagannathanjay; +Cc: linuxppc-embedded
In-Reply-To: <8C86FBE3C676D29-1D1C-33C6@FWM-D43.sysops.aol.com>
Interrupt is signal sending from external devices to CPU notifying
something has happened. So if you want your interrupt handler be
called, first you have to make sure the device does send such signals.
Best Regards,
Leo
> -----Original Message-----
> From: jagannathanjay@aim.com [mailto:jagannathanjay@aim.com]
> Sent: Friday, July 07, 2006 5:24 PM
> To: Li Yang-r58472
> Subject: Re: SIU_INT_IRQ4 in MPC 8260
>=20
> No I haven't measured the IRQ4 line
>=20
> I am newbie into MPC8260 .
>=20
> Can u guide me as to what way I should proceed to get my interrupt
> handler working?
>=20
> Regards
> Jagan
>=20
>=20
>=20
> -----Original Message-----
> From: Li Yang-r58472 <LeoLi@freescale.com>
> To: jagannathanjay@aim.com; linuxppc-embedded@ozlabs.org
> Sent: Fri, 7 Jul 2006 17:18:54 +0800
> Subject: RE: SIU_INT_IRQ4 in MPC 8260
>=20
> Are you sure the IRQ4 line is generating irqs? Did you measure the
> line
> using an oscilloscope?
>=20
> Best Regards,
> Leo
> > -----Original Message-----
> > From: linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org
> > [mailto:linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org] =
On
> Behalf
> > Of jagannathanjay@aim.com
> > Sent: Friday, July 07, 2006 5:05 PM
> > To: linuxppc-embedded@ozlabs.org
> > Subject: SIU_INT_IRQ4 in MPC 8260
> >
> > Hi all
> >
> > I am trying to set up a interrupt handler for SIU_INT_IRQ4.
> >
> > The target I am using is MPC 8260 , emmbedded planet Evaluation
board.
> >
> > The OS is Embedded Linux .
> >
>
------------------------------------------------------------------------
> -
> > ------------
> > void my_interrupt_handler(int irq, void *dev_id, struct pt_regs
*regs)
> > {
> >
> > printk("***********
> ");
> >
> > }
> >
> >
> > if( request_irq(SIU_INT_IRQ4,my_interrupt_handler,0,0,0) < 0)
> > {
> > printk("
> unable to register the interrupt handler
> ");
> > }
> >
> >
>
------------------------------------------------------------------------
> -
> > ------------
> >
> > But my_interrupt_handler isn't getting called .
> >
> > Can anyone help me to fix this problem
> >
> > Regards
> > Jagan
> >
> >
> >
> >
> >
> >
>
________________________________________________________________________
> > Check Out the new free AIM(R) Mail -- 2 GB of storage and
> > industry-leading spam and email virus protection.
> >
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
>=20
>
________________________________________________________________________
> Check Out the new free AIM(R) Mail -- 2 GB of storage and
> industry-leading spam and email virus protection.
^ permalink raw reply
* Re: SIU_INT_IRQ4 in MPC 8260
From: Laurent Pinchart @ 2006-07-07 9:39 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: jagannathanjay
In-Reply-To: <8C86FBB9DCF99D2-1D1C-336A@FWM-D43.sysops.aol.com>
> I am trying to set up a interrupt handler for SIU_INT_IRQ4.
>
> The target I am using is MPC 8260 , emmbedded planet Evaluation board.
> The OS is Embedded Linux .
[snip]
> But my_interrupt_handler isn't getting called .
Make sure the CPM IRQ controller is properly configured. Here's the code I
used to configure IRQ5 and IRQ6 in edge sensitive mode. Read the MPC8260
datasheet to check how to set other options. If IRQ4 is multiplexed with
other signals, make sure you configured the MPC8260 to use the external pin
as IRQ4.
static void __init tbox_cp11_init_irq(void)
{
volatile intctl_cpm2_t *ic = &cpm2_immr->im_intctl;
init_irq();
/* Make IRQ5 and IRQ6 edge sensitive */
ic->ic_siexr |= 1 << (14 - (SIU_INT_IRQ5 - SIU_INT_IRQ1));
irq_desc[SIU_INT_IRQ5].status &= ~IRQ_LEVEL;
ic->ic_siexr |= 1 << (14 - (SIU_INT_IRQ6 - SIU_INT_IRQ1));
irq_desc[SIU_INT_IRQ6].status &= ~IRQ_LEVEL;
}
void __init m82xx_board_init(void)
{
init_irq = ppc_md.init_IRQ;
ppc_md.init_IRQ = tbox_cp11_init_irq;
}
Laurent Pinchart
^ permalink raw reply
* Re: [Alsa-devel] [RFC 01/12] snd-powermac: no longer handle anything with a layout-id property
From: Takashi Iwai @ 2006-07-07 9:51 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: alsa-devel, netstar, linuxppc-dev, Lee Revell, Johannes Berg
In-Reply-To: <1152250720.9862.32.camel@localhost.localdomain>
At Fri, 07 Jul 2006 15:38:40 +1000,
Benjamin Herrenschmidt wrote:
>
> On Fri, 2006-06-30 at 01:16 +0200, Andreas Schwab wrote:
> > Lee Revell <rlrevell@joe-job.com> writes:
> >
> > > What is the content of /proc/asound/cards? The patches must have
> > > changed the card name and failed to create a matching config file
> > > in /usr/share/alsa/cards.
> >
> > Thanks for the hint. I have added 'AppleOnbdAudio cards.PMac' to
> > /usr/share/alsa/cards/aliases.conf, and it works again.
>
> There is still an issue... wether to enable softvol or not... With
> snd-aoa, the card name is always the same but wether it has hardware
> volume control or not (Toonie doesn't) is not known... Alsa should have
> ways to add softvol automatically if no master volume control exist.
Currently, it's aliased to PMacToonie.conf, so that "PCM" volume is
added automatically when no corresponding h/w volume eixsts.
Takashi
^ permalink raw reply
* Re: [Alsa-devel] [RFC 01/12] snd-powermac: no longer handle anything with a layout-id property
From: Johannes Berg @ 2006-07-07 9:55 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, netstar, linuxppc-dev, Lee Revell
In-Reply-To: <s5hpsghwxny.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
On Fri, 2006-07-07 at 11:51 +0200, Takashi Iwai wrote:
> Currently, it's aliased to PMacToonie.conf, so that "PCM" volume is
> added automatically when no corresponding h/w volume eixsts.
Will submit a patch to name it "PCM" then on tas instead of "PCM1"
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH 15/20] [powerpc, netdevices] Constify & voidify get_property()
From: Paul Mackerras @ 2006-07-07 10:35 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev, cbe-oss-dev, netdev
In-Reply-To: <98457831@toto.iv>
Jeremy Kerr writes:
> powerpc-specific network device driver changes.
For some reason, the whitespace got munged on this one. There were
some rejects on some of the other patches due to some of Ben H's
patches. Please fix them and move the include/linux/platform_device.h
change into the same patch as the drivers/base/platform.c change.
I have applied patches 1-3. Please resubmit the rest.
Regards,
Paul.
^ permalink raw reply
* Re: [1/5][POWERPC] boot: prepare for zImage.kexec
From: Paul Mackerras @ 2006-07-07 10:35 UTC (permalink / raw)
To: Milton Miller; +Cc: linuxppc-dev, Sam Ravnborg
In-Reply-To: <200607012346.k61NkWXL006760@sullivan.realtime.net>
Milton Miller writes:
> This patch moves the initializations of prom variables to boot/prom.c
> to allow it to be replaced for kexec. Kexec does not care about
> the stdout handle, but will care about the location of the device
> tree and will search for RTAS.
Unfortunately it doesn't apply now because of other changes to
boot.h. Please respin the series against the powerpc.git tree.
Thanks,
Paul.
^ permalink raw reply
* patches added to powerpc.git tree
From: Paul Mackerras @ 2006-07-07 11:29 UTC (permalink / raw)
To: linuxppc-dev
The following patches have been pushed to the powerpc.git tree (master
branch):
Benjamin Herrenschmidt:
[POWERPC] Workaround Pegasos incorrect ISA "ranges"
[POWERPC] Fix 32 bits warning in prom_init.c
[POWERPC] Fix non-MPIC CHRPs with CONFIG_SMP set
[POWERPC] Fix default clock for udbg_16550
[POWERPC] Fix legacy_serial.c error handling on 32 bits
[POWERPC] Add briq support to CHRP
[POWERPC] Add support for briq front panel
[POWERPC] More offb/bootx fixes
[POWERPC] Xserve G5 thermal control fixes
[POWERPC] Add cpufreq support for Xserve G5
Jeremy Kerr:
[POWERPC] Remove linux,device properties
[POWERPC] Use const qualifiers for prom parsing utilites
[POWERPC] Remove linux,pci-domain properties
Johannes Berg:
[POWERPC] fix up front-LED Kconfig
Michael Ellerman:
[POWERPC] Fix mem= handling when the memory limit is > RMO size
Niels Kristian Bech Jensen:
[POWERPC] Add -fno-stack-protector to BOOTCFLAGS in arch/powerpc/boot/Makefile.
arch/powerpc/Kconfig | 2
arch/powerpc/boot/Makefile | 4
arch/powerpc/configs/pmac32_defconfig | 112 ++++++++-
arch/powerpc/kernel/legacy_serial.c | 13 +
arch/powerpc/kernel/of_device.c | 24 --
arch/powerpc/kernel/pci_64.c | 39 ---
arch/powerpc/kernel/prom_init.c | 42 ++++
arch/powerpc/kernel/prom_parse.c | 22 +-
arch/powerpc/kernel/smp.c | 24 +-
arch/powerpc/kernel/udbg_16550.c | 6 -
arch/powerpc/mm/lmb.c | 3
arch/powerpc/platforms/chrp/pci.c | 42 +++-
arch/powerpc/platforms/chrp/setup.c | 39 +++
arch/powerpc/platforms/powermac/bootx_init.c | 35 ++-
arch/powerpc/platforms/powermac/cpufreq_64.c | 78 ++++---
drivers/char/Kconfig | 14 +
drivers/char/Makefile | 1
drivers/char/briq_panel.c | 268 +++++++++++++++++++++++
drivers/ide/Kconfig | 14 -
drivers/macintosh/Kconfig | 9 +
drivers/macintosh/therm_pm72.c | 218 +++++++++++++++++-
drivers/macintosh/therm_pm72.h | 33 +++
drivers/macintosh/via-pmu-led.c | 2
drivers/video/offb.c | 307 ++++++++++++++------------
include/asm-powerpc/processor.h | 1
include/asm-powerpc/prom.h | 2
26 files changed, 1023 insertions(+), 331 deletions(-)
create mode 100644 drivers/char/briq_panel.c
^ permalink raw reply
* Re: patches added to powerpc.git tree
From: Johannes Berg @ 2006-07-07 11:39 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17582.17835.641485.233064@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
On Fri, 2006-07-07 at 21:29 +1000, Paul Mackerras wrote:
> Johannes Berg:
> [POWERPC] fix up front-LED Kconfig
Thanks for picking this up.
I notice you haven't picked up Andreas' irq conversion fix, was that
intentional? Or did I miss it going in elsewhere?
Thanks,
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox