diff options
| author | Tom Rini <trini@konsulko.com> | 2019-11-01 09:23:21 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2019-11-01 09:23:21 -0400 |
| commit | 82679624f9aa6d1be733c46f3555d5166b6f5b72 (patch) | |
| tree | 8a99cf79bc520b833e155094ef134c0526b1f005 /include | |
| parent | 412326d1bc2d346d7b4faad6fa547eaf065681a2 (diff) | |
| parent | 5d80a1a93d42c8325d65516cc654ff6a9ceec58a (diff) | |
Merge branch '2019-10-30-master-imports'
- Migrate test.py to use python3 and current pytest.
- NVMe bugfixes
- Assorted other fixes
- Android AVB updates.
Diffstat (limited to 'include')
| -rw-r--r-- | include/config_distro_bootcmd.h | 1 | ||||
| -rw-r--r-- | include/errno.h | 11 | ||||
| -rw-r--r-- | include/generic-phy.h | 2 | ||||
| -rw-r--r-- | include/time.h | 1 |
4 files changed, 13 insertions, 2 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 3570a32dff..fc0935fa21 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -189,6 +189,7 @@ "fi\0" \ \ "nvme_boot=" \ + BOOTENV_RUN_PCI_ENUM \ BOOTENV_RUN_NVME_INIT \ BOOTENV_SHARED_BLKDEV_BODY(nvme) #define BOOTENV_DEV_NVME BOOTENV_DEV_BLKDEV diff --git a/include/errno.h b/include/errno.h index ccb7869e17..3af539b9e9 100644 --- a/include/errno.h +++ b/include/errno.h @@ -12,12 +12,21 @@ extern int errno; #define __set_errno(val) do { errno = val; } while (0) +/** + * errno_str() - get description for error number + * + * @errno: error number (negative in case of error) + * Return: string describing the error. If CONFIG_ERRNO_STR is not + * defined an empty string is returned. + */ #ifdef CONFIG_ERRNO_STR const char *errno_str(int errno); #else +static const char error_message[] = ""; + static inline const char *errno_str(int errno) { - return 0; + return error_message; } #endif #endif /* _ERRNO_H */ diff --git a/include/generic-phy.h b/include/generic-phy.h index 947c582f68..95caf58341 100644 --- a/include/generic-phy.h +++ b/include/generic-phy.h @@ -270,7 +270,7 @@ static inline int generic_phy_get_by_name(struct udevice *user, const char *phy_ */ static inline bool generic_phy_valid(struct phy *phy) { - return phy->dev != NULL; + return phy && phy->dev; } #endif /*__GENERIC_PHY_H */ diff --git a/include/time.h b/include/time.h index 1e9b369be7..a1149522ed 100644 --- a/include/time.h +++ b/include/time.h @@ -13,6 +13,7 @@ unsigned long get_timer(unsigned long base); * Granularity may be larger than 1us if hardware does not support this. */ unsigned long timer_get_us(void); +uint64_t get_timer_us(uint64_t base); /* * timer_test_add_offset() |
