From patchwork Fri Sep 5 23:34:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4856411 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 210829F314 for ; Fri, 5 Sep 2014 23:34:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CABE201C0 for ; Fri, 5 Sep 2014 23:34:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EFA0201CE for ; Fri, 5 Sep 2014 23:34:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752679AbaIEXei (ORCPT ); Fri, 5 Sep 2014 19:34:38 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:33683 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbaIEXeg (ORCPT ); Fri, 5 Sep 2014 19:34:36 -0400 Received: by mail-la0-f51.google.com with SMTP id gi9so2885293lab.10 for ; Fri, 05 Sep 2014 16:34:35 -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:organization :user-agent:mime-version:content-transfer-encoding:content-type; bh=7JzxK0RhKGyFKcwDEvduWiavSDmOSq5KoGxj489Tfxw=; b=U+i1oeSRhhv4WgDLcR7RinaPra1xK0K+2Gkd1G06wkijEnug2q+PRhNf+kEMElfG0K aEfK7J9SnPJxieiZtFezhsCDa+sasXD1BhyBeHdIultgR3gRyhV290tygojlqGsXKbnk 2xMjP15cMzbcqxSzlSE2RSojvCpL/TWfkw8FoXMFbFIZ+uFwW2qEecf6py4zhbvzhgab aQUJJ2pr1Qos0HOhVZcuZEDeM/bED5mrKlvGLaH4H4/tySY6RD9PYDJupu2X7D/hFrrP AZUSVeI8zojbAHn3PmL+HNz4lTqkRmfkn+xO6yjRnpTQIqTHUyP+zr8Oo4qk3eki0cBt dNoQ== X-Gm-Message-State: ALoCoQkf4E+2XoUHMYGyzcUBgKx9FXXugpWAj8oorheeGWVG/qGIRHaqWYUmKYLnZ3cyTBk2v/Fh X-Received: by 10.152.10.130 with SMTP id i2mr15014235lab.65.1409960075170; Fri, 05 Sep 2014 16:34:35 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp30-108.pppoe.mtu-net.ru. [81.195.30.108]) by mx.google.com with ESMTPSA id xc7sm1186406lbb.21.2014.09.05.16.34.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Sep 2014 16:34:34 -0700 (PDT) From: Sergei Shtylyov To: wsa@the-dreams.de, linux-i2c@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH] i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND} Date: Sat, 06 Sep 2014 03:34:32 +0400 Message-ID: <2641177.jdYX8POT82@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.13.3 (Linux/3.15.10-201.fc20.x86_64; KDE/4.13.3; x86_64; ; ) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be 0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all 1's in bits 8-31, thus going against the manuals, so fix them. Signed-off-by: Sergei Shtylyov Cc: stable@vger.kernel.org --- The patch is against Wolfram Sang's 'linux.git' repo's 'i2c/for-current' branch. drivers/i2c/busses/i2c-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/drivers/i2c/busses/i2c-rcar.c =================================================================== --- linux.orig/drivers/i2c/busses/i2c-rcar.c +++ linux/drivers/i2c/busses/i2c-rcar.c @@ -76,8 +76,8 @@ #define RCAR_IRQ_RECV (MNR | MAL | MST | MAT | MDR) #define RCAR_IRQ_STOP (MST) -#define RCAR_IRQ_ACK_SEND (~(MAT | MDE)) -#define RCAR_IRQ_ACK_RECV (~(MAT | MDR)) +#define RCAR_IRQ_ACK_SEND (~(MAT | MDE) & 0xFF) +#define RCAR_IRQ_ACK_RECV (~(MAT | MDR) & 0xFF) #define ID_LAST_MSG (1 << 0) #define ID_IOERROR (1 << 1)