All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/9] Fix up inclusion of common.h
Date: Mon,  1 May 2017 09:18:48 -0600	[thread overview]
Message-ID: <20170501151852.26670-6-sjg@chromium.org> (raw)
In-Reply-To: <20170501151852.26670-1-sjg@chromium.org>

It is good practice to include common.h as the first header. This ensures
that required features like the DECLARE_GLOBAL_DATA_PTR macro,
configuration options and common types are available.

Fix up some files which currently don't do this. This is necessary because
driver model will soon start using global data and configuration in the
dm/ofnode.h header file, included via dm.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/mach-uniphier/pinctrl-glue.c            | 1 +
 drivers/firmware/firmware-uclass.c               | 1 +
 drivers/gpio/lpc32xx_gpio.c                      | 1 +
 drivers/mmc/pic32_sdhci.c                        | 2 +-
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c       | 1 +
 drivers/pinctrl/nxp/pinctrl-imx5.c               | 1 +
 drivers/pinctrl/nxp/pinctrl-imx6.c               | 1 +
 drivers/pinctrl/nxp/pinctrl-imx7.c               | 1 +
 drivers/pinctrl/nxp/pinctrl-imx7ulp.c            | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c  | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-sld3.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 1 +
 drivers/serial/serial_uniphier.c                 | 1 +
 drivers/spi/fsl_dspi.c                           | 2 ++
 drivers/sysreset/sysreset_psci.c                 | 1 +
 drivers/video/exynos/exynos_dp.c                 | 2 +-
 23 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-uniphier/pinctrl-glue.c b/arch/arm/mach-uniphier/pinctrl-glue.c
index 725569f90c..3a9ec9c7bc 100644
--- a/arch/arm/mach-uniphier/pinctrl-glue.c
+++ b/arch/arm/mach-uniphier/pinctrl-glue.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <linux/errno.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
diff --git a/drivers/firmware/firmware-uclass.c b/drivers/firmware/firmware-uclass.c
index 6c96656dd0..af781b5b69 100644
--- a/drivers/firmware/firmware-uclass.c
+++ b/drivers/firmware/firmware-uclass.c
@@ -2,6 +2,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 
 /* Firmware access is platform-dependent.  No generic code in uclass */
diff --git a/drivers/gpio/lpc32xx_gpio.c b/drivers/gpio/lpc32xx_gpio.c
index 1bf945acfc..292fc74fc3 100644
--- a/drivers/gpio/lpc32xx_gpio.c
+++ b/drivers/gpio/lpc32xx_gpio.c
@@ -7,6 +7,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <asm/io.h>
 #include <asm/arch-lpc32xx/cpu.h>
 #include <asm/arch-lpc32xx/gpio.h>
diff --git a/drivers/mmc/pic32_sdhci.c b/drivers/mmc/pic32_sdhci.c
index 9d8a392ed9..212e22ee02 100644
--- a/drivers/mmc/pic32_sdhci.c
+++ b/drivers/mmc/pic32_sdhci.c
@@ -7,8 +7,8 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#include <dm.h>
 #include <common.h>
+#include <dm.h>
 #include <sdhci.h>
 #include <linux/errno.h>
 #include <mach/pic32.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index 0dc2438ebe..2fa840c21a 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -7,6 +7,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-imx5.c b/drivers/pinctrl/nxp/pinctrl-imx5.c
index 5f3f94e750..f1c655f4cb 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx5.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx5.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx6.c b/drivers/pinctrl/nxp/pinctrl-imx6.c
index 3842205420..0f767d9079 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx6.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx6.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx7.c b/drivers/pinctrl/nxp/pinctrl-imx7.c
index 439c04e0cc..1f3e4231bc 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx7.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx7.c
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/nxp/pinctrl-imx7ulp.c b/drivers/pinctrl/nxp/pinctrl-imx7ulp.c
index 1f81a66df4..4a893e5a65 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx7ulp.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx7ulp.c
@@ -6,6 +6,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
index cc76fef0a1..9c2db1afc8 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
index 83d960f5e9..0b0af1c018 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
index 84ee10387d..709b005298 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
index 15fab6a1b0..6ade131385 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
index cf1fc5aa32..df5f2d86fa 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
index 788cfab47a..7b14662a71 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
index 8869fe4ed9..90d632903c 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
index 5bff86b31a..86752d91ff 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld3.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld3.c
index 6127fd2111..e9cc9d205d 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld3.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld3.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
index 5ed49f0070..897ce15131 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
 
diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c
index 0762bd9052..68895bde8e 100644
--- a/drivers/serial/serial_uniphier.c
+++ b/drivers/serial/serial_uniphier.c
@@ -6,6 +6,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <linux/io.h>
 #include <linux/serial_reg.h>
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index 38caf69eb4..42086197d9 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -9,6 +9,8 @@
  *
  * SPDX-License-Identifier:	GPL-2.0+
  */
+
+#include <common.h>
 #include <dm.h>
 #include <errno.h>
 #include <common.h>
diff --git a/drivers/sysreset/sysreset_psci.c b/drivers/sysreset/sysreset_psci.c
index b39051c220..4656d273c1 100644
--- a/drivers/sysreset/sysreset_psci.c
+++ b/drivers/sysreset/sysreset_psci.c
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <common.h>
 #include <dm.h>
 #include <sysreset.h>
 #include <linux/errno.h>
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 0ee0d0a7fb..092342e7ad 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#include <config.h>
+#include <common.h>
 #include <dm.h>
 #include <common.h>
 #include <display.h>
-- 
2.13.0.rc0.306.g87b477812d-goog

  parent reply	other threads:[~2017-05-01 15:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 15:18 [U-Boot] [PATCH v2 0/9] dm: Prepare for supporting a live device tree Simon Glass
2017-05-01 15:18 ` [U-Boot] [PATCH v2 1/9] dm: Use dm.h header when driver mode is used Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-11  2:12     ` Masahiro Yamada
2017-05-13  1:11       ` Simon Glass
2017-05-16  9:56         ` Masahiro Yamada
2017-05-17 10:07           ` Simon Glass
2017-05-01 15:18 ` [U-Boot] [PATCH v2 2/9] dm: core: Move dev_get_addr() etc. into a separate file Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-16 10:04   ` Masahiro Yamada
2017-05-17 10:09     ` Simon Glass
2017-05-01 15:18 ` [U-Boot] [PATCH v2 3/9] dm: Rename dev_addr..() functions Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 4/9] atmel: Fix up use of dm_scan_fdt_node() Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` Simon Glass [this message]
2017-05-10 21:43   ` [U-Boot] [PATCH v2 5/9] Fix up inclusion of common.h Tom Rini
2017-05-11  2:21     ` Masahiro Yamada
2017-05-13  1:11       ` Simon Glass
2017-05-16 10:32         ` Masahiro Yamada
2017-05-17 10:09           ` Simon Glass
2017-05-20 16:50             ` Masahiro Yamada
2017-05-01 15:18 ` [U-Boot] [PATCH v2 6/9] dm: core: Dont export dm_scan_fdt_node() Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 7/9] dm: core: Replace of_offset with accessor (part 2) Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-01 15:18 ` [U-Boot] [PATCH v2 8/9] dm: core: Add ofnode to represent device tree nodes Simon Glass
2017-05-10 21:43   ` Tom Rini
2017-05-11  2:33   ` Masahiro Yamada
2017-05-13  1:11     ` Simon Glass
2017-05-16 10:35   ` Masahiro Yamada
2017-05-20  2:29     ` Simon Glass
2017-05-20 16:17       ` Masahiro Yamada
2017-05-01 15:18 ` [U-Boot] [PATCH v2 9/9] dm: core: Adjust device_bind_common() to take an ofnode Simon Glass
2017-05-10 21:43   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170501151852.26670-6-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.