sf: Drop dm.h header file from spi_flash.h
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jul 2020 16:15:40 +0000 (10:15 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 4 Aug 2020 02:19:54 +0000 (22:19 -0400)
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>
arch/arm/mach-k3/sysfw-loader.c
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
arch/x86/cpu/ivybridge/sdram.c
board/st/common/stm32mp_dfu.c
include/spi_flash.h

index 513be09..96be069 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <image.h>
 #include <log.h>
 #include <spl.h>
index 70940f0..8aad4be 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <dm.h>
 #include <dfu.h>
 #include <malloc.h>
 #include <serial.h>
index 99bc480..dd6b875 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>
index 0cda919..38eb0f2 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <dm.h>
 #include <dfu.h>
 #include <env.h>
 #include <memalign.h>
index b336619..85cae32 100644 (file)
@@ -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