From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BBE4C433E0 for ; Mon, 29 Jun 2020 08:39:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE03E23370 for ; Mon, 29 Jun 2020 08:39:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VmjfkfyK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE03E23370 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YBsyc+WgZhC4aZqRiaeoiVe0yxJl5ZgDq5pMOzd/+CU=; b=VmjfkfyKX6uF9ai4QbuxY8aGJ PRGk4t5y+ADZbVXbpKYDcOVwBJJKxitMvWc0EKle8HQsTxqPku9monMrLwXBve62p6kdZl45tXCCI aoEtizIwQnlFG4OtGCc+h0ymrvF792hyrB8KvXlmNgqDjbeLFcBF9QcNywxnJGfMcRiGBenPHov0q /lFMs4NVvavCYTaRcPl0W3ijVPCV1SwrATzSnRTJLhJ1C3319w9nDNAu2TDmy3vjtWEWwioMnnpJ1 FItdnw1IyVxEld28kOaFwZ8qGYfU1/odSgoNAwtSsRqXYyKAS6lpF7+6dKlrVyCiaFiHI7K/XnseE 7Z7+slm4w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jppIB-0000Lu-4c; Mon, 29 Jun 2020 08:37:31 +0000 Received: from mail-ej1-f66.google.com ([209.85.218.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jppGh-0006Xg-VR for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 08:36:01 +0000 Received: by mail-ej1-f66.google.com with SMTP id rk21so15722415ejb.2 for ; Mon, 29 Jun 2020 01:35:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=P/lWBTxJeT64MmPuE+Y53vSa9wNIb6a3JKrDaGJpzms=; b=fgbTi+qnLlQF7GBwGRPOR/fCCuU0x0nvMyAPqQ6xttfpgjAHBPUMgkoEPEPC518/yj cUxqMlT8TModPcFAg4GdLbYvtCpkwhzQaSJ/ZGZ9qNNexBT6tj2ZxduBA/qrY+udKPUZ b3rBIBrbnCNrvNlyaKTpjAL9k/on1E+5w3cLIf5W7Z9X9UFo6jJS2RT/zB0b5auEbuD9 ANb6qIskJBJZSXLYepj39Bq0eVpUhtTVhqPf7quHuVJe0SZn0ChB6Fu8wTA5F/mQ5Vig 2Wsp/IxHBOCONBlOKWXpWEiSgM7DEq2ocw/KDqP1K9xS8Pge0gh1EVXbUa8xqAA6dm2C R/Pw== X-Gm-Message-State: AOAM5305vFbXv0hDdLaa3qi0L+Zi6/DMXrFNytCtJZASZwxvCsrheaQd ZqZICRvYoTpdNcMKt/81s0I= X-Google-Smtp-Source: ABdhPJwSpDThVjcEd0PgJHWyDlPf/nuRiq+gnvJcGaWZixD0/guW/6gO2OZBM23kPBf0l0OLqzgoxQ== X-Received: by 2002:a17:906:a1cc:: with SMTP id bx12mr12520655ejb.461.1593419756288; Mon, 29 Jun 2020 01:35:56 -0700 (PDT) Received: from kozik-lap ([194.230.155.195]) by smtp.googlemail.com with ESMTPSA id c4sm24101091ejb.17.2020.06.29.01.35.54 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jun 2020 01:35:55 -0700 (PDT) Date: Mon, 29 Jun 2020 10:35:53 +0200 From: Krzysztof Kozlowski To: Tamseel Shams Subject: Re: [PATCH v2] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC Message-ID: <20200629083553.GA14028@kozik-lap> References: <20200628070007.36222-1-m.shams@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200628070007.36222-1-m.shams@samsung.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, kgene@kernel.org, linux-serial@vger.kernel.org, jslaby@suse.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jun 28, 2020 at 12:30:07PM +0530, Tamseel Shams wrote: > In few older Samsung SoCs like s3c2410, s3c2412 > and s3c2440, UART IP is having 2 interrupt lines. > However, in other SoCs like s3c6400, s5pv210, > exynos5433, and exynos4210 UART is having only 1 > interrupt line. Due to this, "platform_get_irq(platdev, 1)" > call in the driver gives the following warning: > "IRQ index 1 not found" on recent platforms. > > This patch re-factors the IRQ resources handling for > each platform and hence fixing the above warnings seen > on some platforms. > > Signed-off-by: Tamseel Shams > --- > Removed the RFC tag and using 'platform_get_irq_optional' > instead of 'platform_get_irq' as per comment received from > Robin Murphy. > > drivers/tty/serial/samsung_tty.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index 6ef614d8648c..60554f42e208 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -60,6 +60,7 @@ struct s3c24xx_uart_info { > char *name; > unsigned int type; > unsigned int fifosize; > + unsigned int irq_cnt; No, it's duplicating the logic. The driver already checks whether SoC has two or one interrupt line with s3c24xx_serial_has_interrupt_mask() so there is no point to have two of such methods. Instead unify it please. Probably entire s3c24xx_serial_has_interrupt_mask() and s3c24xx_serial_type() should be removed and switched into *serial_drv_data. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel