Commit Graph

49279 Commits

Author SHA1 Message Date
Heinrich Schuchardt 204b4e6872 UPSTREAM: rockchip: spi: the symbol for Hertz is Hz
fix typo

Change-Id: If467ba2cb4d16a4844400e9046e851ab0b96a4de
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 11f12c17d72499292f6e219ebbf8062faedcc5bb)
2019-07-23 17:12:08 +08:00
Heinrich Schuchardt 5385433492 UPSTREAM: omap3: spi: the symbol for Hertz is Hz
fix typo

Change-Id: Ifee202f67e4a972854ed33745de3984b6ae9e2d1
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 042de609ed49cfc41afb13639850c7b01079a527)
2019-07-23 17:12:08 +08:00
Bin Meng a117f09b28 UPSTREAM: spi: ich: Lock down controller settings if required
Some Intel FSP (like Braswell) does SPI lock-down during the call
to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done,
it's bootloader's responsibility to configure the SPI controller's
opcode registers properly otherwise SPI controller driver doesn't
know how to communicate with the SPI flash device.

Rather than passively doing the opcode configuration, let's add a
simple DTS property "intel,spi-lock-down" and let the driver call
the opcode configuration function if required by such FSP.

Change-Id: I2cef052b87320392449c39a8aa2330236539a2c3
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ab20107468de5bf6b9affa93b17f2284cc838b5b)
2019-07-23 17:12:01 +08:00
Adam Ford 2bac9e0206 UPSTREAM: spi: davinci_spi: Add da830-spi support for DM
The DM support is already in the driver, so add
da830-spi to the compatible list.

Reviewed-by: Jagan Teki <jagan@openedev.com>
Change-Id: I1a9146dc21017f7f32e79608cfecb4129df93a14
Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ab0ac272421c4b72c7a78db32ad709e23cab1eea)
2019-07-23 17:12:01 +08:00
Suresh Gupta a668abfcdb UPSTREAM: spi: fsl_qspi: Copy 16 byte aligned data in TX FIFO
In some of the QSPI controller version, there must be atleast
128bit data available in TX FIFO for any pop operation otherwise
error bit will be set. The code will not make any behavior change
for previous controller as the transfer data size in ipcr register
is still the same.

Patch is tested on LS1046A which do not require 16 bytes aligned and
LS1088A which require 16 bytes aligned data in TX FIFO

Change-Id: I87e05aa2d038997a6681d664605c0de9ca6d51bd
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Anupam Kumar <anupam.kumar_1@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 10509987285515b0a969c39ef7374fea3545851b)
2019-07-23 17:11:52 +08:00
Suresh Gupta f0d9665a88 UPSTREAM: spi: fsl_qspi: Add controller busy check before new spi operation
It is recommended to check either controller is free to take
new spi action. The IP_ACC and AHB_ACC bits indicates that
the controller is busy in IP or AHB mode respectively.
And the BUSY bit indicates that controller is currently
busy handling a transaction to an external flash device

Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit 1c631da459a82f4f82a063f5b4ff339ca5384d11)
Change-Id: I79b786b7e24294538cf014c86658838409c29e78
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-23 17:11:52 +08:00
Peng Fan abdcd79a4c UPSTREAM: spi: mxc_spi: support driver model
Add driver model support for mxc spi driver.
Most functions are restructured to be reused by DM and non-DM.
Tested on mx6slevk/mx6qsabresd board.

Change-Id: Idb04e59b28f570b161aa75216748ebda0ed6d9ac
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 994266bdff7903279b8e43ddbf220b04a4e1411f)
2019-07-23 17:11:52 +08:00
rick 24456af2b5 UPSTREAM: nds32: spi: Support spi dm driver.
Support spi driver and can detect MX25U1635E flash on AE3XX board.

Verification:

sf probe 0:0 50000000 0
spi_flash_std_probe(sf_Probr.c)
	spi_flash_probe_slave(sf_Probr.c)
	SF: Detected mx25u1635e with page size 256 Bytes, erase size 4 KiB, total 2 MiB
	NDS32 # sf test 0x100000 0x1000
	SPI flash test:
	0 erase: 34 ticks, 117 KiB/s 0.936 Mbps
	1 check: 15 ticks, 266 KiB/s 2.128 Mbps
	2 write: 21 ticks, 190 KiB/s 1.520 Mbps
	3 read: 11 ticks, 363 KiB/s 2.904 Mbps
	Test passed
	0 erase: 34 ticks, 117 KiB/s 0.936 Mbps
	1 check: 15 ticks, 266 KiB/s 2.128 Mbps
	2 write: 21 ticks, 190 KiB/s 1.520 Mbps
	3 read: 11 ticks, 363 KiB/s 2.904 Mbps

Change-Id: I40c6ea1857c58cffca3a89d53bd3593ad87a0bbe
Signed-off-by: rick <rick@andestech.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 7155cd2e6e7824ab60fbfc755d546d45b1d15e7b)
2019-07-23 17:11:49 +08:00
Joseph Chen eae0a6b103 cmd: add command "android_print_hdr" support
This is useful for debug.

Change-Id: I6e56255d6e32e692031c6c3226d0dc041433dd48
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-22 19:24:57 +08:00
Joseph Chen acffe33271 lib: sysmem: add sysmem_alloc_by_name() interface
Change-Id: I9e2fd6d99fdc487396dd9619dc54567bcd2ba242
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-22 14:23:50 +08:00
Joseph Chen 996752e678 rockchip: memblk: update memblk attr
Add M_ATTR_IGNORE_INVISIBLE for kernel memblk on RK3308-AArch32 to
alloc kernel region within 0~1M address.

Add "ramoops" alias for share memblk to avoid sysmem check warning.

Add M_ATTR_KMEM_CAN_OVERLAP for some images.

Change-Id: I1d7ed93a19ea22e5c69f23d75a1c1faf4e9f0104
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-22 14:23:50 +08:00
Joseph Chen 50226c8f95 lib: sysmem: optimise alloc policy
- Allow request region alloc within the first invisiable region reserved by
  bidram when request region has flags M_ATTR_IGNORE_INVISIBLE. This is a
  workaround for some firmware memory layout, eg: on RK3308-AArch32, the ATF
  region is 0~1M(same as RK3308-AArch64), but the kernel would like to alloc
  at 0x00058000.

- Always make kernel reserved-memory alloc successfully and check overlap
  with invisible and sysmem allocated regions in sysmem_overflow_check()
  before bootm. This makes alloc policy more easier.

Change-Id: I533c710a6e69bd930befda441b9ec64415e3f408
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-22 14:23:50 +08:00
Joseph Chen fc7ff0f015 lib: bidram: add bidram_reserved_is_overlap() interface
Check if the region is overlap with reserved regions.

Change-Id: Ifd9b6a4438dcf954b7e48930e31d0c6cd5d1274c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-22 14:23:49 +08:00
Algea Cao 351f3d38c3 configs: rk3368: Enable rk3368 hdmi
Change-Id: I402c3d104f72005b19d44908ac36a72662c482d8
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-19 15:39:52 +08:00
Algea Cao 19c2faf2ce drm/rockchip: dw-hdmi: Fix hdmi i2c scl configuration error
If ddc-i2c-scl-high-time-ns and ddc-i2c-scl-low-time-ns are not
set in dts, scl_high_ns and scl_low_ns will set to -1. Because of
these variables are unsigned int, misjudgment may occur when their
values are judged.

Change-Id: I8b94f7c2ab8bcb0d966182f220877f9268b7981b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-19 15:39:52 +08:00
Algea Cao 84a1bd9cfb drm/rockchip: dw-hdmi: Support rk3368 hdmi
Change-Id: Iaef5abee75b6e754c4884009ee4dc799277b6253
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-19 15:39:52 +08:00
Joseph Chen fec5505a80 common: board_f: set GD_FLG_DISABLE_CONSOLE early before initcall
Set flags as early as possible to avoid putc() by CONFIG_DEBUG_UART.

Change-Id: Ifb986397e7d94a4ab1a47c065afba3c7845c2563
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:36:43 +08:00
Joseph Chen c7abde102f common: console: support disable console in & out
Set CONFIG_DISABLE_CONSOLE priority higher than CONFIG_DEBUG_UART,
otherwise there maybe some early message is printed by CONFIG_DEBUG_UART.

Change-Id: I235a49646b154e10e724e3d63e0ceecdd862c636
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:36:41 +08:00
Joseph Chen ab4c011acf rockchip: hotkey: disable hotkey when CONFIG_CONSOLE_DISABLE_CTRLC enabled
If we enable CONFIG_CONSOLE_DISABLE_CTRLC for AVB bootflow, we want to
disable hotkey too.

Change-Id: Idd542a1fa8b3b2a7d232373a767e91e49e90d9ae
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:31:38 +08:00
Joseph Chen 8dbcccd6d4 rockchip: atags: disable set atags if it is not available
We make the appoint that the other pre-loader can set atags
only when TPL ative it(creating the valid atags header).

Change-Id: I579d31e0880f35193b9c017fc83cbe0f5a25bfb3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:31:13 +08:00
Joseph Chen e8b8350080 rockchip: resource: dump android version and build time
It prints like: "Android 8.1, Build 2019.7", maybe helpful
for debugging.

Change-Id: I10acbb6e8d864ae2daa2621bf9cfdf4b902a49b4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:30:53 +08:00
Joseph Chen 2208cd926b rockchip: board: clean up code
Change-Id: Ic4cdd4b54514a4c89f5603063ca791e9efa39193
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:30:20 +08:00
Joseph Chen 1476830723 cmd: bootrkp: clean up code
Change-Id: Ic76a6cabca67263a792eece7ecc7ee46e521ef97
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-19 11:29:56 +08:00
Joseph Chen d14162bd80 common: rkimg: clean up code
Change-Id: I392fce121353b6ae51fcd016b3ba5cedeb033757
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-18 16:43:09 +08:00
Algea Cao 3f6d16ab3d drm/rockchip: dw-hdmi: Fix yuv422 display err
When switching from another color to yuv422, neither
encoder input color nor encoder output color is rgb.
CSC coeff will be incorrectly selected as
csc_coeff_full_to_limited, which causes the display
turn to green. To solve this problem, choose
csc_coeff_full_to_limited only if the input and output
colors are both RGB.

Change-Id: If09f53fb2a5aa20359efb548b1a8b7da2c79310d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-18 14:59:49 +08:00
Algea Cao b5016cf2d5 drm/rockchip: dw-hdmi: Support hdmi quantization range setting
Adding hdmi quantization range switching function. The current
version use default quant range, subsequent version will keep consistent
with the kernel Setting.

Change-Id: Ibb93f7c08d72322caa15f12b1d6e1f901371b27b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-18 14:59:49 +08:00
Joseph Chen af4fa70793 common: android: format address with "0x%08lx"
Change-Id: Icbb0d31541fab9d66043834a28f995da8b9ab087
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-17 16:50:28 +08:00
Jon Lin 26e23df7b8 rkflash: add new SPI Nannd flash
GD5F1GQ4R

Change-Id: Ie2077814963f564318cda4777a0c91bbacb4c1fb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-17 14:05:09 +08:00
Jason Zhu 9f7520289f configs: rk3399pro: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: I2abed8b06292ce68c09b5bcfc6d0ef9bd19b080f
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 10:01:47 +08:00
Jason Zhu b5c685eb33 configs: rk3399: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: I5b26d9ac988f45f4dd3627542c2d2eec9b6ca1f2
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:59:43 +08:00
Jason Zhu d075d60b97 configs: rk3368: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: Iae4d1ea91fef4e4355babd88e54277e24ff17edd
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:58:44 +08:00
Jason Zhu 6ad43d645c configs: rk3288: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: I50054102e03ae5925a35124ccbedd3f7cebce5f5
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:57:32 +08:00
Jason Zhu 38b5f44a82 configs: rk3128x: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: Ieb9c9e49df3b18fa6a9b459469e8c9c0377192ac
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:56:27 +08:00
Jason Zhu 1477ee821b configs: rk3126: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: I343a84e08668af7895ef3fcbf0da0f2deeced63a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:54:14 +08:00
Jason Zhu 6c720b9e02 configs: rk3326: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: I0d9028411a83a7bbe15060ecd06c0804b8a29c10
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:53:24 +08:00
Jason Zhu 3f17292665 configs: px30: delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.

fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)

Change-Id: Ibad49030f76a69c5f32c5deac963f49c96c9670b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-16 09:48:31 +08:00
Hisping Lin b9a7e756c4 lib: optee_client: change the condition for eMMC devices
1.dev_desc->if_type == IF_TYPE_MMC for SD and eMMC device,
  dev_desc->devnum == 1 is SD devices,
  dev_desc->devnum == 0 is eMMC devices
2.SD devices do not have rpmb
3.we prefer to use rpmb for eMMC devices, use security
  partition for nand or SD devices

Change-Id: Ifc21bd4da7c3ee91e2ecc845c343182c78d52dc1
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2019-07-15 17:06:52 +08:00
Hisping Lin 0202ee8aef lib: optee_client: vboot enable if read bootflag == 1 for rk3288
Change-Id: Ic59341a3bd386a5d05cc501a6841556a6375572a
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2019-07-15 14:33:40 +08:00
Heinrich Schuchardt 2556ca16c0 include: update log2 header from the Linux kernel
Without the patch gcc 8 produces:
warning: ignoring attribute ‘noreturn’ because it conflicts with
attribute ‘const’ [-Wattributes]
 int ____ilog2_NaN(void);

So let's update the include from Linux kernel v4.16.

This removes static checks of ilog2() arguments.

Change-Id: I313759aac445d1e369ba5c478393ebfa27d988a2
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-13 17:10:57 +08:00
Kever Yang 2f61549f3d include: log2: update license format
Change-Id: I83faacafca564b52de987c8af851d2979ce80f30
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-13 17:10:57 +08:00
Jon Lin d9cdd3188b rkflash: add new SPI Nand flash
FM25S01, HYF1GQ4UPACAE, EM73E044SNA-G, GD5F2GQ5UEYIG

Change-Id: Ied88add0b99e6aa733a59990c267b1802a9c9b79
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-12 12:01:06 +08:00
Joseph Chen 1d30bcc50c rockchip: resource: support parse "logo" partition picture
We provide a "logo" partition for user to store logo.bmp
and update from kernel user space dynamically.

This patch follows the rkdevelop usage:
- Only support store one picture named "logo.bmp";
- Use "dd" command to generate partition image with logo.img
  eg: "dd if=logo.bmp of=logo.img count=1 bs=19456"

Change-Id: Iffde4d123e303c010d99cd446c241a535bce1dcf
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-12 11:58:13 +08:00
Joseph Chen 47e67a816e rockchip: boot mode: remove "recovery" partition lookup for recovery mode
Since we have unified android and linux image format that "recovery" partition
is necessary, we remove partition lookup when recovery mode is required.

Anyway, there is no recovery partition in A/B system and recovery ramdisk
has been moved to boot.img, and adding this judgment code is a little mess.

Change-Id: I9f590f464a14ac25855b8a9487c55cec8d353890
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-12 11:57:55 +08:00
Jon Lin d851b9175c include: rk3036: rm CONFIG_MTD_DEVICE which is redefined
Change-Id: I835b7600bc67cb1d417a3a65e2a717ae6815040d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-12 11:03:32 +08:00
Jon Lin d864de69ce defconfig: rockchip: rm MTD nand support
Change-Id: I6ae494789075c86835ebbcf4ee5b7ce9eb0d98b4
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-12 11:03:32 +08:00
Jason Zhu d3a731eb0a rockchip: rk1808: add CONFIG_SUPPORT_EMMC_RPMB
This config is used to open the MMC RPMB driver.

Change-Id: Ie58ff510221e75743f10222dab2ebedd81b6bf56
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-12 11:03:01 +08:00
Quentin Schulz fb504314e8 UPSTREAM: cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n
cmd/mtd.c:447:13: warning: ‘mtd_help_text’ defined but not used [-Wunused-variable]
static char mtd_help_text[] =
            ^~~~~~~~~~~~~

When SYS_LONGHELP is not defined. After looking at how other commands
work, we should surround the whole help text (even its declaration) with
an #ifdef CONFIG_SYS_LONGHELP, since it's compiled out when calling
_CMD_HELP[1] on the help text variable argument to U_BOOT_CMD.

[1] https://elixir.bootlin.com/u-boot/latest/source/include/command.h#L181

Change-Id: If84aae3167fd8826e33f717b7debefe32920dd0b
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a645831ca0962532660e4db3155a8be85e5ca312)
2019-07-12 11:02:53 +08:00
Boris Brezillon b3d8fba6e0 cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands
It's way simpler this way, and we also gain auto-completion support for
free (MTD name auto-completion has been added with mtd_name_complete())

change-Id: I4292fde7affaddd8eb5a51fe8ec4265ae4984a21
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9671243e8d10defb06f2ea24fac138c87697d7fc)
2019-07-12 11:02:53 +08:00
Zain Wang 375a256d23 rockchip: common: enter fastboot when avb+ab system boot failed
When avb+ab system boot failed, it means slot a/b is unbootable
and slot_cnt_a/b is zero. We should update images a/b and
active slot again, and this can be done by fastboot. Remove
rockusb from RKIMG_BOOTCOMMAND since rockusb unable to active slot.

Change-Id: Ib9b15940a5b8f0cefe9a91ee7564ea8f9aa6f201
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2019-07-11 15:40:25 +08:00
Joseph Chen f3d602457f make.sh: add more help information
Change-Id: I8ed016767d8d7d0cd8dd533ce384715ad8d8afab
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-11 10:35:30 +08:00