spi: designware: Change include order

With current order of include files, the file designware_spi.c
can't see that the struct global_data has the member
board_type when CONFIG_BOARD_TYPES is defined. By not seeing this
then all the members are shifted in the struct global_data.
So when the driver is trying to read from device tree blob, it
would pass the wrong address to the function 'fdtdev_get_int'.
This will make to use the default frequency 500000.

The fix consists of changing the order of include files in
designware_spi.c to include first common.h file.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
This commit is contained in:
Horatiu.Vultur@microchip.com 2019-02-25 10:59:54 +00:00 committed by Jagan Teki
parent cfba74d0be
commit 1b77de4476

View file

@ -9,8 +9,8 @@
* Copyright (c) 2009, Intel Corporation. * Copyright (c) 2009, Intel Corporation.
*/ */
#include <asm-generic/gpio.h>
#include <common.h> #include <common.h>
#include <asm-generic/gpio.h>
#include <clk.h> #include <clk.h>
#include <dm.h> #include <dm.h>
#include <errno.h> #include <errno.h>