[PATCH 2/3 v2] Add initial iomega StorCenter board port.

Stephen Rothwell sfr at canb.auug.org.au
Wed Jan 9 16:29:53 EST 2008


Hi Jon,

On Tue, 08 Jan 2008 16:07:17 -0600 Jon Loeliger <jdl at jdl.com> wrote:
>
> +static void __init storcenter_init_IRQ(void)
> +{
> +	struct mpic *mpic;
> +	struct device_node *dnp;
> +	const void *prop;
> +	int size;
> +	phys_addr_t paddr;
> +
> +	dnp = of_find_node_by_type(NULL, "open-pic");
> +	if (dnp == NULL)
> +		return;
> +
> +	prop = of_get_property(dnp, "reg", &size);
> +	paddr = (phys_addr_t)of_translate_address(dnp, prop);
> +	mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
> +			4, 32, " EPIC     ");
> +	BUG_ON(mpic == NULL);

> +	mpic_assign_isu(mpic, 0, paddr + 0x10200);
> +	mpic_assign_isu(mpic, 1, paddr + 0x10220);
> +	mpic_assign_isu(mpic, 2, paddr + 0x10240);
> +	mpic_assign_isu(mpic, 3, paddr + 0x10260);
> +	mpic_assign_isu(mpic, 4, paddr + 0x10280);
> +	mpic_assign_isu(mpic, 5, paddr + 0x11120);
> +	mpic_assign_isu(mpic, 6, paddr + 0x11140);
> +
> +	mpic_init(mpic);
> +}

The above needs a of_node_put(dnp) somewhere.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080109/7de880d9/attachment.pgp>


More information about the Linuxppc-dev mailing list