Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1128197ybg; Sat, 26 Oct 2019 13:32:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFbzqXYOddLXj9Iq90l8jZOcaeJUOmRxlhtdsnv0wWPPCp1/HcpUfgjD0mtdopQCOyBnNr X-Received: by 2002:a05:6402:7d2:: with SMTP id u18mr11391427edy.23.1572121935284; Sat, 26 Oct 2019 13:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572121935; cv=none; d=google.com; s=arc-20160816; b=lSs6J0TfJk0+QIAz8bWCjqxVA43RnbY5DYN7gkyT8G5ZyblPCjNZZ5Oi6ut5Xd4iPO pZ/qobBpGtbkixlt6nWrjZCEeLUTQbyJ40dANZdTVx2eWE9evRdDpawt9b6tAhl73nCQ 6vl9v+8nVRQVtkUPn1j089rHJQPj7mxOpT9xdg1sWyNC1Afc9/I3tLzcSbT9XAv7BeST zrh72ivY0wbUz1wJ2hSRsJtEJo3WultfbF7OuYMypBSs3x5OZZ41apzvUZqlt779T37N R4kWY8EBPt5aYy5Q1gHcCHUMy2WghNziyD+hy83LZ1GOVvw+MWvgzU178bh+A25NTFEw 7GiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=C3Bnj79/MdmyOPceI8w6ogw+VOwoEwR2LfbvEH8/Jt8=; b=AJqq7Aj5AVHNiVYYnyd3hMG7tb9AWiBOkWaC8FmB9rMSzQSYh+pmOGnhZmBwQ2s0z0 EEcF1QnvJihpglf4wUDEKIQ1JSuZ8TwdDvzivBGB+AMpLlCMskNJsWmrsDGa6XsC0G5u Q4WjA1iD5TP2HS6bxdjkpIpbdYk1dyThR6H5qxDm6Z9snHncVvig0YFl6QLdWinmwpHe 1j+c0hnRsiaB9AgVRf331Hb4AQR75rrCjOAAbc/k37nFbLsdROqGH9Sj/AHiFJdPvK1D aGmIMxI4L2G1hx19MKhjjhG5NSYI2+GuYRuNobRGlM1BsK7kmzHhwxWZylziB7GyDlE1 68gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ocEA2/Up"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si4164643edj.43.2019.10.26.13.31.51; Sat, 26 Oct 2019 13:32:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ocEA2/Up"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726524AbfJZUbE (ORCPT + 99 others); Sat, 26 Oct 2019 16:31:04 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:40479 "EHLO mail-lf1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbfJZUbE (ORCPT ); Sat, 26 Oct 2019 16:31:04 -0400 Received: by mail-lf1-f50.google.com with SMTP id i15so4807441lfo.7; Sat, 26 Oct 2019 13:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C3Bnj79/MdmyOPceI8w6ogw+VOwoEwR2LfbvEH8/Jt8=; b=ocEA2/UpEZub4FfzrES/35kLEEgf+iuM14yuJDnzueb3oicjVf5VjH8yPNzykDM3CI 0ySJFqTK5wy/ITLl5r/AeF199mbKYCUlQe1acfJZ5OhvbURawEi5O+XvdN9rqYmKETtf IC4fsanTSIIn0AuZ928OzFys+/+zrqPd7vALXtU348vu0tp9fVZM93c8V5ZMRvOv6k3O zF08+RBUuiBLGBuqG0409jY8ynGQnCTTBp7hGXvgGTKWkIWQmOEDqYk2MMIl0mIF7Pld TI0erEKwKnwVhZpDN3Se0CJNro3iFgZ84BgBVQI0u1n2a2vvUQ2YIqlEi/FFJJE1r/uF 9BBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C3Bnj79/MdmyOPceI8w6ogw+VOwoEwR2LfbvEH8/Jt8=; b=J3tEuV4nZRnxkmo5nLd9c+w0k1CF7cYyJxDF/Xmgk+/FWJKw+MU4+JSBa4RitC2z5U pzD0kkmEgBpjNtG8Rfso+mfTLzPeh8NMHHMYJ/7xluO9uS+ZsLbta6wF/CTxGn1WtZhp f5V87Zvfzf4PzG045SFKeNoHhzByu2lrFCai/fGq48oRj1miYFypxM7sitnpHYvwWVzf OqJOhb1RW/+fD/FBcV00nwnTtQMpjwqqNqvkGnLoGl4H0Rys/cXrjWKoW+228b71V6GP ms7SnazSSfH90ZgzuZzG4V3uRYn+FA/CKWiDdUKUE6N9CJSKyTtridDAtURfukKi6HRM lq1g== X-Gm-Message-State: APjAAAUY74g2DJDdrIXbNEGlPKJ1XI0Cxf638ICfrOznzYL2n7UZz/li qmcEul1R1QdVnjqOTVNBASSEDwgp1KkuE3CeqFA= X-Received: by 2002:ac2:4c29:: with SMTP id u9mr6709818lfq.90.1572121861966; Sat, 26 Oct 2019 13:31:01 -0700 (PDT) MIME-Version: 1.0 References: <20191026194522.28293-1-frank-w@public-files.de> In-Reply-To: <20191026194522.28293-1-frank-w@public-files.de> From: Fabio Estevam Date: Sat, 26 Oct 2019 17:31:03 -0300 Message-ID: Subject: Re: [PATCH, RESEND] serial: 8250-mtk: Ask for IRQ-count before request one To: Frank Wunderlich Cc: linux-mediatek@lists.infradead.org, Greg Kroah-Hartman , linux-kernel , linux-serial@vger.kernel.org, Matthias Brugger , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 26, 2019 at 4:46 PM Frank Wunderlich wrote: > > at least on bananapi-r2 we have only 1 IRQ and need to > check for IRQ-count to fix following Errors during probe: > > [ 4.935780] mt6577-uart 11004000.serial: IRQ index 1 not found > [ 4.962589] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 202, base_baud = 1625000) is a ST16650V2 > [ 4.972127] mt6577-uart 11002000.serial: IRQ index 1 not found > [ 4.998927] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 203, base_baud = 1625000) is a ST16650V2 > [ 5.008474] mt6577-uart 11003000.serial: IRQ index 1 not found > > based on Patch from Anson Huang > https://patchwork.ozlabs.org/patch/1164500/ The solution that was accepted for this case was to use platform_get_irq_optional() instead. You could try using platform_get_irq_optional() here as well.