Thread (12 messages) flat view 12 messages, 5 authors, 2008-01-02

Re: [PATCH 2/3] mpc82xx: Embedded Planet EP8248E support

From: Stephen Rothwell <hidden>
Date: 2007-12-12 04:43:11

On Tue, 11 Dec 2007 15:22:47 -0600 Scott Wood [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ 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@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help