Merge "serial: msm_geni_serial: Add boot KPI markers"

This commit is contained in:
qctecmdr 2021-04-26 12:18:03 -07:00 committed by Gerrit - the friendly Code Review server
commit 5ad91ebb04

View File

@ -26,6 +26,7 @@
#include <linux/pinctrl/consumer.h>
#include <linux/dma-mapping.h>
#include <uapi/linux/msm_geni_serial.h>
#include <soc/qcom/boot_stats.h>
/* UART specific GENI registers */
#define SE_UART_LOOPBACK_CFG (0x22C)
@ -3146,6 +3147,7 @@ static int msm_geni_serial_probe(struct platform_device *pdev)
struct uart_driver *drv;
const struct of_device_id *id;
bool is_console = false;
char boot_marker[40];
id = of_match_device(msm_geni_device_tbl, &pdev->dev);
if (!id) {
@ -3172,6 +3174,14 @@ static int msm_geni_serial_probe(struct platform_device *pdev)
line = pdev->id;
}
if (strcmp(id->compatible, "qcom,msm-geni-console") == 0)
snprintf(boot_marker, sizeof(boot_marker),
"M - DRIVER GENI_UART_%d Init", line);
else
snprintf(boot_marker, sizeof(boot_marker),
"M - DRIVER GENI_HS_UART_%d Init", line);
place_marker(boot_marker);
is_console = (drv->cons ? true : false);
dev_port = get_port_from_line(line, is_console);
if (IS_ERR_OR_NULL(dev_port)) {
@ -3258,6 +3268,14 @@ static int msm_geni_serial_probe(struct platform_device *pdev)
else
spin_lock_init(&dev_port->rx_lock);
if (strcmp(id->compatible, "qcom,msm-geni-console") == 0)
snprintf(boot_marker, sizeof(boot_marker),
"M - DRIVER GENI_UART_%d Ready", line);
else
snprintf(boot_marker, sizeof(boot_marker),
"M - DRIVER GENI_HS_UART_%d Ready", line);
place_marker(boot_marker);
exit_geni_serial_probe:
IPC_LOG_MSG(dev_port->ipc_log_misc, "%s: ret:%d\n",
__func__, ret);