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 D65FEC001DF for ; Tue, 1 Aug 2023 14:27:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D4B7086C25; Tue, 1 Aug 2023 16:27:40 +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="M3BLrz9t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1EEE186C3C; Tue, 1 Aug 2023 16:27:39 +0200 (CEST) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (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 3944986AFD for ; Tue, 1 Aug 2023 16:27:36 +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-x1134.google.com with SMTP id 00721157ae682-583b3939521so64044177b3.0 for ; Tue, 01 Aug 2023 07:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690900055; x=1691504855; 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=DxfQxWIqemXYwHjrk6MASB08+eGi9TZ9eRs5C+npMvA=; b=M3BLrz9t4SQNqpjDTk4gbL2jBzX6x8+p0L5e4lupVDb8FDu53zVjjp/VSuu2V6RaD7 aMLrnkedD5aijoZRtj1Hi9EOvnetVvVrPbjDja/UVh60JauJ4CK2c79sK9pcKUPRgMGI PTfhwtTcwl+BNSUcqqaPuzLXO9GmTsw5G5Geg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690900055; x=1691504855; 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=DxfQxWIqemXYwHjrk6MASB08+eGi9TZ9eRs5C+npMvA=; b=QPXIz2cFdwKnfXiJxLSkafk9qlZExo6CHcsNuGcvmsOVVINGFAHZhanvkbLQgZcXJ8 3NOtN4lsaL2S+OI4wjQS0F2HyClr/21mqOzFMf++VysVt2CnMrBSyrLt2Mn4jrFaGSK5 ie+4laY0LpeHMJ8OAXBLjsS6SWF/6oCoalEkNBbV4HjGbBlEBDqevGk44x1fmurbej/C 4Jl1T/lQXPnolJC2RdHV4kOiL883UFec3FRY+tYf1yDmhbCE1Sow0kXeVAqzO214o4oT 4Nm1LOtBxG1c5WBxe9hOK8IrYtPHRz0/FGB49l/qUDda7oOZlY3Fv/RbgzjQJws8rIIy DcZA== X-Gm-Message-State: ABy/qLaVwM28bXgle30/1AscxZPIEIA/Uz9cKu5h8kqPqKxThAEcbj4B Tx9f9pr2xcU4iBgzHuolXLmSrQ== X-Google-Smtp-Source: APBJJlGtpUetZU0cuDf5YD5dgQuLKNyfkKM6nVA6qlaAliKBPGRfpDSReYQp7jbuL7jJP6M4b7m4xA== X-Received: by 2002:a0d:e642:0:b0:56c:e70b:b752 with SMTP id p63-20020a0de642000000b0056ce70bb752mr12622073ywe.13.1690900053369; Tue, 01 Aug 2023 07:27:33 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-383c-c9ce-d23d-78ae.res6.spectrum.com. [2603:6081:7b00:6400:383c:c9ce:d23d:78ae]) by smtp.gmail.com with ESMTPSA id o10-20020a81de4a000000b0057a0e5b18e0sm3653494ywl.142.2023.08.01.07.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 07:27:32 -0700 (PDT) Date: Tue, 1 Aug 2023 10:27:31 -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: <20230801142731.GN3630934@bill-the-cat> References: <20230731184329.1789323-1-saproj@gmail.com> <20230731185913.GA3630934@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hPrS/dth61AlL5b0" 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 --hPrS/dth61AlL5b0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 servers. > > > > > > Technical specifications: > > > FA526 ARMv4 CPU, 64 MB of RAM, 16 MB NOR flash, 100 Mbit/s Ethernet, > > > 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? >=20 > 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. > > > diff --git a/board/moxa/nport6600/nport6600.c b/board/moxa/nport6600/= 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 >=20 > OK. Compiles without it. >=20 > > New files must not add common.h > > > > > diff --git a/include/configs/nport6600.h b/include/configs/nport6600.h > > > new file mode 100644 > > > index 000000000000..c70cc7e1ac72 > > > --- /dev/null > > > +++ b/include/configs/nport6600.h > > [snip] > > > +#define __io > > > > What's this for? >=20 > Removing it leads to warnings: >=20 > .../u-boot/drivers/serial/ns16550.c: In function =E2=80=98serial_out_dyna= mic=E2=80=99: > .../u-boot/drivers/serial/ns16550.c:111:17: warning: implicit > declaration of function =E2=80=98outb=E2=80=99 [-Wimplicit-function-decla= ration] > 111 | outb(value, addr); > | ^~~~ > .../u-boot/drivers/serial/ns16550.c: In function =E2=80=98serial_in_dynam= ic=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=98isb= =E2=80=99? > [-Wimplicit-function-declaration] > 131 | return inb(addr); > | ^~~ > | isb >=20 > and then linking errors: >=20 > .../armv4/lib/gcc/armv4-linux-gnueabi/13.0.1/../../../../armv4-linux-gnue= abi/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-gnue= abi/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 Tom --hPrS/dth61AlL5b0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTJFk8ACgkQFHw5/5Y0 tywMGQv+KUVxEYUoMFAWvPVmTEOM+rtLJ/KdAjD0P7urGrQ3yeCG7SepAt7UOhk7 R4Dy9mOTwTQj3hHDbD3nNLo2R2eSD6HHqyoaI64OgyQl3/9ISLko2FuDBWFd79a8 FKSNoX2v1nCOXay+jGt9x5KJcphKtEP1SQH0PuEK5wuN3kv+HBxKUxkbzVKgGuTA wBhQg4xczqGFtM/tvHbIkmBiiRD9fHaZ+4iTVzpD8ypx/kX9nc0MhbcEzDudxoWU ojq6fFVG2eHkm2QYXV4SZr0oEgQ+pXg8Vo7HoseimHC9cOf0FnOr9XJ/xu2s1jNO x6deDIkmHWmOIVVO/N31Qc1q4ZG2C+lXvG9dHcWn6fxLgw+HRumvmvODuIU2Dv6m yineJy7t7tNzARM4errdSWZ9vY1zAqSEeRti0RlMqAzYzxJZLNWOvY1rDr1IcrxP 46TjwLuRC0IqzCiTni+oHx+HqFEy8jqDGSxG3yTA39ph7A/Tfq6TeQfnh3bej3GR eG6AA01T =OLuK -----END PGP SIGNATURE----- --hPrS/dth61AlL5b0--