diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 4 | ||||
-rw-r--r-- | lib/fdtdec.c | 5 | ||||
-rw-r--r-- | lib/vsprintf.c | 16 |
3 files changed, 21 insertions, 4 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 3c8de869b1f..7ec8c98da2b 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -45,7 +45,9 @@ config REGEX "setexpr". config LIB_RAND - bool + bool "Pseudo-random library support " + help + This library provides pseudo-random number generator functions. source lib/rsa/Kconfig diff --git a/lib/fdtdec.c b/lib/fdtdec.c index b586da2a563..9877849f99b 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -22,9 +22,6 @@ DECLARE_GLOBAL_DATA_PTR; #define COMPAT(id, name) name static const char * const compat_names[COMPAT_COUNT] = { COMPAT(UNKNOWN, "<none>"), - COMPAT(NVIDIA_TEGRA20_USB, "nvidia,tegra20-ehci"), - COMPAT(NVIDIA_TEGRA30_USB, "nvidia,tegra30-ehci"), - COMPAT(NVIDIA_TEGRA114_USB, "nvidia,tegra114-ehci"), COMPAT(NVIDIA_TEGRA20_EMC, "nvidia,tegra20-emc"), COMPAT(NVIDIA_TEGRA20_EMC_TABLE, "nvidia,tegra20-emc-table"), COMPAT(NVIDIA_TEGRA20_KBC, "nvidia,tegra20-kbc"), @@ -75,8 +72,10 @@ static const char * const compat_names[COMPAT_COUNT] = { COMPAT(AMS_AS3722, "ams,as3722"), COMPAT(INTEL_ICH_SPI, "intel,ich-spi"), COMPAT(INTEL_QRK_MRC, "intel,quark-mrc"), + COMPAT(INTEL_X86_PINCTRL, "intel,x86-pinctrl"), COMPAT(SOCIONEXT_XHCI, "socionext,uniphier-xhci"), COMPAT(COMPAT_INTEL_PCH, "intel,bd82x6x"), + COMPAT(COMPAT_INTEL_IRQ_ROUTER, "intel,irq-router"), }; const char *fdtdec_get_compatible(enum fdt_compat_id id) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index bedc865240d..a9b8a3ae67f 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -909,3 +909,19 @@ void print_grouped_ull(unsigned long long int_val, int digits) grab = 3; } } + +bool str2off(const char *p, loff_t *num) +{ + char *endptr; + + *num = simple_strtoull(p, &endptr, 16); + return *p != '\0' && *endptr == '\0'; +} + +bool str2long(const char *p, ulong *num) +{ + char *endptr; + + *num = simple_strtoul(p, &endptr, 16); + return *p != '\0' && *endptr == '\0'; +} |