[PATCH 07/10] ARM: mx28: add the second fec device registration
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Dec 29 05:50:01 EST 2010
Hello Shawn,
> -static const struct fec_platform_data mx28_fec_pdata __initconst = {
> - .phy = PHY_INTERFACE_MODE_RMII,
> +static struct fec_platform_data mx28_fec_pdata[] = {
> + {
> + /* fec0 */
> + .phy = PHY_INTERFACE_MODE_RMII,
> + }, {
> + /* fec1 */
> + .phy = PHY_INTERFACE_MODE_RMII,
> + },
> };
I think there is no need to duplicate the platform_data as mx28_add_fec
makes a copy anyhow. Did you remove __initconst and const on purpose?
> static void __init mx28evk_init(void)
> @@ -117,7 +136,10 @@ static void __init mx28evk_init(void)
> mx28_add_duart();
>
> mx28evk_fec_reset();
> - mx28_add_fec(0, &mx28_fec_pdata);
> + mx28_add_fec(0, &mx28_fec_pdata[0]);
> +#ifdef CONFIG_FEC2
> + mx28_add_fec(1, &mx28_fec_pdata[1]);
> +#endif
> }
>
> static void __init mx28evk_timer_init(void)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the linux-arm-kernel
mailing list