From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas.langer at lantiq.com Date: Mon, 28 Jul 2014 08:09:34 +0000 Subject: [U-Boot] [PATCH 4/7] sunxi: Add CONFIG_MACPWR option In-Reply-To: <1406496323-13093-4-git-send-email-hdegoede@redhat.com> References: <1406496323-13093-1-git-send-email-hdegoede@redhat.com> <1406496323-13093-4-git-send-email-hdegoede@redhat.com> Message-ID: <593AEF6C47F46446852B067021A273D6FB85A3D5@MUCSE037.lantiq.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Hans, Hans de Goede wrote on?2014-07-27: > On some boards the phy needs to be powered up through a gpio, add > support for this. > > @@ -129,6 +129,11 @@ int cpu_eth_init(bd_t *bis) > { > __maybe_unused int rc; > +#ifdef CONFIG_MACPWR If this is powering a phy, maybe CONFIG_PHYPWR or similar is a better name? Because PHY and MAC are different things! And maybe adding GPIO to the name to indicate that the value is a GPIO number? All of these should be part of the description in the README, which each CONFIG_ option requires. > + gpio_direction_output(CONFIG_MACPWR, 1); > + mdelay(200); > +#endif > + > #ifdef CONFIG_SUNXI_EMAC > rc = sunxi_emac_initialize(bis); > if (rc < 0) { Best Regards, Thomas --- There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. ---