Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3697639rdg; Wed, 18 Oct 2023 03:33:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfDPmrK31WC2kN2fUOJb+1OU35xdJlrOGMqrUH5otPMU/S7Bt/BlskyhuQOA9ecsaWqE5K X-Received: by 2002:a05:6830:43a3:b0:6c4:a42b:9cd8 with SMTP id s35-20020a05683043a300b006c4a42b9cd8mr4935103otv.1.1697625236410; Wed, 18 Oct 2023 03:33:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697625236; cv=none; d=google.com; s=arc-20160816; b=gOF3+FwF0sJdu2UHny9Qtus7bi46I48LDPqk0leX3NsSmlipVILIvSk9wRFt2KyEaf QDZDNk8C+M2pC4yFZWAjylBpNJZR0B9VmtTGnvIhUJ4NCc2c8Oapny11C3+/WXl2u1hO JYrDy5e17AyOrIOHWvBAuwmnycSQdWluIlwgjVmOIPyNX+CeEM38g6GzCNCI+dUgzDZJ pWzCmyAEaV3mWNJHxANA9rXZoKYIMQcPWsW/I05dDFz6mLgIX1ZA472XBt0vAE31MPOW x5pBGXi3KiuRFCwgO/gSxfLJTuY9m2dWxbxVwY4yUnQ43TFxkcwX7GjCcT2oQIwMc7tL fHVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bxQGM9qA4EGtcdIFGLpO7R5wP1z0FxL0mkOXOfmIXcI=; fh=NjfxJJJXz9TMP6ysuYkvNbZtfPwqDrPastOUhrzqbt0=; b=I4N7NR5i1gOQBogUCjBJXO/JrGHH3kCT6M7VjlTzEJ+1qRfsChMTW2yamU0p6xovnt l2IP65np8SBRn/r5LLCRi2USuBhZn8D6Fr+SyorZt5QzqfHRWhD1v7bJ6tUXDrV04dcV ktk+fARHEIiisFANISww2LErUDhi4FdXEHb2AI1u4P9dMK41cE2jluTjGLAQB0GI7VY8 RtxCTxC1m4B1lqbbCZYMQb/b56Yzhb3MVo9z+aEqlBRjbOlkiP/3BYIUuwva8ge8ELW1 KPBZBRrwlIU5kQULLxcoSuB5z++mdatLbeKU1iJBuKQGX2pVZVC7wcW1XtBsorurfwNu 0ikA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lI8wgWs1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id g20-20020a056a001a1400b006b1fb740866si3856433pfv.189.2023.10.18.03.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 03:33:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lI8wgWs1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9B19A802DBAF; Wed, 18 Oct 2023 03:33:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbjJRKdq (ORCPT + 99 others); Wed, 18 Oct 2023 06:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbjJRKdp (ORCPT ); Wed, 18 Oct 2023 06:33:45 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3380B0; Wed, 18 Oct 2023 03:33:43 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1c87a85332bso57398625ad.2; Wed, 18 Oct 2023 03:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697625223; x=1698230023; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bxQGM9qA4EGtcdIFGLpO7R5wP1z0FxL0mkOXOfmIXcI=; b=lI8wgWs1OCxxbcvsJXTI7bgySE5gIZOXL94kDdf3Vm8Mk1b2tK092DGOm39cYxatXI QQZPujHhzjUT5OJCLx5i43B9uILi5zFtYpoJU9g7c4TNsVDWiJyDk2cyVLwk+Jdy9s81 J8y6//o4BquMpuzSyxt+uWjq59vIxyX2ifXWwrjvqdFEJvIHP/hnj7TcD1qnLT6y4ku2 3wlccJradKx488iwF/X+bQtWZtqweEt50OUHfMIw3TGhTm45vE3tZL1vlrjTk12qH70I DRXBxUMEjShtFwPdL/D+ZL9otOI8JEmB53zfvKgy5Hht+RcCBN4mh1eJlFgjFJ2S85g+ sJ0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697625223; x=1698230023; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bxQGM9qA4EGtcdIFGLpO7R5wP1z0FxL0mkOXOfmIXcI=; b=rxwKhfv6eDE3kUg/ZuVkla76Lt7eI8APwXFcQFROa+NBg2mOmZvLwx31VqHLZbgnlQ sanJIQMo0rwXl2idiwPgoAEWX9JVoaPTss5kpG9vhu2q4bdnPHvl502f0LuI+w8sztp+ suMUCoLJpUvYYb4SL/WSYCNdRcsn/DDXuZimGKAv4ebegRZQZogOUlTUL2CKRrvkZHpj YPXQRx9HF8HE+Z96okrA+leZuCW1QjM1Ujo6UpfBjlobVLaT2qau9sBmqtEcUlGk+wqF ZOkfwXpCdwT979zkovaL2DgSEo8umL0JIPUiyN8mqHxiKLBxtX7gyPQGsEpuDHOFxHV+ Hu3A== X-Gm-Message-State: AOJu0Yyk4m/xFJ7vUK46ik5du68Ab6fem3D6wzrq/THEaVQDXFeydBPv iGhrFhbOXSfS+r8Up9MRR68= X-Received: by 2002:a17:902:e743:b0:1ca:2caa:aca6 with SMTP id p3-20020a170902e74300b001ca2caaaca6mr4942272plf.68.1697625223134; Wed, 18 Oct 2023 03:33:43 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e757-5817-b46c-3b23-233f-77d9.emome-ip6.hinet.net. [2001:b400:e757:5817:b46c:3b23:233f:77d9]) by smtp.gmail.com with ESMTPSA id p6-20020a170902eac600b001ca4ad86369sm2871480pld.236.2023.10.18.03.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 03:33:42 -0700 (PDT) From: Victor Shih To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw, Greg.tu@genesyslogic.com.tw, SeanHY.Chen@genesyslogic.com.tw, kai.heng.feng@canonical.com, Victor Shih , Victor Shih Subject: [PATCH V2] mmc: sdhci-pci-gli: GL975[05]: Mask the replay timer timeout of AER Date: Wed, 18 Oct 2023 18:33:37 +0800 Message-Id: <20231018103337.34622-1-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 03:33:53 -0700 (PDT) From: Victor Shih Due to a flaw in the hardware design, the GL975x replay timer frequently times out when ASPM is enabled. As a result, the warning messages that will often appear in the system log when the system accesses the GL975x PCI config. Therefore, the replay timer timeout must be masked. Signed-off-by: Victor Shih --- Updates in V2: - Modify the commit message. --- drivers/mmc/host/sdhci-pci-gli.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c index d83261e857a5..d8a991b349a8 100644 --- a/drivers/mmc/host/sdhci-pci-gli.c +++ b/drivers/mmc/host/sdhci-pci-gli.c @@ -28,6 +28,9 @@ #define PCI_GLI_9750_PM_CTRL 0xFC #define PCI_GLI_9750_PM_STATE GENMASK(1, 0) +#define PCI_GLI_9750_CORRERR_MASK 0x214 +#define PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT BIT(12) + #define SDHCI_GLI_9750_CFG2 0x848 #define SDHCI_GLI_9750_CFG2_L1DLY GENMASK(28, 24) #define GLI_9750_CFG2_L1DLY_VALUE 0x1F @@ -152,6 +155,9 @@ #define PCI_GLI_9755_PM_CTRL 0xFC #define PCI_GLI_9755_PM_STATE GENMASK(1, 0) +#define PCI_GLI_9755_CORRERR_MASK 0x214 +#define PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT BIT(12) + #define SDHCI_GLI_9767_GM_BURST_SIZE 0x510 #define SDHCI_GLI_9767_GM_BURST_SIZE_AXI_ALWAYS_SET BIT(8) @@ -561,6 +567,11 @@ static void gl9750_hw_setting(struct sdhci_host *host) value &= ~PCI_GLI_9750_PM_STATE; pci_write_config_dword(pdev, PCI_GLI_9750_PM_CTRL, value); + /* mask the replay timer timeout of AER */ + pci_read_config_dword(pdev, PCI_GLI_9750_CORRERR_MASK, &value); + value |= PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT; + pci_write_config_dword(pdev, PCI_GLI_9750_CORRERR_MASK, value); + gl9750_wt_off(host); } @@ -770,6 +781,11 @@ static void gl9755_hw_setting(struct sdhci_pci_slot *slot) value &= ~PCI_GLI_9755_PM_STATE; pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value); + /* mask the replay timer timeout of AER */ + pci_read_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, &value); + value |= PCI_GLI_9755_CORRERR_MASK_REPLAY_TIMER_TIMEOUT; + pci_write_config_dword(pdev, PCI_GLI_9755_CORRERR_MASK, value); + gl9755_wt_off(pdev); } -- 2.25.1