From patchwork Tue Jul 14 08:11:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 29760 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from wa-out-1516.google.com (wa-out-1516.google.com [209.85.146.164]) by bilbo.ozlabs.org (Postfix) with ESMTP id 9F1EDB7090 for ; Tue, 14 Jul 2009 18:12:31 +1000 (EST) Received: by wa-out-1516.google.com with SMTP id n28so2998535wag.1 for ; Tue, 14 Jul 2009 01:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :received:x-virus-scanned:received:received:message-id:date:from :user-agent:mime-version:content-type:to:cc:subject:x-acl-warn :x-antiabuse:x-antiabuse:x-antiabuse:x-antiabuse:x-antiabuse :x-source:x-source-args:x-source-dir:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=BVVGOHszqnho871RS2ddo4KmMZgMqri1mvKYqI9R+Ik=; b=tkMvE45uw7zBOTpIZi6iSW+958HRLHA3sub7lIX6vbjckmKbl26PhecsQCk9ml8ZkX 8wIqt1XpVDG2e3I2XfG4JlGbQckOtT3v52pXK5PCH52M0ycdIwrmOmMB0Nb27uJ0dAAX GK4I2KxzO0HuoolnhEAvc1wnlCBAkX+dnxuWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :x-virus-scanned:message-id:date:from:user-agent:mime-version :content-type:to:cc:subject:x-acl-warn:x-antiabuse:x-source :x-source-args:x-source-dir:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=EzOf6KeNU6AaB0RUriu5M1mQCRbPtvkzzdQp5ywylNE++XkdW4xPuUmTgivSS0zcPE aMozGv/IiY+DTqayVQd60OVDGLGfZIwkLaavNf0CHonKlhtkl29oCO6kOHK5WNFE/s0B 55n8CrBmo333rXmiUwJyoYNHNHpJ7vQSyOD04= Received: by 10.220.85.81 with SMTP id n17mr27709vcl.8.1247559145268; Tue, 14 Jul 2009 01:12:25 -0700 (PDT) Received: by 10.176.133.33 with SMTP id g33gr2566yqd.0; Tue, 14 Jul 2009 01:12:25 -0700 (PDT) X-Sender: mike@compulab.co.il X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.90.74.7 with SMTP id w7mr3333838aga.13.1247559144162; Tue, 14 Jul 2009 01:12:24 -0700 (PDT) Received: from compulab.co.il ([67.18.134.219]) by gmr-mx.google.com with ESMTP id 15si796153gxk.4.2009.07.14.01.12.23; Tue, 14 Jul 2009 01:12:24 -0700 (PDT) Received-SPF: neutral (google.com: 67.18.134.219 is neither permitted nor denied by best guess record for domain of mike@compulab.co.il) client-ip=67.18.134.219; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 67.18.134.219 is neither permitted nor denied by best guess record for domain of mike@compulab.co.il) smtp.mail=mike@compulab.co.il Received: from mail.linux-boards.com ([192.114.83.142] helo=zimbra-mta.compulab.co.il) by compulab.site5.com with esmtp (Exim 4.69) (envelope-from ) id 1MQd7e-0007pG-Uz; Tue, 14 Jul 2009 03:12:23 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 08E9A9A028D; Tue, 14 Jul 2009 11:12:22 +0300 (IDT) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nes-AeDutvBz; Tue, 14 Jul 2009 11:12:21 +0300 (IDT) Received: from [10.1.1.95] (mike-pc.compulab.local [10.1.1.95]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 979109A0247; Tue, 14 Jul 2009 11:12:21 +0300 (IDT) Message-ID: <4A5C3DBD.3040306@compulab.co.il> Date: Tue, 14 Jul 2009 11:11:41 +0300 From: Mike Rapoport User-Agent: Thunderbird 2.0.0.21 (X11/20090712) Mime-Version: 1.0 To: Alessandro Zummo CC: rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH] rtc-v3020: fix mmio read access X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - compulab.site5.com X-AntiAbuse: Original Domain - googlegroups.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Source: X-Source-Args: X-Source-Dir: Reply-To: rtc-linux@googlegroups.com Sender: rtc-linux@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rtc-linux@googlegroups.com; contact rtc-linux+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rtc-linux@googlegroups.com X-BeenThere: rtc-linux@googlegroups.com >From: Bob Dunlop Changes to support GPIO broke memory mapped IO in cases where chip->leftshift != 0. Fix it. Signed-off-by: Mike Rapoport --- drivers/rtc/rtc-v3020.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) static struct v3020_chip_ops v3020_mmio_ops = { diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c index ad16405..c167b3d 100644 --- a/drivers/rtc/rtc-v3020.c +++ b/drivers/rtc/rtc-v3020.c @@ -96,7 +96,7 @@ static void v3020_mmio_write_bit(struct v3020 *chip, unsigned char bit) static unsigned char v3020_mmio_read_bit(struct v3020 *chip) { - return readl(chip->ioaddress) & (1 << chip->leftshift); + return (readl(chip->ioaddress) >> chip->leftshift) & 1; }