Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD51AC77B7C for ; Wed, 10 May 2023 20:41:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 29CB686091; Wed, 10 May 2023 22:41:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="V+z1q0T7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28E1C86091; Wed, 10 May 2023 22:41:08 +0200 (CEST) Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7DA8E86086 for ; Wed, 10 May 2023 22:41:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-55dc3431c64so51798967b3.2 for ; Wed, 10 May 2023 13:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1683751262; x=1686343262; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IK9ScBpzIXBbJmJSPGzTpuVgNcVqouAmbn1DeNUCDvY=; b=V+z1q0T7qFYkd+ecQyg/n/sl8KBURg71t2uqm6POQqD6lTYM0zXCXAZ0wgdHwLnldt vyVNzw2G+lCv+W2lvo2tvbNqB/xW0nXiyxkpaebEWYIIlKSffAkQSzBSfSONPutmIQB+ bp6NBWubQsPpWQ/X5G8M0+cvqIQ7LTNQl6KMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683751262; x=1686343262; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IK9ScBpzIXBbJmJSPGzTpuVgNcVqouAmbn1DeNUCDvY=; b=ORmdArnsoMshai2wthb1WFnDSVaFxBAQbHUdBsk3jUvuFBCLZGsxWsEd3tR6rZzvnx PiSCCXmQISZARu85bBa8g6TITGH+9bB/AjWo0fanT2i8zP0G7v9CjG0cpdB9F+3IMf0v 19HizFZ0RQTbeMitgZO9Rru2abHyrywWiZG1oflD3MqWXXY876rewXVv2KlbPFGd1Rpd wxTEnkiuSMbza8KL8Yct2MRKqeP/vWpNEzsOrsmK8HoUZwgiMq6AAAtpFVZFXeDOjBHA vOL/4YVQVOyeaqgz8vHKwqWR3k7l0mWLvUWMJNo74BYkzUwKVAYK8vRWDkUts9ChAAnD AmKQ== X-Gm-Message-State: AC+VfDyCUF4Wbk1e1oqdh5zGVS9Bk5kxlIGk8KMUPnGzrF+6jEKkTCBG EUghnPrbeyqNTMAjDSec/O1MFw== X-Google-Smtp-Source: ACHHUZ76Nnz27L0a+iqiNpu7jEFAmrzhZIQzhS0Z3fdANOHMXBwNC2V4hO36IfyCzV8AC6SwXzArwA== X-Received: by 2002:a0d:cc16:0:b0:55a:483:fc19 with SMTP id o22-20020a0dcc16000000b0055a0483fc19mr21496406ywd.44.1683751262279; Wed, 10 May 2023 13:41:02 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-238a-0d17-77d4-33aa.res6.spectrum.com. [2603:6081:7b00:6400:238a:d17:77d4:33aa]) by smtp.gmail.com with ESMTPSA id y18-20020a81a112000000b0055d5f7d05a4sm4394657ywg.52.2023.05.10.13.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 13:41:01 -0700 (PDT) Date: Wed, 10 May 2023 16:41:00 -0400 From: Tom Rini To: Troy Kisky Cc: sjg@chromium.org, u-boot@lists.denx.de, gary.bisson@lairdconnect.com, Andre Przywara , Bin Meng Subject: Re: [PATCH v3 17/23] ns16550: match when to define bdf with uart code Message-ID: <20230510204100.GA1757833@bill-the-cat> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> <20230313213146.1775650-18-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DbTZLpc4Y2p++cxY" Content-Disposition: inline In-Reply-To: <20230313213146.1775650-18-troykiskyboundary@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --DbTZLpc4Y2p++cxY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 13, 2023 at 02:31:39PM -0700, Troy Kisky wrote: > When switching defined(CONFIG_PCI) to CONFIG_IS_ENABLED(PCI) > bdf is no longer accessible. So add preprocessor protection > to avoid access. >=20 > Signed-off-by: Troy Kisky > Reviewed-by: Simon Glass > --- >=20 > (no changes since v2) >=20 > Changes in v2: > - changed condition of when to include field bdf > - added protection to another instance of bdf in uart.c > - Thanks to Simon for getting this corrected >=20 > arch/x86/cpu/apollolake/uart.c | 4 ++++ > include/ns16550.h | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uar= t.c > index a9362436000..878aa48ed76 100644 > --- a/arch/x86/cpu/apollolake/uart.c > +++ b/arch/x86/cpu/apollolake/uart.c > @@ -79,10 +79,12 @@ void apl_uart_init(pci_dev_t bdf, ulong base) > =20 > static int apl_ns16550_probe(struct udevice *dev) > { > +#if IS_ENABLED(CONFIG_PCI) && defined(CONFIG_SPL_BUILD) > struct apl_ns16550_plat *plat =3D dev_get_plat(dev); > =20 > if (!CONFIG_IS_ENABLED(PCI)) > apl_uart_init(plat->ns16550.bdf, plat->ns16550.base); > +#endif > =20 > return ns16550_serial_probe(dev); > } Looking at this again, this hunk here doesn't make sense. Reading outloud, "if we have CONFIG_PCI enabled and CONFIG_SPL_BUILD, declare plat to be .. and then if we do not have PCI enabled ...". I really don't know what the code is supposed to be doing here. --=20 Tom --DbTZLpc4Y2p++cxY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRcAVgACgkQFHw5/5Y0 tywGbwv7BUU3zMM7M/it6bEbtOHiqeNSTwPV2Bbum9+0o4dTTgWWQy4XxcLlA8tT g+Sl0phob7hhLTF7EZmzchBfYBLLS6S1c/+GTn+kUa086049xsr0IMbOWpfulzhj qKD3k5CBBpERZI/9vqsj5OBUIkpJjMDjvZnFFJvpsFzdBoBQO3rX5xUp4Jy/DHCx jDZFx73r7zzjg+Z2lvkYFbwOo2deViQXKfRDN68aJkdLUy+hbfeXVEWQHt/xxWsV Froa+v2mXetRsl6rGxSG482G0IRnvAR0NcLogN9hLV43J5NzG4fxtk1mxEt6JatD Ecr+oWab/ydSWNoL5p796TJCHobRW8+EPyjPJwmg+As2Wu1R3/0yMamfVae5usOt 7ZO8z2bXApUODpbvnctMb88MfsfF9AfdYAOB8cRub8JsxGMsYf3Cuo43HOanG7KW MVthVOOm2Soo9yBRIKsCcqnzsRFhx8yRsMs4bg+jj4V1W/oS29Wi2Z4E7mYykuIO Jh5C7B6N =WLWA -----END PGP SIGNATURE----- --DbTZLpc4Y2p++cxY--