From patchwork Tue Oct 18 23:45:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9383361 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CABA60487 for ; Tue, 18 Oct 2016 23:47:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 366252980E for ; Tue, 18 Oct 2016 23:47:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B20D29810; Tue, 18 Oct 2016 23:47:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A91842980E for ; Tue, 18 Oct 2016 23:47:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwe4i-0004fn-Fe; Tue, 18 Oct 2016 23:45:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwe4d-0003sm-TF for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 23:45:36 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 775E961ACF; Tue, 18 Oct 2016 23:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1476834315; bh=u+nefkwzL3hsvYi0LcxLNyUlRqHIkQUp7wXz3Mjtt0M=; h=From:To:Cc:Subject:Date:From; b=FD91A4VD3RnPVLMEeztaTxMTEZ1w0pcJ/FRhxi+ZVTZrmaUESjBSA6Ci5B6ktDKU3 zU0E5+DTMnsk/rsxhC6S3NrQozDXcvw1n0EqT8Uk+v3f3ZtXejaSrl4IP20rOVojbB +Csiwy2QW0XgMPF2ODvgOQDMrlfZi5OuXvF3D4gc= Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D7E296170F; Tue, 18 Oct 2016 23:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1476834315; bh=u+nefkwzL3hsvYi0LcxLNyUlRqHIkQUp7wXz3Mjtt0M=; h=From:To:Cc:Subject:Date:From; b=FD91A4VD3RnPVLMEeztaTxMTEZ1w0pcJ/FRhxi+ZVTZrmaUESjBSA6Ci5B6ktDKU3 zU0E5+DTMnsk/rsxhC6S3NrQozDXcvw1n0EqT8Uk+v3f3ZtXejaSrl4IP20rOVojbB +Csiwy2QW0XgMPF2ODvgOQDMrlfZi5OuXvF3D4gc= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org D7E296170F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Mark Rutland , Marc Zyngier Subject: [PATCH/RESEND] clocksource/arm_arch_timer: Map frame with of_io_request_and_map() Date: Tue, 18 Oct 2016 16:45:14 -0700 Message-Id: <20161018234514.6175-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.10.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161018_164536_034965_52F5305C X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Daniel Lezcano , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Let's use the of_io_request_and_map() API so that the frame region is protected and shows up in /proc/iomem. Signed-off-by: Stephen Boyd --- drivers/clocksource/arm_arch_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 73c487da6d2a..cbfa3bc5be75 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -964,7 +964,8 @@ static int __init arch_timer_mem_init(struct device_node *np) } ret= -ENXIO; - base = arch_counter_base = of_iomap(best_frame, 0); + base = arch_counter_base = of_io_request_and_map(best_frame, 0, + "arch_mem_timer"); if (!base) { pr_err("arch_timer: Can't map frame's registers\n"); goto out;