Commit Graph

8 Commits

Author SHA1 Message Date
Joseph Chen c01d448924 sysmem: simplify the memblk name
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icfe908ade21d1d8f568db796298f67ba9f013da6
2020-02-28 11:22:04 +08:00
Jean-Jacques Hiblot b95d44460f UPSTREAM: usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers
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)
2020-01-07 17:24:53 +08:00
Joseph Chen 6e15146eff lib: sysmem: refactor code
- import memblk id to manage memory blocks;
- change "sysmem_property" to generic "memblock";
- use alloc instead of reserve for all memory blocks;
- clean up and fix some logic;
- add U-Boot cmd for sysmem;

Change-Id: I614223ce3bf97a7b3566412a9d1864fb30b68fd8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-26 11:04:33 +08:00
Jason Zhu 562a66d432 cmd: fastboot: test the fastboot memory space availability
Use the sysmem to test fastboot memory is available or not.

Change-Id: I021152827b6948fabd5ea41e111ea20adf43167f
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-05 11:19:41 +08:00
Joseph Chen deebadb707 cmd: fastboot: print mode state
This avoids user misunderstanding the system is hang
when enter fastboot mode without any warning message.

Change-Id: Ie6238c825342c8e322b2a5be746e4bba020e1ec9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-19 11:51:02 +08:00
Masahiro Yamada 90aa625c9a treewide: replace with error() with pr_err()
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)
2018-01-17 15:27:28 +08:00
Jocelyn Bohr 965eda410b Add support for fastboot command over UDP
The Raspberry Pi does not support USB device mode, so fastboot over
USB does not work. This patch adds support for and partially
implements the device side fastboot UDP protocol as a U-boot command.
It requires an ip address set and ethernet initialized.

- Modify U-boot fastboot command to do fastboot over UDP
- Add net/fastboot.c, which implements fastboot server functions
- Handle QUERY and INIT fastboot packets
- Add CONFIG_UDP_FUNCION_FASTBOOT to enable fastboot over UDP

Bug: 31887729
Test: Tested with fastboot, responds correctly to query and init
      packets.

Change-Id: I4045abaf7a4455d756b7c1c00215afaa90c70a6e
2017-11-14 10:55:44 +08:00
Simon Glass 2e192b245e Remove the cmd_ prefix from command files
Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
2016-01-25 10:39:43 -05:00