summaryrefslogtreecommitdiff
path: root/board/technexion
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-06-26 09:13:33 +0300
committerTom Rini <trini@konsulko.com>2020-07-17 16:30:13 +0300
commitb75d8dc5642b71eb029e7cd38031a32029e736cc (patch)
treee13a2c309a27c528a79f7c49b468c0c2d246a499 /board/technexion
parent02ff91e8c60f1f48bee8f4bd1c87ea0892cc5dae (diff)
downloadu-boot-b75d8dc5642b71eb029e7cd38031a32029e736cc.tar.xz
treewide: convert bd_t to struct bd_info by coccinelle
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'board/technexion')
-rw-r--r--board/technexion/pico-imx6/pico-imx6.c2
-rw-r--r--board/technexion/pico-imx6/spl.c2
-rw-r--r--board/technexion/pico-imx6ul/pico-imx6ul.c2
-rw-r--r--board/technexion/pico-imx6ul/spl.c2
-rw-r--r--board/technexion/pico-imx7d/spl.c2
-rw-r--r--board/technexion/pico-imx8mq/spl.c2
-rw-r--r--board/technexion/tao3530/tao3530.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index b5a02eb832..da82244b39 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -303,7 +303,7 @@ int board_early_init_f(void)
return 0;
}
-int board_eth_init(bd_t *bis)
+int board_eth_init(struct bd_info *bis)
{
setup_iomux_enet();
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index f9ae09607f..3b36bb8df1 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -297,7 +297,7 @@ int board_mmc_getcd(struct mmc *mmc)
return 1;
}
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
{
SETUP_IOMUX_PADS(usdhc3_pads);
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 1d24096df5..5d6be26faa 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -69,7 +69,7 @@ static void setup_iomux_fec(void)
imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
}
-int board_eth_init(bd_t *bis)
+int board_eth_init(struct bd_info *bis)
{
setup_iomux_fec();
diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c
index 41b053ab1c..3807779544 100644
--- a/board/technexion/pico-imx6ul/spl.c
+++ b/board/technexion/pico-imx6ul/spl.c
@@ -177,7 +177,7 @@ int board_mmc_getcd(struct mmc *mmc)
return 1;
}
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
{
imx_iomux_v3_setup_multiple_pads(usdhc1_pads, ARRAY_SIZE(usdhc1_pads));
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c
index a651a00c1a..bed0f21f44 100644
--- a/board/technexion/pico-imx7d/spl.c
+++ b/board/technexion/pico-imx7d/spl.c
@@ -158,7 +158,7 @@ int board_mmc_getcd(struct mmc *mmc)
return 1;
}
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
{
imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
diff --git a/board/technexion/pico-imx8mq/spl.c b/board/technexion/pico-imx8mq/spl.c
index 1677e033c7..b181f797a7 100644
--- a/board/technexion/pico-imx8mq/spl.c
+++ b/board/technexion/pico-imx8mq/spl.c
@@ -146,7 +146,7 @@ static struct fsl_esdhc_cfg usdhc_cfg[2] = {
{USDHC2_BASE_ADDR, 0, 4},
};
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
{
int ret;
/*
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index 8ce3637731..84db131de2 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -182,7 +182,7 @@ void set_muxconf_regs(void)
}
#if defined(CONFIG_MMC)
-int board_mmc_init(bd_t *bis)
+int board_mmc_init(struct bd_info *bis)
{
omap_mmc_init(0, 0, 0, -1, -1);