diff options
author | Simon Glass | 2020-02-03 07:36:16 -0700 |
---|---|---|
committer | Simon Glass | 2020-02-05 19:33:46 -0700 |
commit | 336d4615f8fa774557d14f9b3245daa9e5fe3dbc (patch) | |
tree | 7a4d2d33113f44238d64e7e409fd3aafef63c2ed /drivers/mailbox | |
parent | 61b29b82683863a970fd4609a7c58512872616bc (diff) |
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>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/k3-sec-proxy.c | 2 | ||||
-rw-r--r-- | drivers/mailbox/mailbox-uclass.c | 1 | ||||
-rw-r--r-- | drivers/mailbox/sandbox-mbox-test.c | 1 | ||||
-rw-r--r-- | drivers/mailbox/sandbox-mbox.c | 1 | ||||
-rw-r--r-- | drivers/mailbox/stm32-ipcc.c | 2 | ||||
-rw-r--r-- | drivers/mailbox/tegra-hsp.c | 1 | ||||
-rw-r--r-- | drivers/mailbox/zynqmp-ipi.c | 1 |
7 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index 1194c6f029c..a560209f035 100644 --- a/drivers/mailbox/k3-sec-proxy.c +++ b/drivers/mailbox/k3-sec-proxy.c @@ -7,7 +7,9 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <linux/types.h> #include <linux/bitops.h> #include <linux/soc/ti/k3-sec-proxy.h> diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c index a6d2d1f5b83..291f5c218e5 100644 --- a/drivers/mailbox/mailbox-uclass.c +++ b/drivers/mailbox/mailbox-uclass.c @@ -7,6 +7,7 @@ #include <dm.h> #include <mailbox.h> #include <mailbox-uclass.h> +#include <malloc.h> #include <time.h> static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev) diff --git a/drivers/mailbox/sandbox-mbox-test.c b/drivers/mailbox/sandbox-mbox-test.c index ba1bb1cf957..faca8fcc441 100644 --- a/drivers/mailbox/sandbox-mbox-test.c +++ b/drivers/mailbox/sandbox-mbox-test.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> #include <mailbox.h> +#include <malloc.h> #include <asm/io.h> struct sandbox_mbox_test { diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c index 442ca633a19..25e23eb05b7 100644 --- a/drivers/mailbox/sandbox-mbox.c +++ b/drivers/mailbox/sandbox-mbox.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> #include <mailbox-uclass.h> +#include <malloc.h> #include <asm/io.h> #include <asm/mbox.h> diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c index d4035a85f2f..13e642ab703 100644 --- a/drivers/mailbox/stm32-ipcc.c +++ b/drivers/mailbox/stm32-ipcc.c @@ -7,7 +7,9 @@ #include <clk.h> #include <dm.h> #include <mailbox-uclass.h> +#include <malloc.h> #include <asm/io.h> +#include <dm/device_compat.h> /* * IPCC has one set of registers per CPU diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index c463e6a2be5..60f6a38321e 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <dm.h> #include <mailbox-uclass.h> diff --git a/drivers/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c index c181a7b8176..17b46545f5f 100644 --- a/drivers/mailbox/zynqmp-ipi.c +++ b/drivers/mailbox/zynqmp-ipi.c @@ -9,6 +9,7 @@ #include <asm/io.h> #include <dm.h> #include <mailbox-uclass.h> +#include <dm/device_compat.h> #include <mach/sys_proto.h> #include <linux/ioport.h> #include <linux/io.h> |