Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4667637rwd; Tue, 30 May 2023 08:18:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vYSH/8KevZv1MM4A13kLQGNbfx92QY1WFk0OjlLxfl5wMNOtuBuxEDaRxOFw8T5NfOB1n X-Received: by 2002:a17:902:e5c4:b0:1b0:6e16:b92c with SMTP id u4-20020a170902e5c400b001b06e16b92cmr1594821plf.54.1685459916220; Tue, 30 May 2023 08:18:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685459916; cv=none; d=google.com; s=arc-20160816; b=tZ71HlfcaOtOLm4/xgG7tnCxx0NtwatIcgogty+uTd5nXt+n5vxV+xGKqFMbry8s1L HUiFMy8VaesYr6DHeEJMX8p48VDRrW9M1t245jn7Gaow3OVuH9WTq1eQeUtOFBT0MRs8 e7Wpju3CMFSYbgc1nfbbPRWMNlT9T4Q54zB5EvvdP5Tr3nA2ijVhn7jupQrutT0A0W9/ RHJDg3p40jiQ/xWA0BlLOAeTLTy7SckU2G4vwU9VtDUdUGMhIt1zbo7uscZNCIBhdwcw frj66lGUdlpENll7klvNZdAyKNoPtdc4M7bhYncZ2E+rpf3nEPJJoNIZHCd1HCk6Ox8M 5GZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N4XiTYh9KFzm6zQH5nYNX6BqBVSr94X4moivTj+DTks=; b=BduCzM8niCSe2W6BZa5F8nSO97tY342iZjqIoUO8mGo8CrqfVFqjyxF24cb6v78XlR letbGkNarqlTxRKDum6dIDbhDjO1A8h7s5egzPKLHHjlom2LqzrbfRJla4FM3UfwY/ky yGiJyc9pqq1KRDm+cUFma5jO5JH0JHL0ZMkhB/D8BKhl2BPrQnPKbAXIz/zhE/kOH7gw 6esMLiqLEove+4xPF/+nuchQMCf3lgkpclrqmx3MyYgYaigjP1e17m1o+3mNvTo69RLy d2bWkENLsGF0vOXwHWgy4NIWK/VGZnZsU+3AXBy5rPo/JNEqkqByfjS3MIhbI20+fyoF SDMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FeOqiEd6; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n15-20020a170902d2cf00b001a9f42553dasi12215547plc.614.2023.05.30.08.18.23; Tue, 30 May 2023 08:18:36 -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=FeOqiEd6; 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 S231929AbjE3PCv (ORCPT + 99 others); Tue, 30 May 2023 11:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230486AbjE3PCu (ORCPT ); Tue, 30 May 2023 11:02:50 -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 8538EE5; Tue, 30 May 2023 08:02:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0C43C63019; Tue, 30 May 2023 15:02:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95B48C433D2; Tue, 30 May 2023 15:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685458968; bh=IGu/SIS5nO+4P63qYCwsR2tsSMfXDgOvY5qdgU7R3pY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FeOqiEd67vy+w2qgzA1AOXF48C/qda8KQnb2clUO4Lt0pbwrZxAMAS9XwMJ8jbC/f aS5LzicX0nY3qN76R2qS3RSZ31juaccabl3rwwcM13ROY3MZaTFJbuabKcQt0mdQ/5 kUWxnloNP1X8osiJbfc96r3wlc0JRNEwyhmo2ARxM1UDxzikP5JxlqWC2FT98MYBfJ /SWU2bTjugptGZNzFWCjiI73SZycy6wKnoC1Gp4VxVISrbl99blM+ioa/HXJX3btNd RecKa3wrLjBu8t4DOYDYvvfiNoA3TvqxoIDVDwnreoXFZc41EpVRCnTuaA1ymt9i++ RoivMOGGNV8rw== Date: Tue, 30 May 2023 08:06:31 -0700 From: Bjorn Andersson To: Mehul Raninga Cc: agross@kernel.org, konrad.dybcio@linaro.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vdadhani@quicinc.com, quic_vtanuku@quicinc.com, quic_vnivarth@quicinc.com Subject: Re: [PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep Message-ID: <20230530150631.7eg6nkre6sva5dcz@ripper> References: <20230530111557.10944-1-quic_mraninga@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530111557.10944-1-quic_mraninga@quicinc.com> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2023 at 04:45:57PM +0530, Mehul Raninga wrote: > While exiting deep sleep, serial port loses its configuration > hence it prints garbage characters on console. Presumably it lost its configuration sometime after suspend, rather than while resuming the system? > > Set serial port configuration while resume from deep sleep. > What happens if you do this unconditionally? > Signed-off-by: Mehul Raninga > --- > drivers/tty/serial/qcom_geni_serial.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c > index 8582479f0211..c04b8fec30ba 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -1737,6 +1738,8 @@ static int qcom_geni_serial_sys_resume(struct device *dev) > if (uart_console(uport)) { > geni_icc_set_tag(&port->se, QCOM_ICC_TAG_ALWAYS); > geni_icc_set_bw(&port->se); > + if (pm_suspend_via_firmware()) I'm not familiar with this api, but aren't all our systems implementing firmware-assisted suspend? Regards, Bjorn > + qcom_geni_serial_port_setup(uport); > } > return ret; > } > -- > 2.17.1 >