On Fri, Mar 14, 2008 at 10:24:30AM +0100, Heiko Schocher wrote:
> +     setbits16(&mpc8xx_immr->im_ioport.iop_pcso, 0x300);
> +     cpm1_clk_setup(CPM_CLK_SCC3, CPM_CLK5, CPM_CLK_RX);
> +     cpm1_clk_setup(CPM_CLK_SCC3, CPM_CLK6, CPM_CLK_TX);
> +     setbits32(&mpc8xx_immr->im_cpm.cp_pbpar, 0x300);
> +     setbits32(&mpc8xx_immr->im_cpm.cp_pbdir, 0x300);

Any particular reason not to use cpm1_set_pin() rather than those setbits?

> +static void __init mgsuvd_setup_arch(void)
> +{
> +     struct device_node *cpu;
> +
> +     cpu = of_find_node_by_type(NULL, "cpu");
> +     if (cpu != 0) {
> +             const unsigned int *fp;
> +
> +             fp = of_get_property(cpu, "clock-frequency", NULL);
> +             if (fp != 0)
> +                     loops_per_jiffy = *fp / HZ;
> +             else
> +                     loops_per_jiffy = 50000000 / HZ;
> +             of_node_put(cpu);
> +     }
> +

This is obsolete and unnecessary.

> +     ROOT_DEV = Root_NFS;

Likewise.

> +static int __init mgsuvd_probe(void)
> +{
> +     char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
> +                                       "model", NULL);
> +     if (model == NULL)
> +             return 0;
> +     if (strcmp(model, "MGSUVD"))
> +             return 0;
> +
> +     return 1;
> +}

Check compatible (using of_flat_dt_is_compatible), not model.

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to