From patchwork Wed May 8 14:42:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 400 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 572A23F066 for ; Wed, 8 May 2019 16:43:09 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id z12sf12819891pgs.4 for ; Wed, 08 May 2019 07:43:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1557326587; cv=pass; d=google.com; s=arc-20160816; b=wVZ+VpkVU7xJLWwBY1EHHmRy8W8TKwEY07B9RkmK0LKp8DockFys2smYrQVYGC8W5L WC7rldOjvRaAuw4PeyhRifEYK8lF9QrFZHrc0gaxitn8QN1R8SqEKq27DdgaO8PYeeeH pfTYh8fEwUNj+QyAkHBPmZ44TylU5KnUMaWKkaprijg8ZvyC9arugZpMRYgceLvz1xJK bqwKLUxk87uTnbdy7o+GJpGByPTV6eYHetTEittP/c+wv4riylIrCaGmw07dRyWZEzFl FoAtykDlmC/EbkQaeDHNP+JORLRl8lTXSJNMRI3Ik2j7UXZiokSy5WoSTZNZUO1uQfnQ l40A== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=h/Spndf9jHtWMvVAne5DqsGodAbm/2/daxgdzbIsj+M=; b=fyoRtdTrWFZWycdrmnhmQPEtcUVDOJPdjbQFN3oCgQ5JMjt6Xr7NksW9Us8VTeHSsR hRuOdYB0s+dzD/d1/9FMgTuxh7RqXuTttE4k9hcKC/PYbZpWo2r6AliV+ntBBCc2I26/ HjrXN4uofTw0/bvOzI3aeRwpCWjZk72FTv43CDJ6amyIIJ5cs8iqle8RFOEV8lcZznpX p0mL6+k0K/Gcv/tG3yXQ8vEq+yZJpOuCDmOS9kPZTJu1fNSP3KtfpkA2MTgUgWiSbi42 tUg/UG1wBbgEHgK1BLOZzf74nvcSycOo8cKwgehOcJaKCiUlwRR0u7rdaeOKGoBOv6a1 ZotA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NHBDdh48; 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=h/Spndf9jHtWMvVAne5DqsGodAbm/2/daxgdzbIsj+M=; b=cB2UAJGE/Qoxk8pEB5jNuMUAz147s7yQBXWlEAR/D4bYF35qpMEXycyY8MSmKhWaEo 9u7xUknMZLXRsboYonOXiSjHqJLltxKVnVGcYYbe1Jcgob0ip5nf43Y6LB/dRg4vwedh syKhpSu59SEGDtsg5YaQZ5lIlSwDt7Ad9W1KA= 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: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=h/Spndf9jHtWMvVAne5DqsGodAbm/2/daxgdzbIsj+M=; b=gTWZ08kaEXKJ8tyOfctHQE108tbRG7WcVigwfOq2KQnno1M+Bsv48mlBmmtrzbbIUW kn8lCGva1Z29Lefjc/yWL3t6MNMqkmtvpXn2Mqd14/BePaxxZ+CqoqCElVS6vS4cmDCh ujcHlcedxj/WbtfQcB4HYW55Tg4/mlvWZ9NKSHljcSKYg7/4036Sb3SyMMUQ9Y0PdfO9 Gj97AU4kTtMCvjxscYQVTVedb6jCXc1a/DnZWWDg+/Ah4K+zUupncWKyfCOyEu4rJoFO aTVlgwliDbP7lqkaTiBr0e/xQe4PYQpZaQte7wrbNbUZG33f5BW89QX6kMcShwMbo1x4 dFEA== X-Gm-Message-State: APjAAAU4bJz6UaMZHbRHPkigQgCh1+foYUtQ4He2tJafsiou+fzWX448 CQjEg6M5L4keRt7ZZbLsgT4Jb62U X-Google-Smtp-Source: APXvYqxSj0SPqrs5bz4Lgopimm4emdyiSPQc/weLN8U2sFXZfyHfhKEJXp7QpNm5WPsok9+HP55TuQ== X-Received: by 2002:a62:489d:: with SMTP id q29mr49204255pfi.45.1557326587366; Wed, 08 May 2019 07:43:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:2c51:: with SMTP id s78ls5583190pfs.1.gmail; Wed, 08 May 2019 07:43:07 -0700 (PDT) X-Received: by 2002:a63:690:: with SMTP id 138mr46746108pgg.415.1557326586989; Wed, 08 May 2019 07:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557326586; cv=none; d=google.com; s=arc-20160816; b=nhE6it0JqdrtKwcAZTEBLR9y/AnlzLVwtHlDzK6MZQMjd1AYQSEWyDjE/TaFEC5TG4 vqHwA0SHJMyEJrxVF4VhhtjCtnMLNxH5qcInx+xAlQqmA3Ld9Spt96/nn+BE2bj53QT6 NA/cT56PLpmjU+V3TZ0g3TYcmB7iXp6rrs1HFGMtnuisz7/5y98O7Zt/vCi490AOR9oh 15d3EwEA6mhHuVYlTcWn5hSueBiXayBemMtQBW9kHCGvzpHgIPSjleg9epMoixnEVUcn zRvSJlvTENxXkhnFebWAFUsCzSgEs/oxDAYxGjSWMtr3AS5pNdHNvxRT3KekmwHelmTo lwMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=PZAFSbjLALM+3E0G4WN3w/EHxMNFIUeSqjYfnAz02nk=; b=rU3kUoQC5m5T3Ugiu1OulqHHTuJ5nZzDOOZob0SS7R/kGchhPHxKYn/opVSMGmbRV4 PROCdA/3ebCjED51ZL1FlAW/0DX0xMDP8sV1IwKbT+KIxCbxfXlcMgVLxZOqDqaiV0v9 +rS99s87FcRf+kWuvOmayh6Ktv9jAzXHHB9O1z0LLEqKOaY0I8NUdcZto02zd9gGdrkH Su/q00l8GSC92YwMOJWQGDTxl5bEzWaZJOztzuvqvp0MjQMTX+k5Bl77gslLjg7CAXB0 G/tR3Mde9xSCl05gsfg9bPBHRPzGH6Iz+trWJabWO/v+ZMzGMp8mN5Vq+skgnp4ivq0u Ze+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NHBDdh48; 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 o61sor15116638pld.19.2019.05.08.07.43.06 for (Google Transport Security); Wed, 08 May 2019 07:43:06 -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:a17:902:6842:: with SMTP id f2mr48101350pln.189.1557326585912; Wed, 08 May 2019 07:43:05 -0700 (PDT) Received: from localhost.localdomain ([183.82.225.185]) by smtp.gmail.com with ESMTPSA id p7sm20864307pgn.64.2019.05.08.07.43.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 07:43:05 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de, Tom Rini Cc: linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 1/3] spi: atcspi200: Change include order Date: Wed, 8 May 2019 20:12:50 +0530 Message-Id: <20190508144252.31001-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 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=NHBDdh48; 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 atcspi200_spi driver is unable to find CONFIG_ENV_SIZE. In file included from arch/nds32/include/asm/u-boot.h:24, from include/dm/of.h:10, from include/dm/ofnode.h:12, from include/clk.h:11, from drivers/spi/atcspi200_spi.c:9: 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 atcspi200_spi.c to include first common.h file. Signed-off-by: Jagan Teki Reviewed-by: Bin Meng --- drivers/spi/atcspi200_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c index af96c6d21e..e0cc323444 100644 --- a/drivers/spi/atcspi200_spi.c +++ b/drivers/spi/atcspi200_spi.c @@ -6,8 +6,8 @@ * Author: Rick Chen (rick@andestech.com) */ -#include #include +#include #include #include #include