diff options
author | Simon Glass <sjg@chromium.org> | 2020-02-03 07:36:16 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:46 -0700 |
commit | 336d4615f8fa774557d14f9b3245daa9e5fe3dbc (patch) | |
tree | 7a4d2d33113f44238d64e7e409fd3aafef63c2ed /drivers/usb | |
parent | 61b29b82683863a970fd4609a7c58512872616bc (diff) | |
download | u-boot-336d4615f8fa774557d14f9b3245daa9e5fe3dbc.zip u-boot-336d4615f8fa774557d14f9b3245daa9e5fe3dbc.tar.gz u-boot-336d4615f8fa774557d14f9b3245daa9e5fe3dbc.tar.bz2 |
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')
35 files changed, 38 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index 2fa0104..652cd5c 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -9,6 +9,7 @@ #include <asm-generic/io.h> #include <clk.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/io.h> #include <linux/usb/otg.h> #include <malloc.h> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index 6f5e5af..f947e69 100644 --- a/drivers/usb/cdns3/core.c +++ b/drivers/usb/cdns3/core.c @@ -14,6 +14,7 @@ #include <common.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <dm/lists.h> #include <linux/kernel.h> diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c index 13eb489..47874fe 100644 --- a/drivers/usb/cdns3/drd.c +++ b/drivers/usb/cdns3/drd.c @@ -11,6 +11,7 @@ * */ #include <dm.h> +#include <dm/device_compat.h> #include <linux/delay.h> #include <linux/iopoll.h> #include <linux/kernel.h> diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index f35a924..1957a3b 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -11,6 +11,7 @@ */ #include <cpu_func.h> +#include <dm/device_compat.h> #include <linux/usb/composite.h> #include <linux/iopoll.h> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index e095760..22e90a5 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -57,6 +57,7 @@ */ #include <dm.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/err.h> #include <linux/usb/gadget.h> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index cbf21d3..c506652 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -18,6 +18,7 @@ #include <malloc.h> #include <dwc3-uboot.h> #include <asm/dma-mapping.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/err.h> #include <linux/ioport.h> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 7ffec12..9596bf1 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -18,6 +18,7 @@ #include <asm/io.h> #include <dm.h> #include <dwc3-omap-uboot.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/usb/dwc3-omap.h> #include <linux/ioport.h> diff --git a/drivers/usb/dwc3/dwc3-uniphier.c b/drivers/usb/dwc3/dwc3-uniphier.c index 6e9c521..88317b1 100644 --- a/drivers/usb/dwc3/dwc3-uniphier.c +++ b/drivers/usb/dwc3/dwc3-uniphier.c @@ -7,6 +7,7 @@ */ #include <dm.h> +#include <dm/device_compat.h> #include <linux/bitops.h> #include <linux/errno.h> #include <linux/io.h> diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 0c8c11d..4af5894 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -14,6 +14,7 @@ */ #include <common.h> #include <cpu_func.h> +#include <dm/device_compat.h> #include <linux/kernel.h> #include <linux/list.h> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 677607a..1502d67 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -17,6 +17,7 @@ #include <cpu_func.h> #include <malloc.h> #include <asm/dma-mapping.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/bug.h> #include <linux/list.h> diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c index a908682..6b0166a 100644 --- a/drivers/usb/dwc3/ti_usb_phy.c +++ b/drivers/usb/dwc3/ti_usb_phy.c @@ -19,6 +19,7 @@ #include <common.h> #include <malloc.h> #include <ti-usb-phy-uboot.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/ioport.h> #include <asm/io.h> diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index b834a1c..496abf3 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -23,6 +23,7 @@ #include <generic-phy.h> #include <malloc.h> #include <reset.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/errno.h> diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c index 4bbd030..f40779b 100644 --- a/drivers/usb/gadget/storage_common.c +++ b/drivers/usb/gadget/storage_common.c @@ -269,6 +269,7 @@ struct device_attribute { int i; }; #define ETOOSMALL 525 #include <usb_mass_storage.h> +#include <dm/device_compat.h> /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index 52384b9..a33ab5c 100644 --- a/drivers/usb/gadget/udc/udc-core.c +++ b/drivers/usb/gadget/udc/udc-core.c @@ -13,6 +13,7 @@ * usb_ */ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/compat.h> #include <malloc.h> diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index b9c56f7..e4efaf1 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -15,6 +15,7 @@ #include <usbroothubdes.h> #include <wait_bit.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <power/regulator.h> #include <reset.h> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 6900848..67eec0e 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -8,6 +8,7 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <malloc.h> #include <usb.h> #include <asm/io.h> #include <asm/arch/clk.h> diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c index 80ac876..0643681 100644 --- a/drivers/usb/host/ehci-generic.c +++ b/drivers/usb/host/ehci-generic.c @@ -5,6 +5,7 @@ #include <common.h> #include <clk.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index ef20c3c..1cc0205 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -17,6 +17,7 @@ #include <malloc.h> #include <memalign.h> #include <watchdog.h> +#include <dm/device_compat.h> #include <linux/compiler.h> #include "ehci.h" diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 29a7020..6920182 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -4,9 +4,11 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <clk.h> #include <dm.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c index 7b6ec51..04d5fdb 100644 --- a/drivers/usb/host/ohci-generic.c +++ b/drivers/usb/host/ohci-generic.c @@ -6,6 +6,7 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index a37696d..8fc9d21 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -10,6 +10,7 @@ #include <dm.h> #include <usb.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <linux/iopoll.h> #include <power/regulator.h> diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c index c4d8811..d86584b 100644 --- a/drivers/usb/host/xhci-rcar.c +++ b/drivers/usb/host/xhci-rcar.c @@ -9,8 +9,10 @@ #include <clk.h> #include <dm.h> #include <fdtdec.h> +#include <malloc.h> #include <usb.h> #include <wait_bit.h> +#include <dm/device_compat.h> #include <usb/xhci.h> #include "xhci-rcar-r8a779x_usb3_v3.h" diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c index 58cde22..6e5be90 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 899b30d..2ddcf33 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 cc6e0a7..f678aa4 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 d342eeb..eb59088 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 74b6457..35d2123 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 3ef8fe1..79e8222 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 55ad8ea..b98f0ed 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 f4d0e1f..72f14b9 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 8a45b05..0d34dcf 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 3a19900..c7867fe 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 45eecfe..98bf736 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 20ca273..00759f3 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> diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c index 897e6f1..9209942 100644 --- a/drivers/usb/phy/omap_usb_phy.c +++ b/drivers/usb/phy/omap_usb_phy.c @@ -10,6 +10,7 @@ #include <common.h> #include <usb.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <asm/omap_common.h> #include <asm/arch/cpu.h> |