OSDN Git Service

usb: dwc3-msm: Add boot marker
authorZhiqiang Tu <ztu@codeaurora.org>
Fri, 15 Jun 2018 02:52:41 +0000 (10:52 +0800)
committerZhiqiang Tu <ztu@codeaurora.org>
Fri, 6 Jul 2018 00:44:32 +0000 (08:44 +0800)
Add boot marker for booting KPI measurement.

Change-Id: Idf57bed89437d85abc419f7774e0c2d975d214c9
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
drivers/usb/dwc3/dwc3-msm.c

index f94d0ba..8ffb272 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/irq.h>
 #include <linux/extcon.h>
 #include <linux/reset.h>
+#include <soc/qcom/boot_stats.h>
 
 #include "power.h"
 #include "core.h"
@@ -2913,6 +2914,7 @@ static int dwc3_msm_probe(struct platform_device *pdev)
        int ret = 0;
        int ext_hub_reset_gpio;
        u32 val;
+       char boot_marker[40];
 
        mdwc = devm_kzalloc(&pdev->dev, sizeof(*mdwc), GFP_KERNEL);
        if (!mdwc)
@@ -3260,8 +3262,15 @@ static int dwc3_msm_probe(struct platform_device *pdev)
                mdwc->host_only_mode = true;
                mdwc->id_state = DWC3_ID_GROUND;
                dwc3_ext_event_notify(mdwc);
+               snprintf(boot_marker, sizeof(boot_marker),
+                       "M - DRIVER %s Host Ready", dev_name(&pdev->dev));
+       } else {
+               snprintf(boot_marker, sizeof(boot_marker),
+                       "M - DRIVER %s Device Ready", dev_name(&pdev->dev));
        }
 
+       place_marker(boot_marker);
+
        return 0;
 
 put_dwc3: