From patchwork Tue Oct 21 12:41:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 39116 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4B0D4202DB for ; Tue, 21 Oct 2014 12:47:19 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id q1sf766378lam.4 for ; Tue, 21 Oct 2014 05:47:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=z39RSdukeCUBZ6Q/Fpau0wzW1HX8a6SEj1+nkChHl5Q=; b=Yvd66V8CJWojU4pxnridyKpg18brn9dsgBYP8xyDUh8z2NOVQLJF46RYXoWP2xCW9w KlDM2qGpLa5wiREWY12iIHyWlUdL1nocNmHf/YtNMhZXxUyFtz9kzn+VuU0i2AU22PDb ywR/U/tBAVEeuziueDv1ZmjFdd4OJWOTHKXOl0QosXuU0kHjA3nX7K3ERwb2VXwQa6yu vYPOJtKpK0jyn8tdE5ofwd/Z7Wt4TLNt10Ayi5iazr6vBESwvx6qqG1SVmRSiDmlfJ29 RtsVgICXTqcG/fHEbD7f+fE1F7X62etEqMNz9Z6lRpdM78Y6q0gYE1ILa/BGWo9iucwx vcMg== X-Gm-Message-State: ALoCoQlL2zP3Fd5PD8VCrVeUTfT5+QqTW+ZKCfg+JWHHdFzU4KX7mNsnnBLa7EcatVTLKETb356F X-Received: by 10.180.74.130 with SMTP id t2mr3518768wiv.4.1413895322798; Tue, 21 Oct 2014 05:42:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.44 with SMTP id t12ls50551lal.104.gmail; Tue, 21 Oct 2014 05:42:02 -0700 (PDT) X-Received: by 10.152.243.39 with SMTP id wv7mr33670445lac.48.1413895322635; Tue, 21 Oct 2014 05:42:02 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id tb1si11844977lbb.130.2014.10.21.05.42.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 05:42:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so970979lab.12 for ; Tue, 21 Oct 2014 05:42:02 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr34125223lbc.23.1413895322401; Tue, 21 Oct 2014 05:42:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp488771lbz; Tue, 21 Oct 2014 05:42:01 -0700 (PDT) X-Received: by 10.67.3.202 with SMTP id by10mr34186842pad.81.1413895320939; Tue, 21 Oct 2014 05:42:00 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fa4si10878840pbc.238.2014.10.21.05.42.00 for ; Tue, 21 Oct 2014 05:42:00 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932442AbaJUMl7 (ORCPT + 5 others); Tue, 21 Oct 2014 08:41:59 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:57627 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932402AbaJUMl7 (ORCPT ); Tue, 21 Oct 2014 08:41:59 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9LCfv9Q031916; Tue, 21 Oct 2014 07:41:57 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9LCfv2x018344; Tue, 21 Oct 2014 07:41:57 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 21 Oct 2014 07:41:57 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9LCfoo2012514; Tue, 21 Oct 2014 07:41:55 -0500 From: Roger Quadros To: CC: , , , Roger Quadros , Sekhar Nori Subject: [PATCH 2/5] ARM: OMAP2+: gpmc: Error out if timings fail in gpmc_probe_generic_child() Date: Tue, 21 Oct 2014 15:41:46 +0300 Message-ID: <1413895309-9152-3-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1413895309-9152-1-git-send-email-rogerq@ti.com> References: <1413895309-9152-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , gpmc_cs_set_timings() returns non-zero if there was an error while setting the GPMC timings. e.g. Timing was too large to be accomodated with current GPMC clock frequency and available timing range. Fail in this case, else we risk operating a NOR device with non compliant timings. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori --- arch/arm/mach-omap2/gpmc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 45f680f..f5d9dd2 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1562,7 +1562,12 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, goto err; gpmc_read_timings_dt(child, &gpmc_t); - gpmc_cs_set_timings(cs, &gpmc_t); + ret = gpmc_cs_set_timings(cs, &gpmc_t); + if (ret) { + dev_err(&pdev->dev, "failed to set gpmc timings for: %s\n", + child->name); + goto err; + } no_timings: if (of_platform_device_create(child, NULL, &pdev->dev))