From patchwork Fri Apr 25 09:31:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 29045 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 DD03D202E6 for ; Fri, 25 Apr 2014 09:35:39 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i4sf20445955oah.4 for ; Fri, 25 Apr 2014 02:35:39 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ql6zmCAjfqG6rsYNiU3A2Px+AjKPBlRg9tK9NkDpnPk=; b=dT7hQPq/OQ1w7Uym7BE7fh0bg/iZG0Y+A8lfuHcZu+ROzuwVGvNaWrygufTJ2QO3+L b4G9RERjhqujOZV1cBvaZtZ1rgKWq+Fl4v9QHamAxfJ503hQ2D+Z3T/nPbIaWBQdkV4u ATAgPGEqkxnc4G0hTJd2op4XI5CtQeuTtCZ6aBXOvsmaHoO94snFTbVZFds4033EwBe8 sSgWGlUqjjKQyKnb8L2YVLfrEHwf4lggvS/obhLZnnkB00qI555ZSQBoqbYqi7H45D/6 A1DWHCtdTkXCRzM69GQKROHCCHyZnHPrM6muC2BFI1VqUWjzoZ/ZpqxmKTvv5BHzeCeD muyA== X-Gm-Message-State: ALoCoQk0PDArQBxT8/9pRxAHl+8aKN/3kaPFixeNkVhMSwWS/3tK3MrNmVvn1TT48fFmgCK82H9h X-Received: by 10.182.158.4 with SMTP id wq4mr4142372obb.18.1398418539465; Fri, 25 Apr 2014 02:35:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.203 with SMTP id j69ls1440042qgj.61.gmail; Fri, 25 Apr 2014 02:35:39 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr522516vdc.34.1398418539344; Fri, 25 Apr 2014 02:35:39 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id e9si1577364vcf.49.2014.04.25.02.35.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 02:35:39 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id im17so4404415vcb.14 for ; Fri, 25 Apr 2014 02:35:39 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr522511vdc.34.1398418539271; Fri, 25 Apr 2014 02:35:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp83516vcb; Fri, 25 Apr 2014 02:35:38 -0700 (PDT) X-Received: by 10.66.221.99 with SMTP id qd3mr6490054pac.46.1398418538410; Fri, 25 Apr 2014 02:35:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wh9si4425608pac.377.2014.04.25.02.35.37; Fri, 25 Apr 2014 02:35:37 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753127AbaDYJb0 (ORCPT + 28 others); Fri, 25 Apr 2014 05:31:26 -0400 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:24907 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751500AbaDYJbV (ORCPT ); Fri, 25 Apr 2014 05:31:21 -0400 Received: from e102391-lin.cambridge.arm.com (e102391-lin.cambridge.arm.com [10.1.209.166]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 37A2B13FCAD; Fri, 25 Apr 2014 04:31:20 -0500 (CDT) From: Marc Zyngier To: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Cc: Russell King , Will Deacon , Catalin Marinas , Alessandro Zummo Subject: [PATCH 4/7] rtc-cmos: allow strictly MMIO based configurations Date: Fri, 25 Apr 2014 10:31:12 +0100 Message-Id: <1398418275-9671-5-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1398418275-9671-1-git-send-email-marc.zyngier@arm.com> References: <1398418275-9671-1-git-send-email-marc.zyngier@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: marc.zyngier@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , For those new fancy architectures lacking any kind of I/O ports, and unwilling to emulate them, introduce the new config symbol RTC_DRV_CMOS_MMIO_STRICT, which provides default (and explosive) legacy I/O port accessors. Signed-off-by: Marc Zyngier --- drivers/rtc/Kconfig | 4 ++++ drivers/rtc/rtc-cmos.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 7e88866..10974f7 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -680,6 +680,10 @@ config RTC_DRV_CMOS config RTC_DRV_CMOS_MMIO bool +config RTC_DRV_CMOS_MMIO_STRICT + select RTC_DRV_CMOS_MMIO + bool + config RTC_DRV_ALPHA bool "Alpha PC-style CMOS" depends on ALPHA diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index d535e72..e2d1338 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -70,6 +70,11 @@ static const char driver_name[] = "rtc_cmos"; #ifdef CONFIG_RTC_DRV_CMOS_MMIO static void __iomem *rtc_cmos_base; +#ifdef CONFIG_RTC_DRV_CMOS_MMIO_STRICT +#define CMOS_READ(reg) ({BUG(); 0;}) +#define CMOS_WRITE(val,reg) BUG(); +#endif + static u8 do_cmos_read(u8 reg) { u8 val;