[PATCH] ARM i.MX53: enable fec driver on EVK board
From: Yong Shen <hidden>
Date: 2011-01-06 09:45:11
Hi Baruch, Thanks for comments.
quoted
+static inline void fec_reset(void)For the sake of clearer stack traces I prefer a less generic name for this routine, something like mx53_evk_fec_reset().
Acked.
quoted
+{ + ? ? int ret; + + ? ? /* reset FEC PHY */ + ? ? ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); + ? ? if (ret) { + ? ? ? ? ? ? printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); + ? ? ? ? ? ? return; + ? ? } + ? ? gpio_direction_output(SMD_FEC_PHY_RST, 0); + ? ? gpio_set_value(SMD_FEC_PHY_RST, 0);This seems to be redundant. gpio_direction_output() has already set the value to 0.
You are right. But, gpio_set_value is meant to be here to show the process of fec reset: first pull low and then pull high. And gpio_direction_output here is for direction configuration although it has the ability of configure output value. cheers Yong