dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-02-03 07:36:16 -07:00
parent 61b29b8268
commit 336d4615f8
460 changed files with 593 additions and 77 deletions

View File

@@ -29,6 +29,7 @@
#include <pci.h>
#include <asm/io.h>
#include <asm-generic/gpio.h>
#include <dm/device_compat.h>
#include <linux/ioport.h>
/* PCIe core registers */

View File

@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
#include <malloc.h>
#include <pci.h>
#include <asm/io.h>
#include <dm/device-internal.h>

View File

@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/of_access.h>

View File

@@ -12,6 +12,7 @@
#include <syscon.h>
#include <asm/io.h>
#include <asm-generic/gpio.h>
#include <dm/device_compat.h>
#include <linux/err.h>
DECLARE_GLOBAL_DATA_PTR;

View File

@@ -15,6 +15,7 @@
#include <asm/fsl_serdes.h>
#include <asm/io.h>
#include "pcie_fsl.h"
#include <dm/device_compat.h>
LIST_HEAD(fsl_pcie_list);

View File

@@ -11,6 +11,7 @@
#include <common.h>
#include <init.h>
#include <malloc.h>
#include <pci.h>
#include <asm/arch/clock.h>
#include <asm/arch/iomux.h>

View File

@@ -10,6 +10,7 @@
#include <dm.h>
#include <pci.h>
#include <asm/io.h>
#include <dm/device_compat.h>
#define RP_TX_REG0 0x2000
#define RP_TX_CNTRL 0x2004

View File

@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
#include <malloc.h>
#include <pci.h>
#include <reset.h>
#include <asm/io.h>