The blk_dread will occor error if the image is packed with multiple
firmwares, for example boot.img, when nand or spi nand have bad block.
So call mtd_blk_map_table_init to remap part address to make sure
reading correct data.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Icebc6b1c5a10758efa615424d0706b9ed6ec23ad
Otherwise the next stage will respond to the decompress completed interrupt.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie56a7eb939374bd5aac326bb3cd022225bf71dd2
1.support boot kernel by spl
2.support pressing key to enter uboot
3.rename the defconfig
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I56e4aa9d90a7fa3efae9e0d7dbdf73741eeb9040
- enable CONFIG_SUPPORT_USBPLUG to generate mininum usbplug.bin
- only "rockusb" command is supported
- run_command_list() doesn't support powerful syntax, it falls
back to run_command().
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
Change-Id: I67ac23aedc48359032c9b44cbf417515090cbd95
The output usbplug.bin is used to replace the rockchip
usbplug binary in the "rkbin" repository.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0ec488bd37f3b3e96232f2ed653a0af453199105
Allow disable some configure without bringing compile error.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6fddf3368c3e63b82cfb071a2cfe70ebcad7de7b
rockusb command is required for usbplug feature in the furture.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9998ba07e2f7faddae6a830987bea2d6018f431a
This function is used to support some special U-Boot commands with
U_BOOT_CMD_ALWAYS() declared even when CONFIG_CMDLINE is disabled.
It's used when developers requires a critial u-boot.bin by disabling
the U_BOOT_CMD() and using a simple CLI instead.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I768637592a4d85c7fea00564e96fb80f21ab65fe
The simple CLI mode only support run_command() which can't support
powerful command line syntax like if...then...else...fi conditionals
or `&&' and '||'.
The run_command_list() falls back to run_command().
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I136cba71e02fd1f57c9a395b37679d9a885ba4a0
It avoids compile error while disabling CONFIG_ARCH_FIXUP_FDT_MEMORY.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I283a335c2ecf559e42544ab138af414423d8a888
In general we should avoid calling malloc() and free() repeatedly in
U-Boot lest we turn it into tianocore. In SPL this can make SPI flash
unusable since free() is often a nop and allocation space is limited.
In any case, these seems no need for malloc() since the number of bytes
is very small, perhaps less than 8.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: d13f5b254a (spi: Extend the core to ease integration of SPI
memory controllers)
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ca2abb75a086d8b0bdb51689f331ba8f1a146379)
Change-Id: Ia76abf7491780b1984eb81c6c78796bcc0141095
Add check if exec_op is set before calling it.
At the moment it is called unconditionally, which leads to a crash if it
is not set correctly.
Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 567a3eb7956f98af4ed065499898c6d0ac6443c7)
Change-Id: Ie9fdf0cbee364fc33965e3234d7457702bd0120f
Spetial patch for GD devices cause u-boot SPI Nand MTD bad
supporting for GD, and the u-boot mainline haven't synchronize
with Linux.
reference to following Linux commit:
commit f1541773af49ecd1edae29c8ac0775253a0b0760
Author: Chuanhong Guo <gch981213@gmail.com>
Date: Sat Feb 8 15:43:50 2020 +0800
mtd: spinand: rework detect procedure for different READ_ID operation
Currently there are 3 different variants of read_id implementation:
1. opcode only. Found in GD5FxGQ4xF.
2. opcode + 1 addr byte. Found in GD5GxGQ4xA/E
3. opcode + 1 dummy byte. Found in other currently supported chips.
Original implementation was for variant 1 and let detect function
of chips with variant 2 and 3 to ignore the first byte. This isn't
robust:
1. For chips of variant 2, if SPI master doesn't keep MOSI low
during read, chip will get a random id offset, and the entire id
buffer will shift by that offset, causing detect failure.
2. For chips of variant 1, if it happens to get a devid that equals
to manufacture id of variant 2 or 3 chips, it'll get incorrectly
detected.
This patch reworks detect procedure to address problems above. New
logic do detection for all variants separatedly, in 1-2-3 order.
Since all current detect methods do exactly the same id matching
procedure, unify them into core.c and remove detect method from
manufacture_ops.
Change-Id: If60d0281eb963486639d5b4ce1939ad2b219c8d6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
When a CPU enters a low power state, the registers ICC_IGRPEN1_EL1 is lost.
It need to re-initialise.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I62d9eed2b29190134d95ebd153f21aa764c4ab3b
Fix the warning:
<stdout>: Warning (unit_address_vs_reg): Node /images/uboot@1 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /images/uboot@1/hash@1 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /images/optee@1 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /images/optee@1/hash@1 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /images/fdt@1 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /images/fdt@1/hash@1 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /configurations/conf@1 has a unit name, but no reg property
......
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If48fa120294ff6061922de3c277654744cdebe02