From mboxrd@z Thu Jan 1 00:00:00 1970 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 22588C433F5 for ; Fri, 7 Jan 2022 18:34:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D215836C5; Fri, 7 Jan 2022 19:34:18 +0100 (CET) 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="Jtxy490F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F246A83741; Fri, 7 Jan 2022 19:34:16 +0100 (CET) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 6E0DB834DE for ; Fri, 7 Jan 2022 19:34:14 +0100 (CET) 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-x530.google.com with SMTP id w16so25313463edc.11 for ; Fri, 07 Jan 2022 10:34:14 -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=2lOJ4lJj5Us9qXu4SpWpYzeitmeW3FQpDJ+4TAyl2SA=; b=Jtxy490FYX0QwpFnqU9SMHGrH+ipc6wCbdSDEwKuRtYTKTcr2M0+ZAuNJOug5bhQeW zCc09MqOh3+5dhcJxQyCcTg9Ti3UxEn7TyOq/rXgfNOyFAbXaNJaK14+mxdi8fbQBKoW OhzJCTETFTDhXTlaAMm5eQ3Yj9agoE/N0JRVh/+Hbv5VLVCkRf+9h71oaDjAQ2Nr9Oot a8l40jn9V/gnkL3slG+zK7OMb39Gzmp45AnmLeC9w/q0VHO2Q5ZD1QvS4d5IUwKND07I uoSN+3RI0sKKQi2+k6GV/CxQBzmN36FzGylGJpVVPAa6qaBSNw8bHXD25y/7kldwwhBT cPPQ== 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=2lOJ4lJj5Us9qXu4SpWpYzeitmeW3FQpDJ+4TAyl2SA=; b=oW+ThkinKQLJjylJ6rRTPo88rwq0aYN8/qUr2FtMy1IDIi+AS+c+q1QDL9P07aPQWT uIhs3KERvAlw3manU2vtmOorYljux1Pt97MNEDZ9NXN3of+vqUYHX24UoVaQrbWSKpWE TJdnOaHgLszCVKc0RhqyJ7OsuzyiNNC0l8Etc3iJfgIyAG8RCBM8ewbW323PbbMkv9s7 H/5QoEBgMAIfnNKKrmGuctlGBY1uvrgND/GgB2IaHN1dS5LMVJxQTyjFmzq+ngTeeILG qCtqoFNrWNAVpM2OYWd8KxAfrsNFxLukMF8Pli254wyt0vPvIA1A/ms3fp8nl2v+ihN8 jGtg== X-Gm-Message-State: AOAM532eNZNG+hpseQzk5OXHFyaqx3rLkM228/oa2O4QZYq18nLS89MA XbOTc3C4dk9sJrXmrWUIJRg= X-Google-Smtp-Source: ABdhPJzrwjFxjrV/suMIOUJgPGn9QvK6i1YClCwmqyh/kjrAyxY6m/FZDaOOQcExQg5SqwME7eFTPw== X-Received: by 2002:a17:906:9b8e:: with SMTP id dd14mr51968884ejc.337.1641580454138; Fri, 07 Jan 2022 10:34:14 -0800 (PST) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id gb10sm1603714ejc.49.2022.01.07.10.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 10:34:13 -0800 (PST) From: Johan Jonker To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, peng.fan@nxp.com, jh80.chung@samsung.com, u-boot@lists.denx.de Subject: [PATCH v1 1/2] rockchip: mmc: rockchip_dw_mmc: fix ciu clock index Date: Fri, 7 Jan 2022 19:34:05 +0100 Message-Id: <20220107183406.1804-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 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 7f8dea1e..be065ec0 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