Given how we handle the ARM toolchain we can't easily combine these two
jobs, so don't. Give xilinx/ARM a separate build.
Change-Id: I438104c5eb54fe89dd72d55df6240bb0d4de8c0f
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0d3aaa35b87573c229d65bc79050ab13f39d8ec2)
The recent changes to these files did not completely fix the previous
issues, or introduced different (minor) issues. In cmd/gpt.c we need to
dereference str_disk_guid to be sure that malloc worked. In
cmd/nvedit.c we need to be careful that we can also fit in that leading
space when adding to the string. And in tools/fit_image.c we need to
re-work the error handling slightly in fit_import_data() so that we only
call munmap() once. We have two error paths here, one where we have an
fd to close and one where we do not. Adjust labels to match this.
Change-Id: I66fafd0ed8d1c290a7773bba5ece8d11bfc15b50
Reported-by: Coverity (CID: 167366, 167367, 167370)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bf52fcdef4aac242b5e6b6b9827acf6d69ce1951)
- Move SoCFPGA and K2 boards to their own job
- Expand the microblaze job to cover ARM boards from Xilinx as well.
Change-Id: I05a8fd8e4c7246f8e49b095fdc08facbfa205d8a
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit afbdfd829f457d5dcad5fb70d87941de9c37ceb7)
The i.MX6 job can still be close to the time limit, move a few more
devices out.
Change-Id: I2061d9e692ec733ad5ea0f56ff709397ffecb6a0
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 575e1607d3724bf4a35a69f982f7e7e0655473d6)
A few of the big jobs are getting close to the time limit again, split a
few more things out.
Change-Id: Ibdfaf4207a57e6400a1047665916e3556bf7ce50
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bc3eed965f45305254bd065a1714715daa9c3113)
As reported by Coverity, we did not free dirnode in the case of failure.
Do so now.
Change-Id: I6af93d24c33302d8911ff0021d1c1b067d2a2715
Reported-by: Coverity (CID: 131221)
Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fa9ca8a5d271e0533f61222df2bd6fd512687dbd)
Coverity has found some problems with the return paths in parts of this
code. We have a case where we were going to the wrong part of the
unwind (open() failed so we cannot close the fd), a case where we were
only free()ing our buf on the error path and finally a case where we did
not munmap in the failure path.
Change-Id: I31ee7b7099b7f2a4ec0c11c247029df5eb9d8552
Reported-by: Coverity (CID: 138492, 138495, 143064)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 3c2dff5490831f85f06aa78aad5ef537b661cecf)
We cannot leave this uninitialized, set it to 0.
Change-Id: Ic8f3dd4d7395921bf4269a618aaf92a717dbfe46
Reported-by: Coverity (CID: 144426)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 146dda391126d4f199c7692f2342efcc34b45ebd)
For the initrd portion of handling our bootm arguments we do not have a
sufficiently long enough buffer for some improbable 64bit cases. Expand
this buffer to allow for a 64bit address and almost 256MB initrd to be
used. Make use of strncpy/strncat when constructing the values here
since we know what the worst case valid values are, length wise.
Similarly for bootargs themselves, we need to make use of strlen/sizeof
and strncpy/strncat to ensure that we don't overflow bootargs itself.
Cc: Simon Glass <sjg@chromium.org>
Cc: Alexander Graf <agraf@suse.de>
Change-Id: I86151e4bde53972d9b6105f3a85db93b114e22d8
Reported-by: Coverity (CID: 131256)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 48ee0a87bc46a6f863ffd9e0396b7a068dd68c50)
When we have multiple messages provided, we need to be sure that we do
not exceed the length of our 'message' buffer. In the for loop, make
sure that pos is not larger than message. Only copy in at most however
much of the message buffer remains. Finally, if we have not reached the
end of the message buffer, put in a space and NULL, and if we have,
ensure the buffer is now NULL termined.
Change-Id: I0c4f88803f8525eb6ef0207a6b7fdbec2b43e9ff
Reported-by: Coverity (CID: 165116)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c667723ffb50b00585b729ee0da7b0e8c93ffa13)
Create a common exit for most of the error handling code in
do_rename_gpt_parts. Delete the list elements in disk_partitions
before calling INIT_LIST_HEAD from get_gpt_info() a second time.
The SIZEOF_MISMATCH error is not addressed, since that problem was
already fixed by "GPT: incomplete initialization in
allocate_disk_part".
Change-Id: I4ec9881a86c8a50960844e07f69c04a239bc218f
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reported-by: Coverity (CID: 167222, 167235, 167237)
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 18030d04d25d7c08d3deff85881772a520d84d49)
The current code doesn't compute the group descriptor checksum correctly
for the filesystems that e2fsprogs 1.43.4 creates (they have
'Group descriptor size: 64' as reported by tune2fs). Extend the checksum
calculation to be done as ext4_group_desc_csum() does in Linux.
This fixes these errors in dmesg from running fs-test.sh and makes it
succeed again:
[1671902.620699] EXT4-fs (loop1): ext4_check_descriptors: Checksum for group 0 failed (35782!=10965)
[1671902.620706] EXT4-fs (loop1): group descriptors corrupted!
Change-Id: I362747a60cc16886c1a215867471b0a83fcf5e47
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 385b73185596cfc9e2acb74ab66abe91c06177f3)
The regulator bindings state that regulator prefixes are allowd to be
in upper or lower case. However pmic_bind_children from pmic_uclass uses
strncmp to compare DT node name against prefix. This comparison is case
sensitive hence the regulator driver prefix case matters.
Change-Id: I991a56a1cae736c22012318612e7a4d1f8f25f31
Signed-off-by: Felix Brack <fb@ltec.ch>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bd2259e3c40c097c47e1dfc58a03b1df66b44840)
Note that this commit requires
https://github.com/swarren/uboot-test-hooks/pull/14 to go in first.
Change-Id: Ibe232788714cbe11384976c905ce7b012b375441
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 7b09dffc3b07ae08b0b1006ab799c2d1a0364504)
u-boot can be embedded within a FIT image with multiple DTBs. It then
selects at run-time which one is best suited for the platform.
Use the same principle here for the SPL: put the DTBs in a FIT image,
compress it (LZO, GZIP, or no compression) and append it at the end of the
SPL.
Change-Id: Ifebdd14bdf1abc923d228f9f3947e719c8645356
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
[trini: Move default y of SPL_MULTI_DTB_FIT_DYN_ALLOC to it being the
default choice if SYS_MALLOC_F, drop spl.h include from lib/fdtdec.c
it's unused.]
Signed-off-by Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 2f57c95100f231de0f4e0301237cbe477e09084b)
Sort include files in accordance to U-Boot coding style.
Change-Id: I3c7992edd31468f4105a95b86a6f05108e751e92
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 035d64025c3e32a2f372981f86fc69255feeb2b2)
If board_fit_config_name_match() doesn't match any configuration node,
then use the default one (if provided).
Change-Id: Ieb93f146a54cb6d75d8f6b395078c315a4fac134
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 02035d0086b3f9114463a9b9df38a5618ffe8a04)
If the dtb is the first data of the FIT, the its offset is 0x0. Change the
test to '<' instead of '<='
Change-Id: Ie6dd1734049f642511db0fc1b19f2af0bec8de04
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d56b86eec32a700cdc16170ad8365ee7c6522f0e)
Those 2 functions don't modify their input, we can mark it const.
This prevents compilation warnings when they are provided const input.
Change-Id: I9583751451cfc26a99ee94f87447dd6337d0cc67
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 906a9dbbcba85e8b02414c960c75103cc4755102)
CONFIG_FIT_EMBED might be confused with CONFIG_OF_EMBED, rename it
MULTI_DTB_FIT as it is able to get a DTB from a FIT image containing
multiple DTBs. Also move the option to the Kconfig dedicated to the DTS
options and create a README for this feature.
Change-Id: Ide55c474339db3ccd5e20499c54c8bb41fe3a2c9
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 11955590a284ecb75892aad5f1174ca1b94a709b)
These macros are useful to avoid link error on 32-bit systems.
Change-Id: Id451c874a2a89e3ebff352e4c90d2d4d0613b9bc
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 84570a0c111ac50372d51271eadc13ff5cbb1a54)
While this came in with a default value of 6 I am lowering this to 4.
The MTD/UBI code has a large number of error messages that we include
now. In addition, "normally" warning messages are not included so this
feels like a more natural level to have.
Change-Id: I20bc4b32caf1876d5f6052851580383f00a67dc9
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6a3e65dea3e525b5337ca8014aa4be9f5fafeb92)
As we discussed before in ML, dm_dbg() causes undefined reference
error if #define DEBUG is added to users, but not drivers/core/util.c
We do not need this macro because we can use pr_debug() instead, and
it is pretty easy to enable it for the DM core by using ccflags-y.
Change-Id: I0732d1fec827d434b1163093920a3c5bd682803e
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ceb9190969e458dcd1427566f762dbb9cfdfdc94)
Copied from Linux 4.13.
Commit log of 3e9b3112ec74 of Linux explains well why this header
is useful.
Change-Id: I6d565317c573e01eb5df2af5a24982db049e8e08
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6990e91f0971b877cd636e646f93587b1afbb284)
Many drivers had started to use dev_err, dev_info, etc. for log
functions. Currently, we are relying on <linux/compat.h>, but I
guess the best home is <dm/device.h>, taking into account that
Linux defines them in <linux/device.h>.
For now, I am leaving the ones in <linux/compat.h> because lots of
Linux-originated code uses dev_*(), but the first argument is not
struct udevice, so we need to ignore the bogus argument. More
efforts are needed to iron out the issues.
Change-Id: I18f67bd63ac22d8b69bdf8e0558600c58e8703d2
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c898cba41e94fa87c57d71911fb812cd34c7a91e)
Collect runtime BUG/WARN into a self-contained header <linux/bug.h>
to make these macros easier to use.
Change-Id: If924684bdab99d2c8fe0b4b3755d0ee5291d11be
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0a70fb4c1c180d6ad6cd4c1dcd3fae8c5d4dd62e)
As commit 84b8bf6d5d ("bug.h: move BUILD_BUG_* defines to
include/linux/bug.h") noted, include/linux/bug.h was locally
modified for U-Boot because the name conflict of error() caused
build errors at that time.
Now error() is gone, so we can fully sync BUILD_BUG* with Linux.
These macros are just compile-time utilities. Nothing depends on
platform code, so it should make sense to simply copy Linux's ones.
Please note Linux split BUILD_BUG stuff out into <linux/build_bug.h>
by commit bc6245e5efd7. Let's follow it.
Change-Id: Iea5d4f8a69203f9b7c6cd12bdda5eb5b3f691830
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 059a48096c883e98bc1a4a561abc0069f44cbfea)
This header uses ulong, size_t, loff_t.
Include <linux/types.h> to make this header self-contained.
Change-Id: I810a1ca02d6220826d7c457c7ae6e2d0ecece232
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit f7d6b896d641767e04409fc3abf05338b19d9109)
This macro prevents us from using compiletime_error/assert defined
in <linux/compiler.h>.
Now we can remove it, then we will be able to import more BUILD_BUG
macros from Linux.
Change-Id: Ib744c3a718ac71a7d49d14d84cd075695c2c43d8
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5a719f921871d852a83870b12158e00e8715647e)
U-Boot widely uses error() as a bit noisier variant of printf().
This macro causes name conflict with the following line in
include/linux/compiler-gcc.h:
# define __compiletime_error(message) __attribute__((error(message)))
This prevents us from using __compiletime_error(), and makes it
difficult to fully sync BUILD_BUG macros with Linux. (Notice
Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)
Let's convert error() into now treewide-available pr_err().
Done with the help of Coccinelle, excluing tools/ directory.
The semantic patch I used is as follows:
// <smpl>
@@@@
-error
+pr_err
(...)
// </smpl>
Change-Id: I921807c1770d36a91e692c48ab477558bb2ed0b8
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Re-run Coccinelle]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 9b643e312d528f291966c1f30b0d90bf3b1d43dc)
When we import code from Linux, with regular re-sync planned, we want
to use printk() and pr_*(). U-Boot does not support them in a clean
way. So, people end up with local macros, or compat headers here and
there, then we occasionally see build errors of definition conflicts.
We have include/linux/compat.h, but putting all sorts of unrelated
things into a single header is just a temporal workaround. Hence this
patch, to find the best home for all printk variants. If you want to
use printk() and friends, please include <linux/printk.h>. This header
is self-contained, and pulls in only a few headers.
When I was testing this clean-up, I noticed the image size exceeded
its platform limit on some boards. This is because all pr_*() that
were previously defined as no-op in include/linux/mtd/mtd.h (unless
CONFIG_MTD_DEBUG is set), are now enabled.
To make such boards happy, this commit also implements CONFIG_LOGLEVEL.
The concept is similar to the kernel parameter "loglevel". (Actually,
the Kconfig help message was taken from kernel-paremeter.txt of Linux)
Messages with a loglevel smaller than console loglevel will be printed.
The difference is the loglevel is build-time determined. To save the
image size, lower priority pr_*() are compiled out. I set the default
of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages
are compiled in.
I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.
Change-Id: I997d8bbeedd48777be87472df8ed126181fc4b8e
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b44b30260ffa3dc82f4bb98b022483bb09e95353)
<common.h> pulls in a lot of headers. Including it from every .c
file is a bad idea. We need to remove contents until it contains
nothing.
Move printf() and friends to <stdio.h>.
Change-Id: I7f64296fe6e08bf695e9e274ab0f21e72e36ec48
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 7fea7b1a37ad2b1c1e92bd87f7c6a1877d70e579)
CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when
none are provided.
Move that option to Kconfig.
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Change-Id: Ie4c840fb583d1e5c95170e452ccbb04034926119
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 47738acceda5bae52b7c33ce912da6b52244c033)
The setbits/clrbits/clrsetbits macros are used widely across the tree,
let's provide implementation for them in the sandbox.
Change-Id: Idb421bde7a225c38760da09f179b68a11116802b
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit a4dd8722fab257ff23cd63483b2926a4e197be96)
Convert the arm architecture to make use of the new asm-generic/io.h to
provide address mapping functions. As the generic implementations are
suitable for arm this is primarily a matter of removing code.
This has only been build-tested, feedback from architecture maintainers
is welcome.
Change-Id: I26ff51026961b89fc1dbd282c9b3d8c3cf9b4119
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 8f8e6304df54b36d5971a69ff3de0f6f9ad4bf4e)
Most architectures currently supported by U-Boot use trivial
implementations of map_to_physmem & virt_to_phys which simply cast a
physical address to a pointer for use a virtual address & vice-versa.
This results in a lot of duplicate implementations of these mapping
functions.
The set of functions provided by different architectures also differs,
with some having implementations of phys_to_virt & others not. A later
patch will make use of phys_to_virt in architecture-neutral code, and so
requires that it be provided for all architectures.
This patch introduces an asm-generic/io.h which provides generic
implementations of address mapping functions, allowing the duplication
of them between architectures to be removed. Once architectures are
converted to make use of this generic header it will also ensure that
all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are
provided. The 2 families of functions differ in that map_physmem may
create dynamic mappings whilst phys_to_virt may not & therefore is more
limited in scope but doesn't require information such as a length &
flags.
This patch doesn't convert any architectures to make use of this generic
header - later patches in the series will do so.
Change-Id: I29d206b92b9ebcdd10e6599539bfd195d247c5f8
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Macpaul Lin <macpaul@andestech.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Angelo Dureghello <angelo@sysam.it>
Tested-by: Angelo Dureghello <angelo@sysam.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d4150ca6dea5f81f527fb2a01fcffc3d8dd09fc4)
Add a header variadic-macro.h which defines the CALL_MACRO_FOR_EACH marco.
This macro can be used as follows:
#define TEST(x)
CALL_MACRO_FOR_EACH(TEST, a, b, c, d)
This will expand to
TEST(a) TEST(b) TEST(c) TEST(d)
The nice thing is that CALL_MACRO_FOR_EACH is a variadic macro, thus the
number of arguments can vary (although it has an upper limit - in this
implementation 32 arguments).
Change-Id: Ic186ed444a78a86a4cfa10f9ca1198c0bfa9af10
Signed-off-by: Marek Behun <marek.behun@nic.cz>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 59981e6a3d6074bf5413c1875a95325a4b8c01ca)
The ext4, reiserfs and zfs filesystems all have their own implementation
of the same function, *_devread. Generalize this function into fs_devread
and put the code into fs/fs_internal.c.
Change-Id: Ib558f0f40ba1520f4974ca5cbd31265573b156c9
Signed-off-by: Marek Behun <marek.behun@nic.cz>
[trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all
cases need it]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5994e8b6432d1c6df1cad44771f02054dba893ff)
This is needed for BTRFS.
Change-Id: I7415e99a6f06aef89f3520ebe9a9ba92a9189059
Signed-off-by: Marek Behun <marek.behun@nic.cz>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 85d8bf57131a21424b50e50884372e813345f09a)
Ignore these generated files during the build of dtc.
Change-Id: If9e9bf0ba501c18ee04436865a48bee41d9ed7cb
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit de163ecedb8a54dc72d5c6cadbfd1a85befce6ce)
The stored 'blk' value is overwritten to 'size / 512' before it can
be used in usb_stor_set_max_xfer_blk(). This is not what we want.
In fact, when 'size' exceeds the upper limit (USHRT_MAX * 512), we
should simply assign 'size' to the upper limit.
Change-Id: I078963e74b22450d0d876e846e44d93118cff96a
Reported-by: Coverity (CID: 167250)
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 72ac8f3fc29016a31ee309b4d025b487e78906ab)
Update the codes to conform with xHCI spec chapter 6.2.3.
Change-Id: I9227754f7f7faf27f90046178526fad4d45e699e
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fae35857e1c38776854442f59d6b56c17e93fc39)
Per xHCI spec, 'Error Count' should be set to 0 for isoch endpoints.
Change-Id: Ibf1924935d705faa8a34e0bc94a44e3a0d1c28e2
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ab2b727dc03113fe35d6a9c937911055be3d3990)
The 'Max Burst Size' indicates to the xHC the maximum number of
consecutive USB transactions that should be executed per scheduling
opportunity. This is a “zero-based” value, where 0 to 15 represents
burst sizes of 1 to 16, but at present this is always set to zero.
Let's program the required value according to real needs.
Change-Id: Id8dbdbfb248acd016b1e133b86334b9815b8ff2d
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fa483b2c750f6ebdb5946f46b217aa3f9a449531)
USB endpoint reports the period between consecutive requests to send
or receive data as bInverval in its endpoint descriptor. So far this
is ignored by xHCI driver and the 'Interval' field in xHC's endpoint
context is always programmed to zero which means 1ms for low speed
or full speed , or 125us for high speed or super speed. We should
honor the interval by getting it from endpoint descriptor.
Change-Id: Ib9180ea7b15d29fdc5a90315dcb0ffea672877a3
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit f51966bf7afe44151756e9a2432705bb56bc2007)
USB 3.0 hubs report bit[5] in the port status change response as BH
reset. The hub shall set the C_BH_PORT_RESET field for this port.
Change-Id: I54d72aba3b1901c505aec754f2183e4d8d2e82dd
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 061895fbe57d29f50bb3c6c8609d56a668d1387d)
During usb_hub_port_connect_change(), a port reset set feature
request is issued to the port, and later a port reset clear feature
is done to the same port before the function returns. However at
the end of usb_scan_port(), we attempt to clear port reset again
on a cached port status change variable, which should not be done.
Adjust the call to clear port reset to right before the call to
usb_hub_port_connect_change().
Change-Id: Ib3df40451289134cc7e60a37293a33fc9fd35547
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b90203526f2c5bcc05b4a65241ea226b7b9f52d0)