From patchwork Mon May 25 16:48:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 187193 Delivered-To: patches@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp5097042ilb; Mon, 25 May 2020 09:48:19 -0700 (PDT) X-Received: by 2002:a2e:7504:: with SMTP id q4mr11283561ljc.339.1590425299478; Mon, 25 May 2020 09:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590425299; cv=none; d=google.com; s=arc-20160816; b=QEg+vQTrMO8H6m9PTQZ53kcLcejRmX67171vBxaUk7jJY3ICbvNRka3tc3bCyfLY0h PJxICpnQ3zoahaNttzb26vIhDgep9w82gvgbX2s5PQUAfruBKbvugMXQbCr7h1EDJZrO IIWEo3zJP7QbF6347Pobv82f2+CJSZt+1k2HMUwnxnn+KCz3j6NhMe7BOEsUp37x070T dcWzVrqoFGNmXcScot7HhcrI8AjwBXkdTo89cz0JvjNdwiCa8GfgDxy1fklFWOCbRcaa 2vsvW1/VoGBl7XOx/NIzi9wZUiAp2ksQQUjeyCNagpefvMGE1s/BY+woyeOgdPz9sTz8 uAZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=qFuxiaLQtj25y9sBPvZbzcmOPRrE2+OoU7mnXmLdh80=; b=P15Kb00ZSS9Z5DYEu6aPw1axYGGzLiI1fcgu3ViGH1UKfMpxvCiFSm70rWfpIO7AV4 LJ0hXHeI+PPS2oIzd05z1dBXAaQSTpSE14pQFvozW+DtP1DS6LEM+p9x09kWRqxUGghr Spe50NUtBGVLwppTA53urLmUS3/A0vz5E15d1qoHNqbpNXsBXlkMTefzi7hlGawf0VFi t3sIfMlIt0Zj0skC/46FRkvBNIXhUV+52TDAK9f/Ld0j70wCxpVoPuAn7AP8AeB52/vU LQnMTGS3Cjlv3Ti5dZWPjRFahqvcsFDUIg5rNGc7Bbi7jO4nA8UVS/7zuRBW+GiLq8qL ZbfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAkQHu34; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m28sor8915150ljc.10.2020.05.25.09.48.19 for (Google Transport Security); Mon, 25 May 2020 09:48:19 -0700 (PDT) Received-SPF: pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAkQHu34; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qFuxiaLQtj25y9sBPvZbzcmOPRrE2+OoU7mnXmLdh80=; b=AAkQHu34gVqwD+D2io1X/xsVdIEw5/KTRUNCC/awsiMQ7KbAutU7D0Y6s7rtgmWObv Zi//1vNOknwT67jcp752ncHZHZmVuzUv8CaK3P1lHjNrxZUqfhhQv2YiCzPT4+PMXxHt fEE+b0SIKZS66MDiQCMKoJehuSg/kotgyd/+oUhBS0Sqq5dblAiVlGJ67aejHulH7PKD 4ZpllbZtsuxUOjvq8z+ubrFYZEUa+Zyq3cmG6ReT1nMbqxDsQujN1wfqUO2VUCsO4r3I GOlwv7hIA3RVr2E1QGWDGfZ5wVhl1zebLP6Yoqe8sN75tXTR0z69yj4SgO0/ZTbylcM3 khhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qFuxiaLQtj25y9sBPvZbzcmOPRrE2+OoU7mnXmLdh80=; b=EN5nlEmE1OMLZZchJEVZ+n+nN++fORSn12C++R9WH4fgBynQABSJ7G5fIUqrgtmSBk xQ+HXslnggD0L0E+aeEvi/aiYPWpzR/r18ktgZHHjpwTQ0/xtdqqguDsNsvvVvm5dplt 0k7ZPzLJ20cuULiBtv+3FewHErj7c7H0r89z16JYa0LBsCTf+U45qDK71Kt6xGwDxaMB QNwvMAQtzMXkOjhXKDlJaQDWP4oSAtWmGj4ml/OqSyO+7bzbck370PmhN2elOwo0xJyj qwEttEp8kong4xg+d/0l+1VA0RMJ4diAZT/cieJgmDUGgtObaQW8+twi/h5lEARCoelK Ttrw== X-Gm-Message-State: AOAM530ZSq6sYiA/aQx5P6fgQWGMfPmfXJisL2rQLUTog6eoKnSVI+dp dGXi1Xshe9YT6qPS0wUwUV+nz6mH X-Google-Smtp-Source: ABdhPJyeiI7t9sxbcbWgBBAvyIrby0YcjkJfjSkpCvcX492Za8Xf13NcKAnKE4AknK9Swn5an8h1MA== X-Received: by 2002:a2e:8018:: with SMTP id j24mr13760743ljg.99.1590425299065; Mon, 25 May 2020 09:48:19 -0700 (PDT) Return-Path: Received: from lothlann.lan ([188.162.64.24]) by smtp.gmail.com with ESMTPSA id y21sm2914337ljg.48.2020.05.25.09.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 09:48:18 -0700 (PDT) From: Dmitry Baryshkov To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 1/4] soc: qcom: socinfo: add support for newer socinfo data Date: Mon, 25 May 2020 19:48:14 +0300 Message-Id: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Add support for newer Qualcomm SoC info structures (up to version 0.15). Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) -- 2.26.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index ebb49aee179b..0e6adf1161c0 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -24,6 +24,7 @@ #define SOCINFO_VERSION(maj, min) ((((maj) & 0xffff) << 16)|((min) & 0xffff)) #define SMEM_SOCINFO_BUILD_ID_LENGTH 32 +#define SMEM_SOCINFO_CHIP_ID_LENGTH 32 /* * SMEM item id, used to acquire handles to respective @@ -121,6 +122,16 @@ struct socinfo { __le32 chip_family; __le32 raw_device_family; __le32 raw_device_num; + /* Version 13 */ + __le32 nproduct_id; + char chip_id[SMEM_SOCINFO_CHIP_ID_LENGTH]; + /* Version 14 */ + __le32 num_clusters; + __le32 ncluster_array_offset; + __le32 num_defective_parts; + __le32 ndefective_parts_array_offset; + /* Version 15 */ + __le32 nmodem_supported; }; #ifdef CONFIG_DEBUG_FS @@ -135,6 +146,12 @@ struct socinfo_params { u32 raw_ver; u32 hw_plat; u32 fmt; + u32 nproduct_id; + u32 num_clusters; + u32 ncluster_array_offset; + u32 num_defective_parts; + u32 ndefective_parts_array_offset; + u32 nmodem_supported; }; struct smem_image_version { @@ -268,9 +285,19 @@ static int qcom_show_pmic_die_revision(struct seq_file *seq, void *p) return 0; } +static int qcom_show_chip_id(struct seq_file *seq, void *p) +{ + struct socinfo *socinfo = seq->private; + + seq_printf(seq, "%s\n", socinfo->chip_id); + + return 0; +} + QCOM_OPEN(build_id, qcom_show_build_id); QCOM_OPEN(pmic_model, qcom_show_pmic_model); QCOM_OPEN(pmic_die_rev, qcom_show_pmic_die_revision); +QCOM_OPEN(chip_id, qcom_show_chip_id); #define DEFINE_IMAGE_OPS(type) \ static int show_image_##type(struct seq_file *seq, void *p) \ @@ -309,6 +336,34 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt); switch (qcom_socinfo->info.fmt) { + case SOCINFO_VERSION(0, 15): + qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported); + + debugfs_create_u32("nmodem_supported", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.nmodem_supported); + /* Fall through */ + case SOCINFO_VERSION(0, 14): + qcom_socinfo->info.num_clusters = __le32_to_cpu(info->num_clusters); + qcom_socinfo->info.ncluster_array_offset = __le32_to_cpu(info->ncluster_array_offset); + qcom_socinfo->info.num_defective_parts = __le32_to_cpu(info->num_defective_parts); + qcom_socinfo->info.ndefective_parts_array_offset = __le32_to_cpu(info->ndefective_parts_array_offset); + + debugfs_create_u32("num_clusters", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.num_clusters); + debugfs_create_u32("ncluster_array_offset", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.ncluster_array_offset); + debugfs_create_u32("num_defective_parts", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.num_defective_parts); + debugfs_create_u32("ndefective_parts_array_offset", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.ndefective_parts_array_offset); + /* Fall through */ + case SOCINFO_VERSION(0, 13): + qcom_socinfo->info.nproduct_id = __le32_to_cpu(info->nproduct_id); + + debugfs_create_u32("nproduct_id", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.nproduct_id); + DEBUGFS_ADD(info, chip_id); + /* Fall through */ case SOCINFO_VERSION(0, 12): qcom_socinfo->info.chip_family = __le32_to_cpu(info->chip_family); From patchwork Mon May 25 16:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 187194 Delivered-To: patches@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp5097053ilb; Mon, 25 May 2020 09:48:20 -0700 (PDT) X-Received: by 2002:a2e:9648:: with SMTP id z8mr11412575ljh.451.1590425300705; Mon, 25 May 2020 09:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590425300; cv=none; d=google.com; s=arc-20160816; b=L72DswD2XCC+SvdFPiWnjGEPI8YoilM/6m9zvU9Y3rz0c/XELW6V9OKynlQpLDXGh/ 3o0tTjUZ+/5MCxGLRnaGgx2WOJ9MO6cug3xNbqULGF+0WQJf5mPidaEB7UGvVJxUTxJS A/2/fKwxB4pz1pRSsI8KXuJvUi+7JCS7hg6ZphL4kk/2BlmhDFl6f9TYOlMiAbGqgnqE Fr+47web7PCIWSkCONd6MO5G62VS6iPEkfOjOqGxLNFBGmIw5zZ41qBIC5bE8dKrfvJs tsyYlxk/MKlS7GVjrKXDAgGNZAFjVA/LrDBqHZqLofGS4Umb7ltvxAVL8mHEQfYERSkn oLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hLLac1fRuRW93cBHaKE0yJPxIw5p9I3En46VkMcc2XY=; b=Bw95qsFX8Cr5/rJ7NBLl9djZEkciVG1Nqi5j6Tcp+gLNK8eNAyQe16Oa+HeXDfF6Vm kW4FWGzGJ7XdiuV722XfVElqbo8neAujnghWgdo0HMHibjs/iqS6B+MD7ZUiEmjfQIhA MG+/+ro4rytm4rRXDQMnJ8Q40Ks0yiAjM9cydhZ7FYo8uEV5tM1ziJD4ArK8TO/YkEUo lLAY4kftzlD0ktP9rdHGY9XN+Pa8qfSJF0FrCGuizK0zU72okr+t38tvRUZ7WKDrd5SI VVNlYyNNXkl54GxrnNkcKxO5W6MsQcHurkqcwTkbTkp6HA59OHZ9Q6boXC0Yd7WHtrPx q8eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vkWuIn0z; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m28sor8915175ljc.10.2020.05.25.09.48.20 for (Google Transport Security); Mon, 25 May 2020 09:48:20 -0700 (PDT) Received-SPF: pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vkWuIn0z; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hLLac1fRuRW93cBHaKE0yJPxIw5p9I3En46VkMcc2XY=; b=vkWuIn0zGI0GsGTu8GD+A30tBGc9GakWacPqWoPMXYMbqMx1/wvSjxaULu207Z6Rg4 g2FQDU1uyFBksSoK9gF+6Qt3/RNkGp9RGJWm4mmJu7/XWA2hTYHtmaPX1xnQb/2M+GGr dJxg1ojN6CyvHUDAYpV41QFxzyfkLW/aX+c+GuosLe1rvtpm8kyffGPnf6pFAX9VUqXV IZAo1EF9AYBKrOv+e2d5oxLJdZaW6cklQoMymW2no3XypppgTVRbd4poYHviuTDecnfC P8D79U6q/vwRJ4yn9GRKZ0IifnmLDXyPdg3OFLAwH6X9PsRHC0Nwmux8dhutxBvZ0PyY crzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hLLac1fRuRW93cBHaKE0yJPxIw5p9I3En46VkMcc2XY=; b=U98CfkivaGHOBTvku4iwkU1fAn/ezW9yahQlTJ4YDAm3KAJ66GAJTvuhU0Z7PLAI6K GkBa6cBfIQS1obCcLZBSOrJCS9QIfrHoQ4o6a8zrA09MAiHO9kOumtDSUQhd1iKBuTkp 6Mv3brGIfZwgKoEIMW8LbeLHClsjMgVEjFtXg86dI3wWWT1lzNGNrGGOemCOKeAoUMxK DM/H7shxjz/sbCx/bq9iGIpOckKOoRHig9wxG2f3/PToB5LlwSuCWWc0iteM7yU2pUCf c7CDaAd9CaYpuUWe8C0kk1UmjFcWAT4JEz53HDSGokshBepBf4/A5UxsnTIxtsKdVQ3m pxwA== X-Gm-Message-State: AOAM530R1Ymzfvie6lGDcFuArhniythOeb1HwCzTSxvNNiN9mR+JcdSc fAr8ARBeRWKCnimyqIo8ycKb0yfH X-Google-Smtp-Source: ABdhPJyX3HhRY0EYbLe4KxnpTY7caK05udU0l6Usk0hAMdvcyCn2ESccsrAMR3FbZDxf93aUgNd1Kg== X-Received: by 2002:a2e:890e:: with SMTP id d14mr14198060lji.216.1590425300344; Mon, 25 May 2020 09:48:20 -0700 (PDT) Return-Path: Received: from lothlann.lan ([188.162.64.24]) by smtp.gmail.com with ESMTPSA id y21sm2914337ljg.48.2020.05.25.09.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 09:48:19 -0700 (PDT) From: Dmitry Baryshkov To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 2/4] soc: qcom: socinfo: fix printing of pmic_model Date: Mon, 25 May 2020 19:48:15 +0300 Message-Id: <20200525164817.2938638-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> References: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Print sensible string instead of just "(null)" for unknown PMIC models. Also as we are at it, do not let debugfs handler access past pmic_models array. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.26.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 0e6adf1161c0..41f48c3447cc 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -269,7 +269,10 @@ static int qcom_show_pmic_model(struct seq_file *seq, void *p) if (model < 0) return -EINVAL; - seq_printf(seq, "%s\n", pmic_models[model]); + if (model <= ARRAY_SIZE(pmic_models) && pmic_models[model]) + seq_printf(seq, "%s\n", pmic_models[model]); + else + seq_printf(seq, "unknown (%d)\n", model); return 0; } From patchwork Mon May 25 16:48:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 187195 Delivered-To: patches@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp5097069ilb; Mon, 25 May 2020 09:48:22 -0700 (PDT) X-Received: by 2002:a2e:b5d0:: with SMTP id g16mr12699618ljn.436.1590425302444; Mon, 25 May 2020 09:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590425302; cv=none; d=google.com; s=arc-20160816; b=VqjJ0Tg1XFUue42PZJVyjVEI3XcUHWF93oYtfSsufC+KaasPhzTWWokApDiDVPmW0k 30PA+daMm3n6m8HzXk0Cvi8wi998ay4MumP2dCieJDYssgNwAJ+FFS7t7+Fo3x1684Wz v/K+NX3De7JVqZai5rsrLqQDyv3gg0hdRz38YxOSroKT7lucQ9bsy9LkFhopK7Cwli6p pa2UqBx/zC/56qMFE8mTnsbryOzsZIQLOLy6AFT8p1fzvJudgbitdu/NG9hCrm7hBTge dfouCiYFWqNlLjSbc72zFI8//RSQ8OAufb9ZuRVmvF1MrgjJM1Lu5mBeeAz2r3OBL31P GWUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=qiWKxhYi/YMJ+m01984GaO2DEsOeOP9WoQp14EKeVgY=; b=Fb/ImmrhokE2KyjjFRfc+5JNlGSCmAXvx4ZUcw24pV+uQDOOALTA2/h6S/dVKdtxKF 8z9VDnDmZOAXCFP+q734EqcUHj+gYQq596KEH0jaKP131iNcf929CF9jFxHEg834P2v7 VZLnz/byha9r4A8G+fL/DP+ytZ/BEi3GJVfTr7SvEh09sK7nnO6tKTs9xnOaazez5wyJ M/NjVLXB7lVfjIQLwHqFCCtQwZ1tyZJGCnYPcytF3TZ87RWvmtn4rsDga11RFFQdfADt 3nxTr2ab9olitju3e3DFR9HFOtUfQb2SxH+lIbiO8/IrOtkVikb0zcSg36vlM1Naoevj tmNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jker/vaU"; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e17sor7566305ljn.71.2020.05.25.09.48.22 for (Google Transport Security); Mon, 25 May 2020 09:48:22 -0700 (PDT) Received-SPF: pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jker/vaU"; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qiWKxhYi/YMJ+m01984GaO2DEsOeOP9WoQp14EKeVgY=; b=Jker/vaUihP9dB/QptkseqeqyGMgRlEGX8R6uIqyNsuPjg1FR2WNDHwGYx4+begViw d9xOFNhgj+EZkqCurFyf2ohJW/2vwWhw9fPlgxMgqqHy15W8t7m2ax9+MuXhG5eBZeFE b8IJvmIwgjzmKR7LtSpSXjkG7I1EalErLGwbsa2nBW8YMRXcx3GQwqWJeJFDRggfkXN+ S8Q+r6bFUTVzMZ5KpQF2ycD9TdLJVZ5NLP6hktYVTv74+up35fZ/EmITp2mfo2hVCJLk heuBkbnz+D6P1+tRn1mqblkOiTWry369H32afiq5ID+2eXU5aW5Sgm9sUtQHo7cg2Poj Jobw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qiWKxhYi/YMJ+m01984GaO2DEsOeOP9WoQp14EKeVgY=; b=I5U5UzeJR966ZqW5EYFx4VukEu3B4q55lUyxKHHCv7YELGNOniixMck45WDsx33MF6 FF7gpXwCKQoSh89Ymdy0noV4Latc5mDpuwUb3vvJ76wtGeGxRO5vyvoO01oU/PeAhDrI noPKQ2IlQqbIXz8ax9mWR3la2V10L2woF/udXxCe4cjpMeAj6GX8QYHXgt2lfPuHkkGw 8D4NBqDe+GpqEVZTrTIkdhkRuYobb8Zyaqu3a9h3PkOKrx3m8zI8maA9MNOVm+bx7xL8 jtxlwBwuOIU4DAEBWpdvb5YNdH+egJ8PToyTIa9lHrS7HngwD8PETEtK+HLeeH4TWP3F HyUw== X-Gm-Message-State: AOAM5321Bkc1zhszm56fF7cRe0Kq8lgdJ/9b2XFoO4bUbqy+/+0oI7jL QIGUfL93ECK5uOSGjGU9QBjsXAZo X-Google-Smtp-Source: ABdhPJw4ZfvriwVp8OJvPY3JYXP5NaW1Atd85v4ZanHFGaTMBXkqHB8AOT0TbHXh1/wG7tdh00U/MQ== X-Received: by 2002:a2e:95d2:: with SMTP id y18mr11693961ljh.342.1590425301583; Mon, 25 May 2020 09:48:21 -0700 (PDT) Return-Path: Received: from lothlann.lan ([188.162.64.24]) by smtp.gmail.com with ESMTPSA id y21sm2914337ljg.48.2020.05.25.09.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 09:48:21 -0700 (PDT) From: Dmitry Baryshkov To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 3/4] soc: qcom: socinfo: add file with SoC info format version Date: Mon, 25 May 2020 19:48:16 +0300 Message-Id: <20200525164817.2938638-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> References: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 To ease debugging socinfo driver for newer chips add debugfs file returning SoC info format version. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.26.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 41f48c3447cc..5f98949c7562 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -338,6 +338,9 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt); + debugfs_create_x32("info_fmt", 0400, qcom_socinfo->dbg_root, + &qcom_socinfo->info.fmt); + switch (qcom_socinfo->info.fmt) { case SOCINFO_VERSION(0, 15): qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported); From patchwork Mon May 25 16:48:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 187196 Delivered-To: patches@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp5097082ilb; Mon, 25 May 2020 09:48:23 -0700 (PDT) X-Received: by 2002:a05:651c:14d:: with SMTP id c13mr13535582ljd.94.1590425303618; Mon, 25 May 2020 09:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590425303; cv=none; d=google.com; s=arc-20160816; b=rZXUc8O0p86OZd5IZk0I5qPVMdX3uGuKmx0oy3IqHLz0ulZREsqnYVhPjbBS3Jp3Fq KHBfV8+veTokzMmBlv3Ybw1zrSEn+isZ3oPUlrodxBoRgsQsMk/xm2LEx3mBtgb6MRVK zPZKDI0IEdTh43eikVq88XipTdbZViRTK47cuMf8bXOsxkpUO3/TqHfox/ceiAS+7DQ1 LSB36F7O1+iIbsaOOYwavgssJ4GhuwjVnjbD8NbCDES7D5VDUv8XMRHuz3XkzstCo7nD taD78gy612ckq0XP7uJAa8KfZ3ngI8OyD2VO7WlCk/Kejt+RhkQ+ZRXCo8Q0ddQVjRtE ywdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NRfikZQfnzv3DqAQbjEWBAHDTgL1DbiRjO2Ao7KxpKU=; b=WzQeyv1u4xmUr+LNfC50HnF8yeQKsLs7DhmefkrccQha5iyIDGYUtH4jHQ1aU5klp2 oj2K6y2HkmXgvKyRqgxLVtgVqxIGcBB0wVL3HOJi49yjuOavnkkut9dqg0x4xdlmXOm7 oize1pPUUxymTDMgUYwKwCmLWo1kbYz8xPlmH/FJSykMT7uEzRoTCwMbWZFZ8EDbL3GQ EWFNunln/ogZb4udhe2Btxw0uhfHVAIsx7SAsUYcw3O07Okx0DNnwGVOObv9vUOuLMm1 UyCDNUO7+jzRkKiWHzkYwM+PNsqs6SGtHmPIY/vzAn5axrxOpkVnfH4zMvH3reZnW243 Y2YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EpxHfRui; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b16sor4889226lfa.24.2020.05.25.09.48.23 for (Google Transport Security); Mon, 25 May 2020 09:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EpxHfRui; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NRfikZQfnzv3DqAQbjEWBAHDTgL1DbiRjO2Ao7KxpKU=; b=EpxHfRuilQ3olQsMfwSX2RsB+/aIgAezO/2jVLjevP84jZh3OPMrJqmaOYjYVik7Cl QZqfFAnMT5tf1X8bRQH6kK9Ud4zGH0ln6ASjoWEMzLPh+zn9grolTsZYS+nRLwzOUy7a J4vSMEJocjc7wu/snlHmYBlT2ReXQVmjRPbYQcAt7o+5WcboXxINK+4OGiyMCoiZFJKv LX6cAzEBNGKBhI/HLfe0nQL2n4e9WiOxiOJixp6YcAngqfWo0yrseeyQTFp3eny6livV D3xFnJbX9QjbLbfz0GSTQdsMeMO+Fa5V4TZU4ywvfui1ghAS3w4CHio0Gl+5awInyRrV o15Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NRfikZQfnzv3DqAQbjEWBAHDTgL1DbiRjO2Ao7KxpKU=; b=cHnGASUO+zCPh8pBiKWeUOyFiTIWWIOvqrbvgnxAjhEhkoyvqWQ9vv2R1BqGIFzESF 5OBXP1CrzKJcjwybilDbmat8Jomx0X4v59qIAjyO2BgjYMFXBywfjNViCpARa/hKlI/X rFjpJc96FJG3PNt8wW3OP3kpF+ErtNVqMnlXzAanTr0hy6sVrsLWKzbxp3amaqtE6foA eM3FrNcOOklwzXwAAzFJXuJMWcD/QpQrtIL7qkd29FRM7G6HsWE6RWS2ZFUL86UdsEGE 40vU7okujntfuw9bq4tQJAzCyN0XaX+LdMi0+xFM8MER6A7gKak5OaRb9TkNbyt9FkGk /gSg== X-Gm-Message-State: AOAM532+kVJRNEQZDpEqsNanvLk16DYfFnnGqVvyP/935bKWu4oVzs6b 6fx3qSYkxJn3EeqHXneAXoINlmFZ X-Google-Smtp-Source: ABdhPJzFGU3gVLo1w0mNJyPSUGTPxZ33nK83+0n06lPIrqq4nc9ArDq1Z7p3REQXcCY0gNEiCA6I0Q== X-Received: by 2002:a19:4048:: with SMTP id n69mr9737662lfa.31.1590425302951; Mon, 25 May 2020 09:48:22 -0700 (PDT) Return-Path: Received: from lothlann.lan ([188.162.64.24]) by smtp.gmail.com with ESMTPSA id y21sm2914337ljg.48.2020.05.25.09.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 09:48:22 -0700 (PDT) From: Dmitry Baryshkov To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 4/4] soc: qcom: socinfo: add SM8250 entry to soc_id array Date: Mon, 25 May 2020 19:48:17 +0300 Message-Id: <20200525164817.2938638-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> References: <20200525164817.2938638-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Add an entry for SM8250 SoC. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 5f98949c7562..3e08cf9836ae 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -217,6 +217,7 @@ static const struct soc_id soc_id[] = { { 312, "APQ8096SG" }, { 321, "SDM845" }, { 341, "SDA845" }, + { 356, "SM8250" }, }; static const char *socinfo_machine(struct device *dev, unsigned int id)