mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 12:46:14 +02:00
Pull request efi-2024-10-rc4
Documentation: * Add description of the pwm command UEFI * Correct printf codes in mkeficapsule * Allow CONFIG_EFI_LOADER_BOUNCE_BUFFER on all architectures * Free memory in efi_get_dp_from_boot() -----BEGIN PGP SIGNATURE----- iQJWBAABCABAFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmbKLooiHGhlaW5yaWNo LnNjaHVjaGFyZHRAY2Fub25pY2FsLmNvbQAKCRCE7i+CcTdTS/3bD/9gcqqxXmNo KkEryoHSANX0kWBKjHFb/yC8/IxdjnEwz7kfkmvRdyY1kGebHUbSYseT6xbmQjLH Bx1Fc0BjYcyvd0SECdbxoxoTltl7yknvx10GV0nQliXz1tdhKEhR1/IsP9IMG7r8 wyYBssScf3FL64odaN/V0/3c0dUbb6OLIsceSO9VMjXEb9EdimRVhLH12eMn78a2 8+quGJrWsJ5hbnlCYZo+R4GVB/0BD8C0ww0IYEukly/R0pyHycwtbA1kfqd4oOv9 TeDfxrDRxsHhaqWb3aycmplvot0pLR0to0h7JbUC8p8idLyTIHvrUj7Th6hN1UAD oz6Xmih6qdxqDJ98bI6ImvGpsLr6G9SJm4S1RT/ZCx9MrM4pMWMdRMxCbS8klbwv Z7bV+cnksWP14+PoJwD1Bg6976VK4XEfp3i7JZeFhrnnNTjTlgcTAjEdiEYdQ1V4 tcqcMQWOU/9IlLwSSIqr5+TEsOUZWI2viCYVk8b4HpM8UzqLcL+N6HQqsKjH0O5P HSfEn/0e/aLWiVT+09hNtj9NYrcsGCUQnt4U/DegmG9hbvXlTIy7MTbD+UWxjVUO ceNGrzu5nvxRuJO3u0jC0mkph3y8QG+I0gmaJYvVG+mqAml4+WQjS88IsvUuZm+W Uy0rCLp/vsWVyhO5yPEdxl8IcsRP4IZvVQ== =bFwn -----END PGP SIGNATURE----- Merge tag 'efi-2024-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2024-10-rc4 Documentation: * Add description of the pwm command UEFI * Correct printf codes in mkeficapsule * Allow CONFIG_EFI_LOADER_BOUNCE_BUFFER on all architectures * Free memory in efi_get_dp_from_boot()
This commit is contained in:
commit
ee2af844ba
91
doc/usage/cmd/pwm.rst
Normal file
91
doc/usage/cmd/pwm.rst
Normal file
@ -0,0 +1,91 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
.. index::
|
||||
single: pwm (command)
|
||||
|
||||
pwm command
|
||||
===========
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
pwm invert <pwm_dev_num> <channel> <polarity>
|
||||
pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns>
|
||||
pwm enable <pwm_dev_num> <channel>
|
||||
pwm disable <pwm_dev_num> <channel>
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The ``pwm`` command is used to access and configure PWM (Pulse Width Modulation)
|
||||
signals.
|
||||
|
||||
pwm invert
|
||||
----------
|
||||
|
||||
* If the value of ``polarity`` is 0, the default polarity is used.
|
||||
* If the value of ``polarity`` is 1, the polarity is inverted.
|
||||
|
||||
pwm config
|
||||
----------
|
||||
|
||||
Configure the period and duty period in nanoseconds.
|
||||
|
||||
pwm enable
|
||||
----------
|
||||
|
||||
Enable output on the configured device and channel.
|
||||
|
||||
pwm disable
|
||||
-----------
|
||||
|
||||
Disable output on the configured device and channel.
|
||||
|
||||
pwm_dev_num
|
||||
Device number of the pulse width modulation device
|
||||
|
||||
channel
|
||||
Output channel of the PWM device
|
||||
|
||||
polarity
|
||||
* 0 - Use normal polarity
|
||||
* 1 - Use inverted polarity
|
||||
|
||||
duty_ns
|
||||
Duty period in ns
|
||||
|
||||
period_ns
|
||||
Period time in ns
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Configure device 0, channel 0 to 20 µs period and 14 µs (that is, 70%) duty period::
|
||||
|
||||
=> pwm config 0 0 20000 14000
|
||||
|
||||
Enable output on the configured device and channel::
|
||||
|
||||
=> pwm enable 0 0
|
||||
|
||||
Disable output on the configured device and channel::
|
||||
|
||||
=> pwm disable 0 0
|
||||
|
||||
Invert the signal on the configured device and channel::
|
||||
|
||||
=> pwm invert 0 0 1
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The ``pwm`` command is only available if CONFIG_CMD_PWM=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
If the command succeeds, the return value ``$?`` is set to 0. If an error occurs, the
|
||||
return value ``$?`` is set to 1.
|
||||
@ -93,6 +93,7 @@ Shell commands
|
||||
cmd/pinmux
|
||||
cmd/printenv
|
||||
cmd/pstore
|
||||
cmd/pwm
|
||||
cmd/qfw
|
||||
cmd/read
|
||||
cmd/reset
|
||||
|
||||
@ -364,7 +364,6 @@ endif
|
||||
|
||||
config EFI_LOADER_BOUNCE_BUFFER
|
||||
bool "EFI Applications use bounce buffers for DMA operations"
|
||||
depends on ARM64
|
||||
help
|
||||
Some hardware does not support DMA to full 64bit addresses. For this
|
||||
hardware we can create a bounce buffer so that payloads don't have to
|
||||
|
||||
@ -74,6 +74,7 @@ out:
|
||||
*/
|
||||
struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid)
|
||||
{
|
||||
struct efi_device_path *file_path = NULL;
|
||||
struct efi_load_option lo;
|
||||
void *var_value;
|
||||
efi_uintn_t size;
|
||||
@ -92,11 +93,11 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid)
|
||||
if (ret != EFI_SUCCESS)
|
||||
goto err;
|
||||
|
||||
return efi_dp_from_lo(&lo, guid);
|
||||
file_path = efi_dp_from_lo(&lo, guid);
|
||||
|
||||
err:
|
||||
free(var_value);
|
||||
return NULL;
|
||||
return file_path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
#include <inttypes.h>
|
||||
#include <pe.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@ -691,7 +692,7 @@ static uint32_t dump_fmp_payload_header(
|
||||
static void dump_capsule_auth_header(
|
||||
struct efi_firmware_image_authentication *capsule_auth_hdr)
|
||||
{
|
||||
printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08lX\n",
|
||||
printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08" PRIX64 "\n",
|
||||
capsule_auth_hdr->monotonic_count);
|
||||
printf("EFI_FIRMWARE_IMAGE_AUTH.AUTH_INFO.HDR.dwLENGTH\t: %08X\n",
|
||||
capsule_auth_hdr->auth_info.hdr.dwLength);
|
||||
@ -724,9 +725,9 @@ static void dump_fmp_capsule_image_header(
|
||||
image_hdr->update_image_size);
|
||||
printf("FMP_CAPSULE_IMAGE_HDR.UPDATE_VENDOR_CODE_SIZE\t: %08X\n",
|
||||
image_hdr->update_vendor_code_size);
|
||||
printf("FMP_CAPSULE_IMAGE_HDR.UPDATE_HARDWARE_INSTANCE\t: %08lX\n",
|
||||
printf("FMP_CAPSULE_IMAGE_HDR.UPDATE_HARDWARE_INSTANCE\t: %08" PRIX64 "\n",
|
||||
image_hdr->update_hardware_instance);
|
||||
printf("FMP_CAPSULE_IMAGE_HDR.IMAGE_CAPSULE_SUPPORT\t: %08lX\n",
|
||||
printf("FMP_CAPSULE_IMAGE_HDR.IMAGE_CAPSULE_SUPPORT\t: %08" PRIX64 "\n",
|
||||
image_hdr->image_capsule_support);
|
||||
|
||||
printf("--------\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user