Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3653584ybg; Mon, 28 Oct 2019 16:39:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxj4n2Vgo+Hp/GQCCPZ194/xEP5JmBIiXsV4jkK5qlUvvCmv5LQ/L3YbICaHTr/T28aRJ3K X-Received: by 2002:a17:906:7094:: with SMTP id b20mr485184ejk.134.1572305981370; Mon, 28 Oct 2019 16:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572305981; cv=none; d=google.com; s=arc-20160816; b=PNmL05pFaRSF8CzHXmsoBuAnaSeWde5F49ECA94CsvGhVRE5GGet45se1cI+qOmw+h omLPOwhKymFrbMmT4GI5wm7h+EGrZm6IOFZmh4YxckfRGvwNjKsO3qaylhKnw5sxXdI6 A7Df+5DgtES1jFEtD1c4mIe1/cYCJyaX2Rr1V9xwVTTC0EwtX4Fbfvs4FVClijhVjJoi z1k6WqV0adDO2TZ8dCpTrFwandFA+FYLY7QGXaNz8TcInSXg0Wzbb4NswL86xzQ7QvD7 0MX0SiokcOTQpzZl9OShGFgw9dl10yy3sRHXmkuVw5uG4UzbUtuJrZ4HqmZBTxpxhJx7 gB7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=K3K/5ExlweTb+Ewz1BZ/0RF+VhI+qsLLm7TMlzfC0mQ=; b=ByDJe8Y4GamECr7xmK4h3FfFQYfByYJxDS8fkWLepVD5WZf6tsA1npwewdSb3WbUE8 nTKbxZr+02SnFJrY4rzdjppe8FbsIqV7tPut2ovEa0fUBXX0jCIS09F6kIfUjkHbawBk 3ENy5kM4L4lWGn35gNUa6dOo8Zbuhl2mLHIH2FWjzudYVXPqWd77fkDIErrJjhQ441zz FFRcNWhSBjT+quoBVf9Xyk5SjU0x9iDdlTgYzxSSqcP8FvpelKXmJMB/7cwjwuj79+ia lqwMPxJANoCmFG13YI3BEV+HD3mGwnSncV+em5/p3mR7LkjgDryGkORCvlSiNUmF8HLj lY8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gl26si459920ejb.331.2019.10.28.16.39.17; Mon, 28 Oct 2019 16:39:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389064AbfJ1V5p (ORCPT + 99 others); Mon, 28 Oct 2019 17:57:45 -0400 Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:48215 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729738AbfJ1V5p (ORCPT ); Mon, 28 Oct 2019 17:57:45 -0400 Received: from belgarion ([90.55.204.252]) by mwinf5d17 with ME id K9xj210025TFNlm039xje7; Mon, 28 Oct 2019 22:57:43 +0100 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 28 Oct 2019 22:57:43 +0100 X-ME-IP: 90.55.204.252 From: Robert Jarzmik To: Arnd Bergmann Cc: Daniel Mack , Haojian Zhuang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Dominik Brodowski Subject: Re: [PATCH 33/46] ARM: pxa: pcmcia: move smemc configuration back to arch References: <20191018154052.1276506-1-arnd@arndb.de> <20191018154201.1276638-33-arnd@arndb.de> X-URL: http://belgarath.falguerolles.org/ Date: Mon, 28 Oct 2019 22:57:43 +0100 In-Reply-To: <20191018154201.1276638-33-arnd@arndb.de> (Arnd Bergmann's message of "Fri, 18 Oct 2019 17:41:48 +0200") Message-ID: <87d0egjzxk.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/26 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann writes: > Rather than poking at the smemc registers directly from the > pcmcia/pxa2xx_base driver, move those bits into machine file > to have a cleaner interface. > > Cc: Dominik Brodowski > Signed-off-by: Arnd Bergmann > -static int pxa2xx_pcmcia_set_mcxx(struct soc_pcmcia_socket *skt, unsigned int clk) > +static int pxa2xx_pcmcia_set_timing(struct soc_pcmcia_socket *skt) > { > + unsigned long clk = clk_get_rate(skt->clk) / 1000; > struct soc_pcmcia_timing timing; > int sock = skt->nr; > > soc_common_pcmcia_get_timing(skt, &timing); > > - pxa2xx_pcmcia_set_mcmem(sock, timing.mem, clk); > - pxa2xx_pcmcia_set_mcatt(sock, timing.attr, clk); > - pxa2xx_pcmcia_set_mcio(sock, timing.io, clk); > + pxa_smemc_set_pcmcia_timing(sock, > + pxa2xx_pcmcia_mcmem(sock, timing.mem, clk), > + pxa2xx_pcmcia_mcatt(sock, timing.attr, clk), > + pxa2xx_pcmcia_mcio(sock, timing.io, clk)); > > return 0; > } > > -static int pxa2xx_pcmcia_set_timing(struct soc_pcmcia_socket *skt) > -{ > - unsigned long clk = clk_get_rate(skt->clk); > - return pxa2xx_pcmcia_set_mcxx(skt, clk / 10000); That curious, because you divide here by 10^4, while in the old pxa2xx_pcmcia_set_mcxx() that was 10^3 ... is that a fix I don't see ? Cheers. -- Robert