Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2106879rdb; Mon, 20 Nov 2023 02:02:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjGWejU+0FGmo7gOv+ce+7nL1mXHsczGEF1bOEbyEPKw1d1+aDVGnzL2Zjw94wsf6SeUmo X-Received: by 2002:a05:6808:140e:b0:3ae:4cad:91a0 with SMTP id w14-20020a056808140e00b003ae4cad91a0mr1775469oiv.6.1700474552014; Mon, 20 Nov 2023 02:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700474551; cv=none; d=google.com; s=arc-20160816; b=a+b99fVeFSV5Pv1pmhmfD2EpVaEbrzgT2pzPqLmDzKt8BxsYBPZQP56DL2IYk8J7tZ VMIEt9dIA50mAzrJA7aFIRYxjQnWqBSjBwjfCz/TyxwFQP3t4GoFEPEddtHfKp+Bx9YT DrJcmEYZuULRY+6Lc8FHMM9yx+yevYpO/hdDNzyaMXYRiGBGVKdEVHHn65wx9j7/Wh/J 7DG45KOqNZQKJoYgfhg/M5v09Ohe9lCwn3eEkhrc17FABO9oiW426jVvBmOyRcvcTBPm XiyVbn8/5X6ZKD6Tcu+mtKwkPNhUGeY4eFgsQp/tkJ9WxWkMbTLQampygmfXtUgqDvQl m4HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=RbWNCBaxuGHE3abNq/3b+ZZK+e/s6QODVluIM9wXQIE=; fh=BvGZhu0ExcWaNJoInT4SKZErPuPZXFNnRDCCbz+2AV0=; b=sRUMb54rllzNB/wvhv3jbIHSLYoCVC8sd10wUK2YCQCXw5US0FiLbcFykAS/DfZzAy 2B1uS7ulWuka+WioTENhQ0nLtbOsx9b7+iPAKlV+HvjT/wufwSfjQJ+7OFxoYCwAaKuG s/8e4AbRkNzPdAaVMbOCRr9SI7ZNfzK49XFo5dInqdgMwVNxxfnXbVUgZHra4lIRCF+M zK6yhxPj5vXrrKUsnDlP+xsEI2SSg+aJpt0sBHYbineLt7aRjLuXbOtFmdPBQZStIGXf lirpVnFSudQBxPWf99/CEnzRQjMig0N3rtHQGtL/FU8vYh7Hzgez2a0oExQjKO/QLWRD oBxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="X/EgsJmF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m10-20020a65530a000000b005b8f6936eb4si7360598pgq.773.2023.11.20.02.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:02:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="X/EgsJmF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 17D27809E21B; Mon, 20 Nov 2023 02:02:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232386AbjKTKCE (ORCPT + 99 others); Mon, 20 Nov 2023 05:02:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbjKTKCD (ORCPT ); Mon, 20 Nov 2023 05:02:03 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 271358F; Mon, 20 Nov 2023 02:01:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700474519; x=1732010519; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=zKggXAZlS8YgibFlT38P+9qlRp4mLDSsXnLg/K6JlEY=; b=X/EgsJmFh1RSoh3FMXp0VuOK59pGQ1nxvRdfr/Tc11kIYcyMwcD56tVa qyrD2aAla4vhpSu6+lQ4b646++TewdK/sCcN33P9Ek2dx5ovVqRvBtaEr auRm1FcLFyu6ST0EcILD91F25YgGTo7hdIHrFxfju4Ok6XHRI2pi+ReyI BWlZLrtc8nmGZtFqEqWtBrXMqjZXNNndqa+cSJEM3Uau59MtOLDYbOq2j EAzzSYWIr1MKlhmqspIS1WkIVlpfONGXzStX3ziCfTtBECo9HQUBs/wS6 PDLEI3isuGCFJ4gZx7I5PtYtQiwDwFdGWJdlsShg8grc8Lhz+N6tG5864 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="455914400" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="455914400" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 01:55:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10899"; a="769841610" X-IronPort-AV: E=Sophos;i="6.04,213,1695711600"; d="scan'208";a="769841610" Received: from akeren-mobl.ger.corp.intel.com ([10.252.40.26]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 01:55:23 -0800 Date: Mon, 20 Nov 2023 11:55:21 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: =?ISO-8859-15?Q?Th=E9o_Lebrun?= cc: Russell King , Greg Kroah-Hartman , Jiri Slaby , LKML , linux-serial , Linus Walleij , =?ISO-8859-15?Q?Gr=E9gory_Clement?= , Alexandre Belloni , Thomas Petazzoni , Vladimir Kondratiev , Tawfik Bayouk Subject: Re: [PATCH v3 6/6] tty: serial: amba-pl011: factor QDF2400 SoC erratum 44 out of probe In-Reply-To: <20231120-mbly-uart-v3-6-07ae35979f1f@bootlin.com> Message-ID: <5c10e247-3fe-7455-a13-fde4c3cb0b4@linux.intel.com> References: <20231120-mbly-uart-v3-0-07ae35979f1f@bootlin.com> <20231120-mbly-uart-v3-6-07ae35979f1f@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-557729899-1700474126=:2032" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:02:14 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-557729899-1700474126=:2032 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Mon, 20 Nov 2023, Théo Lebrun wrote: > On this platform, different vendor data is used. That requires a > compile-time check as we access (1) a global boolean & (2) our local > vendor data. Both symbols are accessible only when > CONFIG_ACPI_SPCR_TABLE is enabled. > > Factor the vendor data overriding to a separate function that is empty > when CONFIG_ACPI_SPCR_TABLE is not defined. > > Suggested-by: Ilpo Järvinen > Signed-off-by: Théo Lebrun > --- > drivers/tty/serial/amba-pl011.c | 25 ++++++++++++++++++------- > 1 file changed, 18 insertions(+), 7 deletions(-) > > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c > index 4185d6fd243b..e08a32eb0ed1 100644 > --- a/drivers/tty/serial/amba-pl011.c > +++ b/drivers/tty/serial/amba-pl011.c > @@ -2874,6 +2874,22 @@ static int pl011_resume(struct device *dev) > > static SIMPLE_DEV_PM_OPS(pl011_dev_pm_ops, pl011_suspend, pl011_resume); > > +#ifdef CONFIG_ACPI_SPCR_TABLE > +static void qpdf2400_erratum44_workaround(struct device *dev, > + struct uart_amba_port *uap) > +{ > + if (qdf2400_e44_present) This should be !qdf2400_e44_present. -- i. > + return; > + > + dev_info(dev, "working around QDF2400 SoC erratum 44\n"); > + uap->vendor = &vendor_qdt_qdf2400_e44; > +} > +#else > +static void qpdf2400_erratum44_workaround(struct device *dev, > + struct uart_amba_port *uap) > +{ /* empty */ } > +#endif > + > static int sbsa_uart_probe(struct platform_device *pdev) > { > struct uart_amba_port *uap; > @@ -2909,13 +2925,8 @@ static int sbsa_uart_probe(struct platform_device *pdev) > return ret; > uap->port.irq = ret; > > -#ifdef CONFIG_ACPI_SPCR_TABLE > - if (qdf2400_e44_present) { > - dev_info(&pdev->dev, "working around QDF2400 SoC erratum 44\n"); > - uap->vendor = &vendor_qdt_qdf2400_e44; > - } else > -#endif > - uap->vendor = &vendor_sbsa; > + uap->vendor = &vendor_sbsa; > + qpdf2400_erratum44_workaround(&pdev->dev, uap); > > uap->reg_offset = uap->vendor->reg_offset; > uap->fifosize = 32; > > --8323329-557729899-1700474126=:2032--