Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755122AbcKBNy5 (ORCPT ); Wed, 2 Nov 2016 09:54:57 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35594 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbcKBNyz (ORCPT ); Wed, 2 Nov 2016 09:54:55 -0400 Subject: Re: [PATCH v2 1/2] net: stmmac: Add OXNAS Glue Driver To: Joachim Eastwood References: <20161031105345.16711-1-narmstrong@baylibre.com> <20161031105442.17228-1-narmstrong@baylibre.com> Cc: "peppe.cavallaro" , alexandre.torgue@st.com, netdev , linux-oxnas@lists.tuxfamily.org, "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" From: Neil Armstrong Organization: Baylibre Message-ID: Date: Wed, 2 Nov 2016 14:54:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1019 Lines: 40 On 10/31/2016 12:12 PM, Joachim Eastwood wrote: > Hi Neil, > > On 31 October 2016 at 11:54, Neil Armstrong wrote: >> Add Synopsys Designware MAC Glue layer for the Oxford Semiconductor OX820. >> >> Acked-by: Joachim Eastwood >> Signed-off-by: Neil Armstrong >> --- >> +static int oxnas_dwmac_init(struct oxnas_dwmac *dwmac) >> +{ >> + unsigned int value; >> + int ret; >> + >> + /* Reset HW here before changing the glue configuration */ >> + ret = device_reset(dwmac->dev); >> + if (ret) >> + return ret; >> + >> + ret = clk_prepare_enable(dwmac->clk); >> + if (ret) >> + return ret; >> + >> + ret = regmap_read(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, &value); >> + if (ret < 0) >> + return ret; > > If regmap reading fails here, the clock will be left on as probe fails. > Indeed, thanks. Neil [...] > > > regards, > Joachim Eastwood >