From patchwork Tue Jul 25 12:00:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Dahl X-Patchwork-Id: 9861885 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 BAA4C601A1 for ; Tue, 25 Jul 2017 12:03:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B482225223 for ; Tue, 25 Jul 2017 12:03:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A94192860C; Tue, 25 Jul 2017 12:03:03 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35FF225223 for ; Tue, 25 Jul 2017 12:03:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=EAGX0mcmYj8ZNJEIRICGPM/WStzerURPvS5OLAjXlgA=; b=meWR9748jUue77rIKyKgZTemSB H4Jtysd0g9sULVvYupMN6gc8NaXsPd3Jv/nAM8o0ngEcBZkYjo1jVUly9/4oe6zOX8SeIAmYmb0u0 alZKz3V5//8qhF1TIcUi1d+fXsXTEZaL+eX8tkNiTkUcBv+jBoylI8DyUg1wfgMDgh+l59bzTkNAf 5ebv5B3QnNRGugHsC/J5RKyjfJhj9nPoV6kArsPYWZGixRk++8Cug+PbCbu81d2Zlzj4oHdXJqWrJ fRCbMQrIKJrnmk7lsPWv6NVqwTmJtwwQZpDYmlTx4E8xD6S4onrxxMXDulL5Sly2hDwlA6aLT5VLb 5wkE0+YQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dZyYF-0005r7-TQ; Tue, 25 Jul 2017 12:02:59 +0000 Received: from mail.thorsis.com ([213.211.200.15]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dZyXD-0004y9-Dm for linux-arm-kernel@lists.infradead.org; Tue, 25 Jul 2017 12:02:02 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id B81683A1153; Tue, 25 Jul 2017 14:02:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HbbTs0nBBKrI; Tue, 25 Jul 2017 14:02:23 +0200 (CEST) Received: from seven.thorsis.com (unknown [192.168.10.7]) by mail.thorsis.com (Postfix) with ESMTP id 565D73A145D; Tue, 25 Jul 2017 14:02:21 +0200 (CEST) Received: from ada.ifak-system.com (ada.ifak-system.com [192.168.10.62]) by seven.thorsis.com (Postfix) with ESMTPSA id 77823E00554; Tue, 25 Jul 2017 14:01:24 +0200 (CEST) From: Alexander Dahl To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] memory: atmel-ebi: Fix smc cycle xlate converter Date: Tue, 25 Jul 2017 14:00:24 +0200 Message-Id: <1500984024-26403-4-git-send-email-ada@thorsis.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1500984024-26403-1-git-send-email-ada@thorsis.com> References: <1500984024-26403-1-git-send-email-ada@thorsis.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170725_050157_320307_5CED56FE X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Lee Jones , Alexandre Belloni , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The converter function for translating ns timings in register values was initialized with a wrong function pointer. This resulted in wrong register values also for the setup and pulse registers when configuring the EBI interface trough dts. Includes a small fix in a comment of the smc driver, which was probably just a copy'n'paste mistake. Signed-off-by: Alexander Dahl Acked-by: Lee Jones --- drivers/memory/atmel-ebi.c | 2 +- drivers/mfd/atmel-smc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index f8a01ae..ebf69ff 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c @@ -72,7 +72,7 @@ struct atmel_smc_timing_xlate { { .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos} #define ATMEL_SMC_CYCLE_XLATE(nm, pos) \ - { .name = nm, .converter = atmel_smc_cs_conf_set_setup, .shift = pos} + { .name = nm, .converter = atmel_smc_cs_conf_set_cycle, .shift = pos} static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid, struct atmel_ebi_dev_config *conf) diff --git a/drivers/mfd/atmel-smc.c b/drivers/mfd/atmel-smc.c index 954cf0f..20cc0ea 100644 --- a/drivers/mfd/atmel-smc.c +++ b/drivers/mfd/atmel-smc.c @@ -206,7 +206,7 @@ EXPORT_SYMBOL_GPL(atmel_smc_cs_conf_set_pulse); * parameter * * This function encodes the @ncycles value as described in the datasheet - * (section "SMC Pulse Register"), and then stores the result in the + * (section "SMC Cycle Register"), and then stores the result in the * @conf->setup field at @shift position. * * Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in