Commit Graph

72016 Commits

Author SHA1 Message Date
Simon Glass
0fb560d9a7 patman: Quieten down the alias checking
When a tag is used in a patch subject (e.g. "tag: rest of message") and
it cannot be found as an alias, patman currently reports a fatal error,
unless -t is provided, in which case it reports a warning.

Experience suggest that the fatal error is not very useful. Instead,
default to reporting a warning, with -t tell patman to ignore it
altogether.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-22 19:23:26 +13:00
Simon Glass
c7e42cabed patman: Update documentation to match new usage
With the subcommands some of the documentation examples are no-longer
correct. Fix all of them, so it is consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-22 19:23:26 +13:00
Simon Glass
a0ac1d9037 azure: Use --board flag with sandbox_spl
At present there is only one board which uses sandbox SPL. But with
sandbox_noinst being added, this is no longer true. Add a --board flag
so that we just build one board on azure, as is done in gitlab.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2021-03-22 19:23:25 +13:00
Tom Rini
874dcedee9 Merge branch '2021-03-20-mediatek-updates' into next
- A number of MediaTek platform updates
2021-03-20 19:27:22 -04:00
Weijie Gao
cfd48ec4dc tools: mtk_image: add an option to set device header offset
This patch adds an option which allows setting the device header offset.
This is useful if this tool is used to generate ATF BL2 image of mt7622 for
SD cards.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
8ec9aa6a30 configs: mt7622: enable debug uart for mt7622_rfb_defconfig
Enable debug uart for mt7622_rfb_defconfig

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
f4f478be4c board: mt7629: enable compression of u-boot to reduce the size of final image
This patch makes use of the decompression mechanism implemented for mt7628
previously to reduce the total image size. Binman will be also removed.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
0b9f1ae586 serial: mtk: rewrite the setbrg function
Currently the setbrg logic of serial-mtk is messy, and should be rewritten.
Also an option is added to make it possible to use highspeed-3 mode for all
bauds.

The new logic is:
1. If baud clock > 12MHz
   a) If baud <= 115200, highspeed-0 mode will be used (ns16550 compatible)
   b) If baud <= 576000, highspeed-2 mode will be used
   c) any bauds > 576000, highspeed-3 mode will be used
2. If baud clock <= 12MHz
   Forced highspeed-3 mode
   a) If baud <= 115200, calculates the divisor using DIV_ROUND_CLOSEST
   b) any bauds > 115200, the same as 1. c)

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
e8b98f0270 dts: mt7629: enable JTAG pins by default
The EPHY LEDs belongs to the built-in FE switch of MT7629, which is barely
used. These LED pins on reference boards are used as JTAG socket. So it's
a good idea to change the default state to JTAG, and this will make it
convenience for debugging.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
e21599ed00 configs: mt7622: use ARMv8 Generic Timer instead of mtk_timer
It's better to use the generic timer which is correctly initialized by
the ATF. The generic timer has higher resolution than the mtk_timer.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
a449cdb881 pinctrl: mt7629: add jtag function and pin group
The EPHY LEDs of mt7629 can be used as JTAG. This patch adds the jtag pin
group to the pinctrl driver.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Weijie Gao
70a2b4220e pinctrl: mediatek: do not probe gpio driver if not enabled
The mtk pinctrl driver is a combination driver with support for both
pinctrl and gpio. When this driver is used in SPL, gpio support may not be
enabled, and this will result in a compilation error.

To fix this, macros are added to make sure gpio related code will only be
compiled when gpio support is enabled.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20 16:24:27 -04:00
Sam Shih
e254d2c0a4 pinctrl: mediatek: add get_pin_muxing ops for mediatek pinctrl
This patch add get_pin_muxing support for mediatek pinctrl drivers

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
2021-03-20 16:24:27 -04:00
Sam Shih
4fc5d4cedb pinctrl: mediatek: fix wrong assignment in mtk_get_pin_name
This is a bug fix for mtk pinctrl common part. Appearently pins should be
used instead of grps in mtk_get_pin_name().

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
2021-03-20 16:24:27 -04:00
Fabien Parent
e96bedf146 board: Add MT8183 pumpkin board support
Add the MT8183 pumpkin board support.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20 16:24:27 -04:00
Fabien Parent
18380437c1 ARM: mediatek: Add MT8183 support
Add the MT8183 SoC support.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20 16:24:27 -04:00
Fabien Parent
21f593214b configs: mt8516: use bootcmd from config_distro_bootcmd.h
Instead of redefining our own way to boot, let's just use
config_distro_bootcmd.h.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20 16:24:27 -04:00
Fabien Parent
4e828d9c75 board: mediatek: mt8516: init USB Ether for pumpkin board
Init USB Ether if CONFIG_USB_ETHER is enabled.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20 16:24:27 -04:00
Fabien Parent
86e07d59ee board: mediatek: rename pumpkin board into mt8516
More than one pumpkin board has been made with different MediaTek SoCs.
Rename the pumpkin board to follow the naming convention of all
other MediaTek boards and also to not be confusing when other pumpkin
boards will be added in follow-up commits.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20 16:24:26 -04:00
Tom Rini
1f9c3f13f6 Pull request efi-2021-04-rc5-2
Bug fixes:
 
 * re-enable loading UEFI binaries via UART
 * fix a NULL dereference in EFI console
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmBVAocACgkQxIHbvCwF
 GsTbyw//V/BZ5DxbmJU76QX/7imawlkvgInloxTjCNvTHQGiQvhM1eeGwcOvSeXW
 tEN6XYjZ/qwmqrydi5s2U7B7YctjGn9/eYxJ4HWafK1MCmmNPj5DX/J0TDUtyomh
 fM9YLhhCEwyJbV9IjCYvNsvQPxvQq1TNqQ5VCSlkBV2TmqOWjtZkerfiob6z6TAo
 k4zEic8eK7jVcwlEBTLvOSEvCX2vDWrFnbyuQVeuIoQExKB2kStUVGJiuKHkDoDs
 FvW0h4Hdpu/YnoOAR0ou08nNm1gRdPMnkY8kOJ53V9H6AwRa45IEmZzstoNLKoxi
 h/CwXD1SvJ96X4htWJyUWzVouWSBVG22VgHfXzgGMAyoTqt6Df3rZ6r3FeYq+cxu
 cWauIaz1FBBMsMnBuvFw3sCXzFQMPyME9HjgnjMA3bW04C/q2rPIP0OhzrLeRleo
 nTtyCto3mC+nBlNHs/brnv3d7yX4g/iY0zIns43HwE0hjCiPxE4iIPVelx7+ZlWz
 nb10iKE7GQl3Uz/iH37SVGnnXS8vAUcmyUVPHmMZAZVueadIpuMz9cHwAVhLpMFT
 O/NxgkO4B5l/p8JM6VtbHL8yZvSDEcHHJLXeT/B+7Ouxf3jo+oEzJMyXicQVnzjV
 iYlBkud3DXvw3YRW7UMusvbigAmBLMN0kju18MlfVEU0i8uv17o=
 =ixoU
 -----END PGP SIGNATURE-----

Merge tag 'efi-2021-04-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2021-04-rc5-2

Bug fixes:

* re-enable loading UEFI binaries via UART
* fix a NULL dereference in EFI console
2021-03-20 08:55:18 -04:00
Heinrich Schuchardt
76b0a19022 cmd/load: support uploading EFI binary via UART
When uploading an EFI binary via the UART we have to call
efi_set_bootdev() or we won't be able to execute it.

Put the includes into alphabetic order.

Fixes: 5f59518a7b ("efi_loader: setting boot device")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-19 20:54:55 +01:00
Heinrich Schuchardt
62df6e9c99 efi_loader: Uart device path
When uploading an EFI binary via the UART we need to assign a device path.

* Provide devicepath node to text conversion for Uart() node.
* Provide function to create Uart() device path.
* Add UART support to efi_dp_from_name().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-19 20:54:40 +01:00
Heinrich Schuchardt
a95f4c8859 efi_loader: NULL dereference in EFI console
Even if CONFIG_DM_VIDEO=y and stdout="vidconsole", a video device may not
be available. Check the return values of the relevant functions.

If no video output device is available, assume that the serial console is
in use.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-19 20:47:25 +01:00
Tom Rini
65f2e55b57 Merge branch '2021-03-19-assorted-fixes'
- NVMe cache fixes, API bugfix with !CONFIG_SYS_64BIT_LBA, ahci mediatek
  fix when debugging, ti-sysc uclass fix, sl28 MMC boot fix
2021-03-19 15:23:10 -04:00
Andre Przywara
4c49879689 nvme: Elaborate on cache maintenance operation in get/set_features
At the moment the nvme_get_features() and nvme_set_features() functions
carry a (somewhat misleading) comment about missing cache maintenance.

As it turns out, nvme_get_features() has no caller at all in the tree,
and nvme_set_features' only user doesn't use a DMA buffer.

Mention that in the comment, and leave some breadcrumbs for the future,
should those functions attract more users.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-03-19 10:36:55 -04:00
Andre Przywara
d0c04926cd nvme: Always invalidate whole cqes[] array
At the moment nvme_read_completion_status() tries to invalidate a single
member of the cqes[] array, which is shady as just a single entry is
not cache line aligned.
The structure is dictated by hardware, and with 16 bytes is smaller than
any cache line we usually deal with. Also multiple entries need to be
consecutive in memory, so we can't pad them to cover a whole cache line.

As a consequence we can only always invalidate all of them - U-Boot just
uses two of them anyway. This is fine, as they are only ever read by the
CPU (apart from the initial zeroing), so they can't become dirty.

Make this obvious by always invalidating the whole array, regardless of
the entry number we are about to read.
Also blow up the allocation size to cover whole cache lines, to avoid
other heap allocations to sneak in.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
2021-03-19 10:36:53 -04:00
Marek Behún
d32211ee95 api: fix a potential serious bug caused by undef CONFIG_SYS_64BIT_LBA
The api_public.h header file undefined macro CONFIG_SYS_64BIT_LBA.

But api/api_storage.c includes this header before including part.h,
causing the type of lbaint_t and subsequently the type signature of
blk_dread() and blk_dwrite() functions to change from the rest of U-Boot
(if CONFIG_SYS_64BIT_LBA is defined for the board).

This is of course wrong, because the call to blk_dread() / blk_dwrite()
will receive mangled arguments.

Fix this by removing the undef of macro CONFIG_SYS_64BIT_LBA and instead
make the immediate code do what it would do as if the macro was not
defined.

Add a FIXME to whoever is maintaining this code.

CI managed to trigger this bug when compiling for lsxhl_defconfig, which
has CONFIG_API selected. The compiler complained about blk_dwrite() and
blk_dread() not matching original declarations:

  include/blk.h:280:15: warning: type of ‘blk_dwrite’ does not match
                                 original declaration
				 [-Wlto-type-mismatch]
  280 | unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t st
      |               ^
  drivers/block/blk-uclass.c:456:15: note: type mismatch in parameter 2
  456 | unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t st
      |               ^

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-19 10:36:06 -04:00
Dario Binacchi
ccc58b4d32 bus: ti-sysc: change in a normal driver
The module defines a duplicate uclass driver for UCLASS_SIMPLE_BUS, but
it is not allowed. This breaks of-platdata and makes the result
non-deterministic.

The driver does not need to be an uclass driver, so lets remove it. I
had turned it into an uclass driver because I thought wrongly it had to
call the dm_scan_fdt_dev routine to work properly, but some tests on the
board have shown otherwise.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-19 10:35:20 -04:00
Michael Walle
73e553a280 board: sl28: disable HS400 mode
Since commit 8ee802f899 ("mmc: fsl_esdhc: make sure delay chain locked
for HS400") HS400 mode is unreliable on LS1028A SoCs. Some workarounds are
missing for this SoC.

Disable HS400 mode for now.

Signed-off-by: Michael Walle <michael@walle.cc>
2021-03-19 10:35:19 -04:00
Frank Wunderlich
93cac85d78 ahci: mediatek: fix undefined reference of dev_err
building with MTK_AHCI enabled results in implicit declaration and
undefined reference of dev_err followed by a segfault of gcc

drivers/ata/mtk_ahci.c: In function 'mtk_ahci_parse_property':
drivers/ata/mtk_ahci.c:65:4: warning:
implicit declaration of function 'dev_err'
drivers/ata/mtk_ahci.c:65: undefined reference to `dev_err'
in function `mtk_ahci_probe':
drivers/ata/mtk_ahci.c:92: undefined reference to `dev_err'
Segmentation fault

fix this by adding the dm/device_compat.h to includes

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2021-03-19 10:35:19 -04:00
Tom Rini
f879f2621b Merge branch 'next' of git://source.denx.de/u-boot-sh into next
- New platforms and related support
2021-03-19 08:20:34 -04:00
Tom Rini
e3310c21a4 - drop unprintable characters from video font header
-----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCYFRW+Q4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXHc0AJ9fMaRhTXa1AmnUgO87HFgHH1ZcRwCfYO7EHZTi
 0bZtL6HrniwUmXyb2U4=
 =J6PL
 -----END PGP SIGNATURE-----

Merge tag 'video-for-v2021.04' of https://source.denx.de/u-boot/custodians/u-boot-video

 - drop unprintable characters from video font header
2021-03-19 08:20:19 -04:00
Tom Rini
d65bd57073 Merge branch '2021-03-17-assorted-fixes'
- Make tests search /sbin for tools, don't use ENODATA in host tools to
  be more portable, avb fix when partition isn't found and a bugfix for
  mediatek mmc.
2021-03-18 12:53:35 -04:00
Andy Shevchenko
9262fe1559 test: Include /sbin to the PATH when creating ext4 disk image
On some distributions the mkfs.ext4 is under /sbin and /sbin is not set
for mere users. Include /sbin to the PATH when creating ext4 disk image,
so that users won't get a scary traceback from Python.

Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-17 12:50:19 -04:00
schspa
0453411998 avb: Fix error when partition not found
part_get_info_by_name will return -1 on error, and >0 on success.

Signed-off-by: schspa <schspa@gmail.com>
Cc: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2021-03-17 12:50:19 -04:00
Simon Glass
29cbc4babf image: Avoid -ENODATA in host tools
Unfortunately -ENODATA is not available in OpenBSD. Use -EBADMSG
instead, to indicate a missing timestamp.

Fixes: c5819701a3 image: Adjust the workings of fit_check_format()
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2021-03-17 12:50:19 -04:00
Daniel Golle
30e76b755b mmc: mtk-sd: don't ignore max-frequency from device tree
commit e58e68d9 ("mmc: mtk-sd: assign plat->cfg.f_max with a correct value")
wrongly assumed that plat->cfg.f_max is always unset at the time
mscd_drv_probe() is run. This is not true in case max-frequency being
defined in device tree, as it is then already set by mmc_of_parse()
in msdc_of_to_plat().
Only set plat->cfg.f_max to the default maximum value in case it is
not already set to a sane value.

Fixes: e58e68d93e ("mmc: mtk-sd: assign plat->cfg.f_max with a correct value")
Cc: Stefan Roese <sr@denx.de>
Cc: Weijie Gao <weijie.gao@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-17 12:27:58 -04:00
Lad Prabhakar
9e346340d7 board: silinux: Enable recovery SPL for EK874 board
Enable building SPL for EK874 board which is based on R8A774C0 SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-03-16 20:09:30 +01:00
Lad Prabhakar
07148c1899 arm: rmobile: Add Silicon Linux EK874 board support
The EK874 development kit from Silicon Linux is made of CAT874 (the main
board) and CAT875 (the sub board that goes on top of CAT874).

This patch adds the required board support to boot Si-Linux EK874 board
based on R8A774C0 SoC.

DTS files apart from r8a774c0-ek874-u-boot.dts and r8a774c0-u-boot.dtsi
have been imported from Linux kernel 5.11 commit f40ddce88593
("Linux 5.11").

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Lad Prabhakar
220f308a5c pinctrl: renesas: Add support for R8A774C0
Renesas RZ/G2E (a.k.a. r8a774c0) is pin compatible with R-Car
E3 (a.k.a. r8a77990), however it doesn't have several automotive
specific peripherals.

This patch hooks R8A774C0 SoC with the pfc driver.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Lad Prabhakar
4ece226e80 pinctrl: renesas: pfc-r8a77990: Sync PFC tables with Linux 5.11
Sync the R8A77990 SoC PFC tables with Linux 5.11 , commit f40ddce88593.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Lad Prabhakar
6180db6e56 arm: dts: r8a774c0: Resync R8A774C0 SoC DTSI with Linux 5.11
Resync the R8A774C0 SoC DTSI with Linux kernel 5.11 commit f40ddce88593
("Linux 5.11").

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Biju Das
5be85de6a8 arm: rmobile: Add HopeRun HiHope RZ/G2H board support
The HiHope RZ/G2H board from HopeRun consists of main board
(HopeRun HiHope RZ/G2H main board) and sub board(HopeRun
HiHope RZ/G2H sub board). The HiHope RZ/G2H sub board sits
below the HiHope RZ/G2H main board.

This patch adds the required board support to boot HopeRun HiHope
RZ/G2H board.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Biju Das
dca070c382 arm: rmobile: Add HopeRun HiHope RZ/G2N board support
The HiHope RZ/G2N board from HopeRun consists of main board
(HopeRun HiHope RZ/G2N main board) and sub board(HopeRun
HiHope RZ/G2N sub board). The HiHope RZ/G2N sub board sits
below the HiHope RZ/G2N main board.

This patch adds the required board support to boot HopeRun HiHope
RZ/G2N board.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Biju Das
b650c83825 arm: rmobile: Add HopeRun HiHope RZ/G2M board support
The HiHope RZ/G2M board from HopeRun consists of main board
(HopeRun HiHope RZ/G2M main board) and sub board(HopeRun
HiHope RZ/G2M sub board). The HiHope RZ/G2M sub board sits
below the HiHope RZ/G2M main board.

This patch adds the required board support to boot HopeRun HiHope
RZ/G2M board.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Biju Das
40ac794524 arm: dts: rmobile: r8a774e1: Synchronize DTs with Linux 5.11
Synchronize r8a774e1 device trees with Linux 5.11,
commit f40ddce88593482919 ("Linux 5.11").

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Biju Das
2141203f58 arm: dts: rmobile: r8a774b1: Synchronize DTs with Linux 5.11
Synchronize r8a774b1 device trees with Linux 5.11,
commit f40ddce88593482919 ("Linux 5.11")

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-03-16 20:09:29 +01:00
Tom Rini
eed127dbd4 Pull request for efi-2021-04-rc5
Bug fixes:
 
 * fix memory type for memory reservation block
 * illegal cast to pointer in initrddump
 * fix compiler warnings
 
 Documentation:
 
 * move README.dfu to HTML documentation
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmBQf6UACgkQxIHbvCwF
 GsQXLg/+M0ldY0t9nreGga/zAJd1MHCx0OohzprpsqRffGfDQyfTvmUVuzlk41Jd
 HPQHoUQhJpQU0Kztcyd4Cy2AsKK76tQrvk+TL83s4NNcWEy7OFPlJ9klCzXLZonK
 apQ14oA5yWcfkiNbhxDiBjouS5o9jXT27afslVynUQ6uMzad+ds4eY0kLTh6zOp5
 hNR+nA4L6XQaMnYKjuypYMANf5NNXXU0g2I+a7BwsjLnHIMTjx82QXnmQ4rFYeX2
 FI9xptxXxoi/M3LXZI0AfQy/WgUccQYNZqtibsogVKLOEPSCBgN4PMpIHpQB/K0K
 yTsSO/VlVrWA9xt4wClpwbTElEdUSFzvJPkD9aXAoUXZldMn4C6uUMmaFCYwIWIQ
 zKV5MPNIegSp9JYX4ezbFYlxe4C1BoGiQfmbPwUYbgGUaS80H32evVaq47dPLXzp
 N1bdpi+XvkvSVLLZ/XG2PtS780pxO7MqZHe8yJEt4XVpHVk/QfpPfKLQwLxD4DpZ
 sgm9oQTt6fWyEWWxkZ5UBt/S059v/+bauDTjtVSD+kd5BKBzG9f3i5xYt8/7oFMK
 kqZJZKZ5UCk3Vwn7ATtJu7vCO7AaTtsIelgAqI4t8UGt12xF1NIioT4KJgL4D4Tm
 p7mzCjsegarLE7C3+TjcYdm/uNrpyrq80TwXJVwgrfX4Fo+TOx4=
 =BO+q
 -----END PGP SIGNATURE-----

Merge tag 'efi-2021-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2021-04-rc5

Bug fixes:

* fix memory type for memory reservation block
* illegal cast to pointer in initrddump
* fix compiler warnings

Documentation:

* move README.dfu to HTML documentation
2021-03-16 08:21:51 -04:00
Heinrich Schuchardt
75d48d11db doc: move README.dfu to HTML documentation
Move README.dfu to doc/usage/dfu.rst and convert to reStructured text.

In the long run this page should be split into two. One for the overview
and one for the dfu command. UEFI capsule updates and dfutftp should be
integrated into the overview page.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-16 09:37:04 +01:00
Simon Glass
64d809b4cb efi: Fix compiler warnings
This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them.

Examples:

cmd/efidebug.c: In function ‘do_efi_capsule_update’:
cmd/efidebug.c:75:49: warning: cast from pointer to integer of different
	size [-Wpointer-to-int-cast]
  ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL));
                                                 ^
include/efi_loader.h:104:9: note: in definition of macro ‘EFI_CALL’
  typeof(exp) _r = exp; \
         ^~~
cmd/efidebug.c:75:49: warning: cast from pointer to integer of different
	size [-Wpointer-to-int-cast]
  ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL));
                                                 ^
include/efi_loader.h:104:19: note: in definition of macro ‘EFI_CALL’
  typeof(exp) _r = exp; \
                   ^~~

In file included from include/common.h:20,
                 from lib/efi_loader/efi_capsule.c:9:
lib/efi_loader/efi_capsule.c: In function ‘efi_update_capsule’:
include/efi_loader.h:83:8: warning: format ‘%lu’ expects argument of type
	‘long unsigned int’, but argument 10 has type ‘size_t’
	{aka ‘unsigned int’} [-Wformat=]
  debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \
        ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:37:21: note: in definition of macro ‘pr_fmt’
 #define pr_fmt(fmt) fmt
                     ^~~
include/log.h:229:2: note: in expansion of macro ‘log’
  log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \
  ^~~
include/log.h:249:2: note: in expansion of macro ‘debug_cond’
  debug_cond(_DEBUG, fmt, ##args)
  ^~~~~~~~~~
include/efi_loader.h:83:2: note: in expansion of macro ‘debug’
  debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \
  ^~~~~
lib/efi_loader/efi_capsule.c:444:2: note: in expansion of macro ‘EFI_ENTRY’
  EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count,
  ^~~~~~~~~
lib/efi_loader/efi_capsule.c:444:19: note: format string is defined here
  EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count,
                 ~~^
                 %u

Signed-off-by: Simon Glass <sjg@chromium.org>
Replace (uintptr_t)NULL by 0.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-16 09:37:04 +01:00