Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3212646pxm; Mon, 28 Feb 2022 14:39:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLnO1VRiE0whZXneebaWQ2K9Hq/fYxDgZjybs+Udy/7CXYjxlAZ8dk9o47Plut7IChcUgD X-Received: by 2002:a17:906:edb5:b0:6b8:1a5a:f3a0 with SMTP id sa21-20020a170906edb500b006b81a5af3a0mr17273606ejb.501.1646087942979; Mon, 28 Feb 2022 14:39:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646087942; cv=none; d=google.com; s=arc-20160816; b=gmBHraFzBVCEsCPrFhP6szhNwegkw4NWg0LREEG7sv7YHN5MtpjtK59LuVOjw7REmT G79U4952eHum4XAIROY3rOacLHxT7D63NBweTNTW1xwPy/oVJkKxRoUyA8jAifL04VUh dU7dDXoLuWhFSA0jFsM+q5Z6DX/Rt4Xy60TncePKty8JEx1QvbLpPoS1dUh9qFCzPfG6 CYTsRL6WbjGAXKpcbUeq5OUcv+qOTQviMdXfGHngqeCmb5WM/LnPZjb3cJbynQuDxDgW E581FyCcnn9Ltye5bl8YNu3u7yrHp5h7V/T3m2Kbh11YzBotnvDywmsvCpCVkPpM26u0 PzSQ== 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=NqNLCNZbfRzdZ6s+RPZUVSDu53vbe0qWHYGyNkt893E=; b=PyTdSekfxLU8LfbUL+AXKmh3/YQzJ8vcVIxX1pVcx92V6J8cPlktevftlcMTzY590/ OiMqqrWHRR6KUq0bIs3oQ/XV1n/skH9h2kUlDfWJ+dbWhI4cbsp1z8D82midJ2gS2e5X s8cBoU0K6v34Aynxi22yU+6nFJsXK8gK8nXOEYAudxWKGSriNZFzkwUphmnd5ja1Snmv Gx85SuLMjQIJLr6ky1eHOnm6tYE9z2jSAFTg5B8FyIjKG/Qx5keC+pFhtV2K4zlLULQA AWTd7R4NubUBEC3PcwVd8HDQjrisKu+GDfrosBxgb7srzvfRXCAhL/viQVdzzzCRDzJo HS+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XftIddrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cz4-20020a0564021ca400b00413ac18eb6esi3678758edb.483.2022.02.28.14.38.40; Mon, 28 Feb 2022 14:39:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XftIddrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231478AbiB1Wh2 (ORCPT + 99 others); Mon, 28 Feb 2022 17:37:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229594AbiB1WhZ (ORCPT ); Mon, 28 Feb 2022 17:37:25 -0500 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B4D113AD6; Mon, 28 Feb 2022 14:36:46 -0800 (PST) Received: by mail-qk1-x732.google.com with SMTP id 185so11623838qkh.1; Mon, 28 Feb 2022 14:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NqNLCNZbfRzdZ6s+RPZUVSDu53vbe0qWHYGyNkt893E=; b=XftIddrMAmhmuVKIlxOi7ezAmFRdps3UDkEEbl2ZeQMGo2H+ELXtV+4e9DhnZAMsyL D/pDeeWj49sL9GZwHUnnj7n3RGyrUTegADjvReidPUORqC64NeyziR5G+yT6oAKr6A2d Vdk+FWwex1AuVPvENWoJB6Ej44hGNZptg3xEBBphTsCS8U8UUkUxFpOUgebJdUc2qjrN ox0phf1gLwEbJqPCbyajU3SIVtC/zaTN1s3koJIojHtROjDUYqV56hheoywgjYgCNSYz vxCzJtshV5w34Hu9TntuiYVCrJxoLt0yfBW6VGutDNiE8lv73o7vOn34u0tiBsX6p2Gg aRMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NqNLCNZbfRzdZ6s+RPZUVSDu53vbe0qWHYGyNkt893E=; b=F0cm/T9jY9h4ZNZBw/vLoF6O2ymLSPe4K7qzX19jVgj9mQ8o5cBg8A5+BHpYsW8P/R lXArAcZjE2/nvdb/ghcTH0iG/+KT2ph8scjy30BvWH88ALFCtm003NL5NQne2CcHyone WbMpDy4DUOOXKbnbHBlzE9EDt4VpQuPLFmZ+JWtskfmgxl0NiC5nkefzJ3qi9ZpWjWhz m6ss4qZxRL2uIML9t0DoxkwN5C6SGupTb76T+npVQ1enf0rB5DeuQeFKsHIHeMvmRcmG +Lux2ccucJOUXKd/yDJmeK6TEIglD1wk4kurpToTzy/ih7BHEplI2M6wmucRNFoJR9Ff himw== X-Gm-Message-State: AOAM531SIqqo/IC3Q4WL0cbI/oagBHe3nlo2Mw1yJQoPc/pBw464IbLH 28suTeHDbBaZuwEBje9VviQ= X-Received: by 2002:a05:620a:45:b0:508:176a:8892 with SMTP id t5-20020a05620a004500b00508176a8892mr12549250qkt.731.1646087805470; Mon, 28 Feb 2022 14:36:45 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id v9-20020a05622a144900b002dfedb4dccasm6632068qtx.66.2022.02.28.14.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 14:36:45 -0800 (PST) From: Peter Geis To: Jaehoon Chung , Ulf Hansson , Heiko Stuebner Cc: Peter Geis , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: host: dw-mmc-rockchip: avoid logspam when cd-broken Date: Mon, 28 Feb 2022 17:36:42 -0500 Message-Id: <20220228223642.1136229-1-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dw_mmc-rockchip driver drops a large amound of logspam constantly when the cd-broken flag is enabled. Set the warning to be debug ratelimited in this case. Signed-off-by: Peter Geis --- drivers/mmc/host/dw_mmc-rockchip.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 95d0ec0f5f3a..d0ebf0afa42a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -50,8 +50,13 @@ static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios) cclkin = ios->clock * RK3288_CLKGEN_DIV; ret = clk_set_rate(host->ciu_clk, cclkin); - if (ret) - dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock); + if (ret) { + /* this screams when card detection is broken */ + if (host->slot->mmc->caps & MMC_CAP_NEEDS_POLL) + dev_dbg_ratelimited(host->dev, "failed to set rate %uHz\n", ios->clock); + else + dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock); + } bus_hz = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV; if (bus_hz != host->bus_hz) { -- 2.25.1