From patchwork Sat Jan 25 09:57:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QW50dGkgU2VwcMOkbMOk?= X-Patchwork-Id: 3536891 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7C617C02DC for ; Sat, 25 Jan 2014 09:58:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB66F201B6 for ; Sat, 25 Jan 2014 09:58:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B97120154 for ; Sat, 25 Jan 2014 09:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751721AbaAYJ6G (ORCPT ); Sat, 25 Jan 2014 04:58:06 -0500 Received: from mail-lb0-f173.google.com ([209.85.217.173]:51804 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbaAYJ6E (ORCPT ); Sat, 25 Jan 2014 04:58:04 -0500 Received: by mail-lb0-f173.google.com with SMTP id y6so3277930lbh.32 for ; Sat, 25 Jan 2014 01:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=wjdjkabjZpf+kVpKa/MlMWKg7PXKiijaYMHnJi1+dXM=; b=HtdwznhInPAmBeRX934gLHEm1RXr50UcWC0ph9GWwuibKefzDp+di/7kAN7EyPf9y9 4iXVigSXhIFPO488rhM8Psmtmwn99e9y2la+1r69XEYaOpCpnMISJs02aENiGdZw2d4u EK2qzdx4JXaQEw2JMXgm87N/IsTYU2qHEevfW8mEzXwhIfWPmXFKft/mlr/gL2uanTgc GgXMJABz7N0P9W356Uzk4xumqmEyHLf4bkhysPj9biGDu/Ff+NkHj4hJvatyQdnPTWuH jxqTIfQsidqTRIoY+X0t3xFPU3uQABt5jkx6oAjQN18DOBcTU7Q4QaGMfwwyUUbvdrK8 1wfQ== X-Received: by 10.152.8.47 with SMTP id o15mr11794896laa.20.1390643882373; Sat, 25 Jan 2014 01:58:02 -0800 (PST) Received: from pixie.elisa-laajakaista.fi (a88-114-92-24.elisa-laajakaista.fi. [88.114.92.24]) by mx.google.com with ESMTPSA id s9sm5981835laj.0.2014.01.25.01.58.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Jan 2014 01:58:01 -0800 (PST) From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Jarod Wilson , =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= Subject: [PATCH] nuvoton-cir: Don't touch PS/2 interrupts while initializing Date: Sat, 25 Jan 2014 11:57:46 +0200 Message-Id: <1390643866-10350-1-git-send-email-a.seppala@gmail.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 There are reports[1] that on some motherboards loading the nuvoton-cir disables PS/2 keyboard input. This is caused by an erroneous write of CIR_INTR_MOUSE_IRQ_BIT to ACPI control register. According to datasheet the write enables mouse power management event interrupts which will probably have ill effects if the motherboard has only one PS/2 port with keyboard in it. The cir hardware does not need mouse interrupts to function and should not touch them. This patch removes the illegal writes and registry definitions. [1] http://ubuntuforums.org/showthread.php?t=2106277&p=12461912&mode=threaded#post12461912 Reported-by: Bruno Maire Tested-by: Bruno Maire Signed-off-by: Antti Seppälä Acked-by: Jarod Wilson --- drivers/media/rc/nuvoton-cir.c | 4 ---- drivers/media/rc/nuvoton-cir.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 21ee0dc..b41e52e 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -330,9 +330,6 @@ static void nvt_cir_wake_ldev_init(struct nvt_dev *nvt) /* Enable CIR Wake via PSOUT# (Pin60) */ nvt_set_reg_bit(nvt, CIR_WAKE_ENABLE_BIT, CR_ACPI_CIR_WAKE); - /* enable cir interrupt of mouse/keyboard IRQ event */ - nvt_set_reg_bit(nvt, CIR_INTR_MOUSE_IRQ_BIT, CR_ACPI_IRQ_EVENTS); - /* enable pme interrupt of cir wakeup event */ nvt_set_reg_bit(nvt, PME_INTR_CIR_PASS_BIT, CR_ACPI_IRQ_EVENTS2); @@ -456,7 +453,6 @@ static void nvt_enable_wake(struct nvt_dev *nvt) nvt_select_logical_dev(nvt, LOGICAL_DEV_ACPI); nvt_set_reg_bit(nvt, CIR_WAKE_ENABLE_BIT, CR_ACPI_CIR_WAKE); - nvt_set_reg_bit(nvt, CIR_INTR_MOUSE_IRQ_BIT, CR_ACPI_IRQ_EVENTS); nvt_set_reg_bit(nvt, PME_INTR_CIR_PASS_BIT, CR_ACPI_IRQ_EVENTS2); nvt_select_logical_dev(nvt, LOGICAL_DEV_CIR_WAKE); diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h index 07e8310..e1cf23c 100644 --- a/drivers/media/rc/nuvoton-cir.h +++ b/drivers/media/rc/nuvoton-cir.h @@ -363,7 +363,6 @@ struct nvt_dev { #define LOGICAL_DEV_ENABLE 0x01 #define CIR_WAKE_ENABLE_BIT 0x08 -#define CIR_INTR_MOUSE_IRQ_BIT 0x80 #define PME_INTR_CIR_PASS_BIT 0x08 /* w83677hg CIR pin config */