When CONFIG_BOARD_TYPES is defined, then in the file designware_spi.c is not seen this define. Which makes the structure to global_data to have a different layout than the other files. Having a different layout, it fails to read the spi-max-frequency from device tree, therefore it is using the default value 500KHz.
Even if someone tries to change the speed, there is a check that doesn't allow higher speeds than the speed read from device tree. The fix consists of changing the order of the include headers so it can see the define CONFIG_BOARD_TYPES. Signed-off-by: Horatiu Vultur <horatiu.vul...@microchip.com> --- drivers/spi/designware_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 02d9376..dadb6fa 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -9,8 +9,8 @@ * Copyright (c) 2009, Intel Corporation. */ -#include <asm-generic/gpio.h> #include <common.h> +#include <asm-generic/gpio.h> #include <clk.h> #include <dm.h> #include <errno.h> -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot