Commit Graph

1129 Commits

Author SHA1 Message Date
Jan Kiszka
5f09f9af3c kbuild: spl: Add shrunk arch-dtbs to targets list
This avoids needless rebuilding.

Fixes: 2f57c95100 ("spl: dm: Make it possible for the SPL to pick its own DTB from a FIT")
CC: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-05-14 11:36:19 -04:00
Jan Kiszka
5d3534de60 kbuild: spl: Fix parallel build
The dts dir must exists when running this rule.

That missing dependency broke e.g. "make -j" for the am65x targets.

Fixes: 2f57c95100 ("spl: dm: Make it possible for the SPL to pick its own DTB from a FIT")
CC: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-05-14 11:36:15 -04:00
Jagan Teki
d0847ecc9f spi: Zap lpc32xx_ssp driver-related code
lpc32xx_ssp driver is deprecated, no active updates
and no board user, hence dropped the same.

Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Albert ARIBAUD <albert.aribaud@3adev.fr>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-11 01:30:49 +05:30
Tom Rini
a5e609b982 Pull request for UEFI sub-system for efi-2020-07-rc2-3
This series contains bug fixes and code simplifications.
 
 Following clarification in the discussion of the EBBR specification
 device trees will be passed as EfiACPIReclaimMemory to UEFI applications.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl60T3UACgkQxIHbvCwF
 GsR85Q/9Eu9IFl1T8Ti83/O0M9N2xGrisvLmG2N1fIRHJgLAAHpIzijieVVba4Wo
 axmEO0WMwbUZsScxDPSsCdkExnbTrU8mt7aHepdSa8D+KJK9kymARxBE+bMa1mXJ
 5b5fpUL/GAKKDcV5j8Yio7JpsrCagB1YtS9yURxhSBPwXKahhdIx1ajWZOZojEPe
 LwSupV4IlHKw85gfM/KSSKKIw8CftKSBpJynGr/H6T6z3ikH43MLvqQ+654wOx9A
 DPxchW2Op8SXuARXgDhpLScCxpAkZgLLTMMoD5FO8RLS/LDHp6f+/AOjXtbbmX4G
 RGOF3bHL2rBn8IHkE969l5gswvUtqQEF4lnG44ocjkKEw4R0+2oNCDYH7SHxUQjg
 pksVDJDMuBU1Fg9HtHlkm7kQ7lxC1IQV6yr/Sx2yah0TrP6+r/gPox41RpAQA6dv
 f9pqdzChCLReDrwQlth++dQ5yEKGZ+cxXNB0YkcUZkrNamh/4sNoccVbVCoTfoMm
 dx5W6KFyf89HwLr1RW5NBAR1vJrapfuam2iOdE2fxVEUScrMFmUVS0SbksthH6qf
 PkYD+tNdF1w2+XXMjOj05zwsLn/iF5pcUxi4S92bZfcxqoCkVP3ym71rwRyD8hSv
 qoRv1F22wUIvWJal6XtsAkWy/6kNP9/gpmqpAyjNEsAr3VvEEHY=
 =PVDs
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-07-rc2-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc2-3

This series contains bug fixes and code simplifications.

Following clarification in the discussion of the EBBR specification
device trees will be passed as EfiACPIReclaimMemory to UEFI applications.
2020-05-08 14:56:23 -04:00
Ashok Reddy Soma
702de89cc6 treewide: mem: Move mtest related defines to Kconfig
Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-08 12:02:56 -04:00
Michal Simek
e519f03a18 cmd: mem: Remove CONFIG_SYS_MEMTEST_SCRATCH mapping
There is no real need to exactly define space for saving patterns for
alternate memory test. It is much easier to allocate space on the stack and
use it instead of trying to find out space where pattern should be saved.

For example if you want to test the whole DDR memory you can't save patter
to DDR and you need to find it out. On Xilinx devices DDR or OCM addresses
were chosen but that means that OCM needs to be mapped and U-Boot has
access permission there.

It is easier to remove this limitation and simply save it on stack because
it is very clear that memory test can't rewrite U-Boot and U-Boot has also
full access to memory where runs from.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
2020-05-08 09:16:26 -04:00
Patrick Delaunay
c39e19a9b0 configs: migrate CONFIG_SYS_MTDPARTS_RUNTIME to defconfigs
Move CONFIG_SYS_MTDPARTS_RUNTIME into Kconfig done by moveconfig.py.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-08 09:16:26 -04:00
Patrick Delaunay
8cc28146f5 configs: migrate CONFIG_SET_DFU_ALT_INFO to defconfigs
Move CONFIG_SET_DFU_ALT_INFO into Kconfig done by moveconfig.py.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-05-08 09:16:26 -04:00
Jan Kiszka
b37a0b5c89 kbuild: efi: Avoid rebuilding efi targets
Add a couple of missing targets so that helloworld and other efi targets
are not needlessly rebuilt.

CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-05-07 18:23:16 +02:00
Rasmus Villemoes
15c160301c scripts/get_default_envs.sh: preserve order of multiple entries for same variable
It's possible that the default_environment[] array contains multiple
entries for the same variable, e.g. a setting from env_default.h based
on some CONFIG_* variable, and another from
CONFIG_EXTRA_ENV_SETTINGS. In such a case, the last setting takes
effect.

Hence, in order to be able to use the output from this script as an
CONFIG_DEFAULT_ENV_FILE and get the same default environment as one
currently has, we need to preserve the order. So only sort by the
variable name, and disable the last-resort comparison.

We could pipe the result through uniq to remove duplicate lines, but I
think there's some value in seeing that certain variables are defined
multiple times.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-06 15:12:48 -04:00
Tom Rini
1d5d0275d7 Merge branch 'next' of git://git.denx.de/u-boot-sh
This is part 1 of big network cleanup / DM conversion.
The dc2114x/rtl8139/pcnet/tulip PCI adapter drivers received checkpatch
cleanups in preparation for DM conversion. The smc911x is converted to
DM completely. The dwc_eth_qos cache fixes are applied.
2020-05-04 07:27:06 -04:00
Patrick Delaunay
f8dc7f2f18 configs: migrate CONFIG_SYS_ARM_CACHE_* in Kconfig
Move CONFIG_SYS_ARM_CACHE_WRITETHROUGH and
CONFIG_SYS_ARM_CACHE_WRITEALLOC into Kconfig done by moveconfig.py.

Kconfig uses a choice between the 3 values supported in U-Boot,
including the new configuration CONFIG_SYS_ARM_CACHE_WRITEBACK
(the default configuration).

The patch also avoids to select simultaneously 2 configurations.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-05-01 11:34:01 -04:00
Marek Vasut
171f5e580e net: tulip: Remove CONFIG_TULIP_*
These macros are not used by any board, remove them to simplify
the driver. The EEPROM accessors are still retained however, as
those might still be useful.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-05-01 12:35:21 +02:00
Marek Vasut
635a76b703 net: pcnet: Remove CONFIG_PCNET_79C97x
These macros guard one switch-case statement, which grows mips malta
by some 20 bytes if debug is enabled, and even less if it is not. To
make the code simpler, just support all the NICs and be done with it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2020-05-01 12:35:20 +02:00
Tom Rini
556fd590db configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-28 16:15:47 -04:00
Masahiro Yamada
f34d0ad82e kbuild: SPL/TPL: generate separate asm-offsets.h for SPL and TPL
Currently generic-asm-offsets.h and asm-offsets.h are generated based
on U-Boot proper config options. The same asm-offsets headers are used
for building U-Boot SPL/TPL, which causes potential offset mismatch if
U-Boot proper has different config options from U-Boot SPL/TPL.

This commit adds:
  spl/include/generated/(generic-)asm-offsets.h
  tpl/include/generated/(generic-)asm-offsets.h

spl/include/generated/(generic-)asm-offsets.h is generated if
CONFIG_SPL=y, and included when building SPL.

tpl/include/generated/(generic-)asm-offsets.h is generated if
CONFIG_TPL=y, and included when building TPL.

They are created before Kbuild descends into SPL/TPL object directories
and builds $(obj)/dts/dt-platdata.o because $(obj)/dts/dt-platdata.c
includes a bunch of headers.

Prepend -I$(obj)/include to $(UBOOTINCLUDE) so (generic-)asm-offsets.h
is searched in {spl,tpl}/include/generated/.

Requested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-04-28 15:44:31 -04:00
Heinrich Schuchardt
c11f0d88ba coccinelle: adjust NULL check before free()
The free() function checks if its argument is NULL. We should avoid
checking for NULL before calling free like in

    if (result->tds)
        free(result->tds);

The list of relevant functions differs between Linux and U-Boot, e.g. we
use free().

Adjust the list of relevant functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-04-24 16:40:09 -04:00
Heinrich Schuchardt
cb2a2ebd4f coccinelle: check for casting malloc output
Casting the (void *) output of memory allocation functions before
assignment like in

	sata->cmd_hdr_tbl_offset = (void *)malloc(length + align);

is useless.

Adopt the Linux kernel script
scripts/coccinelle/api/alloc/alloc_cast.cocci.

Now 'make coccicheck' generates warnings like:

./drivers/ata/fsl_sata.c:143:29-33:
WARNING: casting value returned by memory allocation function
to (void *) is useless.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-04-24 16:40:09 -04:00
Masahiro Yamada
b5a2046376 kbuild: cherry-pick kbuild changes from Linux
b42841b7bb62 kbuild: Get rid of KBUILD_STR
2aedcd098a94 kbuild: suppress annoying "... is up to date." message
9c8fa9bc08f6 kbuild: fix if_change and friends to consider argument order
ebf003f0cfb3 kbuild: Consolidate header generation from ASM offset information
2982c953570b kbuild: remove redundant $(wildcard ...) for cmd_files calculation
8a78756eb545 kbuild: create object directories simpler and faster
4d4b5c2e3b6e treewide: remove explicit rules for *offsets.s
01d509a48b46 kbuild: remove unimportant comments from ./Kbuild

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-24 16:40:09 -04:00
Masahiro Yamada
c3da3f5808 kbuild: add FORCE to dependency of $(obj)/dts/dt-platdata.o
if_changed must have FORCE as a prerequisite.

Add $(obj)/dts/dt-platdata.o to 'targets' so that the corresponding
.cmd file is included.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-24 16:40:09 -04:00
Masahiro Yamada
308c6b0d4b fixdep: Re-sync with Linux 5.7-rc1
fixdep is a standalone host program, so we can just re-sync it with
the latest Linux in one commit.

I kept the U-Boot own code block surrounded by
/* hack for U-Boot */ ... /* U-boot hack end */.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-24 10:51:32 -04:00
Masahiro Yamada
9d88a0aae8 fixdep: handle CONFIG_IS_ENABLE() and friends for TPL
Since commit f1c6e1922e ("spl: dm: use CONFIG_IS_ENABLED to test for
the DM option"), CONFIG_IS_ENABLED() handles CONFIG_TPL_* options, but
fixdep still cannot because it hard-codes the "SPL_" prefix as follows:

    char tmp_buf[256] = "SPL_"; /* hack for U-Boot */

Take care of the "TPL_" prefix too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-24 10:51:32 -04:00
Heinrich Schuchardt
5fa8811fc2 scripts: add documentation-file-ref-check
'make refcheckdocs' requires scripts/documentation-file-ref-check.
Adopt script from Linux v5.6-rc3.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-04-17 12:32:36 -04:00
Simon Glass
89c2798f1f acpi: Add an __ACPI__ preprocessor symbol
The ASL compiler cannot handle C structures and the like so needs some
sort of header guard around these.

We already have an __ASSEMBLY__ #define but it seems best to create a new
one for ACPI since the rules may be different.

Add the check to a few files that ACPI always includes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2020-04-16 14:36:28 +08:00
Tom Rini
587e4a4296 kconfig / kbuild: Re-sync with Linux 4.19
Align Kconfig and Kbuild logic to Linux 4.19 release with minimal impact
on files outside of this scope.

Our previous Kconfig sync was done by commit 5972ff077e ("kconfig /
kbuild: re-sync with Linux 4.18").

In this particular re-sync in order to keep clang support working a
number of related changes needed to be pulled in that had been missed
previously.  Not all of these changes we easily traceable and so have
been omitted from the list below.

The imported Linux commits are:
[From prior to v4.18]
9f3f1fd29976 kbuild: Add __cc-option macro
d7f14c66c273 kbuild: Enable Large File Support for hostprogs
6d79a7b424a5 kbuild: suppress warnings from 'getconf LFS_*'
24403874316a Shared library support
86a9df597cdd kbuild: fix linker feature test macros when cross compiling with Clang
0294e6f4a000 kbuild: simplify ld-option implementation

[From v4.18 to v4.19]
96f14fe738b6 kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS
10844aebf448 kbuild: Rename HOSTCXXFLAGS to KBUILD_HOSTCXXFLAGS
b90a368000ab kbuild: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS
8377bd2b9ee1 kbuild: Rename HOST_LOADLIBES to KBUILD_HOSTLDLIBS
f92d19e0ef9b kbuild: Use HOST*FLAGS options from the command line
4ab3b80159d4 kconfig: check for pkg-config on make {menu,n,g,x}config
693359f7ac90 kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE
f60b992e30ff kbuild: replace $(LDFLAGS) $(ldflags-y) with $(ld_flags)
2fb9279f2c3e kbuild: change ld_flags to contain LDFLAGS_$(@F)
c931d34ea085 arm64: build with baremetal linker target instead of Linux when available
5accd7f3360e kconfig: handle format string before calling conf_message_callback()
a2ff4040151a kconfig: rename file_write_dep and move it to confdata.c
0608182ad542 kconfig: split out useful helpers in confdata.c
adc18acf42a1 kconfig: remove unneeded directory generation from local*config
79123b1389cc kconfig: create directories needed for syncconfig by itself
16952b77d8b5 kconfig: make syncconfig update .config regardless of sym_change_count
d6c6ab93e17f kbuild: remove deprecated host-progs variable
56869d45e364 kconfig: fix the rule of mainmenu_stmt symbol
c151272d1687 kconfig: remove unused sym_get_env_prop() function
1880861226c1 kconfig: remove P_ENV property type
e3fd9b5384f3 scripts/dtc: consolidate include path options in Makefile
4bf6a9af0e91 kconfig: add build-only configurator targets
f1575595d156 kconfig: error out when seeing recursive dependency
5e8c5299d315 kconfig: report recursive dependency involving 'imply'
f498926c47aa kconfig: improve the recursive dependency report
98a4afbfafd2 kconfig: fix "Can't open ..." in parallel build
9a9ddcf47831 kconfig: suppress "configuration written to .config" for syncconfig
87a32e624037 kbuild: pass LDFLAGS to recordmcount.pl
d503ac531a52 kbuild: rename LDFLAGS to KBUILD_LDFLAGS
217c3e019675 disable stringop truncation warnings for now
bc8d2e20a3eb kconfig: remove a spurious self-assignment
fd65465b7016 kconfig: do not require pkg-config on make {menu,n}config
5a4630aadb9a ftrace: Build with CPPFLAGS to get -Qunused-arguments

Note that this adds new cleanup work to do in that we should adapt the
shared library support we have to what is now upstream.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-10 11:18:32 -04:00
Tom Rini
5972ff077e kconfig / kbuild: re-sync with Linux 4.18
Align Kconfig and Kbuild logic to Linux 4.18 release with minimal impact
on files outside of this scope.

Our previous Kconfig sync was done by commit e91610da7c ("kconfig:
re-sync with Linux 4.17-rc4").

A very small number of changes upstream since our sync with v4.17-rc4
that exist in the v4.18 release have already been applied here and have
been omitted from the list in this commit (and are readily available in
our own git history).

The imported Linux commits are:
[From prior to v4.17-rc4]
39a33ff80a25 kbuild: remove cc-option-align
db547ef19064 Kbuild: don't add obj tree in additional includes
b999596b963a Kbuild: don't add ../../ to include path

[From v4.17 to v4.18]
b3aa58d2e85d fixdep: suppress consecutive / from file paths in dependency list files
74656b682902 kbuild: disable new dtc graph and unit-address warnings
74d931716151 genksyms: remove symbol prefix support
e6ecfb45072c kbuild: do not display CHK for filechk
0b669a5076fd kconfig: refactor Qt package checks for building qconf
b464ef583dc7 kconfig: refactor GTK+ package checks for building gconf
1c5af5cf9308 kconfig: refactor ncurses package checks for building mconf and nconf
694c49a7c01c kconfig: drop localization support
96f60dfa5819 trace: Use -mcount-record for dynamic ftrace
bb222ceeb327 kconfig: remove string expansion in file_lookup()
96d8e48da55a kconfig: remove string expansion for mainmenu after yyparse()
5b31a9746756 kconfig: remove sym_expand_string_value()
137c0118a900 kconfig: make default prompt of mainmenu less specific
e298f3b49def kconfig: add built-in function support
2fd5b09c201e kconfig: add 'shell' built-in function
9de071536c87 kconfig: begin PARAM state only when seeing a command keyword
9ced3bddec08 kconfig: support user-defined function and recursively expanded variable
1175c02506ff kconfig: support simply expanded variable
ed2a22f277c6 kconfig: support append assignment operator
82bc8bd82e5c kconfig: expand lefthand side of assignment statement
1d6272e6fe43 kconfig: add 'info', 'warning-if', and 'error-if' built-in functions
a702a6176e2f kconfig: add 'filename' and 'lineno' built-in variables
915f64901eb3 kconfig: error out if a recursive variable references itself
2bece88f89fa kconfig: test: add Kconfig macro language tests
21c54b774744 kconfig: show compiler version text in the top comment
59f7b5847b0c kbuild: $(CHECK) doesnt need NOSTDINC_FLAGS twice
145167650b96 kbuild: add endianness flag to CHEKCFLAGS
1f2f01b122d7 kbuild: add machine size to CHECKFLAGS
d6a0c8a1326b kconfig: Add testconfig into make help output
bb6d83dde191 kbuild: Move last word of nconfig help to the previous line
8593080c0fcf kconfig: fix localmodconfig
ed7d40bc67b8 tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount
b2d00d7c61c8 kconfig: fix line numbers for if-entries in menu tree
ecd53ac2f2c6 kconfig: handle P_SYMBOL in print_symbol()
73d1c580f92b kconfig: loop boundary condition fix
48f6e3cf5bc6 kbuild: do not drop -I without parameter
bd412d81b7ea kbuild: .PHONY is not a variable, but PHONY is
6916162c7308 kbuild: remove duplicated comments about PHONY

Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-16 18:54:18 -04:00
Rob Herring
6e916dfd9d scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc
This adds the following commits from upstream:

84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword
4038fd90056e dtc: add ability to make nodes conditional on them being referenced
e1f139ea4900 checks: drop warning for missing PCI bridge bus-range
f4eba68d89ee checks: Print duplicate node name instead of parent name
46df1fb1b211 .travis.yml: Run valgrind checks via Travis
14a3002a1aee tests: Update valgrind suppressions for sw_tree1
02c5fe9debc0 tests: Remove valgrind error from tests/get_path
df536831d02c checks: add graph binding checks
2347c96edcbe checks: add a check for duplicate unit-addresses of child nodes
8f1b35f88395 Correct overlay syntactic sugar for generating target-path fragments
afbddcd418fb Suppress warnings on overlay fragments
119e27300359 Improve tests for dtc overlay generation

[From Linux Kernel commit 50aafd60898a8b3edf2f60e014a8288da3b2e5e3]
Signed-off-by: Rob Herring <robh@kernel.org>

[For applying to U-Boot]
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-16 18:54:18 -04:00
Masahiro Yamada
ddb87a0b40 kbuild: remove unused dtc-version.sh script
This is U-Boot own code, and no longer used since commit 36dd5f1b8a
("dtc: Switch to building and using our own dtc unless provided").

Prior to that commit, U-Boot relied on an external dtc, so this script
was used to check the dtc version.

Now U-Boot bundles our own dtc in script/dtc/dtc like Linux kernel.

Users are still allowed to pass DTC= option from the command line,
but they are supposed to choose correct version of dtc in this case.
So, we do not check the dtc version any more.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-16 16:42:50 -04:00
Tom Rini
7a212e5617 scripts/Makefile.lib: Re-add -Wno-simple_bus_reg to DTC_FLAGS
This exists in Linux Kernel with commit 70523a3ce5ff so put it in the
list of DTC_FLAGS that mirror Linux as we will catch up there.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-16 12:49:09 -04:00
Tom Rini
aacf264bfd scripts/Makefile.lib: Restore PCI related warnings to DTC_FLAGS
While we are working on correcting usage related to the pci_bridge and
pci_device_bus_num warnings, disable these flags for now.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-16 12:49:09 -04:00
Tom Rini
e0d1a89a5b kbuild: Re-sync DTC flag logic with v4.17
The way that we have been handling additional DTC warning flags hasn't
matched the way the Linux Kernel does.  Resync this logic with v4.17.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-16 12:49:09 -04:00
Tom Rini
67f2ee86cc kbuild: fixdep: Resync this with v4.17
The previous kbuild resync of e91610da7c ("kconfig: re-sync with Linux
4.17-rc4") accidentally did not sync the fixdep program.  This commit
brings fixdep in line with the rest of that previous resync.

This includes all of the following Linux kernel commits:
fbfa9be9904e kbuild: move include/config/ksym/* to include/ksym/*
5b8ad96d1a44 fixdep: remove some false CONFIG_ matches
14a596a7e6fd fixdep: remove stale references to uml-config.h
ab9ce9feed36 fixdep: use existing helper to check modular CONFIG options
87b95a81357d fixdep: refactor parse_dep_file()
5d1ef76f5a22 fixdep: move global variables to local variables of main()
ccfe78873c22 fixdep: remove unneeded memcpy() in parse_dep_file()
4003fd80cba9 fixdep: factor out common code for reading files
01b5cbe7012f fixdep: use malloc() and read() to load dep_file to buffer
41f92cffba19 fixdep: remove unnecessary <arpa/inet.h> inclusion
7c2ec43a2154 fixdep: exit with error code in error branches of do_config_file()
4e433fc4d1a9 fixdep: trivial: typo fix and correction
dee81e988674 fixdep: faster CONFIG_ search
c1a95fda2a40 kbuild: add fine grained build dependencies for exported symbols
d8329e35cc08 fixdep: accept extra dependencies on stdin
4c835b57b8de fixdep: constify strrcmp arguments

Of note is that when applying dee81e988674 above our logic in that area
required some careful consideration to continue to apply.

[Fold in bugfix to allow us to include 638e69cf2230 from upstream]
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

[Merge everything to U-Boot, rework dee81e988674]
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-16 12:49:09 -04:00
Masahiro Yamada
8a266e5800 fixdep: fix U-Boot own code to handle only valid symbol characters
Currently, fixdep skips parsing include/linux/kconfig.h, but if it
parsed it, it would translate the following code in kconfig.h

  config_enabled(CONFIG_VAL(option##_MODULE)

into:

  $(wildcard include/config/option##/module.h)

When Kbuild includes .*.cmd, it would emit the following error:

  *** unterminated call to function 'wildcard': missing ')'.  Stop.

This issue prevents us from importing the upstream Linux commit
638e69cf2230 ("fixdep: do not ignore kconfig.h").

Fix this by handling only alphanumerical characters and underscores.
This makes sense because they match to the valid character sets in
Kconfig symbols.

As a side-note, you can reproduce this issue only on GNU Make <= 4.2.1

For GNU Make <= 4.2.1, the '#' always means the start of a comment.
Hence, GNU Make thinks the closing ')' is missing.

The following commit in GNU Make changed how it handles '#' in
function invocations. So, this does not happen for GNU Make 4.3

| commit c6966b323811c37acedff05b576b907b06aea5f4
| Author: Paul Smith <psmith@gnu.org>
| Date:   Thu Dec 22 18:47:26 2016 -0500
|
|    [SV 20513] Un-escaped # are not comments in function invocations

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reported-by: Tom Rini <trini@konsulko.com>
2020-03-16 12:49:09 -04:00
Tom Rini
9e1d65f36b configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-28 13:28:38 -05:00
Rasmus Villemoes
215df01de4 net: convert NET_MAXDEFRAG to Kconfig
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-13 10:10:50 -05:00
Tom Rini
9a8942b53d sandbox conversion to SDL2
TPM TEE driver
 Various minor sandbox video enhancements
 New driver model core utility functions
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAl48iogACgkQfxc6PpAI
 reaVzAf/an3/yKe6r3CVWlcRV6H/dVg1ApnnLpX7jS0p0b++oCVvOiy7z1WPXj3k
 b1SSgENDeeZ/8EHio+Gf7ZidH/TGEj7L6YEFwd1t60GMkZiWEkNf4Z53tw482YG+
 96hoPD+ySTW+ddIdVHWAFG2I4aEiKHANJAp/ItNdD+rLbrEwNQy+eiK5JTOk80B6
 /X8AJCLZeAC1s7vs+2+WolgjT78QGzA9HHalMiublcqh0ivKKk0QeQiOKKPe8JYJ
 om5YY1TxayQ60Xmo5f39/SBfzEEklxw83sU9o1tBeYzyVUpu7fQdkxiDbWdsij77
 DgwLdeYQJGbN+hdSWE0gjTqyhW+lWA==
 =KRoA
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions
2020-02-11 10:58:41 -05:00
Maxime Ripard
5ed2dc5623 dtc: add ability to make nodes conditional on them being referenced
This is needed when importing mainline DTs into U-Boot, as some started
using this /omit-if-no-ref/ tag, so won't compile with U-Boot's current
dtc copy. This is just a cherry-pick of the patch introducing this
feature.
Original commit message from Maxime:
------------------
A number of platforms have a need to reduce the number of DT nodes,
mostly because of two similar constraints: the size of the DT blob, and
the time it takes to parse it.

As the DT is used in more and more SoCs, and by more projects, some
constraints start to appear in bootloaders running from SRAM with an
order of magnitude of 10kB. A typical DT is in the same order of
magnitude, so any effort to reduce the blob size is welcome in such an
environment.

Some platforms also want to reach very fast boot time, and the time it
takes to parse a typical DT starts to be noticeable.

Both of these issues can be mitigated by reducing the number of nodes in
the DT. The biggest provider of nodes is usually the pin controller and
its subnodes, usually one for each valid pin configuration in a given
SoC.

Obviously, a single, fixed, set of these nodes will be used by a given
board, so we can introduce a node property that will tell the DT
compiler to drop the nodes when they are not referenced in the tree, and
as such wouldn't be useful in the targetted system.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Marek Vasut
8941f8414d watchdog: designware: Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers
accordingly, no functional change. The S10 enables the WDT only in
SPL, but does not enable it in U-Boot itself, hence disable it in
the config again.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dalon Westergreen <dwesterg@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Philipp Tomisch <philipp.tomisch@theobroma-systems.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
2020-02-03 09:26:14 +01:00
Peter Robinson
018921ee79 Remove redundant YYLOC global declaration
Same as the upstream fix for building dtc with gcc 10.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2020-01-30 13:30:35 -05:00
Tom Rini
e8c2d25845 libfdt: Revert 6dcb8ba4 from upstream libfdt
In upstream libfdt, 6dcb8ba4 "libfdt: Add helpers for accessing
unaligned words" introduced changes to support unaligned reads for ARM
platforms and 11738cf01f15 "libfdt: Don't use memcpy to handle unaligned
reads on ARM" improved the performance of these helpers.

In practice however, this only occurs when the user has forced the
device tree to be placed in memory in a non-aligned way, which in turn
violates both our rules and the Linux Kernel rules for how things must
reside in memory to function.

This "in practice" part is important as handling these other cases adds
visible (1 second or more) delay to boot in what would be considered the
fast path of the code.

Cc: Patrice CHOTARD <patrice.chotard@st.com>
Cc: Patrick DELAUNAY <patrick.delaunay@st.com>
Link: https://www.spinics.net/lists/devicetree-compiler/msg02972.html
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Patrice Chotard <patrice.chotard@st.com>
2020-01-30 13:30:35 -05:00
Anatolij Gustschin
43b6e38b27 dts: add property removal option CONFIG_OF_REMOVE_PROPS
This can be used for device tree size reduction similar as
CONFIG_OF_SPL_REMOVE_PROPS option. Some boards must pass the
built-in DTB unchanged to the kernel, thus we may not cut it
down unconditionally. Therefore enable the property removal
list option only if CONFIG_OF_DTB_PROPS_REMOVE is selected.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2020-01-27 19:54:20 -05:00
Holger Brunck
b0405e08f4 arm/km: remove unmaintained board kmsuv31
This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-23 07:29:58 -05:00
Holger Brunck
95e3ce6a7f arm/km: remove unmaintained board SUGP1
This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-23 07:29:58 -05:00
Holger Brunck
0e1c0f361e arm/km: add support for SUSE2
This board is similar to SUV31, but the FPGA is reset concept is quite
different.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-23 07:29:58 -05:00
Tom Rini
052170c6a0 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-22 13:38:00 -05:00
Simon Glass
4d979bfdbc common: Move and rename CONFIG_SYS_SUPPORT_64BIT_DATA
This is not really a CONFIG since it is not intended to be set by boards.
Move it into the compiler header with other similar defines, and rename
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 17:53:52 -05:00
Simon Glass
bd21f66249 common: Drop CONFIG_POST_STD/ALT_LIST
These CONFIG options are not used anymore. CONFIG_POST_ALT_LIST just
causes CONFIG_POST_STD_LIST to be set and it causes tests.c to be
compiled. So just make compiling tests.c unconditional.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 13:26:51 -05:00
Simon Glass
015e3348fc common: Drop floppy disk support
This seems pretty old now. It has not been converted to driver model and
is not used by any boards.

Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 13:26:50 -05:00
Yangbo Lu
c2a8b4f879 powerpc/mpc85xx: drop eSDHC periperhal clock code
The below patch added eSDHC periperhal clock code initially.
2d9ca2c mmc: fsl_esdhc: Add peripheral clock support

The purpose was to fix up device tree properties "peripheral-frequency"
so that linux could get the periperhal clock by it.
However the implementation on both u-boot and linux was only
for a Freescale SDK release. The linux part implementation had never
been upstreamed. These code should not have been exist on u-boot
mainline.

Let's remove the powerpc part changes but keep the changes in
fsl_esdhc driver. The changes in fsl_esdhc driver could be utilized
to support SD UHS and eMMC HS200/HS400 speed modes for current
Layerscape ARM platforms.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2020-01-16 13:16:25 +08:00
Holger Brunck
e7fdb3462d arm/km: remove board KMCOGE3UN
This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-10 10:25:13 -05:00