From 61b29b82683863a970fd4609a7c58512872616bc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Feb 2020 07:36:15 -0700 Subject: dm: core: Require users of devres to include the header At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin --- drivers/net/designware.c | 1 + drivers/net/dwmac_socfpga.c | 1 + drivers/net/mvneta.c | 1 + drivers/net/mvpp2.c | 2 ++ drivers/net/phy/dp83867.c | 1 + drivers/net/sni_ave.c | 1 + drivers/net/zynq_gem.c | 1 + 7 files changed, 8 insertions(+) (limited to 'drivers/net') diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 19fc34f771..aa33fd511b 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c index b7bf5dbe69..66a5f95112 100644 --- a/drivers/net/dwmac_socfpga.c +++ b/drivers/net/dwmac_socfpga.c @@ -14,6 +14,7 @@ #include #include #include "designware.h" +#include #include diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 5fe8500199..505fabd3fa 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index b234b41956..105fdc994a 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -17,12 +17,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index a43793cd42..08935d9c15 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c index 6d333e24ee..64e92abb03 100644 --- a/drivers/net/sni_ave.c +++ b/drivers/net/sni_ave.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index c3fe8e3c56..3d9d5205a1 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -25,6 +25,7 @@ #include #include #include +#include #include /* Bit/mask specification */ -- cgit From 336d4615f8fa774557d14f9b3245daa9e5fe3dbc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Feb 2020 07:36:16 -0700 Subject: 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 --- drivers/net/bcm6348-eth.c | 1 + drivers/net/bcm6368-eth.c | 2 ++ drivers/net/designware.c | 1 + drivers/net/dwc_eth_qos.c | 1 + drivers/net/dwmac_socfpga.c | 1 + drivers/net/e1000.c | 1 + drivers/net/e1000_spi.c | 1 + drivers/net/fsl-mc/dpio/qbman_portal.c | 1 + drivers/net/fsl-mc/mc.c | 1 + drivers/net/fsl_enetc.c | 1 + drivers/net/ftgmac100.c | 2 ++ drivers/net/higmacv300.c | 1 + drivers/net/mscc_eswitch/jr2_switch.c | 1 + drivers/net/mscc_eswitch/luton_switch.c | 1 + drivers/net/mscc_eswitch/ocelot_switch.c | 1 + drivers/net/mscc_eswitch/serval_switch.c | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 1 + drivers/net/mtk_eth.c | 1 + drivers/net/mvneta.c | 1 + drivers/net/mvpp2.c | 1 + drivers/net/pch_gbe.c | 1 + drivers/net/pfe_eth/pfe_driver.c | 1 + drivers/net/pfe_eth/pfe_eth.c | 1 + drivers/net/pfe_eth/pfe_firmware.c | 1 + drivers/net/pfe_eth/pfe_mdio.c | 1 + drivers/net/phy/fixed.c | 1 + drivers/net/pic32_eth.c | 1 + drivers/net/sandbox-raw-bus.c | 1 + drivers/net/sni_ave.c | 8 +++++--- drivers/net/sun8i_emac.c | 1 + drivers/net/sunxi_emac.c | 1 + drivers/net/ti/am65-cpsw-nuss.c | 2 ++ drivers/net/ti/cpsw-common.c | 1 + drivers/net/ti/cpsw.c | 1 + drivers/net/ti/cpsw_mdio.c | 1 + drivers/net/zynq_gem.c | 1 + 36 files changed, 43 insertions(+), 3 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c index 7100e68bd2..fe3532930a 100644 --- a/drivers/net/bcm6348-eth.c +++ b/drivers/net/bcm6348-eth.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c index 110985ed1d..1200049007 100644 --- a/drivers/net/bcm6368-eth.c +++ b/drivers/net/bcm6368-eth.c @@ -10,11 +10,13 @@ #include #include #include +#include #include #include #include #include #include +#include #define ETH_PORT_STR "brcm,enetsw-port" diff --git a/drivers/net/designware.c b/drivers/net/designware.c index aa33fd511b..baac277a84 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 4632111635..0564bebf76 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c index 66a5f95112..e93561dffa 100644 --- a/drivers/net/dwmac_socfpga.c +++ b/drivers/net/dwmac_socfpga.c @@ -14,6 +14,7 @@ #include #include #include "designware.h" +#include #include #include diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 0946011844..9212920549 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -33,6 +33,7 @@ tested on both gig copper and gig fiber boards #include #include #include +#include #include #include #include "e1000.h" diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c index aecd290d72..52b3c79794 100644 --- a/drivers/net/e1000_spi.c +++ b/drivers/net/e1000_spi.c @@ -1,6 +1,7 @@ #include #include #include "e1000.h" +#include #include /*----------------------------------------------------------------------- diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c index c51354cfa1..e161b4e077 100644 --- a/drivers/net/fsl-mc/dpio/qbman_portal.c +++ b/drivers/net/fsl-mc/dpio/qbman_portal.c @@ -3,6 +3,7 @@ * Copyright (C) 2014 Freescale Semiconductor */ +#include #include #include "qbman_portal.h" diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 8ff43a91c7..07bbcc9b23 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c index f0d15febcc..bee73153d0 100644 --- a/drivers/net/fsl_enetc.c +++ b/drivers/net/fsl_enetc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c index ebb74339b2..40e6b3ba39 100644 --- a/drivers/net/ftgmac100.c +++ b/drivers/net/ftgmac100.c @@ -14,9 +14,11 @@ #include #include #include +#include #include #include #include +#include #include #include diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c index 897741ab82..0c1dd6834a 100644 --- a/drivers/net/higmacv300.c +++ b/drivers/net/higmacv300.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c index 665517775e..33dd002146 100644 --- a/drivers/net/mscc_eswitch/jr2_switch.c +++ b/drivers/net/mscc_eswitch/jr2_switch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c index dffe81d873..9d24c005c1 100644 --- a/drivers/net/mscc_eswitch/luton_switch.c +++ b/drivers/net/mscc_eswitch/luton_switch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c index 0ba84ab78a..fe48f371c3 100644 --- a/drivers/net/mscc_eswitch/ocelot_switch.c +++ b/drivers/net/mscc_eswitch/ocelot_switch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c index 1a21360a96..f05fa42ff3 100644 --- a/drivers/net/mscc_eswitch/serval_switch.c +++ b/drivers/net/mscc_eswitch/serval_switch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c index d20ec49d56..bf95a38354 100644 --- a/drivers/net/mscc_eswitch/servalt_switch.c +++ b/drivers/net/mscc_eswitch/servalt_switch.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c index c22e590387..77589b2a04 100644 --- a/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 505fabd3fa..d737400a20 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 105fdc994a..fcd24868af 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c index e4507bf7fd..b2823701a4 100644 --- a/drivers/net/pch_gbe.c +++ b/drivers/net/pch_gbe.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c index 14a8c68276..f70a235217 100644 --- a/drivers/net/pfe_eth/pfe_driver.c +++ b/drivers/net/pfe_eth/pfe_driver.c @@ -4,6 +4,7 @@ * Copyright 2017 NXP */ +#include #include #include diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c index c525674fb8..1b5d11ef32 100644 --- a/drivers/net/pfe_eth/pfe_eth.c +++ b/drivers/net/pfe_eth/pfe_eth.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c index e4563f192b..13112d9c1a 100644 --- a/drivers/net/pfe_eth/pfe_firmware.c +++ b/drivers/net/pfe_eth/pfe_firmware.c @@ -10,6 +10,7 @@ * files. */ +#include #include #include #ifdef CONFIG_CHAIN_OF_TRUST diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c index 62309670fa..b990e7fbe2 100644 --- a/drivers/net/pfe_eth/pfe_mdio.c +++ b/drivers/net/pfe_eth/pfe_mdio.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 0ae0edd0e1..9d9f746e1d 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c index 3458440b6f..e966be038a 100644 --- a/drivers/net/pic32_eth.c +++ b/drivers/net/pic32_eth.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/sandbox-raw-bus.c b/drivers/net/sandbox-raw-bus.c index 0086f25fc1..fb1ba5a8c8 100644 --- a/drivers/net/sandbox-raw-bus.c +++ b/drivers/net/sandbox-raw-bus.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c index 64e92abb03..5d66a63a8b 100644 --- a/drivers/net/sni_ave.c +++ b/drivers/net/sni_ave.c @@ -8,14 +8,16 @@ #include #include #include -#include -#include -#include +#include #include #include #include #include #include +#include +#include +#include +#include #define AVE_GRST_DELAY_MSEC 40 #define AVE_MIN_XMITSIZE 60 diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 6f10578c88..1ae776b446 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c index 9a5f7fd3c7..a9874e4220 100644 --- a/drivers/net/sunxi_emac.c +++ b/drivers/net/sunxi_emac.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c index 2590486810..2b77213001 100644 --- a/drivers/net/ti/am65-cpsw-nuss.c +++ b/drivers/net/ti/am65-cpsw-nuss.c @@ -7,10 +7,12 @@ */ #include +#include #include #include #include #include +#include #include #include #include diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c index 21b8bbda3d..ca93edb70e 100644 --- a/drivers/net/ti/cpsw-common.c +++ b/drivers/net/ti/cpsw-common.c @@ -10,6 +10,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index 57625623c2..04b01a8129 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c index 6e8f652011..1fa520be0f 100644 --- a/drivers/net/ti/cpsw_mdio.c +++ b/drivers/net/ti/cpsw_mdio.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 3d9d5205a1..288037e2a0 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include -- cgit