[PATCH 2/3] mpc82xx: Embedded Planet EP8248E support
Stephen Rothwell
sfr at canb.auug.org.au
Wed Dec 12 15:43:06 EST 2007
On Tue, 11 Dec 2007 15:22:47 -0600 Scott Wood <scottwood at freescale.com> wrote:
>
> +++ b/arch/powerpc/platforms/82xx/ep8248e.c
> +
> +static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
> + const struct of_device_id *match)
> +{
> + struct mii_bus *bus;
> + struct resource res;
> + int ret, i;
> +
> + if (of_get_parent(ofdev->node) != ep8248e_bcsr_node)
> + return -ENODEV;
You need to do of_node_put() on the result of of_get_parent().
> +static struct cpm_pin ep8248_pins[] = {
Should this be const?
> +static void __init ep8248_setup_arch(void)
> +{
> + if (ppc_md.progress)
> + ppc_md.progress("ep8248_setup_arch()", 0);
> +
> + cpm2_reset();
> +
> + /* When this is set, snooping CPM DMA from RAM causes
> + * machine checks. See erratum SIU18.
> + */
> + clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
> +
> + ep8248e_bcsr_node =
> + of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr");
> + if (!ep8248e_bcsr_node) {
> + printk(KERN_ERR "No bcsr in device tree\n");
> + return;
> + }
> +
> + ep8248e_bcsr = of_iomap(ep8248e_bcsr_node, 0);
of_node_put(ep8248e_bcsr_node;
> +static int __init ep8248_probe(void)
> +{
> + unsigned long root = of_get_flat_dt_root();
> + return of_flat_dt_is_compatible(root, "fsl,ep8248e");
Again you should include asm/prom.h
--
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/20071212/18d6206e/attachment.pgp>
More information about the Linuxppc-dev
mailing list