Rasmus Villemoes [Wed, 15 May 2024 07:36:12 +0000 (09:36 +0200)]
scripts/setlocalversion: sync with linux v6.9
The changes upstream since the last sync (2ed1b242ab2
"scripts/setlocalversion: sync with linux 5.8") are
(5) 548b8b5168c9 scripts/setlocalversion: make git describe output more reliable 77a88274dc1a kbuild: replace LANG=C with LC_ALL=C 2a73cce2dad3 scripts/setlocalversion: remove mercurial, svn and git-svn supports a2be76a352f1 scripts/setlocalversion: remove workaround for old make-kpkg ffaf62a8050b scripts/setlocalversion: add more comments to -dirty flag detection 630ff0faf84e scripts/setlocalversion: factor out 12-chars hash construction 042da426f8eb scripts/setlocalversion: simplify the short version part 5df99bec210a scripts/setlocalversion: fix a bug when LOCALVERSION is empty
(1) 7d153696e5db kbuild: do not include include/config/auto.conf from shell scripts
(2) 129ab0d2d9f3 kbuild: do not quote string values in include/config/auto.conf f6e09b07cc12 kbuild: do not put .scmversion into the source tarball 992ebfab2a75 setlocalversion: simplify the construction of the short version 75280bdf49b2 setlocalversion: make indentation shallower
(3) ec31f868ec67 setlocalversion: absorb $(KERNELVERSION) eed36d775177 setlocalversion: clean up the construction of version output
(4) 6ab7e1f95e96 setlocalversion: use only the correct release tag for git-describe 05e96e96a315 kbuild: use git-archive for source package creation 3354c64d4184 scripts/setlocalversion: clean up stale comment 01e89a4acefc scripts/setlocalversion: also consider annotated tags of the form vx.y.z-${file_localversion}
The only thing U-Boot has been applying on top was to deal with not
sourcing include/config/auto.conf but instead using awk to extract the
right value. Commit (1) did a very similar thing upstream, so we no
longer need to do that. However, upstream then went a step further (2)
and changed the convention for what goes into auto.conf, so RHS no
longer contain double-quotes. That commit thus changed the sed pattern
to no longer match those quotes, but as U-Boot has not yet adopted
that change, we have to deal with that. In order to be a little
forward-compatible, I did that in a way that should work both ways:
# version string from CONFIG_LOCALVERSION
-config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
+config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf | tr -d '"')
Furthermore, (3) now requires that there is an appropriate
KERNELVERSION environment variable set. One way to deal with that
would be to just modify the script to use UBOOTVERSION instead, but
for now I've instead opted to let the Makefile provide
KERNELVERSION=$(UBOOTVERSION) to keep the setlocalversion changes
minimal.
That variable is further put to use in (4). Note that the logic for
mapping *VERSION -> [upstream annotated tag to look for] works
unchanged in U-Boot for the current versioning scheme 20XX.YY(-rcN)?.
My motivation for wanting to do this sync is to get (4) and (5), in
order to get the setlocalversion output both more predictable and
consistent across different build environments, i.e. independent of
random local .gitconfig settings, total number of git objects and/or
existence of unrelated tags (possibly from some tracked fork).
dma: ti: k3-udma: invalidate prepared buffers before pushing to recv ring
Buffers must not have an unclean cache before being used for DMA - a
pending write-back may corrupt the next dev-to-mem transfer otherwise.
This was consistently noticeable during long TFTP transfers, when an ARP
request is answered by U-Boot in the middle of the transfer:
As U-Boot's arp_receive() reuses the receive buffer to prepare its
reply packet, the beginning of one of the next incoming TFTP packets
is overwritten by the ARP reply. The corrupted packet is ignored, but
the TFTP transfer stalls for a few seconds until a timeout is detected
and a retransmit is triggered.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
net.h is needed for PKTBUFSRX. Without this definition, the driver will
always use 4 RX buffers, causing am65-cpsw-nuss initialization to fail
when a higher number of buffers is requested.
net: ti: am65-cpsw-nuss: avoid errors due to imbalanced start()/stop()
The eth-uclass state machine doesn't prevent imbalanced start()/stop()
calls - to the contrary, it even provides eth_init_state_only() and
eth_halt_state_only() functions that change the state without any calls
into the driver. This means that the driver must be robust against
duplicate start() and stop() calls as well as send/recv calls while the
interface is down.
We decide not to print error messages but just to return an error in the
latter case, as trying to send packets on a disabled interface commonly
happens when the netconsole is still active after the Ethernet has been
halted during bootm.
Tom Rini [Wed, 15 May 2024 16:45:10 +0000 (10:45 -0600)]
Merge patch series "Add DFU and usb boot for TI am62x SK and beagleplay"
Martyn Welch <martyn.welch@collabora.com> says:
This series adds DFU support for TI AM62 SK and beagleplay boards.
I have picked this series up from Sjoerd due to time constraints.
Since the last revision:
* Removed dwc3 mode setting in favour of reinstating forced peripheral
mode for usb0
* Use of config fragments for both r5 and a53 DFU configuration to
reduce duplication
* Typographical improvements to documentation
We plan to also submit the dts changes to linux so that those can be
dropped again in the near future (hopefully)
Sjoerd Simons [Mon, 6 May 2024 14:38:45 +0000 (15:38 +0100)]
beagleplay: Add DFU support
DFU mode on a beagleplay can be used via the Type-C connector by holding
the USR switch while powering on.
Configuration is already provided as fragments for both the A53 and R5
u-boot parts. Include the am62x_a53_usbdfu.config config. The
am62x_r5_usbdfu.config fragment needs to be added should DFU boot be
required as this will disable booting from persistent storage due to
binary size constraints.
Sjoerd Simons [Mon, 6 May 2024 14:38:44 +0000 (15:38 +0100)]
configs: am62x_evm_*: Enable USB and DFU support
Provide config fragments to enable USB host as well as USB gadget and DFU
support for a53 and r5. This relevant fragment is included into the
am62x EVM a53 defconfig. For the r5, due to the smaller available size,
the config fragment also disables support for persistent storage to free
up space for USB support. This fragment needs to be included is DFU
booting is desired.
The CONFIG_DFU_SF option is placed in the defconfig rather than the
fragment as this is known not to be supported on all boards that can
support DFU.
Tom Rini [Tue, 14 May 2024 13:46:33 +0000 (07:46 -0600)]
Merge branch '2024-05-13-assorted-updates' into next
- A few zfs fixes, ARMv8 timer cleanups, support more algorithms with
the nuvoton crypto driver, virtio + env in filesystem fix, K3 code
cleanup and warning fix in gen_compile_commands.
Since Python 3.12 unrecognised escape sequences trigger a SyntaxWarning.
Convert the '\#' string to a raw string so the backslash is correctly
used as a literal.
Ported from Linux commit dae4a0171e25 ("gen_compile_commands: fix invalid
escape sequence warning").
This updates the script to be in-line with Linux 6.9-rc6.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: João Marcos Costa <jmcosta944@gmail.com>
Fiona Klute [Wed, 1 May 2024 08:54:09 +0000 (10:54 +0200)]
Init virtio before loading ENV from EXT4 or FAT
Specifying a file in an EXT4 or FAT partition on a virtio device as
environment location failed because virtio hadn't been initialized by
the time the environment was loaded. This patch mirrors commit 54ee5ae84191 ("Add SCSI scan for ENV in EXT4 or FAT") in issue and
fix, just for a different kind of block device.
The additional include in include/virtio.h is needed so all functions
called there are defined, the alternative would have been to include
dm/device.h separately in the env/ sources.
Checkpatch suggests using "if (IS_ENABLED(CONFIG...))" instead of
"#if defined(CONFIG_...)", I'm sticking to the style of the existing
code here.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Bin Meng <bmeng.cn@gmail.com> CC: Rogier Stam <rogier@unrailed.org>
Peter Hoyes [Wed, 1 May 2024 08:16:33 +0000 (09:16 +0100)]
armv8: generic_timer: Use event stream for udelay
Polling cntpct_el0 in a tight loop for delays is inefficient.
This is particularly apparent on Arm FVPs, which do not simulate
real time, meaning that a 1s sleep can take a couple of orders
of magnitude longer to execute in wall time.
If running at EL2 or above (where CNTHCTL_EL2 is available), enable
the cntpct_el0 event stream temporarily and use wfe to implement
the delay more efficiently. The event period is chosen as a
trade-off between efficiency and the fact that Arm FVPs do not
typically simulate real time.
This is only implemented for Armv8 boards, where an architectural
timer exists, and only enabled by default for the ARCH_VEXPRESS64
board family.
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Peter Hoyes [Wed, 1 May 2024 08:16:32 +0000 (09:16 +0100)]
arm: Move sev() and wfe() definitions to common Arm header file
The sev() and wfe() asm macros are currently defined only for
mach-exynos. As these are common Arm instructions, move them to the
common asm/system.h header file, for both Armv7 and Armv8, so they
can be used by other machines.
wfe may theoretically trigger a context switch if an interrupt occurs
so add a memory barrier to this call.
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com> Reviewed-by: Andre Przywara<andre.przywara@arm.com>
sandbox: make function 'do_undefined' properly compiles for PowerPC
The 2 bytes 0xffff is too short for being a PowerPC instruction, resulting
in an error similar to:
/tmp/ccW8yjie.s: Assembler messages:
/tmp/ccW8yjie.s: Error: unaligned opcodes detected in executable segment
/tmp/ccW8yjie.s:223: Error: instruction address is not a multiple of 4
make[2]: *** [/tmp/ccyF4HIC.mk:17: /tmp/ccCKUFuF.ltrans5.ltrans.o] Error 1
zfs: recognize zpools formatted with features support
Currently no features are implemented, only the zpool version 5000 that
indicating the features support, is recognized. Since it is possible for
OpenZFS to create a pool with features support enabled, but without
enabling any actual feature, this change enables U-Boot to read such
pools.
arm: mach-k3: am642: Provide a way to obtain boot device for non SPLs
Let's provide get_boot_device() for AM64, similar to what we did
in commit 2f9095e2bf59 ("arm: mach-k3: am625: Provide a way to obtain boot
device for non SPLs") for AM62.
arm: dts: k3-j7200-binman: Add support for HSSE1.0 and HSFS1.0
J7200 has SR1.0 and SR2.0 having three variants of each GP, HS-FS and
HS-SE. Current build does not generate HS-SE SR1.0 and HS-FS SR1.0 so
add support for them.
Reported-by: Suman Anna <s-anna@ti.com> Reported-by: Aniket Limaye <a-limaye@ti.com> Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Andrew Davis <afd@ti.com>
board: phytec: Commonize board code for K3 based SoMs
Environment handling code can be reused across all our K3 based SoMs.
Instead of adding the same code for every new SoM, move it to a common
board.c file.
Tom Rini [Wed, 24 Apr 2024 22:45:37 +0000 (16:45 -0600)]
test/py: Make the number of SPL banners seen a variable
Currently we have the option to tell the console code that we should
ignore the SPL banner. We also have an option to say that we can see it
a second time, and ignore it. However, some platforms such as TI AM64x
will have us see the SPL banner three times. Rather than add an
"spl3_skipped" option, rework the code. By default we expect to see the
banner once, but boards can specify seeing it as many times as they
expect to.
Tom Rini [Wed, 8 May 2024 01:24:07 +0000 (19:24 -0600)]
Merge patch series "arm: Add Analog Devices SC5xx Machine Type"
Greg Malysa <greg.malysa@timesys.com> says:
This series adds support for the ADI SC5xx machine type and includes two
core drivers that are required for being able to boot any board--a UART
driver, the gptimer driver which is used as a clock reference (CNTVCNT
is not supported on the armv7 sc5xx SoCs) and the clock tree driver. Our
corresponding Linux support relies on u-boot configuring the clocks
correctly before booting, so it is not possible to boot any board
without the CGU/CDU configuration happening here. There are also no
board files, device trees, or defconfigs included here, but some common
definitions that will be used to build board files currently are. The
sc5xx SoCs themselves include many armv7 families (sc57x, sc58x, and
sc594) all using an ARM Cortex-A5, and one armv8 family (sc598) indended
to be a drop-in replacement for the SC594 in terms of peripherals, with
a Cortex-A55 instead.
Some of the configuration code in dmcinit and clkinit is quite scary and
causes a lot of checkpatch violations. It is modified from code
initially provided by ADI, but it has not been fully rewritten. There's
a question of how important it is to clean up this code--it has some
quality violations, but it has been in use (including in production) for
over two years and is known to work for performing the low level SoC
initialization, while a rewrite might introduce timing or sequence bugs
that could take a significant amount of time to detect in the future.
drivers: clk: adi: Add in SC5XX-family clock driver
This adds support for the SC5XX clock trees which are required for reading
clock speeds on the SoCs. This is largely a port of the same support for
Linux, which has not yet been submitted upstream.
Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com> Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Add support for the SC5xx machine type from Analog Devices. This
includes support for the SC57x, SC58x, SC59x, and SC59x-64 SoCs, which
have many common features such as common ADI IP blocks, and SHARC DSP
cores. This commit introduces core functionality required for all boards
using an SC5xx SoC, such as:
- SPL configuration
- Required CPU hooks such as reset
- Boot ROM interaction to load the stage 2 bootloader in the reference
configuration. Other options are possible but not officially supported
at this time
- SoC-common configuration expected to be reused by all boards
- Early initialization for system clocks and DDR controller
Co-developed-by: Greg Malysa <greg.malysa@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com> Co-developed-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com> Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com> Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Tom Rini [Tue, 7 May 2024 14:01:06 +0000 (08:01 -0600)]
Merge branch '2024-05-06-remove-include-common_h' into next
- Merge the four series that I made to finally remove include/common.h.
For the most part, this is just removing <common.h> entirely. In a few
cases we needed to add <linux/types.h> or <time.h>. In the case of
PowerPC related code, we instead need to bring in <asm/ppc.h>.