From patchwork Mon Feb 26 16:53:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 206795 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2205367dyb; Mon, 26 Feb 2024 09:01:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWf1ZOZGFSVmUmnccvofyleivXjnAIgOm4inL3141SUHRJU7e3dJXNCf7AIvI6ANG0AHQYyzLu8sGXUgN3f8SJ5friFnA== X-Google-Smtp-Source: AGHT+IHdlnX54BrW7PwYkRrxJ1MV3wogcAOmF09dSt8Fs2rhay8tDgFY9AI3tUQAWC+oj3YsrO0b X-Received: by 2002:a17:906:36cd:b0:a3e:f79e:ce56 with SMTP id b13-20020a17090636cd00b00a3ef79ece56mr4712606ejc.45.1708966876493; Mon, 26 Feb 2024 09:01:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708966876; cv=pass; d=google.com; s=arc-20160816; b=Q2yNR+nVSaVS3/AgdGIzW07KAHeVc99yYkkTDVq9sXaFRsaNcQHx1cuRRehiM2b3JU u5KTNHha/AmRMm2aNP9pXUnduOsv3YIA9/gKYGtYlrbbxc5cGmPpCaw2sHHN6u/nt3Xn eebqG1IUM6iUHXQqr+spG166YwuE7y2U1R97cvkVB6ftOIzWLRs7P5uBM7Sz5ROU4FD1 klwMGvBEOJ6P2tl4mPVu9Sp22Z6/xV1wWtFv0cBv6u+jRZ74Wq/ICqmLeJe793UNYuZf kbpIYThmOSAa8RrnLRyslf8qyogWq9V7mxDZvs9vSR2wD51LR3Ih80Irj1M6E1ewy67K uBbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5LerAFfyndDwaim6ezZwBkxBwQM30xrAj4RWbdAGWGI=; fh=hD87NRI2uXFKH7lntJG4G4naYHSrGp3lxTKSbIyEdj8=; b=Tt+hpDelUSbI3Y7+m+BWkLQOA6wzFL/jy0S7zCITWmhkVKsDEYd/+C01JgzYkeTcdN Lvp/JXnHYsKSGM5eCUR1B/TNHssNOKr1zokC/39q8WJl3DCuR1boeodYaB+zMuCFfITp SUOll8tSmYBPfyHd1vORGlx/FxrbDaT/3DzZQugxMWwjc+VwcgiGeen1stY61iDiFGyM gk0z8GQHAZmCtHWpd51H8mhEne5afBtziu+5TRkEVnyKZch928KVsu3H6uACNN4ks5W3 L+GaBgjEqLqrJgCiK0XCwPDLvLPy3+c3JCmQkQhVesFQtxfjWe+sLyUbZS6vHDLZYY1M CMCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=lCnn4JOb; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-81971-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81971-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b23-20020a170906039700b00a3f18f596fesi2274251eja.616.2024.02.26.09.01.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:01:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81971-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=lCnn4JOb; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-81971-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81971-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 177D61F2A829 for ; Mon, 26 Feb 2024 17:01:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F25F3135A45; Mon, 26 Feb 2024 16:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="lCnn4JOb" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 9C7CA13342E; Mon, 26 Feb 2024 16:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708966437; cv=none; b=rTNZjtNg7jT1h80j/TBXb8biwTZWe+Yyl5vHaw7KHYoxoHZjnrevuojuIKMZa5NkEP0udapEv2qV3kzbPRxzpTFfHWlCOU3jUNtuMaoLxXGNhKc8QTu2EvZ+pdmNZsjbRXF0EQx7Yiq5xGX4pWachvQBHl1NZEm9YF3aT3kbBlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708966437; c=relaxed/simple; bh=kx+oOcwZGizk7pnn1u+NW+Z8JFTuM9vEKXNINaOBa4U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BwRzmy0sg1UA3q+x3xhNkwnKtXwQ5RppcRk4qa53pQUFxzXPpfFYNdBlVRoHW5hhogTesDjPeGBU2hUw6RUg+JiOFq/y78KZWq8oTb1703/Q3nt6uIigBtd9ygKOSTtO5gSle8eYLXr9OqgwWk9ErdoyIFqNuCbqxGzshVWR+PQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=lCnn4JOb; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41QGEXD9012349; Mon, 26 Feb 2024 16:53:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=5LerAFfyndDwaim6ezZwBkxBwQM30xrAj4RWbdAGWGI=; b=lCnn4JObgXudDKMdFhIUwt6ueBTgNxd0zerZTR5wRK08NSaVOx1nYc95RDK9BpHLoEE1 koz9Vcj+OCfi4ikdlVvo4ORNFWwII049iyQDEax3H1AjHZVWzER33QMUujXqCfzEm3FA SIDl3zuIos65WGEQh3ayVPo9BcvdD1bIp53P7HbUtYghgqyTZWrIobDFpb1QeV6eLU+U FrunEn89rynW951Mzcb3m9u9LRpd7W1vwAUqgoH+8xX1LU/hfim9saEyfnojzWggrxKX 1vIWLmXuO4agmt995mMvROlMcidpv1TuGEc48JJ0CfeWCu6ZAvcCwyYKMGhHbykdY/oC 5w== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wgvp6bkc5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 16:53:43 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41QGFrrA021762; Mon, 26 Feb 2024 16:53:41 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3wfu5ytkrn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 16:53:41 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41QGrd5Z17105472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Feb 2024 16:53:41 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E53A75806A; Mon, 26 Feb 2024 16:53:38 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DEED58053; Mon, 26 Feb 2024 16:53:38 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.57.130]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 26 Feb 2024 16:53:38 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, andi.shyti@kernel.org, eajames@linux.ibm.com, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lakshmiy@us.ibmcom Subject: [PATCH v2 20/31] fsi: aspeed: Disable relative addressing and IPOLL for cfam reset Date: Mon, 26 Feb 2024 10:53:10 -0600 Message-Id: <20240226165321.91976-21-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240226165321.91976-1-eajames@linux.ibm.com> References: <20240226165321.91976-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: fvJmaLB3_uTR0ayp6d5k-picsIkscZzx X-Proofpoint-GUID: fvJmaLB3_uTR0ayp6d5k-picsIkscZzx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-26_11,2024-02-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 clxscore=1015 adultscore=0 mlxlogscore=812 priorityscore=1501 spamscore=0 malwarescore=0 bulkscore=0 suspectscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402260128 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791981651311510717 X-GMAIL-MSGID: 1791981651311510717 Need to disable these for the master reset after cfam reset. Signed-off-by: Eddie James --- drivers/fsi/fsi-master-aspeed.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c index 1cb5bf6c05d2..92b47bc9917a 100644 --- a/drivers/fsi/fsi-master-aspeed.c +++ b/drivers/fsi/fsi-master-aspeed.c @@ -375,11 +375,18 @@ static ssize_t cfam_reset_store(struct device *dev, struct device_attribute *att trace_fsi_master_aspeed_cfam_reset(true); spin_lock_irqsave(&aspeed->lock, flags); + + opb_writel(aspeed, ctrl_base + FSI_MMODE, + cpu_to_be32(aspeed->master.mmode & ~(FSI_MMODE_EIP | FSI_MMODE_RELA))); + gpiod_set_value(aspeed->cfam_reset_gpio, 1); udelay(900); gpiod_set_value(aspeed->cfam_reset_gpio, 0); udelay(900); + opb_writel(aspeed, ctrl_base + FSI_MRESP0, cpu_to_be32(FSI_MRESP_RST_ALL_MASTER)); + opb_writel(aspeed, ctrl_base + FSI_MMODE, cpu_to_be32(aspeed->master.mmode)); + spin_unlock_irqrestore(&aspeed->lock, flags); trace_fsi_master_aspeed_cfam_reset(false);