aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy
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/phy
parent61b29b82683863a970fd4609a7c58512872616bc (diff)
downloadu-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/phy')
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c1
-rw-r--r--drivers/phy/bcm6318-usbh-phy.c1
-rw-r--r--drivers/phy/bcm6348-usbh-phy.c1
-rw-r--r--drivers/phy/bcm6358-usbh-phy.c1
-rw-r--r--drivers/phy/bcm6368-usbh-phy.c1
-rw-r--r--drivers/phy/marvell/comphy_core.c1
-rw-r--r--drivers/phy/meson-g12a-usb2.c1
-rw-r--r--drivers/phy/meson-g12a-usb3-pcie.c1
-rw-r--r--drivers/phy/meson-gxl-usb2.c1
-rw-r--r--drivers/phy/meson-gxl-usb3.c1
-rw-r--r--drivers/phy/phy-mtk-tphy.c2
-rw-r--r--drivers/phy/phy-rcar-gen2.c2
-rw-r--r--drivers/phy/phy-rcar-gen3.c1
-rw-r--r--drivers/phy/phy-stm32-usbphyc.c1
-rw-r--r--drivers/phy/phy-ti-am654.c1
15 files changed, 17 insertions, 0 deletions
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 2c12fa6..612c428 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -21,6 +21,7 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/cpu.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#define REG_ISCR 0x00
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index de055a3..2de343d 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <power-domain.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index e7761e3..ed9f02b 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/device.h>
diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c
index 189a1c1..f0fda02 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/device.h>
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index 99da97a..53d1f45 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <power-domain.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index d52f42d..244beef 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index ad1a77f..c23bc87 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index 920675d..82655f2 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <regmap.h>
#include <errno.h>
#include <asm/io.h>
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index 86e69c7..c98d12b 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index 5cbbd4d..c2a8593 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 255d722..bd089b7 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -9,8 +9,10 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <mapmem.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dt-bindings/phy/phy.h>
diff --git a/drivers/phy/phy-rcar-gen2.c b/drivers/phy/phy-rcar-gen2.c
index ee70b81..e93130a 100644
--- a/drivers/phy/phy-rcar-gen2.c
+++ b/drivers/phy/phy-rcar-gen2.c
@@ -11,10 +11,12 @@
#include <dm.h>
#include <fdtdec.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <syscon.h>
#include <usb.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <power/regulator.h>
diff --git a/drivers/phy/phy-rcar-gen3.c b/drivers/phy/phy-rcar-gen3.c
index b662935..ce39cd8 100644
--- a/drivers/phy/phy-rcar-gen3.c
+++ b/drivers/phy/phy-rcar-gen3.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <syscon.h>
#include <usb.h>
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 6f11190..6ba3721 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -13,6 +13,7 @@
#include <syscon.h>
#include <usb.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <power/regulator.h>
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index 1c7db0d..0b2b241 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -10,6 +10,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <dm/device.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dt-bindings/phy/phy.h>
#include <generic-phy.h>