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/gpio | |
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/gpio')
-rw-r--r-- | drivers/gpio/74x164_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/adi_gpio2.c | 1 | ||||
-rw-r--r-- | drivers/gpio/at91_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/atmel_pio4.c | 1 | ||||
-rw-r--r-- | drivers/gpio/da8xx_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/dwapb_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/gpio-rcar.c | 2 | ||||
-rw-r--r-- | drivers/gpio/kona_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mpc83xx_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mscc_sgpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mvgpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mxs_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/pca953x_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/pca9698.c | 1 | ||||
-rw-r--r-- | drivers/gpio/sh_pfc.c | 1 | ||||
-rw-r--r-- | drivers/gpio/spear_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/stm32_gpio.c | 1 |
17 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c index dcb1c1b3699..64717a6780e 100644 --- a/drivers/gpio/74x164_gpio.c +++ b/drivers/gpio/74x164_gpio.c @@ -15,6 +15,7 @@ #include <malloc.h> #include <asm/gpio.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <dt-bindings/gpio/gpio.h> #include <spi.h> diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c index 1012f2d8eb8..9d293b6994d 100644 --- a/drivers/gpio/adi_gpio2.c +++ b/drivers/gpio/adi_gpio2.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/gpio.h> diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 5ea3e77b2d1..3621cf24088 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -11,6 +11,7 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <malloc.h> #include <asm/io.h> #include <linux/sizes.h> #include <asm/gpio.h> diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index 8e6f32de1f3..a3f5e7a2e0a 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -9,6 +9,7 @@ #include <clk.h> #include <dm.h> #include <fdtdec.h> +#include <malloc.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> #include <mach/gpio.h> diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c index ac88f0ca8d8..0d0e9d22549 100644 --- a/drivers/gpio/da8xx_gpio.c +++ b/drivers/gpio/da8xx_gpio.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> #include <fdtdec.h> +#include <malloc.h> #include <asm/io.h> #include <asm/gpio.h> #include <dt-bindings/gpio/gpio.h> diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 58e3e7b1f70..e3439eebb5b 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -12,6 +12,7 @@ #include <asm/io.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <dm/lists.h> #include <dm/root.h> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index a8c5b7f879d..9dc4cd60422 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -6,6 +6,8 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <malloc.h> +#include <dm/device_compat.h> #include <dm/pinctrl.h> #include <errno.h> #include <asm/gpio.h> diff --git a/drivers/gpio/kona_gpio.c b/drivers/gpio/kona_gpio.c index 912a4cac59b..29791882a34 100644 --- a/drivers/gpio/kona_gpio.c +++ b/drivers/gpio/kona_gpio.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <asm/arch/sysmap.h> diff --git a/drivers/gpio/mpc83xx_gpio.c b/drivers/gpio/mpc83xx_gpio.c index dcd78e7e88e..276a3b350dc 100644 --- a/drivers/gpio/mpc83xx_gpio.c +++ b/drivers/gpio/mpc83xx_gpio.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <malloc.h> #include <mpc83xx.h> #include <asm/gpio.h> #include <asm/io.h> diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c index 3378ebb442e..c65ca817281 100644 --- a/drivers/gpio/mscc_sgpio.c +++ b/drivers/gpio/mscc_sgpio.c @@ -13,6 +13,7 @@ #include <asm/io.h> #include <errno.h> #include <clk.h> +#include <dm/device_compat.h> #include <linux/err.h> #define MSCC_SGPIOS_PER_BANK 32 diff --git a/drivers/gpio/mvgpio.c b/drivers/gpio/mvgpio.c index ea2f689d60e..12e7197daf7 100644 --- a/drivers/gpio/mvgpio.c +++ b/drivers/gpio/mvgpio.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <linux/errno.h> #include "mvgpio.h" diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index 77778e9ce57..405e9ac135b 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/iomux.h> diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index 5c2944067bc..d06b834a3bc 100644 --- a/drivers/gpio/pca953x_gpio.c +++ b/drivers/gpio/pca953x_gpio.c @@ -26,6 +26,7 @@ #include <malloc.h> #include <asm/gpio.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <dt-bindings/gpio/gpio.h> #define PCA953X_INPUT 0 diff --git a/drivers/gpio/pca9698.c b/drivers/gpio/pca9698.c index ab0c4c1b971..11274c78101 100644 --- a/drivers/gpio/pca9698.c +++ b/drivers/gpio/pca9698.c @@ -10,6 +10,7 @@ #include <common.h> #include <i2c.h> +#include <malloc.h> #include <linux/errno.h> #include <pca9698.h> diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c index ad8da9ef284..6320a6280d5 100644 --- a/drivers/gpio/sh_pfc.c +++ b/drivers/gpio/sh_pfc.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/bitops.h> #include <asm/io.h> #include <sh_pfc.h> diff --git a/drivers/gpio/spear_gpio.c b/drivers/gpio/spear_gpio.c index 525aa3b9ac5..4e4cd125457 100644 --- a/drivers/gpio/spear_gpio.c +++ b/drivers/gpio/spear_gpio.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> #include <asm/io.h> diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c index 302a4349477..f55f834e7d6 100644 --- a/drivers/gpio/stm32_gpio.c +++ b/drivers/gpio/stm32_gpio.c @@ -12,6 +12,7 @@ #include <asm/arch/stm32.h> #include <asm/gpio.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <linux/io.h> |