mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
acpi: Put the version numbers in a central place
At present two acpi files are built every time since they use a version number from version.h This is not necessary. Make use of the same technique as for the version string, so that they are build only when they change. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
36fc832927
commit
1e4d965b59
4 changed files with 18 additions and 17 deletions
|
@ -19,6 +19,8 @@
|
||||||
U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING
|
U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING
|
||||||
|
|
||||||
const char version_string[] = U_BOOT_VERSION_STRING;
|
const char version_string[] = U_BOOT_VERSION_STRING;
|
||||||
|
const unsigned short version_num = U_BOOT_VERSION_NUM;
|
||||||
|
const unsigned char version_num_patch = U_BOOT_VERSION_NUM_PATCH;
|
||||||
|
|
||||||
static int do_version(struct cmd_tbl *cmdtp, int flag, int argc,
|
static int do_version(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
|
|
|
@ -4,5 +4,7 @@
|
||||||
#define __VERSION_STRING_H__
|
#define __VERSION_STRING_H__
|
||||||
|
|
||||||
extern const char version_string[];
|
extern const char version_string[];
|
||||||
|
extern const unsigned short version_num;
|
||||||
|
extern const unsigned char version_num_patch;
|
||||||
|
|
||||||
#endif /* __VERSION_STRING_H__ */
|
#endif /* __VERSION_STRING_H__ */
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
#include <mapmem.h>
|
#include <mapmem.h>
|
||||||
#include <tables_csum.h>
|
#include <tables_csum.h>
|
||||||
#include <timestamp.h>
|
#include <version_string.h>
|
||||||
#include <version.h>
|
|
||||||
#include <acpi/acpi_table.h>
|
#include <acpi/acpi_table.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
#include <dm/acpi.h>
|
#include <dm/acpi.h>
|
||||||
|
@ -25,12 +24,12 @@
|
||||||
* to have valid date. So for U-Boot version 2021.04 OEM_REVISION is set to
|
* to have valid date. So for U-Boot version 2021.04 OEM_REVISION is set to
|
||||||
* value 0x20210401.
|
* value 0x20210401.
|
||||||
*/
|
*/
|
||||||
#define OEM_REVISION ((((U_BOOT_VERSION_NUM / 1000) % 10) << 28) | \
|
#define OEM_REVISION ((((version_num / 1000) % 10) << 28) | \
|
||||||
(((U_BOOT_VERSION_NUM / 100) % 10) << 24) | \
|
(((version_num / 100) % 10) << 24) | \
|
||||||
(((U_BOOT_VERSION_NUM / 10) % 10) << 20) | \
|
(((version_num / 10) % 10) << 20) | \
|
||||||
((U_BOOT_VERSION_NUM % 10) << 16) | \
|
((version_num % 10) << 16) | \
|
||||||
(((U_BOOT_VERSION_NUM_PATCH / 10) % 10) << 12) | \
|
(((version_num_patch / 10) % 10) << 12) | \
|
||||||
((U_BOOT_VERSION_NUM_PATCH % 10) << 8) | \
|
((version_num_patch % 10) << 8) | \
|
||||||
0x01)
|
0x01)
|
||||||
|
|
||||||
int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
|
int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
|
||||||
|
|
|
@ -11,10 +11,8 @@
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <mapmem.h>
|
#include <mapmem.h>
|
||||||
#include <timestamp.h>
|
|
||||||
#include <version.h>
|
|
||||||
#include <tables_csum.h>
|
#include <tables_csum.h>
|
||||||
#include <version.h>
|
#include <version_string.h>
|
||||||
#include <acpi/acpigen.h>
|
#include <acpi/acpigen.h>
|
||||||
#include <acpi/acpi_device.h>
|
#include <acpi/acpi_device.h>
|
||||||
#include <acpi/acpi_table.h>
|
#include <acpi/acpi_table.h>
|
||||||
|
@ -26,12 +24,12 @@
|
||||||
|
|
||||||
#define BUF_SIZE 4096
|
#define BUF_SIZE 4096
|
||||||
|
|
||||||
#define OEM_REVISION ((((U_BOOT_VERSION_NUM / 1000) % 10) << 28) | \
|
#define OEM_REVISION ((((version_num / 1000) % 10) << 28) | \
|
||||||
(((U_BOOT_VERSION_NUM / 100) % 10) << 24) | \
|
(((version_num / 100) % 10) << 24) | \
|
||||||
(((U_BOOT_VERSION_NUM / 10) % 10) << 20) | \
|
(((version_num / 10) % 10) << 20) | \
|
||||||
((U_BOOT_VERSION_NUM % 10) << 16) | \
|
((version_num % 10) << 16) | \
|
||||||
(((U_BOOT_VERSION_NUM_PATCH / 10) % 10) << 12) | \
|
(((version_num_patch / 10) % 10) << 12) | \
|
||||||
((U_BOOT_VERSION_NUM_PATCH % 10) << 8) | \
|
((version_num_patch % 10) << 8) | \
|
||||||
0x01)
|
0x01)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue