Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1331408 > unrolled thread
| Started by | Matthias Brugger <matthias.bgg@gmail.com> |
|---|---|
| First post | 2016-02-10 19:10 +0100 |
| Last post | 2016-02-10 21:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/2] serial: 8250: fix building mediatek with SERIAL_8250=m Matthias Brugger <matthias.bgg@gmail.com> - 2016-02-10 19:10 +0100
Re: [PATCH 1/2] serial: 8250: fix building mediatek with SERIAL_8250=m Arnd Bergmann <arnd@arndb.de> - 2016-02-10 21:00 +0100
| From | Matthias Brugger <matthias.bgg@gmail.com> |
|---|---|
| Date | 2016-02-10 19:10 +0100 |
| Subject | Re: [PATCH 1/2] serial: 8250: fix building mediatek with SERIAL_8250=m |
| Message-ID | <r0Hnd-5O7-37@gated-at.bofh.it> |
On 08/02/16 13:51, Arnd Bergmann wrote: > The Mediatek 8250 driver has a 'bool' Kconfig symbol, but that > breaks when SERIAL_8250 is a loadable module: > > drivers/tty/built-in.o: In function `mtk8250_set_termios': > 8250_ingenic.c:(.text+0x1bee8): undefined reference to `serial8250_do_set_termios' > 8250_ingenic.c:(.text+0x1bf10): undefined reference to `uart_get_baud_rate' > 8250_ingenic.c:(.text+0x1c09c): undefined reference to `uart_get_divisor' > drivers/tty/built-in.o: In function `mtk8250_do_pm': > 8250_ingenic.c:(.text+0x1c0d0): undefined reference to `serial8250_do_pm' > drivers/tty/built-in.o: In function `mtk8250_probe': > 8250_ingenic.c:(.text+0x1c2e4): undefined reference to `serial8250_register_8250_port' > serial/8250/8250_mtk.c:287:242: error: data definition has no type or storage class [-Werror] > serial/8250/8250_mtk.c:287:122: error: 'mtk8250_platform_driver_init' defined but not used [-Werror=unused-function] > > This changes the symbol to a 'tristate', so the dependency on > SERIAL_8250 also works when that is set to 'm'. > To actually build the driver, we also need to include <linux/module.h>. > > Note that the driver uses builtin_platform_driver() and implements > no .remove() callback, so unloading the module is not possible. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- I tried this with: commit 2178cbc68f3602dc0b5949b9be2c8383ad3d93ef $ grep 8250 .config CONFIG_SERIAL_8250=m # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_PCI=m CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # CONFIG_SERIAL_8250_DW is not set # CONFIG_SERIAL_8250_RT288X is not set CONFIG_SERIAL_8250_MT6577=y # CONFIG_SERIAL_8250_INGENIC is not set # CONFIG_SERIAL_8250_MID is not set $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- drivers/tty/ compiles just fine. Do I missing something? Regards, Matthias
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-02-10 21:00 +0100 |
| Subject | Re: [PATCH 1/2] serial: 8250: fix building mediatek with SERIAL_8250=m |
| Message-ID | <r0J5E-6GL-7@gated-at.bofh.it> |
| In reply to | #1331408 |
On Wednesday 10 February 2016 19:06:27 Matthias Brugger wrote: > > --- > > I tried this with: > commit 2178cbc68f3602dc0b5949b9be2c8383ad3d93ef > > $ grep 8250 .config > CONFIG_SERIAL_8250=m > # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set > CONFIG_SERIAL_8250_PCI=m > CONFIG_SERIAL_8250_NR_UARTS=4 > CONFIG_SERIAL_8250_RUNTIME_UARTS=4 > # CONFIG_SERIAL_8250_EXTENDED is not set > # CONFIG_SERIAL_8250_DW is not set > # CONFIG_SERIAL_8250_RT288X is not set > CONFIG_SERIAL_8250_MT6577=y > # CONFIG_SERIAL_8250_INGENIC is not set > # CONFIG_SERIAL_8250_MID is not set > > $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- drivers/tty/ > > compiles just fine. > > Do I missing something? > I was simplifying the situation in the patch description: When CONFIG_SERIAL_8250=m, Kbuild does not actually descend into drivers/tty/serial/8250/ while building built-in code, so none of the built-in subdrivers actually get built. After spotting the problem, I was building with this patch that I considered submitting: diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index ceba33c4ebb4..28121885e78e 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_SERIAL_SUNSU) += sunsu.o obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o # Now bring in any enabled 8250/16450/16550 type drivers. -obj-$(CONFIG_SERIAL_8250) += 8250/ +obj-y += 8250/ obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o However, after the other problems are fixed, it's not actually needed any more, so I did not submit it. Arnd
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web