From: Andre Przywara <andre.przywara@arm.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Samuel Holland <samuel@sholland.org>,
linux-sunxi@lists.linux.dev, u-boot@lists.denx.de,
Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: Re: [PATCH 00/19] sunxi: SPL cleanup part 1
Date: Wed, 17 Jan 2024 13:52:56 +0000 [thread overview]
Message-ID: <20240117135256.66bb48ee@donnerap.manchester.arm.com> (raw)
In-Reply-To: <20240103001239.17482-1-andre.przywara@arm.com>
On Wed, 3 Jan 2024 00:12:20 +0000
Andre Przywara <andre.przywara@arm.com> wrote:
Hi,
> This is the first part of a series to clean up the Allwinner SPL a bit.
will anyone have a chance to look at this?
I compiled patches 1-4,6,7 for all sunxi boards and the resulting binaries
were identical compared to the base, so if no one screams, I would like to
merge those 6 patches ASAP.
The other patches can surely wait, though I would be glad if someone would
have a look and could confirm if that goes into the right direction in
general.
Cheers,
Andre
> One big driver for this whole clean up is to eventually accommodate the
> RISC-V chips, which share most platform devices, but cannot use any code
> that currently lives under arch/arm. So the idea is to disentangle the
> code, to get a cleaner separation between ARM specific and platform
> specific code. Another related reason is that the RISC-V port aims to
> use a DM SPL, so we want to split off code bits that won't be needed when
> we have the DM framework in the SPL.
>
> This first part of the series is mostly preparation, and some smaller
> cleanups, of code that was around for a long time and missed some
> updates.
> We start with some removal of no longer needed definitions, in the first
> seven patches. The next seven patches tighten the SPL clock code: quite
> some functions were compiled for U-Boot proper, however were not needed
> there. Sorting this out helps to identify legacy code.
> The final five patches move the SPL pinmux setup code into separate
> functions and files, and convert the #ifdef hell into proper C "if"
> statements.
>
> It would be great if Samuel can have a look and say whether this is
> helpful or not. For instance I don't really know how much of the SPL
> clock code will be needed for the RISC-V port, since we don't really
> model the bus clocks in the DT at all, and currently don't support PLLs
> in the DM clock code.
>
> Much of this first series should be good regardless, for instance the
> replacement of #ifdef's with C "if" statements, since that became
> tedious to expand for new SoCs and boards. But if some parts should live
> in a different directory, or should be grouped differently, this can
> certainly be factored in.
>
> Please have a look, review and test!
>
> Cheers,
> Andre
>
> Andre Przywara (19):
> sunxi: cleanup sunxi-common.h
> sunxi: sun50i-h6: remove unneeded base addresses from header
> sunxi: sun4i: remove unneeded base addresses from header
> sunxi: sun9i: remove unneeded base addresses from header
> sunxi: move #ifdef guards around tzpc_init() to header file
> sunxi: remove common.h inclusion
> sunxi: simplify U-Boot proper only builds
> sunxi: remove unneeded i2c_init_board() call for U-Boot proper
> sunxi: compile clock.c for SPL only
> sunxi: sun4i: make more clock functions SPL only
> sunxi: sun6i: make more clock functions SPL only
> sunxi: sun50i_h6: make more clock functions SPL only
> sunxi: sun8i_a83t: make more clock functions SPL only
> sunxi: sun9i: make more clock functions SPL only
> sunxi: move pinmux setup into separate SPL only file
> sunxi: SPL pinmux: rewrite without #ifdefs
> sunxi: move UART pinmux setup into separate file
> sunxi: SPL pinmux: split out UART pinmux per port
> sunxi: SPL pinmux: rewrite UART setup without #ifdefs
>
> arch/arm/Kconfig | 4 +-
> arch/arm/include/asm/arch-sunxi/clock_sun9i.h | 3 -
> arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 47 ---
> .../include/asm/arch-sunxi/cpu_sun50i_h6.h | 21 --
> arch/arm/include/asm/arch-sunxi/cpu_sun9i.h | 41 ---
> arch/arm/include/asm/arch-sunxi/tzpc.h | 6 +
> arch/arm/mach-sunxi/Kconfig | 16 +-
> arch/arm/mach-sunxi/Makefile | 4 +-
> arch/arm/mach-sunxi/board.c | 113 +------
> arch/arm/mach-sunxi/clock.c | 3 -
> arch/arm/mach-sunxi/clock_sun4i.c | 6 +-
> arch/arm/mach-sunxi/clock_sun50i_h6.c | 58 ++--
> arch/arm/mach-sunxi/clock_sun6i.c | 4 +-
> arch/arm/mach-sunxi/clock_sun8i_a83t.c | 6 +-
> arch/arm/mach-sunxi/clock_sun9i.c | 98 +++---
> arch/arm/mach-sunxi/cpu_info.c | 1 -
> arch/arm/mach-sunxi/dram_helpers.c | 3 +-
> arch/arm/mach-sunxi/dram_sun4i.c | 1 -
> arch/arm/mach-sunxi/dram_sun50i_h6.c | 1 -
> arch/arm/mach-sunxi/dram_sun50i_h616.c | 1 -
> arch/arm/mach-sunxi/dram_sun6i.c | 1 -
> arch/arm/mach-sunxi/dram_sun8i_a23.c | 1 -
> arch/arm/mach-sunxi/dram_sun8i_a33.c | 1 -
> arch/arm/mach-sunxi/dram_sun8i_a83t.c | 1 -
> arch/arm/mach-sunxi/dram_sun9i.c | 1 -
> arch/arm/mach-sunxi/dram_suniv.c | 2 +-
> arch/arm/mach-sunxi/dram_sunxi_dw.c | 1 -
> arch/arm/mach-sunxi/gtbus_sun9i.c | 1 -
> arch/arm/mach-sunxi/pmic_bus.c | 1 -
> arch/arm/mach-sunxi/prcm.c | 1 -
> arch/arm/mach-sunxi/spl_pinmux.c | 312 +++++++++++++++++
> arch/arm/mach-sunxi/spl_spi_sunxi.c | 1 -
> arch/arm/mach-sunxi/timer.c | 1 -
> arch/arm/mach-sunxi/uart_pinmux.c | 158 +++++++++
> board/sunxi/board.c | 318 +-----------------
> include/configs/sunxi-common.h | 56 +--
> 36 files changed, 592 insertions(+), 702 deletions(-)
> create mode 100644 arch/arm/mach-sunxi/spl_pinmux.c
> create mode 100644 arch/arm/mach-sunxi/uart_pinmux.c
>
prev parent reply other threads:[~2024-01-17 13:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 0:12 [PATCH 00/19] sunxi: SPL cleanup part 1 Andre Przywara
2024-01-03 0:12 ` [PATCH 01/19] sunxi: cleanup sunxi-common.h Andre Przywara
2024-01-03 0:12 ` [PATCH 02/19] sunxi: sun50i-h6: remove unneeded base addresses from header Andre Przywara
2024-01-03 0:12 ` [PATCH 03/19] sunxi: sun4i: " Andre Przywara
2024-01-03 0:12 ` [PATCH 04/19] sunxi: sun9i: " Andre Przywara
2024-01-03 0:12 ` [PATCH 05/19] sunxi: move #ifdef guards around tzpc_init() to header file Andre Przywara
2024-01-03 0:12 ` [PATCH 06/19] sunxi: remove common.h inclusion Andre Przywara
2024-01-03 0:12 ` [PATCH 07/19] sunxi: simplify U-Boot proper only builds Andre Przywara
2024-01-03 0:12 ` [PATCH 08/19] sunxi: remove unneeded i2c_init_board() call for U-Boot proper Andre Przywara
2024-01-03 0:12 ` [PATCH 09/19] sunxi: compile clock.c for SPL only Andre Przywara
2024-01-03 0:12 ` [PATCH 10/19] sunxi: sun4i: make more clock functions " Andre Przywara
2024-01-03 0:12 ` [PATCH 11/19] sunxi: sun6i: " Andre Przywara
2024-01-03 0:12 ` [PATCH 12/19] sunxi: sun50i_h6: " Andre Przywara
2024-01-03 0:12 ` [PATCH 13/19] sunxi: sun8i_a83t: " Andre Przywara
2024-01-03 0:12 ` [PATCH 14/19] sunxi: sun9i: " Andre Przywara
2024-01-03 0:12 ` [PATCH 15/19] sunxi: move pinmux setup into separate SPL only file Andre Przywara
2024-01-03 0:12 ` [PATCH 16/19] sunxi: SPL pinmux: rewrite without #ifdefs Andre Przywara
2024-01-03 0:12 ` [PATCH 17/19] sunxi: move UART pinmux setup into separate file Andre Przywara
2024-01-03 0:12 ` [PATCH 18/19] sunxi: SPL pinmux: split out UART pinmux per port Andre Przywara
2024-01-03 0:12 ` [PATCH 19/19] sunxi: SPL pinmux: rewrite UART setup without #ifdefs Andre Przywara
2024-01-17 13:52 ` Andre Przywara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240117135256.66bb48ee@donnerap.manchester.arm.com \
--to=andre.przywara@arm.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox