From patchwork Tue Aug 19 16:46:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 4744871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 43609C0338 for ; Tue, 19 Aug 2014 17:01:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A62A20166 for ; Tue, 19 Aug 2014 17:01:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCCD520136 for ; Tue, 19 Aug 2014 17:01:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XJmkB-000837-Ea; Tue, 19 Aug 2014 16:58:47 +0000 Received: from mail-wg0-f45.google.com ([74.125.82.45]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XJmjW-0007Ps-Ij for linux-arm-kernel@lists.infradead.org; Tue, 19 Aug 2014 16:58:07 +0000 Received: by mail-wg0-f45.google.com with SMTP id x12so6596690wgg.28 for ; Tue, 19 Aug 2014 09:57:44 -0700 (PDT) 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=p468d90GXvVOi2X8HycHQDS0KdC2b1fsm0sytK+ki9s=; b=GyrPGOALcMj909uK5A72xGIp5oXiNnrSSgLLM//u0bWFxoEyWu8FszuiaL2b23ybTD cvtP4wMRkXIOugioDZ51/OkAnP+lSYy/iNDz5WpCK7pKvLwosIUlk6c4EK5FuaZ5ssT5 X6DZTIjYMin9QB3PprjmgRWXXkmB8HSyeCIYulK//6wS2WTbb4iP77JT8160BfLkifBz VOzQQULecvFjb1r7uHEkzKfQVfwN65EbFKo2kSxr19t9tPfwO5RckqnDDwXoC5gsQ+lC 5cj5Dd4bgMmmb+nQG1OpmhfkhN2e63O737iWQWLCqL/a1wQEu0/osVGy3dQhK+j0m7x/ 9fvA== X-Gm-Message-State: ALoCoQlDPvdLKg14hdjmAFrezIiokT7AyOMgUuTxUr8JiacdcPcMahcocVyPLqsupfbIwXxneOS6 X-Received: by 10.180.182.67 with SMTP id ec3mr8264880wic.21.1408467464324; Tue, 19 Aug 2014 09:57:44 -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 gc8sm36225wic.3.2014.08.19.09.57.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 09:57:43 -0700 (PDT) From: Daniel Thompson To: Russell King Subject: [PATCH v10 17/19] serial: asc: Adopt readl_/writel_relaxed() Date: Tue, 19 Aug 2014 17:46:07 +0100 Message-Id: <1408466769-20004-18-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1408466769-20004-1-git-send-email-daniel.thompson@linaro.org> References: <1408369264-14242-1-git-send-email-daniel.thompson@linaro.org> <1408466769-20004-1-git-send-email-daniel.thompson@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140819_095806_787977_D1EAEC45 X-CRM114-Status: GOOD ( 14.44 ) X-Spam-Score: -0.7 (/) Cc: kernel@stlinux.com, Catalin Marinas , Linus Walleij , Patrice Chotard , Fabio Estevam , Daniel Thompson , Nicolas Pitre , Jiri Slaby , Anton Vorontsov , Ben Dooks , linux-serial@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, kernel-team@android.com, Dave Martin , linaro-kernel@lists.linaro.org, patches@linaro.org, John Stultz , linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Colin Cross , Frederic Weisbecker , Srinivas Kandagatla X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); } /*