Commit Graph

46495 Commits

Author SHA1 Message Date
Bin Meng 010034028f UPSTREAM: blk: Remove various places that do flush cache after read
All these places seem to inherit the codes from the MMC driver where
a FIXME was put in the comment. However the correct operation after
read should be cache invalidate, not flush.

The underlying drivers should be responsible for the cache operation.
Remove these codes completely.

Change-Id: I8f04c721432753b34e85b19616a0b42d83a633eb
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: York Sun <york.sun@nxp.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 723b43daec7ee2ddb600cfcb9b0253d4a71c3915)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 6d7abe7419 UPSTREAM: test: overlay: Add unit test for stacked overlay
Verify that stacked overlays work.

Change-Id: Id5c578db630bb34e952ca5176bb5ca9815bb0c0f
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ea28e488f743520f7f83b341f28818c32dae1ee3)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou ea99241c37 UPSTREAM: ut: fix fdt_getprop_u32() change
fdt_getprop_u32 is not exported and it's different than what the
unit test uses. Rename u32 prop access methods to something that's
unit test specific.

Change-Id: I0256118c7ae7b6709c4ef0791c53093e3117f23e
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 706708d3b2e7ade443836e7a14802a5a63b59713)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 0608812d5b UPSTREAM: config: sandbox: Add unit tests
Add unit tests for sandbox default config.

Change-Id: Icf7b645fd561eca1f702a42f2b0b72dd1bb38722
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 1e9c4393fd0bc70b53d8159591043732acfb2bf3)
2018-01-16 18:16:48 +08:00
Franklin S Cooper Jr 6a53d8fa9f UPSTREAM: doc: overlays: Tweak documentation regarding overlays
Pull some information regarding overlays from commit messages and
put them directly within the documentation. Also add some information
regarding required dtc version to properly use overlays.

Change-Id: Idccfd1db39dd27a19415f05738e65ca43413cb25
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 56fc7032e1771882a086e8283586fc7c733ba6bd)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou b8631b11ec UPSTREAM: dtbo: make dtbos special
Special rule for dtbo generation

Change-Id: Iac5a5054f43bd732b4278c14ed2fbf3044bf2c28
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit da0b3a946f1a5135297b92e5a18ff97ab10145d6)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 994d9d06da UPSTREAM: doc: Document how to apply fdt overlays
We have the capability to apply overlays on the command line but
we didn't have a document explaining how.

Change-Id: Idec1c3eac1ef3b52f4329d2ce9bffdd8b9aac32b
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Reviewed-by: Łukasz Majewski
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d80162cfc559491dee3009b120e7268e9388302f)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou a116ed4929 UPSTREAM: fit: fdt overlays doc
Change-Id: I69e26ac5683578d8a3333e33e94b65556af479bb
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Reviewed-by: Łukasz Majewski
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6b54e50b5a5889efe179cb06aa6aa25583ef25d5)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 988a4042e6 UPSTREAM: fit: Introduce methods for applying overlays on fit-load
Introduce an overlay based method for constructing a base DT blob
to pass to the kernel.

It is based on a specific method now to get the FDT from a FIT image
named boot_get_fdt_fit().

Change-Id: I98e0526edd594e63b1c29bdd916e4c66774f4337
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 169043d826e6b0db3c67a60acbedfc72c43aae5d)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 06686a7b4c UPSTREAM: fit: Do not throw away extra configuration on fit_image_load()
fit_image_load() threw away the extra configuration parts when
loading. We need them around for applying extra overlays for
building the boot fdt.

Change-Id: Icad7d35f5efb4ebb16a2dba969a9228674d7fb39
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 7c3dc776b91a683b2f7dd40ed91361124a3a91c0)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 75488a387b UPSTREAM: fit: Allow multiple images per property
As part of the fdt overlay support which need it, allow
a list of configurations per property.

Change-Id: I3068dcdd2bd823fd2ee5cfa0d337c4589e2a9588
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ad026adbcf0d719e736eb58a9059cbbebb2d2423)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou d80212386f UPSTREAM: fdt: Allow stacked overlays phandle references
This patch enables an overlay to refer to a previous overlay's
labels by performing a merge of symbol information at application
time.

In a nutshell it allows an overlay to refer to a symbol that a previous
overlay has defined. It requires both the base and all the overlays
to be compiled with the -@ command line switch so that symbol
information is included.

base.dts
--------

	/dts-v1/;
	/ {
		foo: foonode {
			foo-property;
		};
	};

	$ dtc -@ -I dts -O dtb -o base.dtb base.dts

bar.dts
-------

	/dts-v1/;
	/plugin/;
	/ {
		fragment@1 {
			target = <&foo>;
			__overlay__ {
				overlay-1-property;
				bar: barnode {
					bar-property;
				};
			};
		};
	};

	$ dtc -@ -I dts -O dtb -o bar.dtb bar.dts

baz.dts
-------

	/dts-v1/;
	/plugin/;
	/ {
		fragment@1 {
			target = <&bar>;
			__overlay__ {
				overlay-2-property;
				baz: baznode {
					baz-property;
				};
			};
		};
	};

	$ dtc -@ -I dts -O dtb -o baz.dtb baz.dts

Applying the overlays:

	$ fdtoverlay -i base.dtb -o target.dtb bar.dtb baz.dtb

Dumping:

	$ fdtdump target.dtb
	/ {
            foonode {
                overlay-1-property;
                foo-property;
                linux,phandle = <0x00000001>;
                phandle = <0x00000001>;
                barnode {
                    overlay-2-property;
                    phandle = <0x00000002>;
                    linux,phandle = <0x00000002>;
                    bar-property;
                    baznode {
                        phandle = <0x00000003>;
                        linux,phandle = <0x00000003>;
                        baz-property;
                    };
                };
            };
            __symbols__ {
                baz = "/foonode/barnode/baznode";
                bar = "/foonode/barnode";
                foo = "/foonode";
            };
	};

Change-Id: If72870ec3e9260ccd4fbcbaff27ba035d001bd00
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit f00c36a01e774dea1ed2a1171da9e372610ee8eb)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 7c95a4956f UPSTREAM: fdt: Switch to using the verbose overlay application method
The verbose overlay application method prints out more helpful
messages, so switch to it.

Change-Id: Ie8bd31e939e3c12fe547028d0fa3ddc8b254d33d
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 81ecc5d92badfcf1415a6052b5896a62271a94dc)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 0939009dd9 UPSTREAM: fdt: Introduce helper method fdt_overlay_apply_verbose()
Introduce fdt_overlay_apply_verbose, a method that applies an
overlay but in the case of an error produces a helpful message.

In addition if a base tree is found to be missing the __symbols__
node the message will point out that the probable reason is that
the base tree was miscompiled without the -@ option.

Change-Id: I22cc210c6a7bb0aaa9655197c859f54677532099
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fc7c31891c40dd1aac2e71e9d1546727ca2b3556)
2018-01-16 18:14:14 +08:00
Tien Fong Chee 174235d4a2 UPSTREAM: libfdt: Initialize the stack variable
Report Coverity log:
The code uses a variable that has not
been initialized, leading to unpredictable
or unintended results.

Change-Id: I488a9d183590a2dc1ef049351d0c71a4eded2299
Reported-by: Coverity (CID: 60519)
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 18c991ca2bd72c30b7fb578cee8b5c7c835d383d)
2018-01-16 18:14:14 +08:00
Heinrich Schuchardt 7551eb4f05 UPSTREAM: checkpatch: update from Linux v4.13-rc6
Checkpatch produces the following warning:

Unescaped left brace in regex is deprecated here
(and will be fatal in Perl 5.30), passed through in regex;
marked by <-- HERE in m/^(\+.*(?:do|\))){ <-- HERE /
at scripts/checkpatch.pl line 3348.

The curent checkpatch of the Linux kernel corrects this
bug and many others.

It provides improved colored output.

So replace checkpatch by the current Linux version.

Add an empty file scripts/const_structs.checkpatch.
We can later fill it according to our needs.

Change-Id: I307d182d41de6288798e002b9d8990e23d027e63
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6305db960447ff2d32c335de8bbd9b44cb7d6554)
2018-01-16 18:14:09 +08:00
Rob Clark 48d1b0a57c UPSTREAM: lib: strto: fix incorrect handling of specified base
The strto functions should honor the specified base (if non-zero) rather
than permitting a hex or octal string when the user wanted (for example)
base 10.

This has been fixed somewhere along the way in the upstream linux kernel
src tree, at some point after these was copied in to u-boot.  And also
in a way that duplicates less code.  So port _parse_integer_fixup_radix()
to u-boot.

Change-Id: I4e2383c6d8ac4666e7e4e40b15f7577522bc9700
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 2e794614838292499910060509d3c4a7aaed986a)
2018-01-16 18:14:09 +08:00
Alison Chaiken 135b53be98 UPSTREAM: add pytests for 'gpt rename' and 'gpt swap'
Add unit tests for the 'gpt rename' and 'gpt swap' commands that
rely on the block device created by test/py/make_test_disk.py.
Add CONFIG_CMD_GPT_RENAME to the sandbox_defconfig.  Remove the
testdisk.raw test device at the end of the tests.

Change-Id: I1c5b963a1f84168d4979ad1591f68a5f2a259935
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c5772188ede914b0e67c2a58ae179039a582afe0)
2018-01-16 18:14:09 +08:00
Alison Chaiken e2c5d1e4e7 UPSTREAM: add pytests for 'gpt guid' command in sandbox
Run unit tests for the 'gpt guid' command, making use of the block
device created by test/py/make_test_disk.py.  Remove this device at
the end of the tests.

Change-Id: I315989b993388fdce6f0b263376463a3532d154b
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit a2f422555fc80144aea418c0d8e95341acfe6868)
2018-01-16 18:14:09 +08:00
Alison Chaiken 4d11a85763 UPSTREAM: GPT: create block device for sandbox testing
Provide a Python function that creates a small block device for the
purpose of testing the cmd/gpt.c or cmd/part.c functions in the u-boot
sandbox.

Change-Id: I620c2f97c7b6533d8cb607e365e719246cdb7acd
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bf6d76b84ae13b463c0dca556118047e2d046f33)
2018-01-16 18:14:09 +08:00
Wenyou Yang 451f416416 UPSTREAM: clk: Kconfig: Add dependences of SPL_CLK
The SPL_CLK config should depend on SPL && SPL_DM.

Change-Id: I86d4b934bebde3d4661143902b71e198608ff688
Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0712b672d2a1f9a156c489b4dd7ce8354c2b3e1f)
2018-01-16 18:14:09 +08:00
Simon Glass d3aac30ed7 UPSTREAM: patman: Fix error when the email blacklist is missing
This section of the settings file may be missing. Handle that gracefully
rather than emitting an error.

Also update patman to write this section when a new settings file is
created.

Fixes: e11aa602 (patman: add support for omitting bouncing addresses)

Change-Id: I52174b84a9a28e3431fd039185f6e4d521bc037b
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chris Packham <judge.pckham@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ad8931400b193f701a415e7f69f1ad454d1b0380)
2018-01-16 18:14:09 +08:00
Anatolij Gustschin 7a001d4f72 UPSTREAM: spl: add newline in debug output
With debug enabled, SPL output following these debug prints is on the
same line and it is hard to read. Fix it.

Change-Id: I6b0983a285f1deb38cac7e0292c9c286ca6e901b
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 2d2531be861cb7ec25aa7980b1099ca4f5f46d86)
2018-01-16 18:14:05 +08:00
Masahiro Yamada 59814c3b3d UPSTREAM: linux/io.h: import generic ioread* / iowrite* accessors from Linux
Some drivers in Linux (ex. drivers/mtd/nand/denali.c) use
ioread*/iowrite* accessors.  Import them to make drivers more
synced.  I copied code from include/asm-generic/io.h of Linux.

Change-Id: Ifb36301885bb1df36f653f0b9a639b4fc1af6406
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6c06f8dc4ab02890ef93b50dac129c2b43cc9ea3)
2018-01-16 18:14:05 +08:00
Andrew F. Davis ee0f94feab image: Add TI PMMC image type
Add a new image type representing TI Power Management
Micro-Controller (PMMC) Firmware image type.

Change-Id: I28a8132dfd5549ffde3d81e6da7399c3768ac1e7
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6442c9643e82966ae8fff391bab3fcc763662564)
2018-01-16 18:14:05 +08:00
Rob Clark 2272054111 UPSTREAM: examples: add fallback memcpy
Solves build issue:

  Building current source for 134 boards (12 threads, 1 job per thread)
         arm:  +   lsxhl
  +examples/api/vsprintf.o: In function `string16':
  +lib/vsprintf.c:278: undefined reference to `memcpy'
  +examples/api/uuid.o: In function `uuid_bin_to_str':
  +lib/uuid.c:197: undefined reference to `memcpy'
  +lib/uuid.c:199: undefined reference to `memcpy'
  +make[3]: *** [examples/api/demo] Error 1
  +make[2]: *** [examples/api] Error 2
  +make[1]: *** [examples] Error 2
  +make: *** [sub-make] Error 2
    133    0    1 /134    sheevaplug

Change-Id: I467ecc2957a5b74eaf3e368394441817f228a469
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 7e3e20560784b048ff19e90cd36b6680626b1ab3)
2018-01-16 18:13:59 +08:00
Rob Clark aa5728ff9b UPSTREAM: vsprintf.c: add GUID printing
This works (roughly) the same way as linux's, but we currently always
print lower-case (ie. we just keep %pUB and %pUL for compat with linux),
mostly just because that is what uuid_bin_to_str() supports.

  %pUb:   01020304-0506-0708-090a-0b0c0d0e0f10
  %pUl:   04030201-0605-0807-090a-0b0c0d0e0f10

It will be used by a later efi_loader paths for efi variables and for
device-path-to-text protocol, and also quite useful for debug prints
of protocol GUIDs.

Change-Id: I6b0920ae6fe99ac0638c9c3c8eed6ea3f964d2b5
Signed-off-by: Rob Clark <robdclark@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 22ada0c8e6d50281af72176eecdfc356c794639c)
2018-01-16 18:13:59 +08:00
Rob Clark 5ec685037a UPSTREAM: vsprintf.c: add UTF-16 string (%ls) support
This is convenient for efi_loader which deals a lot with UTF-16.  Only
enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when
CC_SHORT_WCHAR is not enabled.

Change-Id: I3c6cd45db5f29157760f99bc5956b482ff96fc6c
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 274325c50951dd16ad2a6f45e79dc062ad47011b)
2018-01-16 18:13:59 +08:00
Rob Clark 407d40f45f UPSTREAM: lib: add some utf16 handling helpers
We'll eventually want these in a few places in efi_loader, and also
vsprintf.

Change-Id: I6c04463ad364e46730fcc84b86d38400f433e8de
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 78178bb0c9dfe2a91a636a411291d8bab50e8a7d)
2018-01-16 18:13:59 +08:00
Rob Clark bb890a575d UPSTREAM: kbuild: Enable -fshort-wchar
EFI_LOADER really wants UTF-16 strings (ie. %ls and L"string" are 16bit
chars instead of 32bit chars).  But rather than enabling -fshort-wchar
conditionally if EFI_LOADER is enabled, it was deemed preferrable to
globally switch.

Change-Id: I6cf927d1bce3a9120cd93ee72a9a578b87d8cfe0
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 4a85663ec7eddd955d22f1b0f34a9708eac82314)
2018-01-16 18:13:59 +08:00
Tom Rini 308d4396d1 UPSTREAM: Travis-CI: Update PATH
We now can no longer re-use the provided path and need to give the
full PATH we want used now.

Change-Id: I2a6929d7d2b49788650048cd7f48340f99fd95c1
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fa6365b7c7cf06f3de0aaf55d1c8cd1e5bb30151)
2018-01-16 18:13:59 +08:00
Patrick Delaunay e5f40fb7af UPSTREAM: dm: backlight: Add a driver for GPIO backlight
Add a driver for GPIO backlights.
It understands the standard device tree binding.
It can be used with simple-panel when PWM is not necessary.

Change-Id: Ia4160d1dfbe53b3f6211f3d321c33b8b5d0be6d0
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5b6a6a91c870949e21b7fd3865582ea6a32ea922)
2018-01-16 18:13:59 +08:00
Patrick Delaunay 55451cfe29 UPSTREAM: dm: backlight: Add CONFIG_BACKLIGHT_PWM
Add a config to select individually the driver for PWM backlights.
Manage "depends on" to be backyard compatible.

Change-Id: I2028a59567fdd1918adb53d7a2d1394f02fc7f75
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 08a43cfbc29224dadf1d725e26697c227bf9723a)
2018-01-16 18:13:59 +08:00
Patrice Chotard b048a4dbd0 UPSTREAM: dm: test: replace dm_scan_dt() by of dm_extended_scan_fdt() in dm_do_test
This allows to scan the DT including all "clocks" node's sub-nodes
in which fixed-clock are defined.
All fixed-clock should be defined inside a clocks node which collect all
external oscillators. Until now, all clocks sub-nodes can't be binded except
if the "simple-bus" compatible string is added which is a hack.

Update test.dts by moving clk_fixed node inside clocks.

Change-Id: I9c346d812b0ee270f9b6fc6b6f60af7c28ebb46e
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ee87a097b0f66158ce2985940a5f28ba15a3552d)
2018-01-16 18:13:59 +08:00
Patrice Chotard 46fb92f0e8 UPSTREAM: dm: core: add clocks node scan
Currently, all fixed-clock declared in "clocks" node in device tree
can be binded by clk_fixed_rate.c driver only if each of them have
the "simple-bus" compatible string.
This constraint has been invoked here [1].

This patch offers a solution to avoid adding "simple-bus" compatible
string to nodes that are not busses.

[1] https://patchwork.ozlabs.org/patch/558837/

Change-Id: Ia267df49d4f1b84115d5e600c0f0cd5e74105f53
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit e81c98649b7a67d43c5baae407430a242d3b26b9)
2018-01-16 18:13:59 +08:00
Chris Packham ad6e7aa6ce UPSTREAM: patman: add support for omitting bouncing addresses
Add support for reading a list of bouncing addresses from a in-tree file
(doc/bounces) and from the ~/.patman config file. These addresses are
stripped from the Cc list.

Change-Id: I0b4b4107a579b344034c750d63b838ef7960f96e
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com <mailto:philipp.tomsich@theobroma-systems.com>>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit e11aa602abd3e8007dfd3ed23ebb829101abcfec)
2018-01-16 18:13:59 +08:00
Simon Glass 48545cfb07 UPSTREAM: moveconfig: Use fd.write() instead of print >>
Adjust this code so that it can work with Python 2 and 3.

Fixes: d73fcb1 (moveconfig: Support building a simple config database)
Change-Id: Ifad4813594adfaf6504cc85f2ee99afb9d1c0fd2
Reported-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c79d18c4b40d10c0a95b56e51f4517aca4515364)
2018-01-16 18:13:59 +08:00
Simon Glass 17c82fdc12 UPSTREAM: dm: core: Add ofnode_for_each_subnode()
Add a convenience macro to iterate over subnodes of a node. Make use of
this where appropriate in the code.

Change-Id: Iae0fb554472d0b5819d26becbbcf8909ff891514
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 3991f42ed2e38aff28ba3c24369bfbd90620bea7)
2018-01-16 18:13:59 +08:00
Simon Glass 0c69cd527f UPSTREAM: genconfig.py: Print defconfig next to warnings
At present we sometimes see warnings of the form:

/tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL.
	Old value: "y", new value: "y".

This is not very useful as it does not show whch defconfig file it relates
to. Update the tool to show this.

Change-Id: Ib4e5c75fa4e7948744d293a8b4d8f07e4474a0ff
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 8639f69a61b47971dba47ab5ed72e47436729bb1)
2018-01-16 18:13:59 +08:00
Simon Glass ae9ecb9781 UPSTREAM: dm: core: Show driver name with 'dm tree'
It is often useful to see which driver was actually selected for each
device. Add a new 'Driver' column to provide this information. Sample
output:

 Class       Probed   Driver     Name
----------------------------------------
 root        [ + ]    root_drive root_driver
 keyboard    [ + ]    i8042_kbd  |-- keyboard
 serial      [ + ]    ns16550_se |-- serial
 rtc         [   ]    rtc_mc1468 |-- rtc
 timer       [ + ]    tsc_timer  |-- tsc-timer
 syscon      [ + ]    ich6_pinct |-- pch_pinctrl
 pci         [ + ]    pci_x86    |-- pci
 northbridge [ + ]    bd82x6x_no |   |-- northbridge@0,0
 video       [ + ]    bd82x6x_vi |   |-- gma@2,0
 vidconsole0 [ + ]    vidconsole |   |   `-- gma@2,0.vidconsole0
...

Change-Id: Ib6ed67d9de2d94f9aae4d4a180a71191a0836786
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ee3e520dad0b368df4541cd0af0d4011cf481e5b)
2018-01-16 18:13:59 +08:00
Simon Glass 58b0f0021c UPSTREAM: dm: core: Drop use of strlcpy()
We can use printf() to limit the string width. Adjust the code to do this
instead of using strlcpy() which is a bit clumbsy.

Change-Id: I69e67116ac1e955498ff886c7daa7461e1fa17ab
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit a0f9acb08bd6f3b4a6f3adcb02c8170e522c074a)
2018-01-16 18:13:53 +08:00
Masahiro Yamada 9ff3d0147e UPSTREAM: dma: import linux/dma-direction.h to consolidate enum dma_data_direction
Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete
duplicated definitions of enum dma_data_direction.

Change-Id: I9c6569e4ab91ac82fb1c99a38003a1ac48061813
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b27af39935855c88ef2203dcfc1ff54e013237c4)
2018-01-16 18:13:53 +08:00
Andy Yan 91603e0221 UPSTREAM: armv8: mmu: add space around operator
Add space around operator "+", make it
match the coding style.

Change-Id: I5cb1e3cea056db89d7ac0c16c233228d39bf6675
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 347e30e1720ea6c0231f81d278b076a39280a314)
2018-01-16 18:13:53 +08:00
Andy Yan 3d53e4e680 UPSTREAM: armv8: mmu: remove unused macro definition
Macro VA_BITS and PTE_BLOCK_BITS are not used
in the code, so remove them.

Change-Id: I5a6b900c8d1d145f28d1604c9b614226c20159d5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 4f84cb980fdc25d7735fe114021b4a84ea601b9f)
2018-01-16 18:13:53 +08:00
York Sun ebec805a62 UPSTREAM: spl: fit: Add booting OS first
If CONFIG_SPL_OS_BOOT is enabled, boot OS if kernel image is found
in FIT structure.

Change-Id: I6fcb0a0ac05e4d548b2bce93f9def04c12294998
Signed-off-by: York Sun <york.sun@nxp.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 c8bc3c0c9ff7ce649b2af1416919b50ecf504874)
2018-01-16 18:13:51 +08:00
York Sun 0ea10b9f85 UPSTREAM: spl: fit: Support both external and embedded data
SPL supports U-Boot image in FIT format which has data outside of
FIT structure. This adds support for embedded data for normal FIT
images.

Change-Id: Iad87ee9d443259a6af53f0473dc1b97db083df8d
Signed-off-by: York Sun <york.sun@nxp.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 5fd13d973613d308663f97b51059ecd9179baf09)
2018-01-16 18:13:51 +08:00
York Sun 40484c6d8c UPSTREAM: cmd: spl: Fix compiling warning
Fix warning "cast from pointer to integer of different size".

Change-Id: Ib6306c30cdbfc180c5cd452def44eb661cc4fc28
Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d1f2ee7021dc4a89f43e25f289747a27da0e930f)
2018-01-16 18:13:50 +08:00
York Sun b81c4739f4 UPSTREAM: spl: fit: Eanble GZIP support for image decompression
Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for
SPL boot, eg. falcon boot compressed kernel image.

Change-Id: I68f64aca8ecad26478f2ce25676253cee7e57d30
Signed-off-by: York Sun <york.sun@nxp.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 7264f2928b46c5f5685e39ed607652c8991e47b6)
2018-01-16 18:13:41 +08:00
Frank Wang eb7c724022 phy: rockchip-inno-usb2: add otg_phy_init api
The USB-PHY may have been in suspend mode before done "reboot loader"
action which will cause the USB device failed to be enumerated by PC
in u-boot context.

So reset USB-PHY and power on its PLL in otg_phy_init(), and invoked
by udc_enable() when the USB Gadget start to fix it.

Change-Id: Ie91fdabece937a6f277cfe80cd707ddcace6470d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-01-12 16:47:13 +08:00
Frank Wang a607e103bc phy: rockchip-inno-usb2: amend charge detect process
Suspend USB-PHY while doing charge detect and resume it after
finishing to ensure the USB-PHY in normal state.

In addition, disable idm_sink_en and vdp_src_en after primary
detection retry to fix the USB device failed to be enumerated
after do charge detect.

Change-Id: Id1effb049cc6491bcd876aa1cc0449469b11df06
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-01-12 16:47:13 +08:00