RFC: MPC5200 PSC AC97 driver
Grant Likely
grant.likely at secretlab.ca
Sun Apr 20 02:03:41 EST 2008
On Fri, Apr 18, 2008 at 9:43 AM, Peter Czanik <pczanik at fang.fa.gau.hu> wrote:
> Hello,
>
> factory:/usr/src/linux-2.6.25 # diff -u
> arch/powerpc/kernel/prom_init.c.orig arch/powerpc/kernel/prom_init.c
> --- arch/powerpc/kernel/prom_init.c.orig 2008-04-18
> 13:55:07.000000000 +0200
> +++ arch/powerpc/kernel/prom_init.c 2008-04-18 16:26:51.000000000 +0200
> @@ -2212,6 +2212,7 @@
>
> static void __init fixup_device_tree_efika(void)
> {
> + int sound_ci = 1;
> int sound_irq[3] = { 2, 2, 0 };
> int bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
> 3,4,0, 3,5,0, 3,6,0, 3,7,0,
> @@ -2257,6 +2258,8 @@
> rv = prom_getprop(node, "interrupts", prop, sizeof(prop));
> if (rv == PROM_ERROR) {
> prom_printf("Adding sound interrupts property\n");
> + prom_setprop(node, "/builtin/sound", "cell-index",
> + &sound_ci, sizeof(int));
> prom_setprop(node, "/builtin/sound", "interrupts",
> sound_irq, sizeof(sound_irq));
> }
This probably isn't the ideal solution; but I've got no objection to
bringing it in as a work around until someone can make the driver
cleaner.
However, this change needs to be more robust. It must first check if
the cell-index property already exists before trying to create it
(just like how adding the interrupts property works).
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list