Hi Mark,

On Mon, 14 Jan 2008 16:00:57 -0700 "Mark A. Greer" <[EMAIL PROTECTED]> wrote:
>
> +++ b/arch/powerpc/platforms/embedded6xx/katana750i.c
> @@ -0,0 +1,314 @@
> +/*
> + * Board setup routines for the Emerson Katana-750i/752i
> + *
> + * Author: Mark A. Greer <[EMAIL PROTECTED]>
> + *
> + * Based on code prpmc2800.c by Dale Farnsworth <[EMAIL PROTECTED]>
> + * and original katana port by Tim Montgomery <[EMAIL PROTECTED]>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.

A Copyright notice would be nice.

> +static void __init katana750i_setup_arch(void)
> +{
> +     struct device_node *np;
> +     phys_addr_t paddr;
> +     const unsigned int *reg;
> +
> +     /*
> +      * ioremap mpp and gpp registers in case they are later
> +      * needed by katana750i_reset_board().
> +      */
> +     np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-mpp");
> +     reg = of_get_property(np, "reg", NULL);

What happens if np == NULL?

> +     paddr = of_translate_address(np, reg);
> +     of_node_put(np);
> +     mv64x60_mpp_reg_base = ioremap(paddr, reg[1]);
> +
> +     np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-gpp");
> +     reg = of_get_property(np, "reg", NULL);

Ditto.

> +     paddr = of_translate_address(np, reg);
> +     of_node_put(np);
> +     mv64x60_gpp_reg_base = ioremap(paddr, reg[1]);
> +
> +#ifdef CONFIG_PCI
> +     mv64x60_pci_init();
> +#endif

Maybe there should be a stub of mv64x60_pci_init for the non PCI case -
that would save the ifdefs in C code.

> +     np = of_find_compatible_node(NULL, NULL, "katana750i,cpld");
> +     reg = of_get_property(np, "reg", NULL);

What if np == NULL?

-- 
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/

Attachment: pgpPk666zu8Tv.pgp
Description: PGP signature

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

Reply via email to