[PATCH] arm: moxa: add nport6600 platform

Tom Rini trini at konsulko.com
Wed Aug 2 17:19:05 CEST 2023


On Wed, Aug 02, 2023 at 05:27:54PM +0300, Sergei Antonov wrote:
> On Tue, 1 Aug 2023 at 17:27, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Tue, Aug 01, 2023 at 01:11:28PM +0300, Sergei Antonov wrote:
> > > On Mon, 31 Jul 2023 at 21:59, Tom Rini <trini at konsulko.com> 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 <saproj at gmail.com>
> > > > > ---
> > > > >  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.
> 
> 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/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 <common.h>
> > >
> > > OK. Compiles without it.
> > >
> > > > 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?
> > >
> > > Removing it leads to warnings:
> > >
> > > .../u-boot/drivers/serial/ns16550.c: In function ‘serial_out_dynamic’:
> > > .../u-boot/drivers/serial/ns16550.c:111:17: warning: implicit
> > > declaration of function ‘outb’ [-Wimplicit-function-declaration]
> > >   111 |                 outb(value, addr);
> > >       |                 ^~~~
> > > .../u-boot/drivers/serial/ns16550.c: In function ‘serial_in_dynamic’:
> > > .../u-boot/drivers/serial/ns16550.c:131:24: warning: implicit
> > > declaration of function ‘inb’; did you mean ‘isb’?
> > > [-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.
> 
> It IS enabled.

Oh, I see it now, you're right, sorry.  But, is CONFIG_NS16550_DYNAMIC
really the only choice here?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230802/22c49748/attachment.sig>


More information about the U-Boot mailing list