19 Feb, 2020
3 commits
-
The implementation of dma_map_single() and dma_unmap_single() is
exactly the same for all the architectures that support them.Factor them out to , and make all drivers to
include instead of .If we need to differentiate them for some architectures, we can
move the generic definitions to .Add some comments to the helpers. The concept is quite similar to
the DMA-API of Linux kernel. Drivers are agnostic about what is
going on behind the scene. Just call dma_map_single() before the
DMA, and dma_unmap_single() after it.Signed-off-by: Masahiro Yamada
-
dma_unmap_single() takes the dma address, not virtual address.
Signed-off-by: Masahiro Yamada
-
Make dma_map_single() return the dma address, and remove the
pointless volatile.Signed-off-by: Masahiro Yamada
26 Jan, 2020
1 commit
-
Subsystems such as USB expect dma_map_single() and dma_unmap_single() to
do dcache flush/invalidate operations as required. For example, see
see drivers/usb/gadget/udc/udc-core.c::usb_gadget_map_request().
Currently drivers do this locally, (see drivers/usb/dwc3/ep0.c,
drivers/mtd/nand/raw/denali.c etc..)
Update arch specific dma_map_single() and dma_unmap_single() APIs to do
cache flush/invalidate operations, so that drivers need not implement
them locally.Signed-off-by: Vignesh Raghavendra
Reviewed-by: Masahiro Yamada
Reviewed-by: Rick Chen
18 Jan, 2020
3 commits
-
At present panic() is in the vsprintf.h header file. That does not seem
like an obvious choice for hang(), even though it relates to panic(). So
let's put hang() in its own header.Signed-off-by: Simon Glass
[trini: Migrate a few more files]
Signed-off-by: Tom Rini -
Move this function out of common.h and into a relevant header file.
Signed-off-by: Simon Glass
-
This is an init function so move it out of the common header. Avoid using
the typedef so that we don't have to include the global_data header file.Also tidy up the function style in comments while we are here.
Signed-off-by: Simon Glass
03 Dec, 2019
5 commits
-
Move these two functions into the irq_funcs.h header file. Also move
interrupt_handler_t as this is used by the irq_install_handler() function.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
These functions do not use driver model but are fairly widely used in
U-Boot. But it is not clear that they will use driver model anytime soon,
so we don't want to label them as 'legacy'.Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it
is widely used in U-Boot already.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
These functions are CPU-related and do not use driver model. Move them to
cpu_func.hSigned-off-by: Simon Glass
Reviewed-by: Daniel Schwierzeck
Reviewed-by: Tom Rini -
These functions belong in cpu_func.h. Another option would be cache.h
but that code uses driver model and we have not moved these cache
functions to use driver model. Since they are CPU-related it seems
reasonable to put them here.Move them over.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
This function belongs in time.h so move it over and add a comment.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini
12 Aug, 2019
2 commits
-
This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.Acked-by: Joe Hershberger
Signed-off-by: Simon Glass -
Move env_get() over to the new header file.
Acked-by: Joe Hershberger
Signed-off-by: Simon Glass
18 May, 2019
3 commits
-
While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances
where these configuration items are conditional on SPL. This commit adds SPL
variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates
the configurations as required.Acked-by: Alexey Brodkin
Signed-off-by: Trevor Woerner
[trini: Make the default depend on the setting for full U-Boot, update
more zynq hardware]
Signed-off-by: Tom Rini -
CONFIG_SYS_[DI]CACHE_OFF had been partially converted to Kconfig
parameters; only for the ARC architecture. This patch turns these two
parameters into Kconfig items everywhere else they are found.All of the include/configs/* and defconfig changes in this patch are
for arm machines only. The Kconfig changes for arc, nds32, riscv,
and xtensa have been included since these symbols are found in code
under arch/{arc,nds32,riscv,xtensa}, however, no currently-defined
include/configs/* or defconfigs for these architectures exist which
include these symbols.These results have been confirmed with tools/moveconfig.py.
Acked-by: Alexey Brodkin
Signed-off-by: Trevor Woerner
[trini: Re-migrate for a few more boards]
Signed-off-by: Tom Rini -
According to De Morgan's Law[1]:
!(A && B) = !A || !B
!(A || B) = !A && !BThere are 5 places in the code where we find:
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
and 4 places in the code where we find:
#if (!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF))In words, the construct:
!defined(CONFIG_SYS_[DI]CACHE_OFF)
means:
"is the [DI]CACHE on?"
and the construct:
defined(CONFIG_SYS_[DI]CACHE_OFF)
means:
"is the [DI]CACHE off?"Therefore
!(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
means:
"the opposite of 'are they both off?'"
in other words:
"are either or both on?"
and:
(!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF)
means:
"are either or both on?"As a result, I've converted the 4 instances of '(!A || !B)' to '!(A && B)' for
consistency.[1] https://en.wikipedia.org/wiki/De_Morgan%27s_laws
Signed-off-by: Trevor Woerner
12 Apr, 2019
1 commit
-
There is no reason not to use the Linux "jedec,spi-nor" binding in U-Boot
dts files. This compatible has been added in sf_probe, let use it.This patch switches to jedec,spi-nor when spi-flash is used in the DTS
and DTSI files, and removed spi-flash when jedec,spi-nor is already
present.The x86 dts are switched in a separate commit since it depends on a change
in fdtdec.Signed-off-by: Neil Armstrong
Acked-by: Stefan Roese
Reviewed-by: Simon Goldschmidt
Reviewed-by: Evgeniy Paltsev
Reviewed-by: Rick Chen
Reviewed-by: Patrick Delaunay
Reviewed-by: Jagan Teki
22 Jan, 2019
4 commits
-
In the two commits:
cf3922dddc44a968685b535f2af195f1e51f4a7b
mmc: ftsdc010_mci: Sync compatible with DT mmc nodec14e90e8445e7b1c3531b4bdeb778c47bd6570eb
riscv: dts: Sync DT with Linux Kernelftsdc010_mci's compatible has been modified as
"andestech,atfsdc010" for RISC-V synchronization.
But ae3xx.dts and ag101p.dts which are used for
nds32 adp-ae3xx and adp-ag101p platforms did not
be modified correctly at that time. It will cause
mmc detection failure. Fix it here.Signed-off-by: Rick Chen
Cc: Greentime Hu -
Add -mcmodel=large can let elf-mculib have
the same default behavior just like linux-glibc.
And it help to pass U-Boot booting sequence.Signed-off-by: Rick Chen
Cc: Greentime Hu -
Force it to generate SW fup instruction.
It help to avoid bugs when running on no-HW-fpu board, but
compile with v3f which support HW fpu instruction.Signed-off-by: Rick Chen
Cc: Greentime Hu -
-G0 is an old option, not support now,
So remove it.
It can help to fix compile error when
build with nds32 pre-build toolchain.Signed-off-by: Rick Chen
Cc: Greentime Hu
26 Nov, 2018
1 commit
-
This is now deprecated and no board is using it. Drop it.
Signed-off-by: Bin Meng
Signed-off-by: Lukas Auer
18 Nov, 2018
1 commit
-
Introduce a new Makefile variable for passing LDFLAGS to standalone
programs. Currently the variable CONFIG_STANDALONE_LOAD_ADDR is
misued on some archs to pass a specific linker script.Signed-off-by: Daniel Schwierzeck
Reviewed-by: Tom Rini
Reviewed-by: Rick Chen
26 Sep, 2018
1 commit
-
Now that we already disable the "strict-aliasing" globally, remove
the duplicates in the nds32/riscv/x86 arch-specific Makefiles.Signed-off-by: Bin Meng
Reviewed-by: Rick Chen
Reviewed-by: Simon Glass
11 Sep, 2018
1 commit
-
All architectures have the same definition for s8/16/32/64
and u8/16/32/64.Factor out the duplicated code into .
BTW, Linux unified the kernel space definition into int-ll64.h
a few years ago as you see in Linux commit 0c79a8e29b5f
("asm/types.h: Remove include/asm-generic/int-l64.h").Signed-off-by: Masahiro Yamada
16 May, 2018
2 commits
-
nds2 bitops.h provides a __clear_bit() but does not define
PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the
architecturally provided __clear_bit().This patch defines PLATFORM__CLEAR_BIT which means that __clear_bit() in
nds32 bitops.h will be called whenever generic_clear_bit() is called - as
opposed to the default cross-platform generic_clear_bit().Signed-off-by: Bryan O'Donoghue
Cc: Macpaul Lin -
nds32 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT
as a result generic_set_bit() is used instead of the architecturally
provided __set_bit().This patch defines PLATFORM__SET_BIT which means that __set_bit() in nds32
bitops.h will be called whenever generic_set_bit() is called - as opposed
to the default cross-platform generic_set_bit().Signed-off-by: Bryan O'Donoghue
Cc: Macpaul Lin
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
28 Apr, 2018
1 commit
-
We have a large number of places where while we historically referenced
gd in the code we no longer do, as well as cases where the code added
that line "just in case" during development and never dropped it.Signed-off-by: Tom Rini
30 Mar, 2018
2 commits
-
After drop non-dm code of ftsdc010, the sd register
base definition can be droppped now.So CONFIG_FTSDC010_BASE and CONFIG_FTSDC010_BASE_LIST both
can be removed from config_whitelist.txtSigned-off-by: Rick Chen
Signed-off-by: Rick Chen
Cc: Greentime Hu -
Enable High-Speed mode with cap-sd-highspeed in dts
Signed-off-by: Rick Chen
Signed-off-by: Rick Chen
19 Feb, 2018
1 commit
-
Only ARM and in some configs MIPS really implement arch_fixup_fdt().
Others just use the same boilerplate which is not good by itself,
but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
apparently implemented in arch/xxx/lib/bootm.c.Now with weak arch_fixup_fdt() right in image-fdt.c where it is
used we get both items highlighted above fixed.Signed-off-by: Alexey Brodkin
Cc: Daniel Schwierzeck
Cc: Simon Glass
Cc: York Sun
Cc: Stefan Roese
Reviewed-by: Tom Rini
Reviewed-by: Daniel Schwierzeck
30 Nov, 2017
1 commit
-
Add dts to support ftsdc010 dm flow on AG101P/AE3XX platform.
Signed-off-by: Rick Chen
03 Oct, 2017
1 commit
-
Convert the nds32 architecture to make use of the new asm-generic/io.h
to provide address mapping functions. As the generic implementations are
suitable for nds32 this is primarily a matter of removing code.Feedback from architecture maintainers is welcome.
Signed-off-by: Paul Burton
Cc: Macpaul Lin
28 Sep, 2017
1 commit
-
It is caused from asm/io.h declare different input type.
Signed-off-by: rick
21 Sep, 2017
3 commits
-
Add spi dts node and enable spi dm flash config.
Signed-off-by: rick
-
Enable cache and ftmac100 performance can be improved.
Signed-off-by: rick
-
move #include from bootm.c to bootm.h
Signed-off-by: rick
13 Sep, 2017
1 commit
-
Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
duplicated definitions of enum dma_data_direction.Signed-off-by: Masahiro Yamada
Reviewed-by: Andy Shevchenko