Browse Source

sf: Drop dm.h header file from spi_flash.h

This header file should not be included in other header files. Remove it
and use a forward declaration instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 3 years ago
parent
commit
a00867b47a

+ 1 - 0
arch/arm/mach-k3/sysfw-loader.c

@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <image.h>
 #include <log.h>
 #include <spl.h>

+ 1 - 0
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c

@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <dm.h>
 #include <dfu.h>
 #include <malloc.h>
 #include <serial.h>

+ 1 - 0
arch/x86/cpu/ivybridge/sdram.c

@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>

+ 1 - 0
board/st/common/stm32mp_dfu.c

@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <dm.h>
 #include <dfu.h>
 #include <env.h>
 #include <memalign.h>

+ 2 - 1
include/spi_flash.h

@@ -9,10 +9,11 @@
 #ifndef _SPI_FLASH_H_
 #define _SPI_FLASH_H_
 
-#include <dm.h>	/* Because we dereference struct udevice here */
 #include <linux/types.h>
 #include <linux/mtd/spi-nor.h>
 
+struct udevice;
+
 /* by default ENV use the same parameters than SF command */
 #ifndef CONFIG_ENV_SPI_BUS
 # define CONFIG_ENV_SPI_BUS	CONFIG_SF_DEFAULT_BUS