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 78214C04A6A for ; Wed, 2 Aug 2023 15:19:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 70E8586812; Wed, 2 Aug 2023 17:19:12 +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="pOWO+cGV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87F4F86863; Wed, 2 Aug 2023 17:19:11 +0200 (CEST) Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) (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 C060186795 for ; Wed, 2 Aug 2023 17:19:08 +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-x1136.google.com with SMTP id 00721157ae682-583f036d50bso81380937b3.3 for ; Wed, 02 Aug 2023 08:19:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690989547; x=1691594347; 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=oTRInuhnZRvseiXip69pr2eDMI2JeinIe0Q5o9/lyE8=; b=pOWO+cGVHVrEdzjb4uxwyJdEkyNLVZjNCif1IDT5ThTM2Oyy6OLuqh7tHMEzXpRZ0h V/c5qBcQBW6/6HGQobeU4iXWWdAJIyyETbWrxLYmie4GLNJ/Vxyl7CnnU2eD6EYZTB7Z exNfzON2aWBkiNbj4o6hf/5GxsvV+xIIFVZj0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690989547; x=1691594347; 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=oTRInuhnZRvseiXip69pr2eDMI2JeinIe0Q5o9/lyE8=; b=WSfHoP5VFrnjEJvsYxh3FVme3JhjNTW/esaNC3/WKw+NMb6ZTIFhp3ldxDuBj1T1vM dUTIPTK0cuk7AQTivOJY/83EZdlCaVro2aRuXyDRp6eLFhCjV3EIkhGT36KZNAOe6omQ UyYNWFnqaJzJcY5tp2RduAGJYvba2/fH6n0ngWBDdd0vWkwKbIU5Ko5C35EevGGkzW/W d8GyzJsbnEQJKEuqrIevkib3kEZFrYZTuBlcPZXF/qRQPvDQxRPDjedbfWjAxaTCkVgx qJkeYsFb9qILLe+lTi9ewPDY93s/z+Ic0cPq5f08xxOphDXuzP94rbZW2x8jgHfMD1zg AP6A== X-Gm-Message-State: ABy/qLZ6y6cOSFsf0dQCIiAyPE8Q/Ila4QfXAut4+3k2nfGdIf+7R4Z/ vNoMNhKSZq5iwHJtvyNGpjAj15+U6f/9y87xenLrxg== X-Google-Smtp-Source: APBJJlFjNbEO6cv+qgazk9sfERe1Y+CWkeWP/lQlf9XLwqmzUXlm9Zz4RmjbufsyYpBkwn4aiDqlrw== X-Received: by 2002:a0d:f3c3:0:b0:561:206a:ee52 with SMTP id c186-20020a0df3c3000000b00561206aee52mr17293766ywf.24.1690989547412; Wed, 02 Aug 2023 08:19:07 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-38a3-d353-a65e-b181.res6.spectrum.com. [2603:6081:7b00:6400:38a3:d353:a65e:b181]) by smtp.gmail.com with ESMTPSA id w145-20020a0dd497000000b005845e6f9b50sm4646577ywd.113.2023.08.02.08.19.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 08:19:06 -0700 (PDT) Date: Wed, 2 Aug 2023 11:19:05 -0400 From: Tom Rini To: Sergei Antonov Cc: u-boot@lists.denx.de, sjg@chromium.org Subject: Re: [PATCH] arm: moxa: add nport6600 platform Message-ID: <20230802151905.GX3630934@bill-the-cat> References: <20230731184329.1789323-1-saproj@gmail.com> <20230731185913.GA3630934@bill-the-cat> <20230801142731.GN3630934@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q2eVvYiOo0sQ0cQo" Content-Disposition: inline In-Reply-To: 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 --q2eVvYiOo0sQ0cQo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 02, 2023 at 05:27:54PM +0300, Sergei Antonov wrote: > On Tue, 1 Aug 2023 at 17:27, Tom Rini wrote: > > > > On Tue, Aug 01, 2023 at 01:11:28PM +0300, Sergei Antonov wrote: > > > On Mon, 31 Jul 2023 at 21:59, Tom Rini wrote: > > > > > > > > On Mon, Jul 31, 2023 at 09:43:29PM +0300, Sergei Antonov wrote: > > > > > > > > > Support for NPort 6600 Series RS-232/422/485 secure terminal serv= ers. > > > > > > > > > > Technical specifications: > > > > > FA526 ARMv4 CPU, 64 MB of RAM, 16 MB NOR flash, 100 Mbit/s Ethern= et, > > > > > optional expansion modules, up to 32 RS-232/422/485 ports. > > > > > > > > > > Signed-off-by: Sergei Antonov > > > > > --- > > > > > arch/arm/Kconfig | 9 +++ > > > > > arch/arm/dts/nport6600.dts | 134 +++++++++++++++++++++++++= ++++++ > > > > > > > > Where does the device tree come from? > > > > > > From the datasheet, testing, and a similar dts in Linux: > > > https://github.com/torvalds/linux/tree/master/arch/arm/boot/dts/moxa > > > > It needs to be the same dts as in Linux, and re-synced periodically. > > The -u-boot.dtsi file can be used for changes that are still being > > staged to Linux, but shouldn't be used indefinitely. >=20 > There is no dts in Linux for the device (a family of devices) I am > submitting. Linux has a dts for a similar device. Please upstream the device tree. > > > > > diff --git a/board/moxa/nport6600/nport6600.c b/board/moxa/nport6= 600/nport6600.c > > > > > new file mode 100644 > > > > > index 000000000000..88fa98c315fd > > > > > --- /dev/null > > > > > +++ b/board/moxa/nport6600/nport6600.c > > > > > @@ -0,0 +1,78 @@ > > > > > +// SPDX-License-Identifier: GPL-2.0-or-later > > > > > + > > > > > +#include > > > > > > OK. Compiles without it. > > > > > > > New files must not add common.h > > > > > > > > > diff --git a/include/configs/nport6600.h b/include/configs/nport6= 600.h > > > > > new file mode 100644 > > > > > index 000000000000..c70cc7e1ac72 > > > > > --- /dev/null > > > > > +++ b/include/configs/nport6600.h > > > > [snip] > > > > > +#define __io > > > > > > > > What's this for? > > > > > > Removing it leads to warnings: > > > > > > .../u-boot/drivers/serial/ns16550.c: In function =E2=80=98serial_out_= dynamic=E2=80=99: > > > .../u-boot/drivers/serial/ns16550.c:111:17: warning: implicit > > > declaration of function =E2=80=98outb=E2=80=99 [-Wimplicit-function-d= eclaration] > > > 111 | outb(value, addr); > > > | ^~~~ > > > .../u-boot/drivers/serial/ns16550.c: In function =E2=80=98serial_in_d= ynamic=E2=80=99: > > > .../u-boot/drivers/serial/ns16550.c:131:24: warning: implicit > > > declaration of function =E2=80=98inb=E2=80=99; did you mean =E2=80=98= isb=E2=80=99? > > > [-Wimplicit-function-declaration] > > > 131 | return inb(addr); > > > | ^~~ > > > | isb > > > > > > and then linking errors: > > > > > > .../armv4/lib/gcc/armv4-linux-gnueabi/13.0.1/../../../../armv4-linux-= gnueabi/bin/ld: > > > /tmp/ccIta0uJ.ltrans12.ltrans.o: in function `ns16550_writeb.isra.0': > > > .../u-boot/drivers/serial/ns16550.c:111: undefined reference to `outb' > > > .../armv4/lib/gcc/armv4-linux-gnueabi/13.0.1/../../../../armv4-linux-= gnueabi/bin/ld: > > > /tmp/ccIta0uJ.ltrans12.ltrans.o: in function `ns16550_readb.isra.0': > > > .../u-boot/drivers/serial/ns16550.c:131: undefined reference to `inb' > > > > Oh, you need to be enabling CONFIG_DM_SERIAL. >=20 > It IS enabled. Oh, I see it now, you're right, sorry. But, is CONFIG_NS16550_DYNAMIC really the only choice here? --=20 Tom --q2eVvYiOo0sQ0cQo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTKc+kACgkQFHw5/5Y0 tyzpUgwAr5xKxyj7yQSG9Eqp3Dbd/yTpuVnV0Ft7EBsRh2cUsaaMZ+q+Fg89JVa7 yvAh2FQwNf5Qs406gyQPHxUJi3nlOAVWpBf4q2HR4kolyxNYH0mDqSuhxlVaQGY9 B5+0etUaHlgP8O80IgbmJzQIAVU+cHiP1EB2oegjIDSu2zXESAGxJ+HLQBetPrWO QoFVRMbYCd72odm5yko5EUpvZLNrTjJw9a9H1yQDTBAbCKktQpRpf9JGS4mbmuXh jrdxHOGEqQvEIHkQi1oZ4p0jMWlXv9aOaDsNnHX6xei3o/ZdDqLVS6PIVHvYtm+r htRdnt9FxxyF+U5jOFYIr9lPewjAKF+MvdObfRtECq3iHvBr6o9B9uspErJ66EKv dj5o+pwrr5cXPOe4nsGiNMJoLXPFbZIOAoad0jjs7d0B7vL2P7RRPucTxG75wtIp +WebdLkoxMoL0Bi9iyqRHeME+sEVuEx1Ya/zhhcVcJNmOax9kJUKMihi0xZBUNBw OS1lo+7L =CG32 -----END PGP SIGNATURE----- --q2eVvYiOo0sQ0cQo--