summaryrefslogtreecommitdiff
path: root/drivers/usb/musb-new
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-02-03 07:36:16 -0700
committerSimon Glass <sjg@chromium.org>2020-02-05 19:33:46 -0700
commit336d4615f8fa774557d14f9b3245daa9e5fe3dbc (patch)
tree7a4d2d33113f44238d64e7e409fd3aafef63c2ed /drivers/usb/musb-new
parent61b29b82683863a970fd4609a7c58512872616bc (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/usb/musb-new')
-rw-r--r--drivers/usb/musb-new/am35x.c1
-rw-r--r--drivers/usb/musb-new/da8xx.c1
-rw-r--r--drivers/usb/musb-new/musb_core.c1
-rw-r--r--drivers/usb/musb-new/musb_dsps.c1
-rw-r--r--drivers/usb/musb-new/musb_gadget.c1
-rw-r--r--drivers/usb/musb-new/musb_gadget_ep0.c1
-rw-r--r--drivers/usb/musb-new/musb_host.c1
-rw-r--r--drivers/usb/musb-new/musb_uboot.c1
-rw-r--r--drivers/usb/musb-new/omap2430.c1
-rw-r--r--drivers/usb/musb-new/pic32.c1
-rw-r--r--drivers/usb/musb-new/sunxi.c2
-rw-r--r--drivers/usb/musb-new/ti-musb.c1
12 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 58cde22615..6e5be90fe5 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -12,6 +12,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/init.h>
#include <linux/module.h>
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 899b30db68..2ddcf33b5f 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <asm/arch/hardware.h>
#include <asm/arch/da8xx-usb.h>
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index cc6e0a71c9..f678aa4826 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -65,6 +65,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/module.h>
#include <linux/kernel.h>
diff --git a/drivers/usb/musb-new/musb_dsps.c b/drivers/usb/musb-new/musb_dsps.c
index d342eeba80..eb590885bc 100644
--- a/drivers/usb/musb-new/musb_dsps.c
+++ b/drivers/usb/musb-new/musb_dsps.c
@@ -15,6 +15,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/init.h>
#include <linux/io.h>
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 74b645715d..35d2123ddd 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/usb/musb-new/musb_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c
index 3ef8fe1373..79e8222e3b 100644
--- a/drivers/usb/musb-new/musb_gadget_ep0.c
+++ b/drivers/usb/musb-new/musb_gadget_ep0.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/timer.h>
diff --git a/drivers/usb/musb-new/musb_host.c b/drivers/usb/musb-new/musb_host.c
index 55ad8ead70..b98f0ed40e 100644
--- a/drivers/usb/musb-new/musb_host.c
+++ b/drivers/usb/musb-new/musb_host.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/module.h>
#include <linux/kernel.h>
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index f4d0e1fdc2..72f14b9343 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -1,5 +1,6 @@
#include <common.h>
#include <console.h>
+#include <malloc.h>
#include <watchdog.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 8a45b05613..0d34dcfc5d 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <serial.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <linux/err.h>
#include <linux/usb/otg.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index 3a19900e21..c7867fef8a 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <dm/device_compat.h>
#include <linux/usb/musb.h>
#include "linux-compat.h"
#include "musb_core.h"
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 45eecfeee6..98bf736978 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -19,12 +19,14 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <phy-sun4i-usb.h>
#include <reset.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clock.h>
#include <asm/arch/gpio.h>
#include <asm-generic/gpio.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/usb/musb.h>
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 20ca2731b4..00759f3e83 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <console.h>
#include <dm.h>
+#include <malloc.h>
#include <linux/usb/otg.h>
#include <dm/device-internal.h>
#include <dm/lists.h>