From patchwork Wed Sep 3 12: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: 36601 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3996C202E4 for ; Wed, 3 Sep 2014 12:01:17 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lf10sf81365535pab.1 for ; Wed, 03 Sep 2014 05:01:09 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=SlKoseN+bLDnqgZo3qNDQlVwqtpJlqxiXIajonSNbw8=; b=iTMfUeJ0Wdw9E8bU66cvi0l2+WWE00y660rtC40WzdLVyvkPp/RVGIIOEH7tAd1o90 UmvtRbLESNBDACwIz7x6ZpkHigM8bP3hiIRQo8c+P2+Z78YOErKUNcg2EOEoCZKWRbVs zyg1aURCvG2//hMuV6qTsWW8yE5vfZhJluERLpFzjVKa/D6bYcfABa9DUPAuMCzjjMb+ reJyAc32fa0dbZobzFib7Fq4/7eESZK+r5JVXJMvFddmoqfKFSyWf2115/VNm/jiilnt WqrAC8kEWGZ8nRL6hWDNCc0VcDMVeXXO44rsxpkBD2d4aS/jI4lfD/LtGJqhXeAEdpOO UbXw== X-Gm-Message-State: ALoCoQkZTAx4oXCDcYW9C+oEBAE10FUnshEMtZYl+8vk/fsrIex7mW5zsgFCCa31TrxOCGg7K5ad X-Received: by 10.67.5.228 with SMTP id cp4mr22323233pad.8.1409745667882; Wed, 03 Sep 2014 05:01:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.210 with SMTP id g76ls2770417qge.74.gmail; Wed, 03 Sep 2014 05:01:07 -0700 (PDT) X-Received: by 10.220.69.18 with SMTP id x18mr154176vci.58.1409745667782; Wed, 03 Sep 2014 05:01:07 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id wv12si3517395vcb.21.2014.09.03.05.01.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 05:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lf12so8620126vcb.34 for ; Wed, 03 Sep 2014 05:01:07 -0700 (PDT) X-Received: by 10.52.141.76 with SMTP id rm12mr122652vdb.71.1409745667668; Wed, 03 Sep 2014 05:01:07 -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 uj3csp669018vcb; Wed, 3 Sep 2014 05:01:07 -0700 (PDT) X-Received: by 10.194.60.240 with SMTP id k16mr2783632wjr.109.1409745666674; Wed, 03 Sep 2014 05:01:06 -0700 (PDT) Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by mx.google.com with ESMTPS id l9si10115498wjf.107.2014.09.03.05.01.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 05:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 74.125.82.169 as permitted sender) client-ip=74.125.82.169; Received: by mail-we0-f169.google.com with SMTP id k48so8458090wev.28 for ; Wed, 03 Sep 2014 05:01:06 -0700 (PDT) X-Received: by 10.180.149.197 with SMTP id uc5mr33984164wib.75.1409745666141; Wed, 03 Sep 2014 05:01:06 -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 hy9sm15439996wjb.27.2014.09.03.05.01.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 05:01:05 -0700 (PDT) From: Daniel Thompson To: Greg Kroah-Hartman Cc: Daniel Thompson , linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Srinivas Kandagatla , Patrice Chotard , Jiri Slaby , kernel@stlinux.com, linux-serial@vger.kernel.org Subject: [PATCH 3.17-rc3] serial: asc: Adopt readl_/writel_relaxed() Date: Wed, 3 Sep 2014 13:00:51 +0100 Message-Id: <1409745651-3247-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 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.175 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: Patrice Chotard Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: kernel@stlinux.com Cc: linux-serial@vger.kernel.org Acked-by: Maxime Coquelin Acked-by: Peter Griffin --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/st-asc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.3 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 8b2d735..adadbc1 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -151,12 +151,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); } /*