From patchwork Wed May 8 14:42:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 401 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E9EB13F066 for ; Wed, 8 May 2019 16:43:11 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id y1sf5439637plr.13 for ; Wed, 08 May 2019 07:43:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1557326590; cv=pass; d=google.com; s=arc-20160816; b=kRkiYfCdlcEYXIlQL/OLTinG192oky4HB2eC0CzJpUnHY27sMJy4hXJksnq0MY2BfA hqxmdr39NlmiZDmP3j6sq6JSTcrzXEXtLWeTGJabBQi/4NGgt0E7I9C7LhVrRvqcLniP fVhrHOZD62KPFo1hMINDR6OqkwaE+zNif7qQE4HMm2yvA1R5Vxs1Ryj3HQkU+naMp7ym i3U8weuv9nweA/8P0WkRbG1tmoCO8XDl2MfMzM1KlXPqzAfqBzPBPIoHxHtaq/N+rYbe Tmbo/02zPbpDm+sTWvrObDbFA0e/vhA3iu5PEaZ4ePUOWtGi9ds0FxVEPoOdPnxK8KAN 0PQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=QNx9PfHpa7hVsPvFEbUHK9BxWd7TLH85O6xMCYX03u8=; b=Cv/VqReKbwCX4uUW7qV1Pn9G5zeaE2rEM4AxlFLRiqFKZ8CjmltwNtTwbWBtiSe/Wb RbGFIOUMFkn73k4niAfBzhYE4gjKftsX869NhQtjxBHQzRUd3QE5n8hlQS3ukbcvy/3v zpz4YzUMjw1GpXplo7pTLjSNcZWYJvKWPnPjX5TmECKynEwoXig9AH8lX+8/afE193oC zJ6MbL1UXrch3w4OXXTpnh7Zq36bJ9UqcNiiy6JK610s0kfzyl83AOxxjBckP2kCkhHx 9cCsEWtUpBjkIYCuLmmfktWS/jnWfHX75zJLRqEbpwu9pOnpw97MfhDjwctmHlmCuqCq 0z/A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enc0HGZ7; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=QNx9PfHpa7hVsPvFEbUHK9BxWd7TLH85O6xMCYX03u8=; b=C4QpimqU7H8guu4DkG4HXWGk252FP6ne0lXuKx1keBuHZDC1qr043TPKtnLitET2z3 WqVVcIrqBOCqisgQRKKKgon+Z9uDalPlXloldoT/gYEvejFdyFYk6S2H/+2BXlneTPfH 5Q/2Hkcs+dV8SfiIDvwN/oLu7F+2NZEFyKqp0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=QNx9PfHpa7hVsPvFEbUHK9BxWd7TLH85O6xMCYX03u8=; b=I3QLcNhum+PO9HSDyJgI0XVa91TUtSF/leASPiRydy7wSo+JUIJkAiGcFScmknBRao p3EIMHBuN8OjS471qkJpcdkOwr3iu4dysew3+ZuopbGKmSaOVXJgB29kAeLM4szfRtGd +xF3M0v2Xsvk+3KDOUnsi0ODbyRPxZcVxKrjqnHmC2gNn/ElWpGiP38sE4iq8ISAiatN d0tDfHF4m5KSsM0nPDzmBtL2GkSvgrZUqURJImAus+PxGcAvBjkY8aAbNSgfSL11XapB CXLZMSFhZY40msaYqgDFaj61U6DIC6Rv0JpBnDy0UfTSM5vAnRlK5FpMRLroJZxxyuPq siIg== X-Gm-Message-State: APjAAAVXNpspnwg9RB8pzOYgtUeMOdQE7GbO9+Kl7vFsUsW8CQPvEwrB 6Cga10s6OY2+LzmWGwWqUACnkFux X-Google-Smtp-Source: APXvYqxZfYDWGWU4qX94VsbuPZF5QLrNmT43C0HFRyRwNhWLsb0AnNdeSR5HiyJOMZ/Fy/kdMVDTKg== X-Received: by 2002:a63:4a4f:: with SMTP id j15mr46568560pgl.338.1557326590029; Wed, 08 May 2019 07:43:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:120a:: with SMTP id a10ls5577637pfj.10.gmail; Wed, 08 May 2019 07:43:09 -0700 (PDT) X-Received: by 2002:aa7:8392:: with SMTP id u18mr50552770pfm.217.1557326589588; Wed, 08 May 2019 07:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557326589; cv=none; d=google.com; s=arc-20160816; b=zESTt2RzwHUuTdf+jklEDLfiBbyIb8M8JhIgC3wGRqtLctoZxlwIS8wK50346+x3Zx tCD7n/JToUoM7F2JQ6ABMVfDdyKZBQIGMRvlphrgJ3jT/qYmXDvWce4sMdXIA0fQE65n Het9KFHs9PM/G0J82uVg7JrBJ696HPWYz7tq/aoN9brwb6NpeagFftp9fntTKBSMTLb1 gZQBp2XMNuLQ98IGIcVUkzCSYLew0pqajOg8nl9JFnWs97h0hNk/CTuYba/JS129zB3O f0GKpS/tB0K71ivZeksH3VIIRPlikgxNr/WIfOv405eQQFpMV0yRB9mMHLlkrVMZltvF 3IZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DIAk7AlP4BsXCYNNZbordBOyoaPZtdnXPU8gfq5aJ64=; b=bGj8unBgIyrkrAoie2qIvo3gBQZvJGOwf1RrIhnagGUu47gmg1xKbzT+juyoJD2DdU uZGN1cJosTOCIVhIJHLmXQ/9jXhXAzQiCYftbmGmfs7X4BiTIheqY7cwFVOU67xhwoep RRNFaTDOzpXXtWtgiToGjBmKm7N2g3UJbtewNMRsJVF7yGkXMguhbyf8iIvxzletghIj eHkIn+PTvhyXXSgTMVDuv8caduMUCqP2LAmPaQB00jbjDwHKF/VJLt5L2N1zSloO1X29 tdE6BGMO7yEsGuYtDM1dE1KEamlGR3lNMosXfSZKFSRlZwIhjuEpZWa/Y75ZKkEnoKa4 OlOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enc0HGZ7; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id l7sor17747786pgm.9.2019.05.08.07.43.09 for (Google Transport Security); Wed, 08 May 2019 07:43:09 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:171c:: with SMTP id x28mr46822211pgl.12.1557326589286; Wed, 08 May 2019 07:43:09 -0700 (PDT) Received: from localhost.localdomain ([183.82.225.185]) by smtp.gmail.com with ESMTPSA id p7sm20864307pgn.64.2019.05.08.07.43.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 07:43:08 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de, Tom Rini Cc: linux-amarula@amarulasolutions.com, Jagan Teki , Anup Patel , Rick Chen , Paul Walmsley Subject: [PATCH 2/3] clk: sifive: fu540-prci: Change include order Date: Wed, 8 May 2019 20:12:51 +0530 Message-Id: <20190508144252.31001-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190508144252.31001-1-jagan@amarulasolutions.com> References: <20190508144252.31001-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enc0HGZ7; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Like clk_get_by_index, there is requirement for clk_get_by_index_nodev. In this case to make common code functionalities for dev and nodev, clk_get_by_index is trying to get the index of clock by passing ofnode instead of actual dev like current gpio uclass does. In these scenarios with current order of include files the fu540-prci driver is unable to find CONFIG_ENV_SIZE. In file included from arch/riscv/include/asm/u-boot.h:23:0, from include/dm/of.h:10, from include/dm/ofnode.h:12, from include/clk.h:11, from include/clk-uclass.h:13, from drivers/clk/sifive/fu540-prci.c:32: include/environment.h:145:19: error: 'CONFIG_ENV_SIZE' undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'? #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) So, fix consists of changing the order of include files in fu540-prci.c to include first common.h file. Cc: Anup Patel Cc: Rick Chen Cc: Paul Walmsley Signed-off-by: Jagan Teki Reviewed-by: Bin Meng --- drivers/clk/sifive/fu540-prci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index e1b5f8e6a9..2d47ebc6b1 100644 --- a/drivers/clk/sifive/fu540-prci.c +++ b/drivers/clk/sifive/fu540-prci.c @@ -28,10 +28,10 @@ * - SiFive FU540-C000 manual v1p0, Chapter 7 "Clocking and Reset" */ +#include #include #include #include -#include #include #include #include