Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11760C433EF for ; Sun, 3 Apr 2022 23:09:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BCCE383C0E; Mon, 4 Apr 2022 01:08:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B1CSrRHn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B97F803F5; Mon, 4 Apr 2022 01:07:22 +0200 (CEST) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A9DEF83BE5 for ; Mon, 4 Apr 2022 01:07:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbx6244@gmail.com Received: by mail-ed1-x52e.google.com with SMTP id g20so9046951edw.6 for ; Sun, 03 Apr 2022 16:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yrdaNMv1uEF9586WepfemhpBGQZ35RTGTr5F5jPGhn4=; b=B1CSrRHntNH0Ns/tHGV3zKCV7NqpGnpOUIqvO0ZtXsGTPZ2Szp2iYpgXCqeP+dpatc fzmtxGkSxaAQB162JASmhInocLE7vx2uEh2kiv+Vn6hjcpnzXwQXSa3wsG7zlNG1BNW0 7Fo8SR8Yr/Ndo1PDJBAMr6K/O2Vl5gpSynuO6uPuaXRetXamReihaMfwBUqTC6a8gboB KWy2dqjkRGGbNb1grRal1/Hp+b22/pEiLTjiktGManTIdrkLbambkJKCEUt1fzE0MRDZ hDXp15ay4gKGjBFfnsMcj0gWZVCG9nvoXLFEBemMZzmKKDAxg924e4Pcuv7apjiS60Lh syQw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=yrdaNMv1uEF9586WepfemhpBGQZ35RTGTr5F5jPGhn4=; b=32/hJ29qUs8CAkOzED29odf3oJpZb29ZSKo1yua6ocAuqZbcFpmjbmoBzCRle2/hmZ fz99EnmXFxq1mHX/z/n/M5ASFzqd1QI/l1Jx6Q3S4RlGQvZ5i6W9uSQ6Kgow0lfnCdTp IiFMCQyM4ggS93b6Xb21FgtuORiG2vidzxVPF3+zg1GNHw3mK0cL+T5Yt1owfFOnERnB 75bYaT8C0uDBbTTzII3jN0qY/QfdyYQHqL4FThupJxBLwUorMO+Mx1Xh1r8JQmkkcv/k qMV5q8u+3TfOtzdIa75WRUGiDaSzc982iZ+FCxkxJ0Jgmem3PDbjd5sY0FJtJQEqck1h pWnw== X-Gm-Message-State: AOAM5325ijQ2XVdIpMbxKozqlFFS211Qpd99hHonkZL8IWPOmqGcXe3l iiAkzWlVw7Rw2LxOmEb8VzE= X-Google-Smtp-Source: ABdhPJwEoYI1IQmdjTJq6YArY4ecINSYt8ONH7QiQCcmvGmPAV5R+6MyQ4WIsOMInYpgNRkV+y4VOg== X-Received: by 2002:a05:6402:5186:b0:419:651e:5137 with SMTP id q6-20020a056402518600b00419651e5137mr30653695edd.335.1649027231179; Sun, 03 Apr 2022 16:07:11 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id c14-20020a170906340e00b006ce98f2581asm3645597ejb.205.2022.04.03.16.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Apr 2022 16:07:10 -0700 (PDT) From: Johan Jonker To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, heiko@sntech.de, peng.fan@nxp.com, jh80.chung@samsung.com, u-boot@lists.denx.de Subject: [PATCH v4 08/12] rockchip: mmc: rockchip_dw_mmc: fix ciu clock index Date: Mon, 4 Apr 2022 01:06:55 +0200 Message-Id: <20220403230659.12039-9-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220403230659.12039-1-jbx6244@gmail.com> References: <20220403230659.12039-1-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean The document rockchip-dw-mshc.yaml decribes a maximum of 4 clocks. In the rockchip_dw_mmc driver the clock name in use was "fixed" to "ciu" with index 1, but later reverted back to index 0. The clock drivers can handle both, but the calling driver should submit correct data as a standard practice. Fix the "ciu" clock index by setting it back to 1. clock-names: minItems: 2 items: - const: biu - const: ciu - const: ciu-drive - const: ciu-sample Signed-off-by: Johan Jonker --- drivers/mmc/rockchip_dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index 7f8dea1e34..be065ec0c3 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -123,11 +123,11 @@ static int rockchip_dwmmc_probe(struct udevice *dev) priv->minmax[0] = 400000; /* 400 kHz */ priv->minmax[1] = dtplat->max_frequency; - ret = clk_get_by_phandle(dev, dtplat->clocks, &priv->clk); + ret = clk_get_by_phandle(dev, &dtplat->clocks[1], &priv->clk); if (ret < 0) return ret; #else - ret = clk_get_by_index(dev, 0, &priv->clk); + ret = clk_get_by_index(dev, 1, &priv->clk); if (ret < 0) return ret; #endif -- 2.20.1