diff options
| author | Tom Rini <[email protected]> | 2023-11-20 09:19:50 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-11-20 09:19:50 -0500 |
| commit | dca7a8958f8d0dbd53072caa4353353e062d80ca (patch) | |
| tree | 2ba9b27f1799d23f5bd3355feaf6276646297b9d /drivers/core | |
| parent | 9e4b42267e1fb5805ecddbb92629f456d8cd4047 (diff) | |
| parent | 24ca49b33af98d54d6cd2e845f071f6565345ffd (diff) | |
Merge tag 'v2024.01-rc3' into next
Prepare v2024.01-rc3
Diffstat (limited to 'drivers/core')
| -rw-r--r-- | drivers/core/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/core/ofnode.c | 18 |
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 209d90e01fa..1081d61fcf0 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -48,7 +48,6 @@ config VPL_DM config DM_WARN bool "Enable warnings in driver model" depends on DM - default y help Enable this to see warnings related to driver model. diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 29a42945102..f72ea416cf1 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -991,6 +991,24 @@ ofnode ofnode_get_chosen_node(const char *name) return ofnode_path(prop); } +int ofnode_read_baud(void) +{ + const char *str, *p; + u32 baud; + + str = ofnode_read_chosen_string("stdout-path"); + if (!str) + return -EINVAL; + + /* Parse string serial0:115200n8 */ + p = strchr(str, ':'); + if (!p) + return -EINVAL; + + baud = dectoul(p + 1, NULL); + return baud; +} + const void *ofnode_read_aliases_prop(const char *propname, int *sizep) { ofnode node; |
