[POWERPC 03/15] [POWERPC] TQM5200 board support
Scott Wood
scottwood at freescale.com
Tue Oct 9 01:04:49 EST 2007
On Sun, Oct 07, 2007 at 01:19:54PM +0200, Marian Balakowicz wrote:
> + np = of_find_node_by_type(NULL, "cpu");
> + if (np) {
> + unsigned int *fp =
> + (int *)of_get_property(np, "clock-frequency", NULL);
> + if (fp != 0)
> + loops_per_jiffy = *fp / HZ;
> + else
> + loops_per_jiffy = 50000000 / HZ;
> + of_node_put(np);
> + }
This is unnecessary legacy cruft.
> +#ifdef CONFIG_PCI
> + np = of_find_node_by_type(NULL, "pci");
> + if (np) {
> + mpc52xx_add_bridge(np);
> + of_node_put(np);
> + }
> +#endif
You should check for a specific compatible, so that you don't match
PCI-to-PCI bridges.
> +#ifdef CONFIG_BLK_DEV_INITRD
> + if (initrd_start)
> + /*
> + * We want the proper initrd behavior, i.e., launching of
> + * /linuxrc from the initial root file system, and not only
> + * mounting it as the normal root file system.
> + */
> + ROOT_DEV = 0x0;
> + else
> +#endif
> +#ifdef CONFIG_ROOT_NFS
> + ROOT_DEV = Root_NFS;
> +#else
> + ROOT_DEV = Root_HDA1;
> +#endif
More legacy cruft.
> +void tqm5200_show_cpuinfo(struct seq_file *m)
> +{
> + struct device_node* np = of_find_all_nodes(NULL);
> + const char *model = NULL;
> +
> + if (np)
> + model = of_get_property(np, "model", NULL);
> +
> + seq_printf(m, "vendor\t\t: Freescale Semiconductor\n");
> + seq_printf(m, "machine\t\t: %s\n", model ? model : "unknown");
> +
> + of_node_put(np);
> +}
Get rid of this.
-Scott
More information about the Linuxppc-dev
mailing list