serial: Massive rework of the serial subsystem
Get series with b4
b4 am 20121002180424.GC655@bill-the-catVersions newest first · linked by author and title
- v3 Latest3 of 72 patches 0 repliesNew
- v111 of 71 patches 0 repliesSuperseded
3 of 72 patches are in this archive. The cover letter announces 72.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 65/72 | serial: ns16550: Rename serial.c to serial_ns16550.c | +0 | 1 reply | |
| 67/72 | serial: Unconditionally enable CONFIG_SERIAL_MULTI | +0 | 1 reply | |
| 67/72 | serial: Unconditionally enable CONFIG_SERIAL_MULTI | +0 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [U-Boot] [PATCH 00/72 V3] serial: Massive rework of the serial subsystem
Quoted 287 lines · Marek Vasut
This patchset is a STAGE 1 of preparation of the stdio and serial subsys for the driver model.
The idea of this patchset is:
1) Clean up the struct
serial_device
Do a coding style cleanup.
2) Replace .init and .uninit with .start and .stop
This is to bring structserial_devicemuch closer to structstdio_devso later on, these structures can be overlayed and structserial_devicecan be easily passed to stdio subsystem directly.
3) Do minor cleanups on the PXA and MPC512X
Basically for PXA this means to removedefault_serial_console()call from every single PXA board and move it into PXA serial driver. For MPC512X, that means properly defining PSC console number.
4) Add support forCONFIG_SERIAL_MULTIinto every single driver Implement support for both non-multi and multi operation into every single serial driver in the U-Boot source tree. This is a vast majority of this patchset.
5) Unconditionally enableCONFIG_SERIAL_MULTI
Enable the multi operation throughout the whole U-Boot tree, both for SPL and non-SPL builds. There was also some breakage due to this, so this patchset also addresses that with minor fixes.
6) Remove unused code used for the non-multi operation
Remove code that was used whenCONFIG_SERIAL_MULTIwas not selected. Also remove all occurances ofCONFIG_SERIAL_MULTIthroughout the source tree. Some parts of the code must have been adjusted to cope with this since they were initially only written for non-multi operation. These were minor adjustments mostly in macros though.This changeset obviously does mean size growth of U-Boot, therefore some statistics (stock U-Boot first, patchset last):
Configuring for
omap3_beagleboard...text data bss dec hex filename 325687 8456 266888 601031 92bc7 ./u-boot 326912 8648 266944 602504 93188 ./u-boot 43082 1812 198020 242914 3b4e2 ./spl/u-boot-spl 45794 1860 198020 245674 3bfaa ./spl/u-boot-splConfiguring for P1020RDB-PC_36BIT_SPIFLASH - Board:
p1_p2_rdb_pc, Options: P1020RDB,36BIT,SPIFLASH
text data bss dec hex filename392469 30628 267568 690665 a89e9 ./u-boot 394550 30940 267600 693090 a9362 ./u-bootConfiguring for
grsim_leon2board...text data bss dec hex filename 95658 3328 2640 101626 18cfa ./u-boot 97058 3384 2640 103082 192aa ./u-bootConfiguring for sandbox board...
text data bss dec hex filename 137394 6364 28488 172246 2a0d6 ./u-boot 138674 6456 28504 173634 2a642 ./u-bootV2: Rebase on top of current -next
V3: - Fix problem with new SPL framework (2 new patches)
- mvdrivers/serial/serial{,-ns16550}.cto make clear what that driver really is [ 0065/0072 ]
- Movecommon/serial.cdodrivers/serial, since it really has to link with libserial.o, not libcommon.o [ 0066/0072 ]Marek Vasut (72):
serial: Coding style cleanup of structserial_device
serial: Rename .init() and .uninit() inserial_device
serial: Properly spell out the structure member names of
serial_driver
serial: pxa: Implementdefault_serial_consoleinserial_pxa.c
serial: pxa: Make use ofdefault_serial_consoleinserial_pxa
serial: pxa: Make local functions static
serial: mpc512x: Properly defineCONFIG_SYS_PSC3in config files
serial: Implementserial_initfunc()macro
serial: mpc8xx: Move serial registration fromserial_initialize()
serial: s3c24xx: Move serial registration fromserial_initialize()
serial: pxa: Move serial registration fromserial_initialize()
serial: s5p: Move serial registration fromserial_initialize()
serial: microblaze: Move serial registration fromserial_initialize()
serial: mpc512x: Move serial registration fromserial_initialize()
serial: ns16550: Move serial registration fromserial_initialize()
serial: bfin: Remove thebfin_serialN_deviceexports fromserial.h
serial: bfin: Adjustserial_register_bfin_uart()
serial: zoom2: Remove zoom2 serial prototypes fromserial.h
serial: bfin: Flip the jtag serial console toCONFIG_SERIAL_MULTI
serial: mips: ImplementCONFIG_SERIAL_MULTIinto au1x00 serial driver
serial: mips: ImplementCONFIG_SERIAL_MULTIinto asc serial driver
serial: mips: ImplementCONFIG_SERIAL_MULTIinto JZ serial driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto mpc5xx serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto mpc8220 serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto mpc8260 serial
drivers
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto mpc85xx serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto iop480 serial
driver
serial: sparc: ImplementCONFIG_SERIAL_MULTIinto leon2 serial driver
serial: sparc: ImplementCONFIG_SERIAL_MULTIinto leon3 serial driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto marvell serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto amirix serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto bmw serial driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto cogent serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto cpci750 serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto evb64260 serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto ml2 serial driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto sconsole serial
driver
serial: powerpc: ImplementCONFIG_SERIAL_MULTIinto p3mx serial
driver
serial: arm: ImplementCONFIG_SERIAL_MULTIintoaltera_jtagserial
driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto altera serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto atmel serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto lpc32xx serial driver
serial: mcf: ImplementCONFIG_SERIAL_MULTIinto MCF serial driver
serial: ImplementCONFIG_SERIAL_MULTIinto ns9750 serial driver
serial: oc: ImplementCONFIG_SERIAL_MULTIinto OpenCores serial
driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto s3c4510b serial
driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto s3c64xx serial driver
serial: sandbox: ImplementCONFIG_SERIAL_MULTIinto sandbox serial
driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto clps7111 serial
driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto imx serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto ixp serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto ks8695 serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto lh7a40x serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto lpc2292 serial driver
serial: ImplementCONFIG_SERIAL_MULTIinto max3100 serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto mxc serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto netarm serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto pl01x serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto s3c44b0 serial driver
serial: arm: ImplementCONFIG_SERIAL_MULTIinto sa1100 serial driver
serial: sh: ImplementCONFIG_SERIAL_MULTIinto sh serial driver
serial: mxs: spl: Remove empty serial_* functions from SPL code
serial: Useputs()andhang()instead ofpanic()in SPL
serial: ns16550: Callusbtty_pollonly in non-SPL build
serial: ns16550: Renameserial.ctoserial_ns16550.c
serial: Movecommon/serial.ctodrivers/serial/
serial: Unconditionally enableCONFIG_SERIAL_MULTI
serial: RemoveCONFIG_SERIAL_MULTIfrom config files
serial: RemoveCONFIG_SERIAL_MULTIfrom serial drivers
serial: RemoveCONFIG_SERIAL_MULTIfrom remaining sources
serial: Compiledrivers/serial/serial.cby default
serial: Enhance the manual relocationarch/arm/cpu/arm926ejs/mxs/spl_boot.c | 4 - arch/arm/lib/board.c | 2 - arch/blackfin/cpu/jtag-console.c | 37 +- arch/blackfin/cpu/serial.c | 6 +- arch/blackfin/lib/board.c | 2 - arch/m68k/lib/board.c | 2 - arch/microblaze/lib/board.c | 2 - arch/mips/cpu/mips32/au1x00/au1x00_serial.c | 42 +- arch/mips/cpu/mips32/incaip/asc_serial.c | 35 +- arch/mips/cpu/xburst/jz_serial.c | 35 +- arch/nds32/lib/board.c | 2 - arch/powerpc/cpu/mpc512x/serial.c | 92 ++--- arch/powerpc/cpu/mpc5xx/serial.c | 69 ++-- arch/powerpc/cpu/mpc5xxx/serial.c | 181 +++----- arch/powerpc/cpu/mpc8220/uart.c | 35 +- arch/powerpc/cpu/mpc8260/serial_scc.c | 39 +- arch/powerpc/cpu/mpc8260/serial_smc.c | 39 +- arch/powerpc/cpu/mpc85xx/serial_scc.c | 39 +- arch/powerpc/cpu/mpc8xx/serial.c | 43 +- arch/powerpc/cpu/ppc4xx/iop480_uart.c | 36 +- arch/powerpc/lib/board.c | 2 - arch/sandbox/lib/board.c | 2 - arch/sparc/cpu/leon2/serial.c | 51 ++- arch/sparc/cpu/leon3/serial.c | 51 ++- arch/x86/lib/board.c | 2 - board/Marvell/common/serial.c | 48 ++- board/amirix/ap1000/serial.c | 35 +- board/balloon3/balloon3.c | 5 - board/bmw/serial.c | 36 +- board/cogent/serial.c | 34 +- board/esd/cpci750/serial.c | 36 +- board/evb64260/serial.c | 54 ++- board/logicpd/zoom2/zoom2_serial.c | 7 +- board/logicpd/zoom2/zoom2_serial.h | 16 +- board/ml2/serial.c | 35 +- board/palmld/palmld.c | 5 - board/palmtc/palmtc.c | 5 - board/pcippc2/sconsole.c | 35 +- board/pdm360ng/pdm360ng.c | 6 - board/prodrive/p3mx/serial.c | 36 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 5 - board/trizepsiv/conxs.c | 7 - board/vpac270/vpac270.c | 5 - board/zipitz2/zipitz2.c | 5 - common/Makefile | 1 - common/cmd_nvedit.c | 2 - common/fdt_support.c | 4 - common/iomux.c | 2 - common/serial.c | 305 -------------- common/stdio.c | 2 - drivers/serial/Makefile | 4 +- drivers/serial/altera_jtag_uart.c | 39 +- drivers/serial/altera_uart.c | 51 ++- drivers/serial/atmel_usart.c | 35 +- drivers/serial/lpc32xx_hsuart.c | 57 ++- drivers/serial/mcfuart.c | 33 +- drivers/serial/ns16550.c | 2 +- drivers/serial/ns9750_serial.c | 33 +- drivers/serial/opencores_yanu.c | 35 +- drivers/serial/s3c4510b_uart.c | 33 +- drivers/serial/s3c64xx.c | 33 +- drivers/serial/sandbox.c | 35 +- drivers/serial/serial.c | 550 +++++++++++++------------ drivers/serial/serial_clps7111.c | 34 +- drivers/serial/serial_imx.c | 36 +- drivers/serial/serial_ixp.c | 36 +- drivers/serial/serial_ks8695.c | 41 +- drivers/serial/serial_lh7a40x.c | 34 +- drivers/serial/serial_lpc2292.c | 34 +- drivers/serial/serial_max3100.c | 42 +- drivers/serial/serial_mxc.c | 40 +- drivers/serial/serial_netarm.c | 33 +- drivers/serial/serial_ns16550.c | 264 ++++++++++++ drivers/serial/serial_pl01x.c | 37 +- drivers/serial/serial_pxa.c | 65 +-- drivers/serial/serial_s3c24x0.c | 78 +--- drivers/serial/serial_s3c44b0.c | 36 +- drivers/serial/serial_s5p.c | 27 +- drivers/serial/serial_sa1100.c | 36 +- drivers/serial/serial_sh.c | 33 +- drivers/serial/serial_xuartlite.c | 69 ++-- include/common.h | 12 - include/configs/DU440.h | 1 - include/configs/KAREF.h | 1 - include/configs/METROBOX.h | 1 - include/configs/MPC8569MDS.h | 1 - include/configs/P1010RDB.h | 1 - include/configs/P1_P2_RDB.h | 1 - include/configs/P2020COME.h | 1 - include/configs/PMC440.h | 1 - include/configs/TB5200.h | 1 - include/configs/amcc-common.h | 1 - include/configs/aria.h | 1 + include/configs/balloon3.h | 1 + include/configs/bfin_adi_common.h | 1 - include/configs/colibri_pxa270.h | 1 + include/configs/coreboot.h | 1 - include/configs/eNET.h | 1 - include/configs/harmony.h | 1 - include/configs/jadecpu.h | 1 - include/configs/korat.h | 1 - include/configs/lubbock.h | 1 + include/configs/lwmon.h | 1 - include/configs/lwmon5.h | 1 - include/configs/mcc200.h | 5 - include/configs/mecp5123.h | 1 + include/configs/medcom.h | 1 - include/configs/mpc5121ads.h | 1 + include/configs/omap3_zoom2.h | 3 +- include/configs/origen.h | 1 - include/configs/palmld.h | 1 + include/configs/palmtc.h | 1 + include/configs/paz00.h | 1 - include/configs/pcs440ep.h | 1 - include/configs/pdm360ng.h | 3 - include/configs/plutux.h | 1 - include/configs/pxa255_idp.h | 1 + include/configs/quad100hd.h | 1 - include/configs/s5p_goni.h | 1 - include/configs/s5pc210_universal.h | 1 - include/configs/sc3.h | 1 - include/configs/seaboard.h | 1 - include/configs/smdk5250.h | 1 - include/configs/smdkc100.h | 1 - include/configs/smdkv310.h | 1 - include/configs/tec.h | 1 - include/configs/tegra-common-post.h | 5 - include/configs/trats.h | 1 - include/configs/trimslice.h | 1 - include/configs/trizepsiv.h | 2 +- include/configs/ventana.h | 1 - include/configs/vpac270.h | 1 + include/configs/whistler.h | 1 -
Quoted 8 lines
include/configs/xaeniax.h | 2 +- include/configs/zeus.h | 1 - include/configs/zipitz2.h | 1 + include/serial.h | 79 +--- post/board/pdm360ng/coproc_com.c | 3 - 138 files changed, 2111 insertions(+), 1547 deletions(-) delete mode 100644 common/serial.c create mode 100644 drivers/serial/serial_ns16550.c
This has been applied, with the various follow-up patches that fixed warnings used, to u-boot/next, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121002/981ebf98/attachment.pgp>