From patchwork Mon Aug 18 14:28:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 35510 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3B3AD20523 for ; Mon, 18 Aug 2014 14:28:32 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf36921755oag.8 for ; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=p468d90GXvVOi2X8HycHQDS0KdC2b1fsm0sytK+ki9s=; b=ckZ8xxDHDrny647qAHcwbjNz9RzCnjGJRKaXW/CNdEzHj3pRUKUgpl50I74F5NExRp 6xWlqpw1/74JgKtDZKktWpljc9dlAPN0AeJBsLZ+alCERXYrXEQp396BfypY+JKDmcN6 qNLWIzmXlMy3X3etIMRiuBzm9jB0/aktedB6qCpLLi1jBJ0tixWuW+/oN6EnR71l1aUU 2ajcrs4rwWV1WdHeFohg471+ol27BEGdPVihsz7rUqWdn9zyq8wKicqoEwTr4lF7Qru/ r8A3yLa8ZrMGMkk9Mj/bDX845LAAmtnU59Mi8193PPkq3jTboXOpwTEUU9u72Lj5Ny2o KTaA== X-Gm-Message-State: ALoCoQmZMGgrUOMnHz1FBD3JUm/jsSql6IrjsgjQ5N/362rJLSB95suBVVcv7X/ZrtDw4w9rCrqC X-Received: by 10.182.186.4 with SMTP id fg4mr19323619obc.9.1408372111901; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.47 with SMTP id w44ls2402516qgw.95.gmail; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) X-Received: by 10.52.144.232 with SMTP id sp8mr444176vdb.61.1408372111714; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id cl4si7157852vdb.78.2014.08.18.07.28.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Aug 2014 07:28:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hy4so5725764vcb.22 for ; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) X-Received: by 10.220.187.134 with SMTP id cw6mr100786vcb.71.1408372111633; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp156833vcb; Mon, 18 Aug 2014 07:28:31 -0700 (PDT) X-Received: by 10.194.202.231 with SMTP id kl7mr2997888wjc.134.1408372110539; Mon, 18 Aug 2014 07:28:30 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id g3si17067670wiz.94.2014.08.18.07.28.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Aug 2014 07:28:30 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.50 as permitted sender) client-ip=74.125.82.50; Received: by mail-wg0-f50.google.com with SMTP id n12so5121407wgh.9 for ; Mon, 18 Aug 2014 07:28:30 -0700 (PDT) X-Received: by 10.180.14.169 with SMTP id q9mr61731183wic.19.1408372110014; Mon, 18 Aug 2014 07:28:30 -0700 (PDT) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id pe6sm42668080wjb.38.2014.08.18.07.28.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Aug 2014 07:28:29 -0700 (PDT) From: Daniel Thompson To: Russell King Cc: Daniel Thompson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kgdb-bugreport@lists.sourceforge.net, patches@linaro.org, linaro-kernel@lists.linaro.org, John Stultz , Anton Vorontsov , Colin Cross , kernel-team@android.com, Rob Herring , Linus Walleij , Ben Dooks , Catalin Marinas , Dave Martin , Fabio Estevam , Frederic Weisbecker , Nicolas Pitre , Srinivas Kandagatla , Maxime Coquelin , Patrice Chotard , Greg Kroah-Hartman , Jiri Slaby , kernel@stlinux.com, linux-serial@vger.kernel.org Subject: [PATCH v9 14/16] serial: asc: Adopt readl_/writel_relaxed() Date: Mon, 18 Aug 2014 15:28:09 +0100 Message-Id: <1408372091-12689-15-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1404979427-12943-1-git-send-email-daniel.thompson@linaro.org> References: <1404979427-12943-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The architectures where this peripheral exists (ARM and SH) have expensive implementations of writel(), reliant on spin locks and explicit L2 cache management. These architectures provide a cheaper writel_relaxed() which is much better suited to peripherals that do not perform DMA. The situation with readl()/readl_relaxed()is similar although less acute. This driver does not use DMA and will be more power efficient and more robust (due to absense of spin locks during console I/O) if it uses the relaxed variants. This change means the driver is no longer portable and therefore no longer suitable for compile testing. Signed-off-by: Daniel Thompson Cc: Srinivas Kandagatla Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: kernel@stlinux.com Cc: linux-serial@vger.kernel.org --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/st-asc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 26cec64..e9b1735 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -1527,7 +1527,7 @@ config SERIAL_FSL_LPUART_CONSOLE config SERIAL_ST_ASC tristate "ST ASC serial port support" select SERIAL_CORE - depends on ARM || COMPILE_TEST + depends on ARM help This driver is for the on-chip Asychronous Serial Controller on STMicroelectronics STi SoCs. diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 2b5eb6e..df709ee 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -152,12 +152,12 @@ static inline struct asc_port *to_asc_port(struct uart_port *port) static inline u32 asc_in(struct uart_port *port, u32 offset) { - return readl(port->membase + offset); + return readl_relaxed(port->membase + offset); } static inline void asc_out(struct uart_port *port, u32 offset, u32 value) { - writel(value, port->membase + offset); + writel_relaxed(value, port->membase + offset); } /*