]> git.baikalelectronics.ru Git - uboot.git/commit
spi: designware: Change include order
authorHoratiu.Vultur@microchip.com <Horatiu.Vultur@microchip.com>
Mon, 25 Feb 2019 10:59:54 +0000 (10:59 +0000)
committerJagan Teki <jagan@amarulasolutions.com>
Mon, 4 Mar 2019 12:26:26 +0000 (17:56 +0530)
commitc8de7f6add0c5f303b8c38548cb3dd48937a2ecd
tree41a1d3a79ea8f73685b3abe26eaca3b57f696b05
parent0ee95a5142593be582df61f843daa4b18e63922b
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>
drivers/spi/designware_spi.c