[PATCH 2/5] [RFC] Add support for lite5200b to arch/powerpc

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Nov 7 13:04:32 EST 2006


> +static int __init lite5200_probe(void)
> +{
> +	unsigned long node = of_get_flat_dt_root();
> +	const char *model = of_get_flat_dt_prop(node, "model", NULL);
> +
> +	if (!of_flat_dt_is_compatible(node, "mpc52xx"))
> +		return 0;
> +	pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown");
> +
> +	return 1;
> +}

Are you creating a "generic" mpc52xx machine or a "lite5200b" machine ?

If you do the former, it will try to match on any board with that
compatible propery, thus any mpc52xx based board. That is probably not
what you want.

Put something like model "lite5200b" compatible "lite5200" "lite5200b"
in your / and check for that. Call you board lite5200, not mpc52xx.

Ben.





More information about the Linuxppc-dev mailing list