From patchwork Wed Feb 3 12:18:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1435240 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=jrJUhU8W; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DW12D4Nffz9sWQ for ; Wed, 3 Feb 2021 23:19:16 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D42D8827B1; Wed, 3 Feb 2021 13:18:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="jrJUhU8W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 14F5A82778; Wed, 3 Feb 2021 13:18:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 9D02B82778 for ; Wed, 3 Feb 2021 13:18:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x32c.google.com with SMTP id o10so3849920wmc.1 for ; Wed, 03 Feb 2021 04:18:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lQftuiqRM94X9TcnLBI70he9TZ4YmLOkGEntllGdogU=; b=jrJUhU8WcZpFZaU2VHyuS9tPyIppr1ILJ7CQPC+tKrrFJ+a9BMV6VHSVF/FrnC8wN/ NY0yqTe6KvYw8bN9bsmumPsdIGCpUceNeXPgcEyCPQeJJrwseri5b4ZN22blNyapZRiQ tczmkOaY/5E/b3nRwBkGlAQuLXWZePPUf7UbmVSAfnKQuHwIHDzY1fNlfv6HzvHM/X7Z Ps5t0l7tU13kdhY3boH0JQ+WNO1JekOICAQEXpq9IM64YAuJogTyeNuU6pqWHdT6qSZ3 9tMYsB0i1t0nm7PbLDr+K/hhHeHy8ZZZTosXOwCeCgxqfhhcANgoxR8K7SNfFnYfQBgR rWJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lQftuiqRM94X9TcnLBI70he9TZ4YmLOkGEntllGdogU=; b=gEwOI7TiSQvZ/tCDI8LLntGorHT0hjgdrLPAzOyuwaW92aOKNX5PMLqdEH7BXbpIOF Pb61isC+b7GohM7GqzaBT31ujUmZjuo0ayWvG+/MJzYjpFfl1ssmLK6dA4QAYOZhbvaK ysNDi0r6ntQ8P7U/Vfx5xnqDqzX9aauW9vLQbBHUZxSpB6qSg++dpuOdL+Tl1cC5si9r ZfdGAlMzNTyVIiqwFjXrAA6K/JhbskBMnBwA2F6tzxhP3H7wrjnIIIfoLWzgCaQUvOxA KbTGCIaJdqBlOUVejL45MWuFe/9EAadAHF4bQikm0eV4os6nwZp26CduUJ3d2cRRXs9o XMeg== X-Gm-Message-State: AOAM531WzgUut1MwKr5SMjJbAeQc1tM6n6eHGzqVZZahW1zGYaj1+x28 JYDN8WpAmbyNHwDVLqf2dPwwJpygyqHHGTFv X-Google-Smtp-Source: ABdhPJzNt/fQLaMxrwVK3lxaMCLJS/BPQ/haNeUYZqun1f2aNf3OfWhXnCrOlluTCh5LY1NmAcbl7A== X-Received: by 2002:a7b:c5d6:: with SMTP id n22mr2531535wmk.70.1612354732020; Wed, 03 Feb 2021 04:18:52 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id l1sm3462225wrp.40.2021.02.03.04.18.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Feb 2021 04:18:51 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: T Karthik Reddy , Heiko Schocher Subject: [PATCH 2/4] i2c: i2c_cdns: Enable i2c clock Date: Wed, 3 Feb 2021 13:18:42 +0100 Message-Id: <1b420c01cd2c02b4a09836c1294fe75e56decc68.1612354721.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean From: T Karthik Reddy Enable i2c controller clock from driver probe function by calling clk_enable(). Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek --- drivers/i2c/i2c-cdns.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c index db3c04fa6e75..a650dd69b89f 100644 --- a/drivers/i2c/i2c-cdns.c +++ b/drivers/i2c/i2c-cdns.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -481,6 +482,12 @@ static int cdns_i2c_of_to_plat(struct udevice *dev) i2c_bus->input_freq = clk_get_rate(&clk); + ret = clk_enable(&clk); + if (ret) { + dev_err(dev, "failed to enable clock\n"); + return ret; + } + return 0; }