Message ID | 20230806092056.2467-1-jszhang@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp847756vqr; Sun, 6 Aug 2023 02:55:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDeQF7nGgp7syCZfC+bmI21NWCeAPpp9Ewzwraor5gP5KduJKF4va4aYH63z4/LPHru3QP X-Received: by 2002:a17:907:78c5:b0:99c:22e3:3eed with SMTP id kv5-20020a17090778c500b0099c22e33eedmr6212102ejc.73.1691315758681; Sun, 06 Aug 2023 02:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691315758; cv=none; d=google.com; s=arc-20160816; b=w13Q0uP2ZSSZZ6IDD0hcWlCjfi7jx3EQbzZU505etSYszECt2zx7hAoIwKEg2+hOkk zPmpZjjJ/O6u33rB9wnq4tW6236EjOhDVPO/Szn8fpspWYAg4yCeUSCwthtax8leEjFG aPNdwjZlZDh18onjnKj50AztizTbbE7ju++29vTJKqob16mWE8VSQhCDRYz9RjLqr2db NCSRgcAp3tBKtr2SQV4YaTVNqtOombw82pZ2zl7kl9zG8bCXcVJ5OMZ6DAb1VptCNYyl m9a24zRSBTiHxcwAMm2XN3dSEoJ8uQ2evPM5E2/I5W6KKW2EsRWjg/kqxqFhgSsvByh0 cXRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+ppPQccbGCd5KCLpbbOv7CriHQ4O/ydq5pp08/dEsMg=; fh=9LhevukQlN8QgABBNKHWl1nBtSwK1vKoyAVqIrNCnSI=; b=EK6YoGmFtauYLQ5kbOe97YvCNumHuhOmXcdZbHtDTx9t4Jc1J1TEvMlauGfZVow95E nTqTIq2vqouxqKZss+BjZP4pnqkQKQtS/YHnCd4ZXcYckBJX5RPncnIN82cS/iXe3KaG 4q6QCsuCF4dpiac1dMLlLFUNUGKRSFdVptPT1qaNgTvzYtTq2GKPs+L7Lf5LIiAi1pBx eg0uqZXpC/cHmsXbESZ6VqqHrO9eBZkoD1K2/UtU4F6IQphX7nnKLXaqYYJmv00mH0by 24jnjj6KFdrYZLu02Y3TY5NvmQRIVl0cr2B5Xp+56LCTvis2AAGhTuOEmqGkXXXe9S32 F/gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="leVX9+/a"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a1709063a8900b00992d262ff61si1283592ejd.989.2023.08.06.02.55.35; Sun, 06 Aug 2023 02:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="leVX9+/a"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbjHFJck (ORCPT <rfc822;david.simonyants@gmail.com> + 99 others); Sun, 6 Aug 2023 05:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjHFJci (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 6 Aug 2023 05:32:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE389F3; Sun, 6 Aug 2023 02:32:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5BFED60FFC; Sun, 6 Aug 2023 09:32:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83E21C433C8; Sun, 6 Aug 2023 09:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691314356; bh=e3eVn3I3csuxUTSWKKbazD8xuiApRe8LHcpfQHQofGk=; h=From:To:Cc:Subject:Date:From; b=leVX9+/a4UYzb787JuPbefONy8LrIEK0Y4HHBTpRJ+k6FGVF+P9dJxWdUtupLM+5y 1K14x98xs+yaAQSfm0kjiqW8979VfUz1wSlhrK2eXmF9MvHIfM24+w/xEcuOwQKFxf xywwFT1YvyvDz6vsfPjF7Q9aZIcMlt4v08+qJqaGdqbyiK5/hLpsfZcWIG64RqcU7F iPHuoMWLpGJjbwPH0RcpnXgQhOrEzAyflu3kV+gyqcjz6ZPpGUg/436UzOXKXi9qgH MZv1GWepaSmPN7rrDddTXkP9NnUzuT9fCWfMWTr9MtGyUFGAj2esYMQjRwspXrgM4C pBOkUpN8vMeog== From: Jisheng Zhang <jszhang@kernel.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Jiri Slaby <jirislaby@kernel.org> Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] serial: 8250_dw: fall back to poll if there's no interrupt Date: Sun, 6 Aug 2023 17:20:54 +0800 Message-Id: <20230806092056.2467-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773473089594219974 X-GMAIL-MSGID: 1773473112978547862 |
Series |
serial: 8250_dw: fall back to poll if there's no interrupt
|
|
Message
Jisheng Zhang
Aug. 6, 2023, 9:20 a.m. UTC
When there's no irq(this can be due to various reasons, for example, no irq from HW support, or we just want to use poll solution, and so on), falling back to poll is still better than no support at all. patch1 makes the interrupt property in dt-binding optional patch2 falls back to poll if there's no interrupt since v1: - adopt Andy's suggestion to simplified the code Jisheng Zhang (2): dt-bindings: serial: snps-dw-apb-uart: make interrupt optional serial: 8250_dw: fall back to poll if there's no interrupt .../devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 - drivers/tty/serial/8250/8250_dw.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-)
Comments
On Sun, Aug 06, 2023 at 12:20:11PM +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 06, 2023 at 05:20:54PM +0800, Jisheng Zhang wrote: > > When there's no irq(this can be due to various reasons, for example, > > no irq from HW support, or we just want to use poll solution, and so > > on), falling back to poll is still better than no support at all. > > Ouch, really? Why not just fix the hardware instead? > Hi Greg, The HW may be designed as that to save interrupt lines if the uart is dedicated to debug purpose. I also see similar support in other uart drivers, for example liteuart.c, altera_uart.c, altera_jtaguart.c 8250_ioc3.c and so on. Thanks
On Sun, Aug 06, 2023 at 05:20:54PM +0800, Jisheng Zhang wrote: > When there's no irq(this can be due to various reasons, for example, > no irq from HW support, or we just want to use poll solution, and so > on), falling back to poll is still better than no support at all. Ouch, really? Why not just fix the hardware instead?