[PATCH 2/2 v3] powerpc/85xx: Abstract common define of signal multiplex control for qe
Tabi Timur-B04825
B04825 at freescale.com
Tue Feb 14 03:24:08 EST 2012
On Sun, Feb 12, 2012 at 11:33 PM, Zhicheng Fan <B32736 at freescale.com> wrote:
> if (np) {
> - pmuxcr = of_iomap(np, 0) + MPC85xx_PMUXCR_OFFSET;
> + guts = of_iomap(np, 0);
>
> - if (!pmuxcr)
> - printk(KERN_EMERG "Error: Alternate function"
> - " signal multiplex control register not"
> - " mapped!\n");
> + if (!guts)
> + pr_err("mpc85xx-rdb: could not map global utilties register!\n");
> else
> /* P1021 has pins muxed for QE and other functions. To
> * enable QE UEC mode, we need to set bit QE0 for UCC1
> @@ -291,11 +286,11 @@ static void __init mpc85xx_mds_qe_init(void)
> * and QE12 for QE MII management signals in PMUXCR
> * register.
> */
> - setbits32(pmuxcr, MPC85xx_PMUXCR_QE0 |
> + setbits32(&guts->pmuxcr, MPC85xx_PMUXCR_QE0 |
> MPC85xx_PMUXCR_QE3 |
> MPC85xx_PMUXCR_QE9 |
> MPC85xx_PMUXCR_QE12);
> -
> + iounmap(guts);
This needs to move into the "else" statement:
else {
setbits(...
iounmap( ...)
}
--
Timur Tabi
Linux kernel developer at Freescale
More information about the Linuxppc-dev
mailing list