26 Feb, 2016
2 commits
-
In some cases the timer must be accessible before driver model is active.
Examples include when using CONFIG_TRACE to trace U-Boot's execution before
driver model is set up. Enable this option to use an early timer. These
functions must be supported by your timer driver: timer_early_get_count()
and timer_early_get_rate().Signed-off-by: Simon Glass
-
This function can be called from the timer code on instrumented functions.
Mark it as 'notrace' so that it doesn't cause infinite recursion.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
17 Feb, 2016
1 commit
-
Adjust the driver to use driver model. The SOR becomes a bridge device. We
use the normal simple_panel driver to handle the display itself. We also
need to enable some options such as regulators, PWMs and DM_VIDEO itself.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin
Signed-off-by: Tom Warren
16 Feb, 2016
1 commit
-
If BUILD_TAG is part of KBUILD_CFLAGS, then any time the value changes,
all files get rebuilt. In a continuous integration environment, the value
will change every build. This wastes time, assuming that incremental
builds would otherwise occur.To solve this, remove BUILD_TAG from KBUILD_CFLAGS and add it to CFLAGS
for just the one file that uses it. This does have the disadvantage that
if any other files want to use the flag, we'll need to duplicate this
custom CFLAGS setup logic. However, it seems unlikely we'll need this.An alternative would be to add BUILD_TAG to the "local version" and remove
the special case code from display_options.c. However, that would affect
the format of the U-Boot signon message, which may negatively affect
people looking for specific data there. The approach of using
file-specific CFLAGS was suggested by Masahiro Yamada.Signed-off-by: Stephen Warren
Reviewed-by: Tom Rini
Reviewed-by: Masahiro Yamada
Acked-by: Simon Glass
10 Feb, 2016
1 commit
-
Current, the following passes:
./u-boot -d arch/sandbox/dts/test.dtb -c 'ut_image_decomp'
but the following fails:
./u-boot -d arch/sandbox/dts/test.dtb -c 'ut dm; ut_image_decomp'This is because the gunzip code reads input data beyond the end of its
input buffer. In the first case above, this data just happens to be 0,
which just happens to trigger gzip to signal the error the decompression
unit test expects. In the second case above, the "ut dm" test has written
data to the accidentally-read memory, which causes the gzip code to take a
different path and so return a different value, which triggers the test
failure.The cause of gunzip reading past its input buffer is the re-calculation of
s.avail_in in zunzip(), since it can underflow. Not only is the formula
non-sensical (it uses the delta between two output buffer pointers to
calculate available input buffer size), it also appears to be unnecessary,
since the gunzip code already maintains this value itself. This patch
removes this re-calculation to avoid the underflow and redundant work.The loop exit condition is also adjusted so that if inflate() has consumed
the entire input buffer, without indicating returning Z_STREAM_END (i.e.
decompression complete without error), an error is raised. There is still
opportunity to simplify the code here by splitting up the loop exit
condition into separate tests. However, this patch makes the minimum
modifications required to solve the problem at hand, in order to keep the
Acked-by: Kees Cookdiff simple.
I am not entirely convinced that the loop in zunzip() is necessary at all.
It could only be useful if inflate() can return Z_BUF_ERROR (which
typically means that it needs more data in the input buffer, or more space
in the output buffer), even though Z_FINISH is set /and/ the full input is
available in the input buffer /and/ there is enough space to store the
decompressed output in the output buffer. The comment in zlib.h after the
prototype of inflate() implies this is never the case. However, I assume
there must have been some reason for introducing this loop in the first
place, as part of commit "Fix gunzip to work for any gziped uImage size".This patch is similar to the earlier b75650d84d4b "gzip: correctly
bounds-check output buffer", which corrected a similar issue for
s.avail_out.Cc: Catalin Radu
Cc: Kees Cook
Fixes: f039ada5c109 ("Fix gunzip to work for any gziped uImage size")
Signed-off-by: Stephen Warren
06 Feb, 2016
3 commits
-
Introduce fdtdec_get_child_count for get the number of subnodes
of one parent node.Signed-off-by: Peng Fan
Cc: Simon Glass
Acked-by: Simon Glass -
Use __maybe_unused which should avoid the Coverity error.
Reported-by: Coverity (CID: 134900)
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
Correct spelling of "U-Boot" shall be used in all written text
(documentation, comments in source files etc.).Signed-off-by: Bin Meng
Reviewed-by: Heiko Schocher
Reviewed-by: Simon Glass
Reviewed-by: Minkyu Kang
29 Jan, 2016
1 commit
-
In case CONFIG_DM_TPM was set without any TPM chipset configured a fault
was generated (NULL pointer access).Reviewed-by: Simon Glass
Signed-off-by: Christophe Ricard
24 Jan, 2016
1 commit
-
We use driver model for this now, so we don't need this string.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
21 Jan, 2016
5 commits
-
Now that driver model support is available, convert sandbox over to use it.
We can remove a few of the special hooks that sandbox currently has.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin -
Add the missing code to allow bzip2 compression to be used. This is useful
for sandbox tests. These files are taken from the bzip2 1.0.6 release.
The license text is copied to the top of each file as is done with other
bzip2 files in U-Boot. The only other change is to squash a compiler warning
with nBytes.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
At present this does not print zero values in numeric format (hex and
decimal). Add a special case for this.Signed-off-by: Simon Glass
Reviewed-by: Stefan Roese
Reviewed-by: Tom Rini -
Add a check for NULL strings to avoid printing junk to the console.
Signed-off-by: Simon Glass
Reviewed-by: Stefan Roese -
Adding timer init function in timer-uclass driver to create and
initialize the timer device on platforms where u-boot,dm-pre-reloc
is not used. Since there will be multiple timer devices in the
system, adding a tick-timer node in chosen node to know which
timer device to be used as tick timer in u-boot.Signed-off-by: Mugunthan V N
19 Jan, 2016
3 commits
-
In a number of places we had wordings of the GPL (or LGPL in a few
cases) license text that were split in such a way that it wasn't caught
previously. Convert all of these to the correct SPDX-License-Identifier
tag.Signed-off-by: Tom Rini
-
Only when we have CONFIG_CMD_UNZIP enabled do we have the 'gzwrite'
command. While this command should be separated from CONFIG_CMD_UNZIP
we should also only include the write portion of the gz code in that
case as well.Signed-off-by: Tom Rini
-
Enabling this function always removes some class of string saftey issues.
The size change here in general is about 400 bytes and this seems a reasonable
trade-off.Cc: Peng Fan
Cc: Peter Robinson
Cc: Fabio Estevam
Cc: Adrian Alonso
Cc: Stefano Babic
Cc: Hans de Goede
Signed-off-by: Tom Rini
15 Jan, 2016
1 commit
14 Jan, 2016
1 commit
-
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.Signed-off-by: Stephen Warren
Reviewed-by: Tom Rini
13 Jan, 2016
2 commits
-
Use "intel,ivybridge-fsp" for Intel IvyBridge FSP compatible string.
Signed-off-by: Bin Meng
Acked-by: Simon Glass
Tested-by: Simon Glass -
Use the driver model version of the function to find the BAR. This updates
the fdtdec function, of which ns16550 is the only user.The fdtdec_get_pci_bdf() function is dropped for several reasons:
- with driver model we should use 'struct udevice *' rather than passing the
device tree offset explicitly
- there are no other users in the tree
- the function parses for information which is already available in the PCI
device structure (specifically struct pci_child_platdata which is available
at dev_get_parent_platdata(dev)Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Bin Meng
20 Dec, 2015
1 commit
-
The USB gadget framework does not support DM yet, so add this bit
to let DWC2 UDC probe from OF on platforms which support it.Signed-off-by: Marek Vasut
Cc: Simon Glass
Cc: Chin Liang See
Cc: Dinh Nguyen
Cc: Lukasz Majewski
Cc: Lukasz Majewski
14 Dec, 2015
3 commits
-
To allow the various string to number conversion functions to be used
when using tiny-printf,split them out into their own file which gets
build regardless of what printf implementation is used.Signed-off-by: Sjoerd Simons
-
To allow panic and panic_str to still be used when using tiny-printf,
split them out into their own file which gets build regardless of what
printf implementation is used.Signed-off-by: Sjoerd Simons
-
Implement both printf and vprintf for a bit more flexibility, e.g.
allows the panic() function to work with tiny-printf.Signed-off-by: Sjoerd Simons
01 Dec, 2015
2 commits
-
Adjust the Tegra PCI driver to support driver model and move all boards over
at the same time. This can make use of some generic driver model code, such
as the range-decoding logic.Signed-off-by: Simon Glass
Tested-by: Stephen Warren -
There are timers with a 64-bit counter value but current timer
uclass driver assumes a 32-bit one. Modify timer_get_count()
to ask timer driver to always return a 64-bit counter value,
and provide an inline helper function timer_conv_64() to handle
the 32-bit/64-bit conversion automatically.Signed-off-by: Bin Meng
Acked-by: Simon Glass
Signed-off-by: Simon Glass
23 Nov, 2015
2 commits
-
With this patch now, the tiny printf() function also supports numbers
bigger than 0xffff. Additionally the code is simplified a bit and
some static variables are moved to function parameters. Also the
upper case hex variable output support is removed, as its not really
needed in this simple printf version. And removing it reduces the
complexity and the code size again a bit.Here the new numbers, again on the db-mv784mp-gp (Armada XP):
Without this patch:
56542 18536 1956 77034 12cea ./spl/u-boot-splWith this patch:
56446 18536 1936 76918 12c76 ./spl/u-boot-splSigned-off-by: Stefan Roese
Cc: Simon Glass
Cc: Hans de Goede
Cc: Tom Rini
Cc: Albert Aribaud -
This patch adds a small printf() version that supports all basic formats.
Its intented to be used in U-Boot SPL versions on platforms with very
limited internal RAM sizes.To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
will result in the SPL using this tiny function and the main U-Boot
still using the full-blown printf() function.This code was copied from:
http://www.sparetimelabs.com/printfrevisited
With mostly only coding style related changes so that its checkpatch
clean.The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
(Marvell AXP) SPL:Without this patch:
58963 18536 1928 79427 13643 ./spl/u-boot-splWith this patch:
56542 18536 1956 77034 12cea ./spl/u-boot-splNote:
To make it possible to compile tiny-printf.c instead of vsprintf.c when
CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
moved from common/console.c into vsprintf.c in this patch.Signed-off-by: Stefan Roese
Cc: Simon Glass
Cc: Hans de Goede
Cc: Tom Rini
Cc: Albert Aribaud
20 Nov, 2015
4 commits
-
This will be used to support console recording. It provides for a circular
buffer which can be written at the head and read from the tail. It supports
avoiding data copying by providing raw access to the data.Signed-off-by: Simon Glass
-
Since common.h will always include this automatically, it is not needed.
Signed-off-by: Simon Glass
-
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.Signed-off-by: Simon Glass
-
Adjust the tegra keyboard driver to support driver model, using the new
uclass. Make this the default for all Tegra boards so that those that use
a keyboard will build correctly with this driver.Signed-off-by: Simon Glass
19 Nov, 2015
1 commit
-
gcc 4.4.3 (which is the default native compiler on x86-64 Ubuntu 10.04)
doesn't seem to like initializers for sub-fields of anonymous unions.
Solve this by replacing the initialization with an assignment. This
fixes:lib/lz4_wrapper.c: In function ‘ulz4fn’:
lib/lz4_wrapper.c:97: error: unknown field ‘raw’ specified in initializerSigned-off-by: Stephen Warren
Reviewed-by: Tom Rini
Acked-by: Simon Glass
13 Nov, 2015
3 commits
-
short strings can be used in type parameter of gpt command
to replace the guid string for the types known by u-bootpartitions = name=boot,size=0x6bc00,type=data; \
name=root,size=0x7538ba00,type=linux;
gpt write mmc 0 $partitionsand they are also used to display the type of partition
in "part list" commandPartition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000022 0x0000037f "boot"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
type: data
guid: d117f98e-6f2c-d04b-a5b2-331a19f91cb2
2 0x00000380 0x003a9fdc "root"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: 25718777-d0ad-7443-9e60-02cb591c9737Signed-off-by: Patrick Delaunay
-
This needs a separate compatible value from Tegra124 since the new HW
version has bugs that would prevent a driver for previous HW versions
from operating at all.Signed-off-by: Stephen Warren
Signed-off-by: Tom Warren
10 Nov, 2015
1 commit
-
After consulting with some of the SPDX team, the conclusion is that
Makefiles are worth adding SPDX-License-Identifier tags too, and most of
ours have one. This adds tags to ones that lack them and converts a few
that had full (or in one case, very partial) license blobs into the
equivalent tag.Cc: Kate Stewart
Signed-off-by: Tom Rini
05 Nov, 2015
1 commit