| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Seems PowerPC in general is missing the IMD sections.
Placement might be suboptimal, please correct if so.
Signed-off-by: Christian Melki <christian.melki@t2data.com>
Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240126075231.1285729-1-christian.melki@t2data.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Linux <linux/word-at-a-time.h> interface is used to optimize
searching for bytes in strings by doing word-size comparisons. This will
be used in the implementation of strscpy in a follow-up commit, so
import the generic version here.
A good overview on the interface is available at LWN[1]. Note that
it discuss Linux v3.5. The asm-generic version imported here works
also on little-endian and not only big-endian[2].
[1]: https://lwn.net/Articles/501492/
[2]: Linux kernel commit a6e2f029ae34 ("Make asm/word-at-a-time.h
available on all architectures").
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231122172951.376531-9-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have the historic baggage of having to support different errno
definitions depending on architecture. We thus have only
asm-generic/errno.h and include that from errno.h and elsewhere
directly.
Kernel code however includes <linux/errno.h>, so let's provide that file
as well and define there the Linux-specific errno's and include
<asm-generic/errno.h> for all other errnos.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231122172951.376531-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the preprocessor runs, the code in question looks like this:
SDMA_INT_DISABLE
while ((counter--) && (!(fec->eth->ievent & FEC_IEVENT_GRA)));
{
struct mpc5xxx_sdma *sdma = (struct mpc5xxx_sdma *)MPC5XXX_SDMA;
sdma->IntMask |= (1 << tasknum);
}
Which understandably looks like a bug. Avoid this by using do { } while
(0) and moving the semicolon to a separate line.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230605062939.242063-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ARM32 has map_io_sections for non-1:1 remapping, but it's limited to 1M
sections. arch_remap_range has newly gained support for 4K granularity
remapping, but supports only changing attributes and no non-1:1
remapping yet. In preparation for adding this missing feature, adjust
the prototype.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230522052835.1039143-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
In Kconfig files, the symbols don't have a CONFIG_ prefix.
Fix an unknown Kconfig symbol introduced in d3b8a88d34
("treewide: rename CONFIG_HAS_ARCH_SJLJ to CONFIG_ARCH_HAS_SJLJ").
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Link: https://lore.barebox.org/20230512023838.1255762-1-antonynpavlov@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
This code is no longer specific to the any board.
Also make ddr2_speed_bins static to not break PowerPC compilation
Signed-off-by: John Watts <contact@jookia.org>
Link: https://lore.barebox.org/20230121144429.3524905-6-contact@jookia.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We have 9 symbols beginning with ARCH_HAS, but only with HAS_ARCH.
Change it over for symmetry. No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221205133033.3008535-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
struct partition from include/partition.h is entirely unused. Remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20221117120604.3840211-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
In order to allow us having architecture-indepenent linker scripts, move
the definition for the format and the architecture into the new
<asm/barebox.lds.h> header file.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221010061122.2084009-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a separate linker script for each architecture and one more for
PBL if supported. All linker scripts include <asm-generic/barebox.lds.h>.
In future, we may want to use a linker script common to more than one
architecture. Prepare for this by having each architecture define a
<asm/barebox.lds.h>. Currently, these files contain little more than
1-2 #include directives, but this will change in later commits.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221010061122.2084009-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most barebox clocksources have a zero priority and if multiple of them
exist, but no higher priority ones, the first to call init_clock wins.
Some supported boards like the Raspberry Pi additionally depended on
initcall ordering to favor one zero-priority clocksource over another.
With the move to deep probe and with Commit b641580deb8c ("of: platform:
Ensure timers are probed early"), device tree blob iteration order could
now dictate which clocksource is ultimately used. This led to a 20 times
slower clock source being chosen on the Raspberry Pi, because the ARM
architected timer was taken instead of the bcm2835 timer.
Fix the root cause by assigning priorities to all clocksource drivers.
Priorities chosen are:
50: device_initcall
60: coredevice_initcall
70: postcore_initcall
80: core_initcall
These priorities are all below 100, which was previously the lowest
positive priority and as they are positive, they win against the dummy
clocksource. This should ensure no priority inversion happens.
Fixes: b641580deb8c ("of: platform: Ensure timers are probed early")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220425094857.674044-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Record GPL-2.0-only as license for all files lacking an explicit license
statement.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-11-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Record GPL-2.0-only as license for all files lacking an explicit license
statement.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-10-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Record GPL-2.0-only as license for all files lacking an explicit license
statement.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-9-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Makes the files not appear when searching for files that lack
SPDX-License-Identifier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To verify only Kconfig/Makefile is touched:
git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile'
will print only arch/powerpc/Kbuild.
To verify nothing unexpected is added:
git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is currently used on ARM and sandbox, but it's relevant for
other platforms like x86 as well if driver code wants to make use
of the functions defined within.
MIPS and PowerPC already defines the symbols, but that's ok because
<bitio.h> doesn't override existing macros. This works for MIPS, but
not PowerPC, where those aren't macros. Fix that up.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210812121944.4419-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applying overlays in blspec currently works in two steps. First
of_firmware_load_overlay() is called which doesn't load an overlay,
but instead loads firmware when one is needed by the overlay. This
is done on the live tree, because that was needed to find the firmware
manager. The second step is to call of_register_overlay() to apply
the overlay to the kernel device tree when the fixups are executed.
Instead of using a separate step to load the firmware, load the firmware
as part of the of_fixups.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210624085223.14616-14-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
unsigned idx is checked for >= 0 which is always true and < 0 which is
never true. Use a signed type instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210517185424.32145-16-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Implementation has been taken from newlib as this is much simpler than
the glibc version.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This implementation is equivalent to the one now provided by
<asm-generic/io.h>, so it can be dropped.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
| |
<asm-generic/div64.h> isn't meant for direct usage as <asm/div64.h> may
override this on a per-architecture basis. We don't do that currently,
but in the future we might. Include the <linux/math64.h> instead.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The exception handlers lead to -Wmissing-prototypes warnings. Add
prototypes for them to avoid these warnings.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Some functions are unused in the code base and do not have a prototype
in any header file. Remove them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some functions are called from assembly only. There's no prototype
for them so this leads to -Wmissing-prototypes warnings. Add a prototype
right aboce the functions to avoid these warnings.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Make only locally used functions static to avoid -Wmissing-prototypes
warnings.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| | |
Add missing includes to avoid -Wmissing-prototypes warnings.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds prototypes of the board specific functions
fsl_ddr_board_options() and fsl_ddr_board_info() to a header
file. Including this header file from the board files reveals
that the prototypes are different across the different implementations,
so harmonize them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
With incoming changes to choose a specific reset method, give all
currently unnamed "default" reset handlers a name:
- soc reset via SoC-specific means
- soc-wdt reset via SoC watchdog timer
- vector reset via jump to reset vector
- efi reset via EFI firmware
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
These files had never been built since being added. At least the C file
doesn't compile due to missing headers. Remove them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many architectures duplicate the same fixed type definitions
as in <asm-generic/int-ll64.h>.
Include <asm-generic/int-ll64.h> from <asm/types.h>, and remove
the duplicated code.
Note:
Linux commit 0c79a8e29b5f ("asm/types.h: Remove
include/asm-generic/int-l64.h") unified the kernel space
definition into int-ll64.h. Barebox also adopts int-ll64.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
| |
Directory descending upward is ugly. Move it to the correct Makefile.
No functional change is intended because FSL_DDR{2,3} depend on
ARCH_MPC85XX.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
You can always add $(srctree)/ to the mach include path.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
In old days, Linux supported PowerPC with two arch directories,
arch/ppc/ and arch/ppc64/.
Linux commit 564ee7a5668e ("[PATCH] powerpc: Move arch/ppc*/kernel/vecemu.c
to arch/powerpc") started the migration to arch/powerpc/, and
commit 917f0af9e5a9 ("powerpc: Remove arch/ppc and include/asm-ppc")
finished it.
This commit aligns the directory name with the current Linux.
I did 'git mv arch/ppc/ arch/powerpc/', and fixed up some hard-coded
arch/ppc paths.
Barebox has stuck to arch/ppc/ for a long time. To keep the backward
compatibility, I added the following to the top Makefile.
# Support ARCH=ppc for backward compatibility
ifeq ($(ARCH),ppc)
SRCARCH := powerpc
endif
Both ARCH=ppc and ARCH=powerpc work in the same way.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|