The rockusb in u-boot could not support BLK_MTD_NAND and
BLK_MTD_SPI_NAND, need reboot to boot ROM.
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I16d9f25d84322c9752e2e62451cd7b8c0aa16f02
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
1.It's good for Nand devices P/E align
2.But actually 0x200 sector(USB limit) is aligned with Nand flash block size
Change-Id: I69510161c32e15ee739c99d36f0294d59df554dd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
rockusb command is required for usbplug feature in the furture.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9998ba07e2f7faddae6a830987bea2d6018f431a
Add 2 functions to wrap the calls to board_usb_init() and
board_usb_cleanup().
This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET).
Conflicts:
cmd/fastboot.c
cmd/rockusb.c
cmd/usb_mass_storage.c
Change-Id: I2b3a567d9dff75a03176d76d9fd9775cd8a0792e
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit a06955ae1ef2a942f18025d4fefceea2c638a76f)
Some special characters will be treated as a path in windows environment,
such as '\\' and '/'. If the usb upload its serial number with these
special characters, the usb drive will unwork. So use '_' to replace them.
Change-Id: Ic249316f2b03b0dcb73680078f122e23003e6e3d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Simply return magic char if one is trying to read data beyond 32MB.
Fixes: 628c827 ("usb: rockusb: forbid reading data beyond addr 32MB")
Change-Id: If2cdf05dbf9d6dcdd4cf8f9605ab84480fbca32d
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Forbid reading data beyong addr 32MB to protect user data & firmware. Excess
partial is filled with 0xcc. The addr 32MB is quoted from pre-loader.
Change-Id: I96f4fb3bb0d88a309fef20650863011cd9f0dfd9
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
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)
We found rockusb upgraded failed when there had gpt partitions in
system caused by total sectors checking, this change expose all mmc
partitions for rockusb command.
Change-Id: I8847c3c7885d17d47189c55765f97abb4965e8b4
Reported-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This patch add a new rockusb command support.
Rockusb command provides a way to upgrade firmware for Rockchip SoC
based devices, its design make use of USB Bulk-Only Transport based
on USB Mass Storage framework.
Change-Id: Idb04c62a8f6fb7ba84641bd4ee00f67920a7cfc8
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Will make use of UMS framework to support rockusb command.
This reverts commit 301fce6(usb: rockchip: add rockusb command).
Change-Id: Iec2ed64212851a85e8570dcfaa5507a5b55c29c5
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
this patch add rockusb command. the usage is
rockusb <USB_controller> <devtype> <dev[:part]>
e.g. rockusb 0 mmc 0
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Changes in v7:
-none
Changes in v6:
-none
Changes in v5:
-none
Changes in v4:
-move USB_FUNCTION_ROCKUSB to drivers/usb/gadget/Kconfig
-modify the dependence
Changes in v3:
-fix comment from Simon and Lukasz
-fix checkpactch error