From patchwork Wed Mar 21 19:15:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7396 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7438023DEA for ; Wed, 21 Mar 2012 19:15:30 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 36BE5A18321 for ; Wed, 21 Mar 2012 19:15:30 +0000 (UTC) Received: by iage36 with SMTP id e36so2618551iag.11 for ; Wed, 21 Mar 2012 12:15:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=+ljn9qVagOmcVsHVkI9kLhDnJhNB73keoOYH68ly9UE=; b=oeVhaujtd4XnMPVQcLg1B1kxfTycbqbM5KO/tq0PH75JYJZo2XrxHY+rUAuGbyyGS6 +GTHucKhSDPAw2VECmJT+ZDI3OcmN5pBSeNzWboppn7Fu0R7F923yu0dY576cX1Pn0qy RtR0AizkNDZtw6A8VA7mzzhwX9Au1QqQg2JX8i3Nif6FQ0WzOqPJaPuBWlYD8y7q/uL3 7NTRX1yio9Pkf2GaLiIHjf/uyhkcCiUbJlfA6fSMRQn6tLNZeLqs5ANiybI1a9cuXBXI V8J4ZginLSIHUc8onXbvpTs5ZiFGx64cZvtzaBLzx5OyFQH3zLpLcgAyXvy/fldOPT1X eyAw== Received: by 10.50.153.193 with SMTP id vi1mr3722170igb.2.1332357329402; Wed, 21 Mar 2012 12:15:29 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.203.79 with SMTP id fh15csp26121ibb; Wed, 21 Mar 2012 12:15:28 -0700 (PDT) Received: by 10.112.86.231 with SMTP id s7mr1831013lbz.11.1332357327855; Wed, 21 Mar 2012 12:15:27 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id nt8si867655lab.25.2012.03.21.12.15.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Mar 2012 12:15:27 -0700 (PDT) Received-SPF: neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: from fecusia (c83-249-216-134.bredband.comhem.se [83.249.216.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id 2B9F365D59; Wed, 21 Mar 2012 20:15:25 +0100 (CET) Received: by fecusia (sSMTP sendmail emulation); Wed, 21 Mar 2012 20:15:24 +0100 From: "Linus Walleij" To: linux-serial@vger.kernel.org, Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Chanho Min , Jong-Sung Kim , Viresh Kumar , Linus Walleij , Shreshtha Kumar Sahu , Russell King , stable Subject: [PATCH] serial: PL011: move interrupt clearing Date: Wed, 21 Mar 2012 20:15:18 +0100 Message-Id: <1332357318-8017-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQmKkDQcJwAsCNbGPSxYlFvR+yKIiVGqAM80PBSqEiOTzLdbnsDFHigTFTPyGPrWg1KpLh1w Commit 360f748b204275229f8398cb2f9f53955db1503b "serial: PL011: clear pending interrupts" attempts to clear interrupts by writing to a yet-unassigned memory address. This fixes the issue. The breaking patch is marked for stable so should be carried along with the other patch. Cc: Shreshtha Kumar Sahu Cc: Russell King Cc: stable Reported-by: Viresh Kumar Signed-off-by: Linus Walleij --- drivers/tty/serial/amba-pl011.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 7e01399..4ed35c5 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1930,10 +1930,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) goto unmap; } - /* Ensure interrupts from this UART are masked and cleared */ - writew(0, uap->port.membase + UART011_IMSC); - writew(0xffff, uap->port.membase + UART011_ICR); - uap->vendor = vendor; uap->lcrh_rx = vendor->lcrh_rx; uap->lcrh_tx = vendor->lcrh_tx; @@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) uap->port.line = i; pl011_dma_probe(uap); + /* Ensure interrupts from this UART are masked and cleared */ + writew(0, uap->port.membase + UART011_IMSC); + writew(0xffff, uap->port.membase + UART011_ICR); + snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev)); amba_ports[i] = uap;