From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dr. Philipp Tomsich Date: Tue, 11 Jul 2017 15:44:52 +0200 Subject: [U-Boot] [PATCH] net: gmac_rockchip: Add support for pinctrl In-Reply-To: References: <20170703071312.19770-1-romain.perier@collabora.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > On 07 Jul 2017, at 05:58, Simon Glass wrote: > > +Philipp > > Hi Romain, > > On 3 July 2017 at 01:13, Romain Perier wrote: >> Currently, selecting state simple is done by the device driver model, >> prior probing the driver. The problem is that it's done and called on >> the pinctrl node with "gmac" as the "periph" struct udevice *. So >> pinctrl-rk3288 is looking for an interrupt property that is not found, >> and then gmac_config is never called. >> >> This commits toggles the pinctrl on the right node from the probe >> function of the driver. > > Is it possible to fix this while still using driver-model automatic pinctrl? I agree that we need to get a handle on the underlying issue and solve that instead of putting a band-aid on. >> Signed-off-by: Romain Perier >> --- >> drivers/net/gmac_rockchip.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c >> index 5e2ca76302..8581026b4a 100644 >> --- a/drivers/net/gmac_rockchip.c >> +++ b/drivers/net/gmac_rockchip.c >> @@ -160,6 +160,10 @@ static int gmac_rockchip_probe(struct udevice *dev) >> struct clk clk; >> int ret; >> >> + ret = pinctrl_select_state(dev, "simple"); >> + if (ret) >> + return ret; >> + >> ret = clk_get_by_index(dev, 0, &clk); >> if (ret) >> return ret; >> -- >> 2.11.0 >> > > Regards, > Simon