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 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 01DAAC636D6 for ; Wed, 22 Feb 2023 18:18:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C537685AE4; Wed, 22 Feb 2023 19:18:10 +0100 (CET) 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="lbU7jFW0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51F6480BAA; Wed, 22 Feb 2023 19:18:08 +0100 (CET) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 D047085AFD for ; Wed, 22 Feb 2023 19:18:05 +0100 (CET) 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-qt1-x82a.google.com with SMTP id bt6so8431488qtb.4 for ; Wed, 22 Feb 2023 10:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; 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=JgED8dZa1YLt4ogjkbUNax/pKNaOCRzD5fsxppDJlbc=; b=lbU7jFW019B1xWBHi1GXTalK4uG6h+fi62g/CynEzu17dSuWFDkpQ6dhdu0GojGpM3 GpdZTLrtiCfRP/itue+O8uc9ER9o9dRlQS6xPP+cAyKQB60EoiPfL0T+vF48r4ErZaHH blwBVG5iKuNGM5z6sNUpLptz5NRl4FNDVdcrk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=JgED8dZa1YLt4ogjkbUNax/pKNaOCRzD5fsxppDJlbc=; b=5DAT4Spy1COChLszcyzQT9v1TnbfHQlbQwFeDhAsdhqb7DPfPCqgzTeiwUKwp4aWsy aXHoJpCoWD5Qte0e0m17/RiTsc5zHyFhea1HUCX1DjXw8ABeOkG4CDgsgvEeg90HkTDA foL1DweQpnKQZwszvfEOnjQJq1YXAGnFlSXCfO5lDBw5wv6hp6kUHbJ2j/RVKk0ZalAg bZpJOZGU7LinLYiCcgSEB2Y5EZ5DvxDS6o5xYZw/OyjSUo0KD+QGR+/3SdqcBAfCKua5 jnBzQZwnt5YO4tNcL9p57Zs0oP81w4MItVs0swota5sW1CWLs/YMtxnlrx7PsslwD/zM 0sng== X-Gm-Message-State: AO0yUKXgCzT2IFi7cYhaKi0+pnp+4c5QjcV5kJoReScZRNIUfYj33wpS CEFRFLx90u/i1OuqxB6WKNo0rA== X-Google-Smtp-Source: AK7set/hckRSdF8+GFaRly9F0NJf7ok+dTiiT2pB/p5ZbBLayqoGFNXUWSImHnP8pYg/IWzugBhtGA== X-Received: by 2002:ac8:5850:0:b0:3bf:9f6e:a383 with SMTP id h16-20020ac85850000000b003bf9f6ea383mr13087411qth.20.1677089884618; Wed, 22 Feb 2023 10:18:04 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-b87e-a945-7631-50d9.res6.spectrum.com. [2603:6081:7b00:6400:b87e:a945:7631:50d9]) by smtp.gmail.com with ESMTPSA id d13-20020ac8534d000000b003b9b48cdbe8sm4729716qto.58.2023.02.22.10.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 10:18:04 -0800 (PST) Date: Wed, 22 Feb 2023 13:18:02 -0500 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 v1 17/24] ns16550: match when to define bdf with uart code Message-ID: References: <20230222013821.1144691-1-troykiskyboundary@gmail.com> <20230222013821.1144691-18-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gK0N7iF0vgvzSLX6" Content-Disposition: inline In-Reply-To: <20230222013821.1144691-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.6 at phobos.denx.de X-Virus-Status: Clean --gK0N7iF0vgvzSLX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 21, 2023 at 05:38:14PM -0800, Troy Kisky wrote: > When switching defined(CONFIG_PCI) to CONFIG_IS_ENABLED(PCI) > bdf is no longer accessible. So change to preprocessor to avoid access. >=20 > Signed-off-by: Troy Kisky > --- >=20 > arch/x86/cpu/apollolake/uart.c | 6 +++--- > include/ns16550.h | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uar= t.c > index a9362436000..143217755ff 100644 > --- a/arch/x86/cpu/apollolake/uart.c > +++ b/arch/x86/cpu/apollolake/uart.c > @@ -79,11 +79,11 @@ void apl_uart_init(pci_dev_t bdf, ulong base) > =20 > static int apl_ns16550_probe(struct udevice *dev) > { > +#if !CONFIG_IS_ENABLED(PCI) > 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); > - > + apl_uart_init(plat->ns16550.bdf, plat->ns16550.base); > +#endif > return ns16550_serial_probe(dev); > } > =20 > diff --git a/include/ns16550.h b/include/ns16550.h > index e7e68663d03..8d7eb7d8f9c 100644 > --- a/include/ns16550.h > +++ b/include/ns16550.h > @@ -74,7 +74,7 @@ struct ns16550_plat { > int clock; > u32 fcr; > int flags; > -#if defined(CONFIG_PCI) && defined(CONFIG_SPL) > +#if !CONFIG_IS_ENABLED(PCI) || CONFIG_IS_ENABLED(OF_PLATDATA) > int bdf; > #endif > }; This isn't equivalent. This means platforms such as am335x_evm which do not enable PCI nor SPL_PCI now get this field and grow their rodata. --=20 Tom --gK0N7iF0vgvzSLX6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmP2XFYACgkQFHw5/5Y0 tyxsLQwAhifCSRpc6pZEU1aKkZg2TUiQkU4oroVj1rwB/2QqlIojteWo2Z4ETmkE PgjupENLlAvxQaJkiq70xvygRPfz6BnUkH8+Qg+i7E6MSqKa5MhTGZtNe54wTHYA Nn4sT1dqKkkvKt2/FFjHxafkAkyNAQsyekr6jJKa3mvzHqXSabPTA72v/yem//ky fKhHxxQRqvOmb1WjPEL6wS2IqDmAwAK+41nBG8+1WzuAEDd/0znn1pOLI6iqOZoV BM1wH3PWlWPHTr9mvuV93zcTbbZ/OWXvZ8mToQaYCVGx9o1ex2IyaBFSLDVAmt0A JPEB+VcVOa+lHOYJmcW0ceMxOm2aW0he+BH+3EiCCpiytKSgA8/Zd7mZjCd8Keri 1Jg9o7ZyL8QdFsQll7Q4NaUDDy4o7eqcBHQ9Ugx13njRp0v6FueT/+7v0nYuuQ6j HbtqcLLPUtu0Wvpbr7+i6mfqjG/O37xZXIj0cfddsDFdEc0oNfnu5pH4oNAFO70W T56pSL8q =4HRB -----END PGP SIGNATURE----- --gK0N7iF0vgvzSLX6--