From patchwork Fri Nov 3 13:43:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10040107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1A72602D8 for ; Fri, 3 Nov 2017 13:44:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A46D02962A for ; Fri, 3 Nov 2017 13:44:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 994E929635; Fri, 3 Nov 2017 13:44:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C24A2962C for ; Fri, 3 Nov 2017 13:44:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756104AbdKCNoF (ORCPT ); Fri, 3 Nov 2017 09:44:05 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:58526 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756012AbdKCNoF (ORCPT ); Fri, 3 Nov 2017 09:44:05 -0400 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990592AbdKCNoCVMQeV (ORCPT ); Fri, 3 Nov 2017 14:44:02 +0100 Date: Fri, 3 Nov 2017 14:43:59 +0100 From: Ladislav Michl To: Roger Quadros Cc: linux-omap@vger.kernel.org, Tony Lindgren Subject: Re: [PATCH] memory: omap-gpmc: Make 'bank-width' property optional Message-ID: <20171103134359.shffctq3lwjri444@lenoch> References: <20171103095706.ws5itsccxe6pwv7d@lenoch> <97cba115-caff-322d-7059-5c7fa5d1ece1@ti.com> <20171103130909.ug35yc7ovjgkmahs@lenoch> <20171103131643.nq5fs4t63uyf34tl@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Nov 03, 2017 at 03:30:45PM +0200, Roger Quadros wrote: > On 03/11/17 15:16, Ladislav Michl wrote: [snip] > > Actually this comment is still wrong (and thus commit message). > > Documentation/devicetree/bindings/net/gpmc-eth.txt > > Ethernet is using this as well... > > Oh :(. Ideally it shouldn't have been the case. But damage is already done. > > I think we should still fix up the gpmc-eth binding document to use gpmc,device-width there. > And continue to support in code anybody already using bank-width for ethernet. Agreed, following version with decreased controversy. (note all this is only to get OneNAND merge ready :)) 8<----------------------- Subject: [PATCH] memory: omap-gpmc: Make 'bank-width' property optional Some devices are using 'gpmc,device-width' property to configure device width, so fail on missing 'bank-width' only if this property was previously unassigned. Signed-off-by: Ladislav Michl --- drivers/memory/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index ff73f2ad468c..f79e78b16a48 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2159,7 +2159,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, } else { ret = of_property_read_u32(child, "bank-width", &gpmc_s.device_width); - if (ret < 0) { + if (ret < 0 && !gpmc_s.device_width) { dev_err(&pdev->dev, "%pOF has no 'bank-width' property\n", child); goto err;