summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2019-05-08 19:42:16 +0530
committerJagan Teki <jagan@amarulasolutions.com>2019-05-09 00:42:55 +0530
commit0cbee8544b4e5282d20d6bc40c505c6fa0589773 (patch)
treeafeeafb4b9c23ad816ac9d42805d7983357cc62e
parent0eabec145fda8bb6b4faebfbbce506a357445956 (diff)
spi: atcspi200: Change include order
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. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
-rw-r--r--drivers/spi/atcspi200_spi.c2
1 files changed, 1 insertions, 1 deletions
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 <clk.h>
#include <common.h>
+#include <clk.h>
#include <malloc.h>
#include <spi.h>
#include <asm/io.h>