From patchwork Tue Sep 2 13:00:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 36483 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CF9F203BE for ; Tue, 2 Sep 2014 13:07:34 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g18sf38414639oah.10 for ; Tue, 02 Sep 2014 06:07:33 -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=jpDnpWTPjpM9NhKuq6mvqb549CXLIpt8VlAMxnX7apA=; b=BlNTbextCYkIUn1OVFLmKTm0UX9WrsTs3zt011sTltpK5xsX+zPJSDufXPljG16uaG jjRvwGlfnji6AUrwwKZZtcoo9Y0ivgfA0dWApMui7/Q/todmZTZSHMlsURJSA6FQpqYV xzeijPNTRW5ed3A5ghpeaifPtvlg8/WVwICkm05brEhgAdJSRV1gJTOC0cbvBkrhBnvO IDn4O7s5YsxVCDoWhBdUwKnCItPihgUfJDMqKBStO2ebGd8WhkbHyxuIL946eH+LuC5l F9lhQN/XXJ/Xot5n0kqqYAG4Qbo+znYxW8F3O1o+DAu+osZ2QfhgWtqFtDnPe7juiACN DwIQ== X-Gm-Message-State: ALoCoQm8z1I3/RGUSDrh2h0iUHBVMR2XekCZwvruwVyto1n7jTvq+WtnvjA05irP5efTToHvFJ4m X-Received: by 10.182.245.134 with SMTP id xo6mr19249528obc.40.1409663253817; Tue, 02 Sep 2014 06:07:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.230 with SMTP id j93ls2474840qgf.31.gmail; Tue, 02 Sep 2014 06:07:33 -0700 (PDT) X-Received: by 10.220.175.17 with SMTP id v17mr558787vcz.0.1409663253676; Tue, 02 Sep 2014 06:07:33 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id bz3si2234523vcb.23.2014.09.02.06.07.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 06:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ij19so6971048vcb.12 for ; Tue, 02 Sep 2014 06:07:33 -0700 (PDT) X-Received: by 10.220.110.77 with SMTP id m13mr762254vcp.35.1409663253565; Tue, 02 Sep 2014 06:07:33 -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.45.67 with SMTP id uj3csp524814vcb; Tue, 2 Sep 2014 06:07:32 -0700 (PDT) X-Received: by 10.180.99.167 with SMTP id er7mr28018222wib.2.1409663252083; Tue, 02 Sep 2014 06:07:32 -0700 (PDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx.google.com with ESMTPS id md6si5891246wjb.111.2014.09.02.06.07.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Sep 2014 06:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.169 as permitted sender) client-ip=209.85.212.169; Received: by mail-wi0-f169.google.com with SMTP id n3so4126788wiv.4 for ; Tue, 02 Sep 2014 06:07:31 -0700 (PDT) X-Received: by 10.194.184.101 with SMTP id et5mr40211409wjc.14.1409663251642; Tue, 02 Sep 2014 06:07:31 -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 ec2sm34928892wib.19.2014.09.02.06.07.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Sep 2014 06:07:30 -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 v11 17/19] serial: asc: Adopt readl_/writel_relaxed() Date: Tue, 2 Sep 2014 14:00:51 +0100 Message-Id: <1409662853-29313-18-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1409662853-29313-1-git-send-email-daniel.thompson@linaro.org> References: <1408466769-20004-1-git-send-email-daniel.thompson@linaro.org> <1409662853-29313-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.181 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 Acked-by: Maxime Coquelin --- 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 26cec64d..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); } /*