Re: [PATCH 1/2 v2] P1025RDB: Add Quicc Engine support
From: Tabi Timur-B04825 <hidden>
Date: 2012-02-09 16:17:36
+#ifdef CONFIG_QUICC_ENGINE
+ =A0 =A0 =A0 np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
+ =A0 =A0 =A0 if (np) {
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 qe_ic_init(np, 0, qe_ic_cascade_low_mpic,
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 qe_ic_casca=de_high_mpic);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_node_put(np);
+
+ =A0 =A0 =A0 } else
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_err("Could not find qe-ic node\n");
Since you have to use pr_err instead of dev_err, please add a prefix
to the message. Like this:
pr_err("mpc85xx-rdb: could not find qe-ic node\n");
or maybe something like this:
pr_err("%s: could not find qe-ic node\n", __func__);
+ =A0 =A0 =A0 if (machine_is(p1025_rdb)) {
+
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 __be32 __iomem *pmuxcr;
+
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 np =3D of_find_node_by_name(NULL, "global-u=tilities");
+
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (np) {
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pmuxcr =3D of_iomap(np, 0) =+ MPC85xx_PMUXCR_OFFSET; Use the ccsr_guts_85xx structure instead of hard-coded offsets. MPC85xx_PMUXCR_OFFSET should be deleted.
+ + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!pmuxcr) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_err(KERN=
_EMERG "Error: Alternate function"
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 " signal multiplex control register not"
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 " mapped!\n"); A missing node in the device tree is NOT an emergency. Also, the KERN_xxx macros are not supposed to be used in a pr_xxx macro. Please don't blindly copy/paste code from somewhere else without thinking about it. --=20 Timur Tabi Linux kernel developer at Freescale=