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:
@@ -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 */
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user