Commit Graph

46820 Commits

Author SHA1 Message Date
Jason Zhu 996b899fff rockchip: resc_img: fix err if initialize resource list
In the function init_resource_list, if hdr is not NULL
The content addr is the sum of hdr addr and
(hdr->c_offset) * RK_BLK_SIZE. Then return 0 directly
without free hdr and content.

If hdr is NULL and gpt table is enabled, the parameter
offset must be multiplied by RK_BLK_SIZE and be divided
by RK_BLK_SIZE in function blk_read.

Change-Id: Ib4120745af8aa4924464f85c8bb4b34daee98fa6
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-01-18 09:59:51 +08:00
Joseph Chen 5c9c1f991f common: boot_rkimg: fix compile warnings
Change-Id: Id7c49a187e789daa8af78c2f38982568f2f48e44
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-01-17 16:28:54 +08:00
Joseph Chen 526c692b8e env: add more debug message for env_update() and env_append()
Change-Id: I0d798d91f2bc132accac882ccfeec76d2f6a747e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-01-17 16:28:51 +08:00
Kever Yang b99d793163 rockchip: remove no use script
We have move these script to common folder.

Change-Id: Ieacd1d49fc481435602fec3de0747873df22c2b5
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:29 +08:00
Kever Yang 5c23cf980b rockchip: sheep-rk3368 remove ENV_SIZE
The ENV_SIZE have moved into Kconfig, remove it.

Change-Id: I3f9f0b8adaff7d9d566c5085b2738b0085feded5
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Kever Yang 7f732f5f7a rockchip: remove no use BITS_PER_LONG
Change-Id: I838bdab8fba05d784dce06cde11e492e225b23d7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Kever Yang 3fcec1ad9c rockchip: dts: rk3128: update pwm-cell for pwm0
The backlight pwm-cell is 3.

Change-Id: I6fc913189a996f257fbe70194985e7d691fb3bd3
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Kever Yang c85f17a61d Revert "rockchip: rk322x: speed up the emmc and the cpu."
This reverts commit 4a872f4aa8.
rk3229 evb and echo can not work with ddr52 enable.

Change-Id: Ia22b30ffe40de6f6e74e50ec5fd52e3715006de0
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Philipp Tomsich 4fd3025541 rockchip: remove duplicate CONFIG_ENV_SIZE definitions
A few header files still have a definition of CONFIG_ENV_SIZE, causing
warnings during buildman runs.  This removes the duplicate definitions
from evb_px5.h, geekbox.h and rv1108_common.h.

Change-Id: Icd605cebc96adaf3efcc59e6545cfb23633d29c0
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Kever Yang 27569069df rockchip: rk3328: sync defconfig after back port
Change-Id: Ia1909ac6d477c1401cf229ebe57ffe343d411eb7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:28 +08:00
Kever Yang 21d68a455c rockchip: rk3399: update with save defconfig
Change-Id: I070833a72b6b80ab903b8ee4f38093cb1dece3b6
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:27 +08:00
Philipp Tomsich 74a0d3c69f rockchip: firefly-rk3399: enable SPL_ATF_NO_PLATFORM_PARAM
The Rockchip-released ATF for the Firefly apparently (i.e. Kever
reported this) does not tolerate a FDT being passed as the platform
parameter and will run into a hard stop.

To work around this limitation in the ATF parameter handling, we
enable SPL_ATF_NO_PLATFORM_PARAM (which will force passing NULL for
the platform parameters).

Note that this only affects this platform, as the ATF releases for the
RK3368 and RK3399 have always either ignored the platform parameter
(i.e. before the FDT-based parameters were supported) or support
receiving a pointer to a FDT.

Change-Id: I77c94b7cd073914c07419e0bad1fb199a53a0637
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:27 +08:00
Kever Yang 147f2cfcc5 rockchip: rk322x: update defconfig after back port
update text base, update its file

Change-Id: I58c8b2b1b6743dd1a50e6387be8a1238c97a9a42
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:27 +08:00
Kever Yang 6d8fffad99 rockchip: rk3229: enable stimer in tpl
Change-Id: Iaa4fd73d0ea43d1ff5149749b9a72876913072f4
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:27 +08:00
Kever Yang 77159a9a96 rockchip: inno-phy-usb2: update error to pr_err
Change-Id: I31e321085c9435d11b1f5ba8295300036f1b550b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:27 +08:00
Kever Yang 099855e292 spl: add support to booting with OP-TEE
OP-TEE is an open source trusted OS, in armv7, its loading and
running are like this:
loading:
- SPL load both OP-TEE and U-Boot
running:
- SPL run into OP-TEE in secure mode;
- OP-TEE run into U-Boot in non-secure mode;

More detail:
https://github.com/OP-TEE/optee_os
and search for 'boot arguments' for detail entry parameter in:
core/arch/arm/kernel/generic_entry_a32.S

Change-Id: I1344a35dd11bd69ca00e9b99909e1eb610648d86
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 32470d8ebee6a9c31a7a6b82704c486ef06cf549)
2018-01-17 15:28:11 +08:00
Kever Yang 820a0a1278 UPSTREAM: image: add os type for OP-TEE
OP-TEE is an open source trust OS maintained here:
https://github.com/OP-TEE/optee_os

Series-changes: 2
- Add new image type like ATF

Change-Id: Idaae12027be1f8a3252d2f9ad2ee689b6dfcb3ad
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 8f7658998ba3ba4338344cee1d235bf090a1dd94)
2018-01-17 15:28:11 +08:00
Philipp Tomsich 4bba5ee7dc spl: atf: add SPL_ATF_NO_PLATFORM_PARAM option
While we expect to call a pointer to a valid FDT (or NULL) as the
platform parameter to an ATF, some ATF versions are not U-Boot aware
and have an insufficiently robust (or an overzealour) parameter
validation: either way, this may cause a hard-stop with uncooperative
ATF versions.

This change adds the option to suppress passing a platform parameter
and will always pass NULL.

Debug output from ATF w/ this option disabled (i.e. default):
      INFO:    plat_param_from_bl2: 0x291450
Debug output from ATF w/ this option enabled:
      INFO:    plat_param_from_bl2: 0

Change-Id: Ic13bf77aa509407563d10ad3ce790087f2d1dc07
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d21fb63d772d32373600abeb7afcb53033e087a7)
2018-01-17 15:27:28 +08:00
Philipp Tomsich feba3cdb1a UPSTREAM: rockchip: board: lion-rk3368: reduce env-size default to 8KiB
We want to have the same configuration defaults for the RK3368-uQ7
as for the RK3399-Q7: this change reduces the default env-size to
8KiB to ensure that it does not overlap the boot-payload on SD/MMC
configurations.

References: commit fe529e6597c0 ("rockchip: rk3399-puma: reduce env size to 8kiB")
Change-Id: Ia3fcfb0fed8422017cca7cb8c9d1e12025598c8c
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 224d261a16435389cc349b0e1640d489f117189d)
2018-01-17 15:27:28 +08:00
Heinrich Schuchardt 843aa190cb UPSTREAM: dm: core: remove orphaned parameter description in platdata.h
struct driver_info has no field 'flags'.

Change-Id: Icedd7ae9bbb6fb62ce6a0d754d740c95f0eb0070
Signed-off-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 5da3b3d10497fdd7a5655d3872286610fe8489ed)
2018-01-17 15:27:28 +08:00
Jakob Unterwurzacher 2b00ccbd41 UPSTREAM: rockchip: rk3399-puma: reduce env size to 8kiB
This commit changes the size of the enviroment (for the RK3399-Q7) to
8kiB for all possible locations of the environment (i.e. even when the
environment is saved to SD card).

With the default of 32kiB, the environment overwrites the SPL
stage which lives at 16kiB.

Change-Id: Iafe513fc093669b51d108641c435c406a654c62b
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Reworked commit-message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fe529e6597c00a98893e5d0ab00251cb50d457a7)
2018-01-17 15:27:28 +08:00
Peng Fan 92671781a6 UPSTREAM: power: pmic.h: include dm/ofnode.h
Include dm/ofnode.h.

Change-Id: I44d76be779c10e354d012e46c591425bf0cb9a60
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d56f6ca288c588b6a17edf7a4952e1bc3b56220c)
2018-01-17 15:27:28 +08:00
Masahiro Yamada 0e13c182e0 Move CONFIG_PANIC_HANG to Kconfig
Freescale (NXP) boards have lots of defconfig files per board.
I used "imply PANIC_HANG" for them.

Change-Id: I56347810ee33ccd8bb3553b0ee95b858e827ce9b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 7e3caa81e0e9cc5e2beed4a3a1c334e2119f4498)
2018-01-17 15:27:28 +08:00
Prabhakar Kushwaha ce17630593 UPSTREAM: arm: Add support of updating dts before fix-up
"ethernet" node fix-up for device tree happens before Linux boot.

There can be requirement of updating "ethernet" node even before
fix-up. So, add support of updating "ethernet" node.

Change-Id: I5fcde8776f7f0f5c7323b1340c69d346c9c01833
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6bedf44714a145e09fddb8c5a03ada210b812ec9)
2018-01-17 15:27:28 +08:00
Prabhakar Kushwaha 1ae99f2494 UPSTREAM: common: Fix-up MAC addr in dts by fetching env variable serially
The MAC addresses get fixed in the device tree for "ethernet" nodes
is by using trailing number behind "ethernet" found in "/aliases".
It may not be necessary for the "ethernet" nodes to be sequential.
There can be gaps in between or any node disabled

So provide a support to fetch MAC addr sequentially from env
and apply them to "ethernet" nodes in the order they appear in
device tree only if "ethernet" is not "disabled"

Change-Id: I1bd6544a2bfe5cd5d6708e249c1e07d44d6944d2
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 24acb83d8f04e9a49f161c07d38da50c70e9f16d)
2018-01-17 15:27:28 +08:00
Kever Yang bff05d39ad rockchip: firefly-rk3399: update fit source
use pythone script

Change-Id: Ia09eef20b24bf936d02a7bdf0835023d1943009e
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:27:28 +08:00
Kever Yang b287022126 UPSTREAM: rockchip: update ROCKCHIP_SPL_RESERVE_IRAM to 0
Only rk3399 atf need ROCKCHIP_SPL_RESERVE_IRAM. This commit updates
its default setting to 0 so that other SoCs do not need to define it.

Change-Id: I40e453451d5376ce15aede0859a7e5b336220094
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 8a8106f06639314f750c9f8dc2b72df3925f7fbf)
2018-01-17 15:27:28 +08:00
Kever Yang 9d33a67d51 UPSTREAM: rockchip: update boot0 hook
Rockchip SoCs only need boot0 hook at SPL, and the U-Boot proper do not
need it.

The very beginning of U-Boot proper is different between armv7 and armv8:
armv7 start with ARM_VECTORS while armv8 start with 'b reset'.

Here is the map of very beginning for all cases:
armv7 SPL: TAG(overwrite 'b 1f')+'b reset' + ARM_VECTORS
armv7 U-Boot: ARM_VECTORS
armv8 SPL: TAG(overwrite 'b 1f')+'b reset' + Reserved_iram(rk3399)
armv8 U-Boot: 'b reset'

Change-Id: I433ccd2e09f32fa3f1892953d67650a99dac39bc
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 270288544e12c7c98e4bc9a5b121517ba0a959d2)
2018-01-17 15:27:28 +08:00
Kever Yang 82c369d0de Revert "rockchip: update boot0 hook"
This reverts commit 7a4d1b5406.

Change-Id: I6f2f5ac92b83129a816a409f669c4ceb2c36b64b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:27:28 +08:00
Stephen Warren 8820f8d05b UPSTREAM: test/py: Setup variables based on HUSH selection
After adding our small zynq uboot which has hush parser off same
variable tests start to failed. Use quotes only when hush is enabled.

Change-Id: I9aee385346129dee480aa04aa68f420aa172aaa7
Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 3e229a83bd4190f99731992d3a56983f29313899)
2018-01-17 15:27:28 +08:00
Klaus Goger 49a2ef1590 UPSTREAM: rockchip: move CONFIG_ENV_SIZE and CONFIG_ENV_OFFSET to Kconfig
This commit adds ENV_SIZE and ENV_OFFSET configuration items for
ARCH_ROCKCHIP, but keeps these non-visible (i.e. not prompt is given).
With these new items present, the configuration from the header files
is moved to Kconfig.

Keeping these non-visible is necessary to have the possibility to
select new default values if CONFIG_IS_IN_* is changed (interactively
or with oldconfig). Otherwise it will always be set to a previous
value if used with a prompt.  As an example if we do a defconfig with
CONFIG_IS_IN_MMC and change it to CONFIG_IS_IN_SPI_FLASH via
menuconfig, ENV_SIZE and ENV_OFFSET will not be changed to the correct
values as defconfig will already have set them to the default values
of CONFIG_IS_IN_MMC in .config.

Change-Id: I72dcb184406523a3a846322fd58ee7b9669d3390
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 81f53b0dafdfe9458f6d04fc5ec2732c2ea23a71)
2018-01-17 15:27:28 +08:00
Jakob Unterwurzacher 83c6e7dea9 UPSTREAM: rockchip: rk3399-puma: set gpio4cd iodomain to 1.8V
The PCIe reset signal is connected to GPIO4_C6 on the Puma
module. This pin is supplied by 1.8V, but the default iodomain
setting is 3.0V and in this situation the pin is unable to go
high.

Linux assumes that this signal works in early boot
as PCIe is probed before loading the iodomain driver.

Make PCIe work in Linux by setting the gpio4cd iodomain to 1.8V.

Change-Id: I131ca6147b490a89cc913ce398dc163c99efd9f2
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit aa41220f6f7c79284ce5880e2533f81c125237a4)
2018-01-17 15:27:28 +08:00
Stefan Roese 6a2ff3f44f UPSTREAM: dm: blk: Use uclass_find_first/next_device() in blk_first/next_device()
This patch changes the calls to uclass_first/next_device() in blk_first/
next_device() to use uclass_find_first/next_device() instead. These functions
don't prepare the devices, which is correct in this case.

With this patch applied, the "usb storage" command now works again as
expected:

=> usb storage
  Device 0: Vendor: SanDisk Rev: 1.00 Prod: Ultra
  Type: Removable Hard Disk
  Capacity: 58656.0 MB = 57.2 GB (120127488 x 512)

Without this patch, it used to generate this buggy output:

=> usb storage
Card did not respond to voltage select!
mmc_init: -95, time 26
No storage devices, perhaps not 'usb start'ed..?

Change-Id: I5a037217a568d9e4eedb089bce5a283eadff1310
Signed-off-by: Stefan Roese <sr@denx.de>
Suggested-by: Simon Glass <sjg@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 8a5cbc065dfe1f258e3a7be823ea128184b90b5b)
2018-01-17 15:27:28 +08:00
Felix Brack 29b6917330 UPSTREAM: power: extend prefix match to regulator-name property
This patch extends pmic_bind_children prefix matching. In addition to
the node name the property regulator-name is used while trying to match
prefixes. This allows assigning different drivers to regulator nodes
named regulator@1 and regulator@10 for example.
I have discarded the idea of using other properties then regulator-name
as I do not see any benefit in using property compatible or even
regulator-compatible. Of course I am open to change this if there are
good reasons to do so.

Change-Id: Ifedf2c0a51cb725ddb290ee9dfd54a3fea45df70
Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bf802f5d544f85c03b4097ab23d078be43c61855)
2018-01-17 15:27:28 +08:00
Philipp Tomsich 13e1d84013 UPSTREAM: dm: reset: have the reset-command perform a COLD reset
The DM version of do_reset has been issuing a warm-reset, which (on
some platforms keeps GPIOs and other parts of the platform active).
This may cause unintended behaviour, as calling do_reset usually
indicates a desire to reset the board/platform and not just the CPU.

This changes do_reset to always request a COLD reset.
Note that programmatic uses can still invoke a WARM reset through
reset_cpu() or using sysreset_walk().

Change-Id: I65a8ac8e62582866e23e6451315090fdb2781ef4
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b53f6992e9cb7f0d892ebc2b1620b55559f461be)
2018-01-17 15:27:28 +08:00
Baruch Siach 6bb2544625 UPSTREAM: README: update the kernel coding style reference
The old CodingStyle document has been converted to ReST and moved
elsewhere. Link to the web version of this document instead.

Change-Id: I92f10f6c014a2658f587350f847634683d3d51c7
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 659208da4703de50826a469cbb38bf6afb938978)
2018-01-17 15:27:28 +08:00
Jakob Unterwurzacher 7cc0da0b68 UPSTREAM: rockchip: rk3399-puma: preserve leading zeros in serial#
Linux preserves leading zeros in /proc/cpuinfo, so we
should as well.

Otherwise we have the situation that
/sys/firmware/devicetree/base/serial-number
and /proc/cpuinfo disagree in Linux.

Change-Id: Ie1b53d75468ac9ae6ac3298ed54a4e7b5e6bea9a
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b32b1bd10b86d01a26056f50de89f768e5183ed1)
2018-01-17 15:27:28 +08:00
York Sun 995085a9d5 UPSTREAM: armv8: fix gd after relocation
Commit 21f4486faa5d ("armv8: update gd after relocate") sets x18
without checking the return value of spl_relocate_stack_gd().

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Change-Id: I929a996608808934bf4d614acfffe43080594ecb
Signed-off-by: York Sun <york.sun@nxp.com>
CC: Kever Yang <kever.yang@rock-chips.com>
CC: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit e421b646fce125ed92936628dc4b287de5f038a5)
2018-01-17 15:27:28 +08:00
Simon Glass 40fb706fa5 UPSTREAM: log: Add documentation
Add documentation for the log system.

Change-Id: I1ad874d516ea2c140bf37d5ae695479b087620fa
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 1d0f30a8e080fd490ec4df50d5ccfc742e771ca0)
2018-01-17 15:27:28 +08:00
Simon Glass c41d05c301 UPSTREAM: log: test: Add a pytest for logging
Add a test which tries out various filters and options to make sure that
logging works as expected.

Change-Id: Ibbaf607e128356e78769b9db9d6bda235c74ead2
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 20faa27c2bc32b1442970cfe98a3006cf8eac063)
2018-01-17 15:27:28 +08:00
Simon Glass a239d69a77 UPSTREAM: log: Plumb logging into the init sequence
Set up logging both before and after relocation.

Change-Id: I225a1077880b14a6f3eabc19b2a5b9fe4c6a530d
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit af1bc0cf46c49c5ddb13b8c75bad31a05a137eba)
2018-01-17 15:27:28 +08:00
Simon Glass b974325dd8 UPSTREAM: board_f: Drop the timer after relocation
Once U-Boot relocates itself the existing driver-model timer (if any) is
no-longer valid until the device is reinitialised. Any use of the device
may cause a crash. To handle this, set the timer to NULL after relocation.

Change-Id: I041cc547659b540735dcaf52444d97834ea10059
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5ee94b4f4032502c26cd3c9ede6a910d7e2c9b46)
2018-01-17 15:27:28 +08:00
Simon Glass 73991b074b log: Add a test command
Add a command which exercises the logging system.

Change-Id: I4eb139b69937c752d7f6fc42dde3f757260b832b
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ef11ed8239bf02b347e7fb9fc6d980aec0c7810a)
2018-01-17 15:27:28 +08:00
Simon Glass 923fc48db4 log: Add a 'log level' command
Add a command for adjusting the log level.

Change-Id: I51e15c61e860f4f0bdb980f1d7aa88c492f55d49
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d5f61f272d5b7b86bf6321512ba6326c7c075e72)
2018-01-17 15:27:28 +08:00
Simon Glass 5cafef2de2 UPSTREAM: log: Add a console driver
It is useful to display log messages on the console. Add a simple driver
to handle this.

Note that this driver outputs to the console, which may be serial or
video. It does not specifically select serial output.

Change-Id: I3626673a306557400584e673f9725e74ecbaaf98
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c6d47535dfb6636ae5244958a2a9e043bb7646ae)
2018-01-17 15:27:28 +08:00
Simon Glass 9530301c66 log: Add an implementation of logging
Add the logging header file and implementation with some configuration
options to control it.

Change-Id: Ic711fa39ba3183b288170ebdd4bfdf0a9e472bad
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit e9c8d49d54cbbc7b219a1637d2994de7448b767d)
2018-01-17 15:27:28 +08:00
Simon Glass 44aaaed168 UPSTREAM: Move debug and logging support to a separate header
Before adding new features, move these definitions to a separate header
to avoid further cluttering common.h.

Change-Id: Ib4be207f2536b4e9f12f32033c6034cb9fe4ccd7
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0e98b0a65092d6573eb17d07e04455f9cf545b21)
2018-01-17 15:27:28 +08:00
Simon Glass 785b4fbf6c Drop the log buffer
This does not appear to be used by any boards. Before introducing a new
log system, remove this old one.

Change-Id: I798cd4aff50b7136ae9f84362185f9f73b04f710
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c5404b64fb5a35d41f7eff6d12b8ffdb0c851040)
2018-01-17 15:27:28 +08:00
Simon Glass 143f37beff UPSTREAM: usb: Correct use of debug()
With clang this gives a warning because hubsts appears to be used before
it is set, even if ultimately it is not used. Simplify the code to avoid
this problem.

Change-Id: If765f7b0c909de125e163875856e43ddf9b6c5d5
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0ad0458c76107b29325b8c38804e0407bed42a79)
2018-01-17 15:27:28 +08:00
Maxime Ripard 00ac81b92d UPSTREAM: part: efi: Add default number of partition entries for sunxi
The SPL must be located at 8kB (16 sectors) offset. That's right in the
middle of the GPT, so we need to define a smaller amount of partitions to
accomodate for that location.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I7932a388389b15237bed18321606f034a47534a3
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5dc0256d1210cb38ba11b22a8eb2ccc101460963)
2018-01-17 15:27:28 +08:00