[PATCH 5/5] [POWERPC] 8xx: Add mpc885ads support and common mpc8xx.

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Nov 14 13:47:34 EST 2006


Few comments..

> +/*
> + * Called very early, device-tree isn't unflattened
> + */
> +int __init mpc8xx_probe(void)
> +{
> +	unsigned long root = of_get_flat_dt_root();
> +
> +	if (of_flat_dt_is_compatible(root, "mpc8xx"))
> +		return 1;
> +
> +	return 0;
> +}

Why hooks on that ?

Normally, board support files test for their specific board. Thus they
have their own probe() function, generally static just before the ppc_md
definition. You probably want to remove the above,.

> +define_machine(mpc885_ads) {
> +	.name			= "MPC885 ADS",
> +	.probe			= mpc8xx_probe,

Do your own probe function that specifically checks for and MPC885 ADS
board.






More information about the Linuxppc-dev mailing list