From patchwork Sun Jan 22 12:15:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 92146 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp802541qgi; Sun, 22 Jan 2017 04:17:20 -0800 (PST) X-Received: by 10.200.34.146 with SMTP id f18mr20651410qta.39.1485087440053; Sun, 22 Jan 2017 04:17:20 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id u127si8710608qkd.60.2017.01.22.04.17.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 04:17:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cVH5C-0006Rs-2v; Sun, 22 Jan 2017 12:17:18 +0000 Received: from mail-lf0-f54.google.com ([209.85.215.54]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cVH4l-0006A7-7k for linux-arm-kernel@lists.infradead.org; Sun, 22 Jan 2017 12:16:53 +0000 Received: by mail-lf0-f54.google.com with SMTP id z134so80602491lff.3 for ; Sun, 22 Jan 2017 04:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Rb4KCMLZmVLqHvHOC9FsG9F5TRFCkHWdjVG1JaJUCLA=; b=iVs4RcOVVPepZtlN8p16WZuysQ0CwXNESagf/kgjJJvOynlhoEGTuotZQPJpbpyP6e G08GAqPrfPVMDUk2BOAZ38wpOS4F6h/uWbw5f/JPMhHruHWwRtKmxO60kO10ouIs1u+H A08WBSyFLiyqxOvQHb4rahhzDVDsktAzzNFO8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Rb4KCMLZmVLqHvHOC9FsG9F5TRFCkHWdjVG1JaJUCLA=; b=TjkdzQAMTWUHrl74tw11yT2GgixIADHKdUw9Netff+gRo6q4ShQ9IfUqJfBGD6Via9 B85ZCDBkOJvc2dVU16cMI5k089UUGdR/6QgSpbMtbITm9OtJK7ANmgy8/oU+vvuVcvT3 Rk58SXT4j85pXELZ+5VCteUxpEm9M2QolXMJTwZB1JHuUveYJ/DuKebyxmZXHKseeukz ClVvxIyHJdCIP0d1vMXRn5oqgCI+f5XqAOfPVnAcXtlsSzKqAplCja1YkgfhVMmG/mU3 z2E6k/g5IEFcR0oCGIj89kWjfvt/yBzue9B0uU8WUva8PXACQRVf7Wj9CYRumps9/3R1 Dg4g== X-Gm-Message-State: AIkVDXIeJ+KDU0ImtOWsiIYdOXnaUBqefVeMId5bt2GMQaKPKClL6hGO801TApXp6LdFFO/s X-Received: by 10.25.15.199 with SMTP id 68mr6337966lfp.53.1485087329250; Sun, 22 Jan 2017 04:15:29 -0800 (PST) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id h76sm5300725lfg.39.2017.01.22.04.15.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 04:15:28 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli Subject: [PATCH 01/22] ARM: gemini: convert to MULTI_IRQ_HANDLER Date: Sun, 22 Jan 2017 13:15:24 +0100 Message-Id: <20170122121524.10048-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170122_041651_465398_AFE18DFF X-CRM114-Status: GOOD ( 16.77 ) X-Spam-Score: -2.2 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.54 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.54 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.54 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@openwrt.org, Janos Laube , Arnd Bergmann , Paulius Zaleckas , Linus Walleij MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org In order to enable device tree boot on this machine we must first convert it to runtime-manage its irq handler, so do this. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij --- arch/arm/Kconfig | 1 + arch/arm/mach-gemini/include/mach/entry-macro.S | 33 ------------------------- arch/arm/mach-gemini/irq.c | 15 +++++++++++ 3 files changed, 16 insertions(+), 33 deletions(-) delete mode 100644 arch/arm/mach-gemini/include/mach/entry-macro.S -- 2.9.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5fab553fd03a..63e61bf5aab0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -359,6 +359,7 @@ config ARCH_GEMINI select CPU_FA526 select GENERIC_CLOCKEVENTS select GPIOLIB + select MULTI_IRQ_HANDLER help Support for the Cortina Systems Gemini family SoCs diff --git a/arch/arm/mach-gemini/include/mach/entry-macro.S b/arch/arm/mach-gemini/include/mach/entry-macro.S deleted file mode 100644 index f044e430bfa4..000000000000 --- a/arch/arm/mach-gemini/include/mach/entry-macro.S +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Low-level IRQ helper macros for Gemini platform. - * - * Copyright (C) 2001-2006 Storlink, Corp. - * Copyright (C) 2008-2009 Paulius Zaleckas - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ -#include - -#define IRQ_STATUS 0x14 - - .macro get_irqnr_preamble, base, tmp - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - ldr \irqstat, =IO_ADDRESS(GEMINI_INTERRUPT_BASE + IRQ_STATUS) - ldr \irqnr, [\irqstat] - cmp \irqnr, #0 - beq 2313f - mov \tmp, \irqnr - mov \irqnr, #0 -2312: - tst \tmp, #1 - bne 2313f - add \irqnr, \irqnr, #1 - mov \tmp, \tmp, lsr #1 - cmp \irqnr, #31 - bcc 2312b -2313: - .endm diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c index d929b3ff18fd..37d52e372456 100644 --- a/arch/arm/mach-gemini/irq.c +++ b/arch/arm/mach-gemini/irq.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -65,6 +66,18 @@ static struct irq_chip gemini_irq_chip = { .irq_unmask = gemini_unmask_irq, }; + +asmlinkage void __exception_irq_entry gemini_handle_irq(struct pt_regs *regs) +{ + int irq; + unsigned status; + + while ((status = __raw_readl(IRQ_STATUS(IO_ADDRESS(GEMINI_INTERRUPT_BASE))))) { + irq = ffs(status) - 1; + handle_domain_irq(NULL, irq, regs); + } +} + static struct resource irq_resource = { .name = "irq_handler", .start = GEMINI_INTERRUPT_BASE, @@ -102,4 +115,6 @@ void __init gemini_init_irq(void) /* Set interrupt mode */ __raw_writel(mode, IRQ_TMODE(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); __raw_writel(level, IRQ_TLEVEL(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); + + set_handle_irq(gemini_handle_irq); }