Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp170861lqd; Tue, 23 Apr 2024 20:22:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0I7yLmPVWvx8Fr9qcDEj/dpHjCKGNG+4GY/WfRmhq7MTPCT26xgAv2Dvpti8G93hn26wbWWbqHlwqJbHgGgCqnydW8Lhc2VDEr2TEvg== X-Google-Smtp-Source: AGHT+IESJfjANP5DXXZ5vIMB6COn1LrDhvcTibzHx8wBQSGgBjRN/7tNZYp9WHzuIuuFe0caV8IO X-Received: by 2002:a05:6808:21a:b0:3c7:3d7:711d with SMTP id l26-20020a056808021a00b003c703d7711dmr1229926oie.33.1713928961307; Tue, 23 Apr 2024 20:22:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713928961; cv=pass; d=google.com; s=arc-20160816; b=YFWEgcNdKAN5I54C3fNCpg4GmrbrKgvTsDaafEsJeQJv4NtX3jE8S3lKefG2m+Hcma zcdIdohQZXwY8d7zkudtQZL8Fo92v59+9ixpW32b4+Fc7dgbmS2EFYW4SR9Wao2p9ExU Sc5ouGqivzKy0+YKW3Gv+pLGoV09XmVg73b0eoC826hI+Qo7IR/R9lwcdQan2o2tMGer 5kwa++rq8wjMAmQ1LtnYAaD8MIfL3PKD6/s1Nf5rm9N9MZPHDPGqocTgyO0M2N6z+I4D ZpZ2EqnCpMawbR76ZjmtRgVEbluHwuueCFkdFUHHSoePeO2ZwWwvrrflpTTH+QUtI46q UobQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=MuZUX7Ht1E8KIROZNKFvqsRnZXOXGpGWf3Y/osE8/uQ=; fh=f4KQnOf4DL3FZ4rINpxCCB681RH9plJXTbAzdkN1cKE=; b=KdbPxpQKecKsj+26iFdKi/QKzoG8IsJi1U/voamJT6KGbPdQ8L2ZRtmLw+5a4IeV3a NW1s+0DuA9rKx0lhJEEPo54viKPXVMqHqveSW+ahc82+OnIGKhTqLM17u5obAonSmm6H FufoTWy57XJJZS+mhQIgvUT0NNBvXKkdW8hOyHn2gxiCM0eN6SB+c+zoNbmqQttdvIUI /GURxmMZDll4rqkf0Z085/yEsUC0AJS/DPquwBH3KzREcoO1bsro25eq+4bFsu3ELgAo JlgtizyeaITmvFSdDDKPh6Q6gHoSRMnJvGE1MLN7X2PEptP7u/Q0bktRB5/ci237BvnX 5fLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Q53fMSz/"; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-156205-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c2-20020aa78e02000000b006eaaec3424fsi10452193pfr.186.2024.04.23.20.22.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 20:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156205-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Q53fMSz/"; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-156205-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5B93228266D for ; Wed, 24 Apr 2024 03:22:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E835F13B2BF; Wed, 24 Apr 2024 03:22:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Q53fMSz/" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 992FD947E; Wed, 24 Apr 2024 03:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713928927; cv=none; b=h9JbQHA4cDsMkLyfrR961YgxOggcMH+MCwPDXjSMxYsZ2w5cZBLk8gslBjKGytoOVm7Eca/h2ToB4ivqQnYDRPgAsGuwZxd/WxqkrCC+K/XRtK//a4yGfWSa2yLwkVKxoB2CXnkuTekF21xDq6BUuOWJzvd4bNy9AMfQhKBDCnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713928927; c=relaxed/simple; bh=R1mueC9SUcpU6A8TYOzL4KkjjbUjUGBMieumGsYzqD8=; h=From:To:Cc:Subject:Date:Message-Id; b=G+rhlDf4JQ5NkqXBXW74RaNsvWDrump4V1QMhbYa76V/Uy9z858tfJoCGpRDeN0fpQ6eabdOYjpLZ56YjG6ICLuYD78EqCAHUnlWxDynxt0exQFP5SPAcbN29eNZ1Dn02pa78Doe9eCXWL7OZmW2PgeIsU4JpzNk4Krhm+87PV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Q53fMSz/; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43O32IjH002198; Wed, 24 Apr 2024 03:22:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id; s=qcppdkim1; bh=MuZUX7Ht1E8K IROZNKFvqsRnZXOXGpGWf3Y/osE8/uQ=; b=Q53fMSz/qaQkzWwwamfM/1Ak/MWy S75tvwD/txYX8fg5vLoicEyyic39f6oEtFinOESmS6lcqD3zPAD1qpM+cdfCIG/W dH1ueX9y5fyzWHd9WVUVeP8j5LyaL5/fE0d82jd5UY+J4fJr1F3txdjy+/xIo2Uw aNYX0xsI/jkn8DrDuUMFNgbp/o+tDAw7yS2Yrlc7F2Qpb3W9Ao6kwaf0vzI8PA3g afyid6mo2+Sy/OeOHwyELNDVPQHmSW3OyjHq3VKTyYRXlC3F+0ygl9d755sM+up3 fQVJaYW/IZR7sEucScq/1TQHpDAZQgeBN1gOAEdlolZshxvMz1n/70nj1A== Received: from aptaippmta01.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xpapmjrcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 03:22:02 +0000 (GMT) Received: from pps.filterd (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 43O3M08G024079; Wed, 24 Apr 2024 03:22:00 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 3xm6skh29k-1; Wed, 24 Apr 2024 03:22:00 +0000 Received: from APTAIPPMTA01.qualcomm.com (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43O3M0xL024074; Wed, 24 Apr 2024 03:22:00 GMT Received: from cbsp-sh-gv.qualcomm.com (CBSP-SH-gv.ap.qualcomm.com [10.231.249.68]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 43O3M0AR024072; Wed, 24 Apr 2024 03:22:00 +0000 Received: by cbsp-sh-gv.qualcomm.com (Postfix, from userid 4098150) id 8113A5B1C; Wed, 24 Apr 2024 11:21:59 +0800 (CST) From: Qiang Yu To: mani@kernel.org, quic_jhugo@quicinc.com Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_cang@quicinc.com, quic_mrana@quicinc.com, Qiang Yu Subject: [PATCH v5 0/3] Add sysfs entry to EDL mode Date: Wed, 24 Apr 2024 11:21:52 +0800 Message-Id: <1713928915-18229-1-git-send-email-quic_qianyu@quicinc.com> X-Mailer: git-send-email 2.7.4 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: OPDHaBT4SW0C-ko7R442X_ztgV4OIU_D X-Proofpoint-GUID: OPDHaBT4SW0C-ko7R442X_ztgV4OIU_D X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-23_20,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 mlxlogscore=762 clxscore=1015 spamscore=0 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404240014 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Add EDL sysfs entry for mhi controller that provides edl_trigger callback. Add mhi_pci_generic_edl_trigger for qualcomm sdx55,sdx65 and sdx75 as edl_trigger callback. v4->v5: 1. Add a blank line before the #endif in patch[2/3]. 2. Add reviewed-by tag. v3->v4: 1. Modify some comments, commit message and sysfs entry description. 2. Add error cleanups if get channel doorbell offset fail. 3. s/force_edl/trigger_edl 4. s/mhi_get_channel_doorbell/mhi_get_channel_doorbell_offset 5. Use mhi_get_channel_doorbell_offset in mhi_init_mmio() v2->v3: 1. Update Documentation/ABI/stable/sysfs-bus-mhi with description of force_edl sysfs entry. 2. Add comments about edl_trigger callback in mhi_controller struct. 3. Follow reverse christmas tree in mhi_pci_generic_edl_trigger. 4. Add a new API in MHI to allow controller to get CHDB address and avoid duplicating the definition of CHDBOFF. v1->v2: 1. Move all process needed by qualcomm sdx55,sdx65,sdx75 to enter EDL into mhi_pci_generic_edl_trigger() as the callback to edl_trigger. 2. MHI stack creates EDL sysfs entry to invoke edl_trigger callback so that devices need different mechanism to enter EDL can provide its own edl_trigger callabck. Qiang Yu (3): bus: mhi: host: Add sysfs entry to force device to enter EDL bus: mhi: host: Add a new API for getting channel doorbell address bus: mhi: host: pci_generic: Add edl callback to enter EDL Documentation/ABI/stable/sysfs-bus-mhi | 13 ++++++++++ drivers/bus/mhi/host/init.c | 39 ++++++++++++++++++++++++++--- drivers/bus/mhi/host/main.c | 16 ++++++++++++ drivers/bus/mhi/host/pci_generic.c | 45 ++++++++++++++++++++++++++++++++++ include/linux/mhi.h | 9 +++++++ 5 files changed, 118 insertions(+), 4 deletions(-) -- 2.7.4