Browse Source

common: Drop part.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 4 years ago
parent
commit
e6f6f9e648
97 changed files with 142 additions and 10 deletions
  1. 1 0
      api/api_storage.c
  2. 1 0
      arch/arm/mach-omap2/utils.c
  3. 1 0
      arch/arm/mach-snapdragon/dram.c
  4. 2 0
      arch/x86/include/asm/fsp/fsp_api.h
  5. 2 0
      arch/x86/include/asm/fsp/fsp_fv.h
  6. 1 0
      board/xilinx/zynq/bootimg.c
  7. 2 0
      cmd/ab_select.c
  8. 1 0
      cmd/bcb.c
  9. 1 0
      cmd/fat.c
  10. 2 0
      cmd/gpt.c
  11. 2 0
      cmd/mmc.c
  12. 1 0
      cmd/nvme.c
  13. 1 0
      cmd/sata.c
  14. 1 0
      cmd/scsi.c
  15. 1 0
      cmd/unzip.c
  16. 1 0
      cmd/usb.c
  17. 2 1
      cmd/usb_mass_storage.c
  18. 1 0
      cmd/virtio.c
  19. 3 1
      common/android_ab.c
  20. 1 0
      common/spl/spl_ext.c
  21. 1 0
      common/spl/spl_mmc.c
  22. 1 0
      common/usb_storage.c
  23. 1 0
      disk/part.c
  24. 1 0
      disk/part_amiga.c
  25. 2 0
      disk/part_dos.c
  26. 3 1
      disk/part_efi.c
  27. 2 0
      disk/part_iso.c
  28. 1 0
      disk/part_mac.c
  29. 1 0
      drivers/ata/ahci.c
  30. 2 0
      drivers/ata/dwc_ahsata.c
  31. 1 0
      drivers/ata/fsl_sata.c
  32. 2 0
      drivers/ata/sata.c
  33. 1 0
      drivers/ata/sata_mv.c
  34. 1 0
      drivers/ata/sata_sandbox.c
  35. 2 0
      drivers/ata/sata_sil3114.c
  36. 1 0
      drivers/block/blk-uclass.c
  37. 2 0
      drivers/block/blk_legacy.c
  38. 1 1
      drivers/block/blkcache.c
  39. 2 0
      drivers/block/ide.c
  40. 1 0
      drivers/dfu/dfu_mmc.c
  41. 1 0
      drivers/fastboot/fb_getvar.c
  42. 1 0
      drivers/fastboot/fb_nand.c
  43. 1 0
      drivers/misc/fsl_ifc.c
  44. 1 0
      drivers/mmc/mmc.c
  45. 1 0
      drivers/mmc/mmc_write.c
  46. 1 0
      drivers/mmc/sh_sdhi.c
  47. 1 0
      drivers/mtd/nand/raw/fsl_ifc_spl.c
  48. 1 0
      drivers/net/fm/eth.c
  49. 1 0
      drivers/nvme/nvme-uclass.c
  50. 1 0
      drivers/nvme/nvme.c
  51. 2 0
      drivers/scsi/scsi.c
  52. 1 0
      drivers/usb/gadget/ether.c
  53. 1 0
      drivers/usb/gadget/f_rockusb.c
  54. 1 0
      drivers/video/atmel_hlcdfb.c
  55. 1 0
      drivers/video/atmel_lcdfb.c
  56. 1 0
      drivers/video/imx/mxc_ipuv3_fb.c
  57. 1 0
      drivers/video/meson/meson_vpu.c
  58. 1 0
      drivers/video/mvebu_lcd.c
  59. 1 0
      drivers/video/sunxi/sunxi_de2.c
  60. 1 0
      drivers/video/tegra.c
  61. 1 0
      drivers/video/tegra124/display.c
  62. 1 0
      drivers/virtio/virtio_blk.c
  63. 1 0
      env/ext4.c
  64. 3 3
      env/fat.c
  65. 1 0
      fs/btrfs/dev.c
  66. 3 1
      fs/btrfs/super.c
  67. 2 0
      fs/ext4/ext4_common.c
  68. 1 0
      fs/ext4/ext4_journal.c
  69. 2 0
      fs/ext4/ext4_write.c
  70. 2 0
      fs/ext4/ext4fs.c
  71. 1 0
      fs/fs.c
  72. 1 0
      fs/fs_internal.c
  73. 1 0
      fs/sandbox/sandboxfs.c
  74. 1 0
      fs/ubifs/ubifs.c
  75. 2 1
      include/android_ab.h
  76. 3 0
      include/btrfs.h
  77. 0 1
      include/common.h
  78. 3 0
      include/efi_loader.h
  79. 2 0
      include/ext4fs.h
  80. 2 0
      include/fat.h
  81. 3 0
      include/fb_mmc.h
  82. 2 0
      include/fs.h
  83. 1 0
      include/fsl_ifc.h
  84. 2 0
      include/gzip.h
  85. 4 0
      include/initcall.h
  86. 3 0
      include/reiserfs.h
  87. 3 0
      include/sandboxfs.h
  88. 1 0
      include/spl.h
  89. 3 0
      include/ubifs_uboot.h
  90. 2 0
      lib/efi_driver/efi_block_device.c
  91. 1 0
      lib/efi_loader/efi_device_path_to_text.c
  92. 1 0
      lib/efi_loader/efi_file.c
  93. 1 0
      lib/gunzip.c
  94. 1 0
      lib/image-sparse.c
  95. 1 0
      test/dm/blk.c
  96. 1 0
      test/dm/mmc.c
  97. 1 0
      test/dm/usb.c

+ 1 - 0
api/api_storage.c

@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <api_public.h>
+#include <part.h>
 
 #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
 #include <usb.h>

+ 1 - 0
arch/arm/mach-omap2/utils.c

@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <part.h>
 #include <asm/setup.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/omap_common.h>

+ 1 - 0
arch/arm/mach-snapdragon/dram.c

@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <smem.h>
 #include <fdt_support.h>
 #include <asm/arch/dram.h>

+ 2 - 0
arch/x86/include/asm/fsp/fsp_api.h

@@ -6,6 +6,8 @@
 #ifndef __ASM_FSP_API_H
 #define __ASM_FSP_API_H
 
+#include <linux/linkage.h>
+
 enum fsp_phase {
 	/* Notification code for post PCI enuermation */
 	INIT_PHASE_PCI	= 0x20,

+ 2 - 0
arch/x86/include/asm/fsp/fsp_fv.h

@@ -7,6 +7,8 @@
 #ifndef __FSP_FV___
 #define __FSP_FV___
 
+#include <efi.h>
+
 /* Value of EFI_FV_FILE_ATTRIBUTES */
 #define EFI_FV_FILE_ATTR_ALIGNMENT	0x0000001F
 #define EFI_FV_FILE_ATTR_FIXED		0x00000100

+ 1 - 0
board/xilinx/zynq/bootimg.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <part.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>

+ 2 - 0
cmd/ab_select.c

@@ -3,8 +3,10 @@
  * Copyright (C) 2017 The Android Open Source Project
  */
 
+#include <common.h>
 #include <android_ab.h>
 #include <command.h>
+#include <part.h>
 
 static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc,
 			char * const argv[])

+ 1 - 0
cmd/bcb.c

@@ -8,6 +8,7 @@
 #include <android_bootloader_message.h>
 #include <command.h>
 #include <common.h>
+#include <part.h>
 
 enum bcb_cmd {
 	BCB_CMD_LOAD,

+ 1 - 0
cmd/fat.c

@@ -11,6 +11,7 @@
 #include <mapmem.h>
 #include <fat.h>
 #include <fs.h>
+#include <part.h>
 #include <asm/cache.h>
 
 int do_fat_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

+ 2 - 0
cmd/gpt.c

@@ -11,9 +11,11 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <env.h>
 #include <malloc.h>
 #include <command.h>
+#include <part.h>
 #include <part_efi.h>
 #include <exports.h>
 #include <uuid.h>

+ 2 - 0
cmd/mmc.c

@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <mmc.h>
+#include <part.h>
 #include <sparse_format.h>
 #include <image-sparse.h>
 

+ 1 - 0
cmd/nvme.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <nvme.h>

+ 1 - 0
cmd/sata.c

@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <dm.h>
 #include <command.h>
 #include <part.h>

+ 1 - 0
cmd/scsi.c

@@ -8,6 +8,7 @@
  * SCSI support.
  */
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <scsi.h>
 

+ 1 - 0
cmd/unzip.c

@@ -8,6 +8,7 @@
 #include <command.h>
 #include <env.h>
 #include <gzip.h>
+#include <part.h>
 
 static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {

+ 1 - 0
cmd/usb.c

@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <dm.h>

+ 2 - 1
cmd/usb_mass_storage.c

@@ -6,10 +6,11 @@
  * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
  */
 
-#include <errno.h>
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
+#include <errno.h>
 #include <g_dnl.h>
 #include <malloc.h>
 #include <part.h>

+ 1 - 0
cmd/virtio.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <virtio_types.h>

+ 3 - 1
common/android_ab.c

@@ -5,9 +5,11 @@
 #include <common.h>
 #include <android_ab.h>
 #include <android_bootloader_message.h>
+#include <blk.h>
 #include <malloc.h>
-#include <linux/err.h>
+#include <part.h>
 #include <memalign.h>
+#include <linux/err.h>
 #include <u-boot/crc.h>
 #include <u-boot/crc.h>
 

+ 1 - 0
common/spl/spl_ext.c

@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <part.h>
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <ext4fs.h>

+ 1 - 0
common/spl/spl_mmc.c

@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <spl.h>
 #include <linux/compiler.h>
 #include <errno.h>

+ 1 - 0
common/usb_storage.c

@@ -33,6 +33,7 @@
 
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <errno.h>

+ 1 - 0
disk/part.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <env.h>
 #include <errno.h>

+ 1 - 0
disk/part_amiga.c

@@ -9,6 +9,7 @@
 #include <env.h>
 #include <ide.h>
 #include "part_amiga.h"
+#include <part.h>
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 

+ 2 - 0
disk/part_dos.c

@@ -14,10 +14,12 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <ide.h>
 #include <memalign.h>
 #include "part_dos.h"
+#include <part.h>
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 

+ 3 - 1
disk/part_efi.c

@@ -9,10 +9,12 @@
  *   when CONFIG_SYS_64BIT_LBA is not defined, lbaint_t is 32 bits; this
  *   limits the maximum size of addressable storage to < 2 Terra Bytes
  */
+#include <common.h>
+#include <blk.h>
+#include <part.h>
 #include <uuid.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
-#include <common.h>
 #include <command.h>
 #include <fdtdec.h>
 #include <ide.h>

+ 2 - 0
disk/part_iso.c

@@ -5,7 +5,9 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
+#include <part.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
 #include "part_iso.h"

+ 1 - 0
disk/part_mac.c

@@ -17,6 +17,7 @@
 #include <memalign.h>
 #include <ide.h>
 #include "part_mac.h"
+#include <part.h>
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 

+ 1 - 0
drivers/ata/ahci.c

@@ -9,6 +9,7 @@
  * This driver provides a SCSI interface to SATA.
  */
 #include <common.h>
+#include <blk.h>
 #include <cpu_func.h>
 
 #include <command.h>

+ 2 - 0
drivers/ata/dwc_ahsata.c

@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <dwc_ahsata.h>
@@ -13,6 +14,7 @@
 #include <libata.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <sata.h>
 #include <asm/cache.h>
 #include <asm/io.h>

+ 1 - 0
drivers/ata/fsl_sata.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <cpu_func.h>

+ 2 - 0
drivers/ata/sata.c

@@ -11,7 +11,9 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <dm.h>
+#include <part.h>
 #include <sata.h>
 
 #ifndef CONFIG_AHCI

+ 1 - 0
drivers/ata/sata_mv.c

@@ -33,6 +33,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <asm/cache.h>

+ 1 - 0
drivers/ata/sata_sandbox.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 
 int init_sata(int dev)
 {

+ 2 - 0
drivers/ata/sata_sil3114.c

@@ -8,6 +8,8 @@
  */
 
 #include <common.h>
+#include <blk.h>
+#include <part.h>
 #include <pci.h>
 #include <command.h>
 #include <config.h>

+ 1 - 0
drivers/block/blk-uclass.c

@@ -8,6 +8,7 @@
 #include <blk.h>
 #include <dm.h>
 #include <malloc.h>
+#include <part.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>

+ 2 - 0
drivers/block/blk_legacy.c

@@ -5,6 +5,8 @@
  */
 
 #include <common.h>
+#include <blk.h>
+#include <part.h>
 #include <linux/err.h>
 
 struct blk_driver *blk_driver_lookup_type(int if_type)

+ 1 - 1
drivers/block/blkcache.c

@@ -4,8 +4,8 @@
  * Author: Eric Nelson<eric@nelint.com>
  *
  */
-#include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <malloc.h>
 #include <part.h>
 #include <linux/ctype.h>

+ 2 - 0
drivers/block/ide.c

@@ -6,8 +6,10 @@
 
 #include <common.h>
 #include <ata.h>
+#include <blk.h>
 #include <dm.h>
 #include <ide.h>
+#include <part.h>
 #include <watchdog.h>
 #include <asm/io.h>
 

+ 1 - 0
drivers/dfu/dfu_mmc.c

@@ -14,6 +14,7 @@
 #include <ext4fs.h>
 #include <fat.h>
 #include <mmc.h>
+#include <part.h>
 
 static unsigned char *dfu_file_buf;
 static u64 dfu_file_buf_len;

+ 1 - 0
drivers/fastboot/fb_getvar.c

@@ -10,6 +10,7 @@
 #include <fb_mmc.h>
 #include <fb_nand.h>
 #include <fs.h>
+#include <part.h>
 #include <version.h>
 
 static void getvar_version(char *var_parameter, char *response);

+ 1 - 0
drivers/fastboot/fb_nand.c

@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <flash.h>
 
 #include <fastboot.h>

+ 1 - 0
drivers/misc/fsl_ifc.c

@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fsl_ifc.h>
+#include <part.h>
 
 #ifdef CONFIG_TFABOOT
 struct ifc_regs ifc_cfg_default_boot[CONFIG_SYS_FSL_IFC_BANK_COUNT] = {

+ 1 - 0
drivers/mmc/mmc.c

@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <dm/device-internal.h>

+ 1 - 0
drivers/mmc/mmc_write.c

@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <dm.h>
 #include <part.h>
 #include <div64.h>

+ 1 - 0
drivers/mmc/sh_sdhi.c

@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <mmc.h>
 #include <dm.h>
+#include <part.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/compat.h>

+ 1 - 0
drivers/mtd/nand/raw/fsl_ifc_spl.c

@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <fsl_ifc.h>
+#include <part.h>
 #include <linux/mtd/rawnand.h>
 #ifdef CONFIG_CHAIN_OF_TRUST
 #include <fsl_validate.h>

+ 1 - 0
drivers/net/fm/eth.c

@@ -5,6 +5,7 @@
  *	Dave Liu <daveliu@freescale.com>
  */
 #include <common.h>
+#include <part.h>
 #include <asm/io.h>
 #ifdef CONFIG_DM_ETH
 #include <dm.h>

+ 1 - 0
drivers/nvme/nvme-uclass.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <errno.h>
 #include <dm.h>
 #include <dm/device.h>

+ 1 - 0
drivers/nvme/nvme.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>

+ 2 - 0
drivers/scsi/scsi.c

@@ -5,8 +5,10 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <dm.h>
 #include <env.h>
+#include <part.h>
 #include <pci.h>
 #include <scsi.h>
 #include <dm/device-internal.h>

+ 1 - 0
drivers/usb/gadget/ether.c

@@ -10,6 +10,7 @@
 #include <common.h>
 #include <console.h>
 #include <env.h>
+#include <part.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/usb/ch9.h>

+ 1 - 0
drivers/usb/gadget/f_rockusb.c

@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/composite.h>

+ 1 - 0
drivers/video/atmel_hlcdfb.c

@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <malloc.h>
+#include <part.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>

+ 1 - 0
drivers/video/atmel_lcdfb.c

@@ -9,6 +9,7 @@
 #include <atmel_lcd.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <part.h>
 #include <video.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>

+ 1 - 0
drivers/video/imx/mxc_ipuv3_fb.c

@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <part.h>
 #include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/global_data.h>

+ 1 - 0
drivers/video/meson/meson_vpu.c

@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <efi_loader.h>
 #include <fdt_support.h>
+#include <part.h>
 #include <linux/sizes.h>
 #include <asm/arch/mem.h>
 #include <dm/device-internal.h>

+ 1 - 0
drivers/video/mvebu_lcd.c

@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <video.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>

+ 1 - 0
drivers/video/sunxi/sunxi_de2.c

@@ -12,6 +12,7 @@
 #include <efi_loader.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
+#include <part.h>
 #include <video.h>
 #include <asm/global_data.h>
 #include <asm/io.h>

+ 1 - 0
drivers/video/tegra.c

@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <panel.h>
+#include <part.h>
 #include <pwm.h>
 #include <video.h>
 #include <asm/cache.h>

+ 1 - 0
drivers/video/tegra124/display.c

@@ -12,6 +12,7 @@
 #include <display.h>
 #include <edid.h>
 #include <lcd.h>
+#include <part.h>
 #include <video.h>
 #include <asm/gpio.h>
 #include <asm/io.h>

+ 1 - 0
drivers/virtio/virtio_blk.c

@@ -7,6 +7,7 @@
 #include <common.h>
 #include <blk.h>
 #include <dm.h>
+#include <part.h>
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>

+ 1 - 0
env/ext4.c

@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <part.h>
 
 #include <command.h>
 #include <env.h>

+ 3 - 3
env/fat.c

@@ -7,18 +7,18 @@
  */
 
 #include <common.h>
-#include <asm/cache.h>
-
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
-#include <linux/stddef.h>
+#include <part.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <search.h>
 #include <errno.h>
 #include <fat.h>
 #include <mmc.h>
+#include <asm/cache.h>
+#include <linux/stddef.h>
 
 #ifdef CONFIG_SPL_BUILD
 /* TODO(sjg@chromium.org): Figure out why this is needed */

+ 1 - 0
fs/btrfs/dev.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <compiler.h>
 #include <fs_internal.h>
 

+ 3 - 1
fs/btrfs/super.c

@@ -5,9 +5,11 @@
  * 2017 Marek Behun, CZ.NIC, marek.behun@nic.cz
  */
 
-#include "btrfs.h"
+#include <common.h>
 #include <memalign.h>
+#include <part.h>
 #include <linux/compat.h>
+#include "btrfs.h"
 
 #define BTRFS_SUPER_FLAG_SUPP	(BTRFS_HEADER_FLAG_WRITTEN	\
 				 | BTRFS_HEADER_FLAG_RELOC	\

+ 2 - 0
fs/ext4/ext4_common.c

@@ -19,10 +19,12 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext_common.h>
 #include <ext4fs.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <stddef.h>
 #include <linux/stat.h>
 #include <linux/time.h>

+ 1 - 0
fs/ext4/ext4_journal.c

@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext4fs.h>
 #include <malloc.h>
 #include <ext_common.h>

+ 2 - 0
fs/ext4/ext4_write.c

@@ -22,8 +22,10 @@
 
 
 #include <common.h>
+#include <blk.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <linux/stat.h>
 #include <div64.h>
 #include "ext4_common.h"

+ 2 - 0
fs/ext4/ext4fs.c

@@ -21,11 +21,13 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext_common.h>
 #include <ext4fs.h>
 #include "ext4_common.h"
 #include <div64.h>
 #include <malloc.h>
+#include <part.h>
 #include <uuid.h>
 
 int ext4fs_symlinknest;

+ 1 - 0
fs/fs.c

@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <common.h>
 #include <env.h>
+#include <lmb.h>
 #include <mapmem.h>
 #include <part.h>
 #include <ext4fs.h>

+ 1 - 0
fs/fs_internal.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <compiler.h>
 #include <part.h>
 #include <memalign.h>

+ 1 - 0
fs/sandbox/sandboxfs.c

@@ -7,6 +7,7 @@
 #include <fs.h>
 #include <malloc.h>
 #include <os.h>
+#include <sandboxfs.h>
 
 int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {

+ 1 - 0
fs/ubifs/ubifs.c

@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include "ubifs.h"
+#include <part.h>
 #include <dm/devres.h>
 #include <u-boot/zlib.h>
 

+ 2 - 1
include/android_ab.h

@@ -6,7 +6,8 @@
 #ifndef __ANDROID_AB_H
 #define __ANDROID_AB_H
 
-#include <common.h>
+struct blk_desc;
+struct disk_partition;
 
 /* Android standard boot slot names are 'a', 'b', 'c', ... */
 #define BOOT_SLOT_NAME(slot_num) ('a' + (slot_num))

+ 3 - 0
include/btrfs.h

@@ -8,6 +8,9 @@
 #ifndef __U_BOOT_BTRFS_H__
 #define __U_BOOT_BTRFS_H__
 
+struct blk_desc;
+struct disk_partition;
+
 int btrfs_probe(struct blk_desc *fs_dev_desc,
 		struct disk_partition *fs_partition);
 int btrfs_ls(const char *);

+ 0 - 1
include/common.h

@@ -28,7 +28,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <linux/kernel.h>
-#include <part.h>
 #include <image.h>
 #include <log.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */

+ 3 - 0
include/efi_loader.h

@@ -9,11 +9,14 @@
 #define _EFI_LOADER_H 1
 
 #include <common.h>
+#include <blk.h>
 #include <part_efi.h>
 #include <efi_api.h>
 #include <image.h>
 #include <pe.h>
 
+struct blk_desc;
+
 static inline int guidcmp(const void *g1, const void *g2)
 {
 	return memcmp(g1, g2, sizeof(efi_guid_t));

+ 2 - 0
include/ext4fs.h

@@ -28,6 +28,8 @@
 #define __EXT4__
 #include <ext_common.h>
 
+struct disk_partition;
+
 #define EXT4_INDEX_FL		0x00001000 /* Inode uses hash tree index */
 #define EXT4_EXTENTS_FL		0x00080000 /* Inode uses extents */
 #define EXT4_EXT_MAGIC			0xf30a

+ 2 - 0
include/fat.h

@@ -12,6 +12,8 @@
 #include <asm/byteorder.h>
 #include <fs.h>
 
+struct disk_partition;
+
 /* Maximum Long File Name length supported here is 128 UTF-16 code units */
 #define VFAT_MAXLEN_BYTES	256 /* Maximum LFN buffer in bytes */
 #define VFAT_MAXSEQ		9   /* Up to 9 of 13 2-byte UTF-16 entries */

+ 3 - 0
include/fb_mmc.h

@@ -6,6 +6,9 @@
 #ifndef _FB_MMC_H_
 #define _FB_MMC_H_
 
+struct blk_desc;
+struct disk_partition;
+
 /**
  * fastboot_mmc_get_part_info() - Lookup eMMC partion by name
  *

+ 2 - 0
include/fs.h

@@ -14,6 +14,8 @@
 #define FS_TYPE_UBIFS	4
 #define FS_TYPE_BTRFS	5
 
+struct blk_desc;
+
 /**
  * do_fat_fsload - Run the fatload command
  *

+ 1 - 0
include/fsl_ifc.h

@@ -10,6 +10,7 @@
 #ifdef CONFIG_FSL_IFC
 #include <config.h>
 #include <common.h>
+#include <part.h>
 #ifdef CONFIG_ARM
 #include <asm/arch/soc.h>
 #endif

+ 2 - 0
include/gzip.h

@@ -7,6 +7,8 @@
 #ifndef __GZIP_H
 #define __GZIP_H
 
+struct blk_desc;
+
 /**
  * gzip_parse_header() - Parse a header from a gzip file
  *

+ 4 - 0
include/initcall.h

@@ -8,6 +8,10 @@
 
 typedef int (*init_fnc_t)(void);
 
+#ifdef CONFIG_EFI_APP
+#include <efi.h>
+#endif
+
 /*
  * To enable debugging. add #define DEBUG at the top of the including file.
  *

+ 3 - 0
include/reiserfs.h

@@ -18,6 +18,9 @@
 #define SECTOR_SIZE		0x200
 #define SECTOR_BITS		9
 
+struct blk_desc;
+struct disk_partition;
+
 /* Error codes */
 typedef enum
 {

+ 3 - 0
include/sandboxfs.h

@@ -18,6 +18,9 @@
 #ifndef __SANDBOX_FS__
 #define __SANDBOX_FS__
 
+struct blk_desc;
+struct disk_partition;
+
 int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 
 int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,

+ 1 - 0
include/spl.h

@@ -26,6 +26,7 @@ struct image_header;
 #define MMCSD_MODE_FS		2
 #define MMCSD_MODE_EMMCBOOT	3
 
+struct blk_desc;
 struct image_header;
 
 /*

+ 3 - 0
include/ubifs_uboot.h

@@ -14,6 +14,9 @@
 #ifndef __UBIFS_UBOOT_H__
 #define __UBIFS_UBOOT_H__
 
+struct blk_desc;
+struct disk_partition;
+
 int ubifs_init(void);
 int uboot_ubifs_mount(char *vol_name);
 void uboot_ubifs_umount(void);

+ 2 - 0
lib/efi_driver/efi_block_device.c

@@ -28,6 +28,8 @@
  * iPXE uses the simple file protocol to load Grub or the Linux Kernel.
  */
 
+#include <common.h>
+#include <blk.h>
 #include <efi_driver.h>
 #include <malloc.h>
 #include <dm/device-internal.h>

+ 1 - 0
lib/efi_loader/efi_device_path_to_text.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <efi_loader.h>
 
 #define MAC_OUTPUT_LEN 22

+ 1 - 0
lib/efi_loader/efi_file.c

@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <fs.h>
+#include <part.h>
 
 /* GUID for file system information */
 const efi_guid_t efi_file_system_info_guid = EFI_FILE_SYSTEM_INFO_GUID;

+ 1 - 0
lib/gunzip.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <div64.h>

+ 1 - 0
lib/image-sparse.c

@@ -36,6 +36,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <image-sparse.h>
 #include <div64.h>
 #include <malloc.h>

+ 1 - 0
test/dm/blk.c

@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <usb.h>
 #include <asm/state.h>
 #include <dm/test.h>

+ 1 - 0
test/dm/mmc.c

@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <mmc.h>
+#include <part.h>
 #include <dm/test.h>
 #include <test/ut.h>
 

+ 1 - 0
test/dm/usb.c

@@ -6,6 +6,7 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
+#include <part.h>
 #include <usb.h>
 #include <asm/io.h>
 #include <asm/state.h>