From patchwork Wed Oct 26 01:26:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 686836 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3t3XRz5nn7z9t0J for ; Wed, 26 Oct 2016 12:26:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=P9+2UqS+; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD2FCA759C; Wed, 26 Oct 2016 03:26:46 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5oL-bPvDurc5; Wed, 26 Oct 2016 03:26:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A2580A75B8; Wed, 26 Oct 2016 03:26:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C3298A75A9 for ; Wed, 26 Oct 2016 03:26:38 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QObBuQqOnG2p for ; Wed, 26 Oct 2016 03:26:38 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by theia.denx.de (Postfix) with ESMTPS id 15FF9A7579 for ; Wed, 26 Oct 2016 03:26:35 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id i85so21075524pfa.0 for ; Tue, 25 Oct 2016 18:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=haj0DYCFz+fSbdGuleIotv8h7yKWWi52Mh3IYO3Luf8=; b=P9+2UqS+fcgIdM3eTgbOOe55Rns7Vsk+l4q+g6AYuc2KqF2ylI2IiHcytU6mGRPyet bvxucTFj6VIVSk+2sgj5pQNj84avbBsPxLyg1ois5GWkTg9lv1YMDLZ4mxKYgGhfAU9Q f6QE82XBM85Ymov/l+qV358zPEmacLSxXyAm4PQvCqOsGl6XJ+TUg5O4vwXRagSJYCKh Aoz4vWyGdjYVUklC2Fm9yxk0Hih11b/epPIBd83VHGZdGk3AWzEvhdvqDjeKD5J2RBtL aFmJGgnfRk9hmR2Ee9w2DCmXA2p5lW6eJeQqNGc4m91bH9cAeeBudE3Fc+pjrTawirIC bJ7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=haj0DYCFz+fSbdGuleIotv8h7yKWWi52Mh3IYO3Luf8=; b=Jf8Q2YTlUOMeomPnBRUT5EVBXMFUjFDd7n0X1IJCRWk5ksP3fwm5X2+j/XwpxEFtR+ iqFQC+kWG4WmJSKq6bSWyU0Uy7p+jNsc6vBzhSDczF5Ze9teAwPYS9kJQP5Zl5K0rf/d mYsMmYbVR6dBGOGL7FDjsqyZ+2z5dvjFYB2jRpvoPc+X5wZyMR8+gLQDRO71hEzdIwr/ BIdmM+wynhqr0+60LY025HfFf8ACZ61RQFVyw8euMt7Alc9R/qqa8Nc+5NqvY4O/vE/Z Ymbh2Ig95NXVVjbufAlAg7g3zM+W7gR19KCWufzeej0LGqD6iJwS5zl5neqGTI5UfKCx mUEg== X-Gm-Message-State: ABUngvcglI4cYFQBhTGVzMmkmDIeO+a/nM8mTUJf8p5ku4fF7w6nVMoihYR4biAH573j2A== X-Received: by 10.99.160.17 with SMTP id r17mr37199544pge.49.1477445193969; Tue, 25 Oct 2016 18:26:33 -0700 (PDT) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:a4a7:b31:c210:ddc6]) by smtp.gmail.com with ESMTPSA id ij5sm36231958pab.2.2016.10.25.18.26.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Oct 2016 18:26:33 -0700 (PDT) From: Chris Packham To: u-boot@lists.denx.de Date: Wed, 26 Oct 2016 14:26:05 +1300 Message-Id: <20161026012612.9479-4-judge.packham@gmail.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161026012612.9479-1-judge.packham@gmail.com> References: <20161026012612.9479-1-judge.packham@gmail.com> Cc: Luka Perkov , Scott Wood , Scott Wood , Stefan Roese , Chris Packham Subject: [U-Boot] [RFC PATCH v2 03/10] mtd: nand: pxa3xx_nand: sync pxa3xx_nand_set_sdr_timing() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since the pxa3xx_nand driver was added there has been a discrepancy in pxa3xx_nand_set_sdr_timing() around the setting of tWP_min and tRP_min. This brings us into line with the current Linux code. Signed-off-by: Chris Packham --- Changes in v2: - None drivers/mtd/nand/pxa3xx_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index a5b9332456ec..17cbc8d3d930 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -345,9 +345,9 @@ static void pxa3xx_nand_set_sdr_timing(struct pxa3xx_nand_host *host, u32 tCH_min = DIV_ROUND_UP(t->tCH_min, 1000); u32 tCS_min = DIV_ROUND_UP(t->tCS_min, 1000); u32 tWH_min = DIV_ROUND_UP(t->tWH_min, 1000); - u32 tWP_min = DIV_ROUND_UP(t->tWC_min - tWH_min, 1000); + u32 tWP_min = DIV_ROUND_UP(t->tWC_min - t->tWH_min, 1000); u32 tREH_min = DIV_ROUND_UP(t->tREH_min, 1000); - u32 tRP_min = DIV_ROUND_UP(t->tRC_min - tREH_min, 1000); + u32 tRP_min = DIV_ROUND_UP(t->tRC_min - t->tREH_min, 1000); u32 tR = chip->chip_delay * 1000; u32 tWHR_min = DIV_ROUND_UP(t->tWHR_min, 1000); u32 tAR_min = DIV_ROUND_UP(t->tAR_min, 1000);