OSDN Git Service

serial: msm_serial_hs: add boot marker
authorZhiqiang Tu <ztu@codeaurora.org>
Tue, 22 May 2018 07:34:41 +0000 (15:34 +0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Fri, 1 Jun 2018 06:48:48 +0000 (23:48 -0700)
Add boot marker for booting KPI measurement.

Change-Id: Ia54411a901cc09493f2085af42c3a2188438e29d
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
drivers/tty/serial/msm_serial_hs.c

index 4d02ff2..0644943 100644 (file)
@@ -66,6 +66,7 @@
 #include <linux/msm-sps.h>
 #include <linux/platform_data/msm_serial_hs.h>
 #include <linux/msm-bus.h>
+#include <soc/qcom/boot_stats.h>
 
 #include "msm_serial_hs_hwreg.h"
 #define UART_SPS_CONS_PERIPHERAL 0
@@ -3417,6 +3418,7 @@ static int msm_hs_probe(struct platform_device *pdev)
        struct msm_serial_hs_platform_data *pdata = pdev->dev.platform_data;
        unsigned long data;
        char name[30];
+       char boot_marker[40];
 
        if (pdev->dev.of_node) {
                dev_dbg(&pdev->dev, "device tree enabled\n");
@@ -3442,6 +3444,10 @@ static int msm_hs_probe(struct platform_device *pdev)
                pdev->dev.platform_data = pdata;
        }
 
+       snprintf(boot_marker, sizeof(boot_marker),
+                       "M - DRIVER MSM HS-UART_%d Init", pdev->id);
+       place_marker(boot_marker);
+
        if (pdev->id < 0 || pdev->id >= UARTDM_NR) {
                dev_err(&pdev->dev, "Invalid plaform device ID = %d\n",
                                                                pdev->id);
@@ -3675,6 +3681,9 @@ static int msm_hs_probe(struct platform_device *pdev)
        if (!ret) {
                msm_hs_clk_bus_unvote(msm_uport);
                msm_serial_hs_rt_init(uport);
+               snprintf(boot_marker, sizeof(boot_marker),
+                               "M - DRIVER MSM HS-UART_%d Ready", pdev->id);
+               place_marker(boot_marker);
                return ret;
        }