From patchwork Tue Oct 21 12:41:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 39114 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7ED7C202DB for ; Tue, 21 Oct 2014 12:42:11 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id d1sf850659wiv.10 for ; Tue, 21 Oct 2014 05:42:07 -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=n0Zc7ZqQJ9G6+Y7WF0CIlbwcIFCFso7RLBlTukt+oJE=; b=RCqSmq6LymK3fci8AdMKHiu4O9VNusvlKp8FGL8ED8OEdJ646m/hkkYhaCfAKNje/4 JDM5CG1TnVfj6rrhyt17DEc+zv/GXBAaJ4dI5fBgRLWELalfiO67TLmbv9+kHVzjSbJB PAb7acQjJPyeW9KY7Fkbca/v0V2D/2vEmdKyLSMrE04at7tyXoX46n3kvxuS17SSl7Vq PV3ZKUKQBR+8LtvdsADTMFZmId9KY89Wt54CZAPldzev9EGxXRFbz4pwz8wBWQ0N0xqa 9w635YfOG8sNM8FwCfWOJzfSmkpamiBOwNG4H9dW8UbdHNh/xIvjmD/f+AO2YzJ0uA5f 5qrQ== X-Gm-Message-State: ALoCoQn1bXTs7vmF7RVj4cOSH6cw+HRN1LBPShw4kNJTEVJKxvqd2+OX4jNwISqbAQnqCeYQMazh X-Received: by 10.181.27.135 with SMTP id jg7mr3516007wid.5.1413895325775; Tue, 21 Oct 2014 05:42:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.166 with SMTP id t6ls59033lat.20.gmail; Tue, 21 Oct 2014 05:42:05 -0700 (PDT) X-Received: by 10.152.243.39 with SMTP id wv7mr33670756lac.48.1413895325548; Tue, 21 Oct 2014 05:42:05 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id ue10si3085691lac.12.2014.10.21.05.42.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 05:42:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so929486lbg.4 for ; Tue, 21 Oct 2014 05:42:05 -0700 (PDT) X-Received: by 10.152.6.228 with SMTP id e4mr34425913laa.71.1413895325332; Tue, 21 Oct 2014 05:42:05 -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 c5csp488777lbz; Tue, 21 Oct 2014 05:42:04 -0700 (PDT) X-Received: by 10.70.43.233 with SMTP id z9mr10561177pdl.128.1413895324175; Tue, 21 Oct 2014 05:42:04 -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.03 for ; Tue, 21 Oct 2014 05:42:04 -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 S932518AbaJUMmC (ORCPT + 5 others); Tue, 21 Oct 2014 08:42:02 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:45071 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932402AbaJUMmB (ORCPT ); Tue, 21 Oct 2014 08:42:01 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9LCfxTt016281; Tue, 21 Oct 2014 07:41:59 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9LCfxDx018364; Tue, 21 Oct 2014 07:41:59 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Tue, 21 Oct 2014 07:41:58 -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 s9LCfoo3012514; Tue, 21 Oct 2014 07:41:57 -0500 From: Roger Quadros To: CC: , , , Roger Quadros , Sekhar Nori Subject: [PATCH 3/5] ARM: OMAP2+: gpmc: Always enable A26-A11 for non NAND devices Date: Tue, 21 Oct 2014 15:41:47 +0300 Message-ID: <1413895309-9152-4-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.217.173 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: , Although RESET state of LIMITEDADDRESS bit in GPMC_CONFIG register is 0 (i.e. A26-A11 enabled), faulty bootloaders might accidentally set this bit. e.g. u-boot 2014.07 with CONFIG_NOR disabled. Explicity disable LIMITEDADDRESS bit for non NAND devices so that they can always work. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori --- arch/arm/mach-omap2/gpmc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index f5d9dd2..0ba95d3 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -85,6 +85,8 @@ #define GPMC_ECC_CTRL_ECCREG8 0x008 #define GPMC_ECC_CTRL_ECCREG9 0x009 +#define GPMC_CONFIG_LIMITEDADDRESS BIT(1) + #define GPMC_CONFIG2_CSEXTRADELAY BIT(7) #define GPMC_CONFIG3_ADVEXTRADELAY BIT(7) #define GPMC_CONFIG4_OEEXTRADELAY BIT(7) @@ -1501,6 +1503,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, struct resource res; unsigned long base; int ret, cs; + u32 val; if (of_property_read_u32(child, "reg", &cs) < 0) { dev_err(&pdev->dev, "%s has no 'reg' property\n", @@ -1569,6 +1572,11 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, goto err; } + /* Clear limited address i.e. enable A26-A11 */ + val = gpmc_read_reg(GPMC_CONFIG); + val &= ~GPMC_CONFIG_LIMITEDADDRESS; + gpmc_write_reg(GPMC_CONFIG, val); + no_timings: if (of_platform_device_create(child, NULL, &pdev->dev)) return 0;