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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 73D51C433B4 for ; Thu, 1 Apr 2021 04:16:32 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 B4B9061057 for ; Thu, 1 Apr 2021 04:16:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4B9061057 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4F9qcs1FW8z30D3 for ; Thu, 1 Apr 2021 15:16:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=jms.id.au header.i=@jms.id.au header.a=rsa-sha256 header.s=google header.b=FSY9bK6E; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::833; helo=mail-qt1-x833.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=jms.id.au header.i=@jms.id.au header.a=rsa-sha256 header.s=google header.b=FSY9bK6E; dkim-atps=neutral Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4F9qcM50scz2yYn; Thu, 1 Apr 2021 15:16:01 +1100 (AEDT) Received: by mail-qt1-x833.google.com with SMTP id h7so635373qtx.3; Wed, 31 Mar 2021 21:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DnLOo/zKFvvfvZUcx+JWPM+sG45h5ZMlE6pfJth5bZA=; b=FSY9bK6EqVMbAvbJjmaAGvWT2YTq6+22I+ohI8uL+Jxqutw0a+tqk250xv6oUWfebr iFDBj2m6RXqdKKIZUF/n11GKeruzHnFE3MO6xrVts8a6ok9yoI1b4nQhrQDqOLBkXTsT tCrCGmieznBTNltFiXw3Tg+lgg7a57GYS1SkE= 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=DnLOo/zKFvvfvZUcx+JWPM+sG45h5ZMlE6pfJth5bZA=; b=Ks+p/2/d+MRv+NRa/XbMyA1N5FxZmB3ntZx6hhwNHP+mLtYv+ppeGOOwDDEH0mElsG v0ddT6iPbxCFqY45Mk+hg+6L8/2P0NtRWzOzn9XIMLPYC6Q9ZRk73Qby2+gAdZbC5nX1 4DXbvNXnMVuBdj4yopnpdGjjTjMGvhqCTcXBCOSxVV0GYBD2r/rzhZryUuDcJBg9f6Il 6xCkacqdNYqfudtKtNrc7AKH/jTLQ6bEonuLL4I+wZopBh+Hh7p9rcjUNiJc6GaTIOwx kYfOAPX+FpSzWHECiK30ubAwEcuwqlflVom6VtUcwUtwp4J9hd5OIocU4CSsWC3Qg/aD u+SQ== X-Gm-Message-State: AOAM530FiZy/mG40B5wASHr6PFGnGanCFvskxP46taP/T8OFE8F18BzA WGab85sCUMCg5yOLPu/+pfwDq5CUMp9H1Rzcoso= X-Google-Smtp-Source: ABdhPJypEX2gUYtGWHMsAT0fUIon/Gl9d1HFtws1V67C6FeeuxcqVZPapwQ22BWZprgSEoafxfPm3vIDhv8+xFHtLcQ= X-Received: by 2002:ac8:7547:: with SMTP id b7mr5684873qtr.176.1617250557473; Wed, 31 Mar 2021 21:15:57 -0700 (PDT) MIME-Version: 1.0 References: <20210401005702.28271-1-zev@bewilderbeest.net> <20210401005702.28271-3-zev@bewilderbeest.net> In-Reply-To: <20210401005702.28271-3-zev@bewilderbeest.net> From: Joel Stanley Date: Thu, 1 Apr 2021 04:15:44 +0000 Message-ID: Subject: Re: [PATCH v2 2/3] drivers/tty/serial/8250: add DT property for aspeed vuart sirq polarity To: Zev Weiss , Jeremy Kerr Content-Type: text/plain; charset="UTF-8" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed , Andrew Jeffery , Greg Kroah-Hartman , OpenBMC Maillist , Linux Kernel Mailing List , linux-serial@vger.kernel.org, Jiri Slaby , Linux ARM Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Thu, 1 Apr 2021 at 00:57, Zev Weiss wrote: > > This provides a simple boolean to use instead of the deprecated > aspeed,sirq-polarity-sense property. > > Signed-off-by: Zev Weiss > --- > drivers/tty/serial/8250/8250_aspeed_vuart.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c > index c33e02cbde93..e5ef9f957f9a 100644 > --- a/drivers/tty/serial/8250/8250_aspeed_vuart.c > +++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c > @@ -482,6 +482,9 @@ static int aspeed_vuart_probe(struct platform_device *pdev) > of_node_put(sirq_polarity_sense_args.np); > } > > + if (of_property_read_bool(np, "aspeed,sirq-active-high")) > + aspeed_vuart_set_sirq_polarity(vuart, 1); This assumes the default is always low, so we don't need a property to set it to that state? Would it make more sense to have the property describe if it's high or low? (I'm happy for the answer to be "no", as we've gotten by for the past few years without it). This brings up another point. We already have the sysfs file for setting the lpc address, from userspace. In OpenBMC land this can be set with obmc-console-client (/etc/obmc-console.conf). Should we add support to that application for setting the irq polarity too, and do away with device tree descriptions? > + > aspeed_vuart_set_enabled(vuart, true); > aspeed_vuart_set_host_tx_discard(vuart, true); > platform_set_drvdata(pdev, vuart); > -- > 2.31.1 >